@atlaskit/smart-card 26.13.1 → 26.14.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 +12 -0
- package/dist/cjs/constants.js +5 -0
- package/dist/cjs/extractors/flexible/index.js +5 -0
- package/dist/cjs/extractors/flexible/utils.js +23 -2
- package/dist/cjs/extractors/hover/extractMetadata.js +2 -1
- package/dist/cjs/messages.js +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +21 -37
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +15 -0
- package/dist/cjs/view/BlockCard/views/flexible/utils.js +116 -0
- package/dist/cjs/view/EmbedModal/utils.js +30 -56
- package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +33 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +20 -0
- package/dist/cjs/view/FlexibleCard/components/utils.js +37 -2
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +28 -12
- package/dist/cjs/view/HoverCard/utils.js +102 -3
- package/dist/es2019/constants.js +6 -0
- package/dist/es2019/extractors/flexible/index.js +7 -2
- package/dist/es2019/extractors/flexible/utils.js +18 -1
- package/dist/es2019/extractors/hover/extractMetadata.js +1 -1
- package/dist/es2019/messages.js +10 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +24 -38
- package/dist/es2019/view/BlockCard/views/flexible/styled.js +14 -0
- package/dist/es2019/view/BlockCard/views/flexible/utils.js +108 -0
- package/dist/es2019/view/EmbedModal/utils.js +14 -46
- package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +24 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +25 -0
- package/dist/es2019/view/FlexibleCard/components/utils.js +35 -0
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +30 -14
- package/dist/es2019/view/HoverCard/utils.js +100 -1
- package/dist/esm/constants.js +6 -0
- package/dist/esm/extractors/flexible/index.js +7 -2
- package/dist/esm/extractors/flexible/utils.js +18 -1
- package/dist/esm/extractors/hover/extractMetadata.js +1 -1
- package/dist/esm/messages.js +10 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +23 -38
- package/dist/esm/view/BlockCard/views/flexible/styled.js +7 -0
- package/dist/esm/view/BlockCard/views/flexible/utils.js +108 -0
- package/dist/esm/view/EmbedModal/utils.js +29 -53
- package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/index.js +24 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +20 -0
- package/dist/esm/view/FlexibleCard/components/utils.js +34 -0
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +30 -14
- package/dist/esm/view/HoverCard/utils.js +98 -1
- package/dist/types/constants.d.ts +5 -0
- package/dist/types/extractors/flexible/utils.d.ts +5 -0
- package/dist/types/extractors/hover/extractMetadata.d.ts +2 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +25 -0
- package/dist/types/view/BlockCard/views/flexible/styled.d.ts +2 -0
- package/dist/types/view/BlockCard/views/flexible/utils.d.ts +10 -0
- package/dist/types/view/EmbedModal/utils.d.ts +2 -10
- package/dist/types/view/FlexibleCard/components/actions/action/preview-action/types.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +35 -2
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +24 -0
- package/dist/types/view/FlexibleCard/components/utils.d.ts +64 -0
- package/dist/types/view/HoverCard/utils.d.ts +1 -0
- package/dist/types-ts4.5/constants.d.ts +5 -0
- package/dist/types-ts4.5/extractors/flexible/utils.d.ts +5 -0
- package/dist/types-ts4.5/extractors/hover/extractMetadata.d.ts +2 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +25 -0
- package/dist/types-ts4.5/view/BlockCard/views/flexible/styled.d.ts +2 -0
- package/dist/types-ts4.5/view/BlockCard/views/flexible/utils.d.ts +10 -0
- package/dist/types-ts4.5/view/EmbedModal/utils.d.ts +2 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/preview-action/types.d.ts +0 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +35 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +24 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +64 -0
- package/dist/types-ts4.5/view/HoverCard/utils.d.ts +1 -0
- package/package.json +4 -1
- package/report.api.md +40 -0
- package/tmp/api-report-tmp.d.ts +36 -1
|
@@ -27,7 +27,7 @@ export const getSimulatedMetadata = (extensionKey = '', data) => {
|
|
|
27
27
|
return {
|
|
28
28
|
metadata: {
|
|
29
29
|
primary: [ElementName.AuthorGroup, primaryAttribution],
|
|
30
|
-
secondary: [ElementName.CommentCount, ElementName.
|
|
30
|
+
secondary: [ElementName.ReactCount, ElementName.CommentCount, ElementName.ViewCount],
|
|
31
31
|
subtitle: []
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -73,4 +73,103 @@ export const getSimulatedMetadata = (extensionKey = '', data) => {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
+
};
|
|
77
|
+
export const getSimulatedBetterMetadata = (extensionKey = '', data) => {
|
|
78
|
+
const types = data ? extractType(data) : undefined;
|
|
79
|
+
const defaultMetadata = {
|
|
80
|
+
topMetadataBlock: {
|
|
81
|
+
primary: [ElementName.ModifiedOn, ElementName.CreatedBy],
|
|
82
|
+
secondary: [],
|
|
83
|
+
subtitle: []
|
|
84
|
+
},
|
|
85
|
+
bottomMetadataBlock: {
|
|
86
|
+
primary: [],
|
|
87
|
+
secondary: [],
|
|
88
|
+
subtitle: []
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
switch (extensionKey) {
|
|
92
|
+
case 'bitbucket-object-provider':
|
|
93
|
+
case 'native-bitbucket-object-provider':
|
|
94
|
+
if (types !== null && types !== void 0 && types.includes('atlassian:SourceCodePullRequest')) {
|
|
95
|
+
return {
|
|
96
|
+
...defaultMetadata,
|
|
97
|
+
topMetadataBlock: {
|
|
98
|
+
primary: [ElementName.AuthorGroup, ElementName.ModifiedOn, ElementName.SubscriberCount, ElementName.State],
|
|
99
|
+
secondary: [],
|
|
100
|
+
subtitle: [ElementName.SourceBranch, ElementName.TargetBranch]
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
...defaultMetadata,
|
|
106
|
+
topMetadataBlock: {
|
|
107
|
+
primary: [ElementName.ModifiedOn, ElementName.CreatedBy],
|
|
108
|
+
secondary: [],
|
|
109
|
+
subtitle: []
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
case 'confluence-object-provider':
|
|
113
|
+
const primaryAttribution = data && extractOwnedBy(data) ? ElementName.OwnedByGroup : ElementName.AuthorGroup;
|
|
114
|
+
return {
|
|
115
|
+
topMetadataBlock: {
|
|
116
|
+
primary: [primaryAttribution, ElementName.ModifiedOn],
|
|
117
|
+
secondary: [],
|
|
118
|
+
subtitle: []
|
|
119
|
+
},
|
|
120
|
+
bottomMetadataBlock: {
|
|
121
|
+
primary: [ElementName.CommentCount, ElementName.ReactCount, ElementName.ViewCount],
|
|
122
|
+
secondary: [],
|
|
123
|
+
subtitle: []
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
case 'jira-object-provider':
|
|
127
|
+
return {
|
|
128
|
+
...defaultMetadata,
|
|
129
|
+
topMetadataBlock: {
|
|
130
|
+
primary: [ElementName.AssignedToGroup, ElementName.State, ElementName.Priority],
|
|
131
|
+
secondary: [],
|
|
132
|
+
subtitle: []
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
case 'trello-object-provider':
|
|
136
|
+
return {
|
|
137
|
+
...defaultMetadata,
|
|
138
|
+
topMetadataBlock: {
|
|
139
|
+
primary: [ElementName.AuthorGroup, ElementName.State, ElementName.DueOn],
|
|
140
|
+
secondary: [ElementName.ReactCount, ElementName.CommentCount, ElementName.AttachmentCount, ElementName.ChecklistProgress],
|
|
141
|
+
subtitle: [ElementName.Location]
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
case 'watermelon-object-provider':
|
|
145
|
+
if (types !== null && types !== void 0 && types.includes('atlassian:Project')) {
|
|
146
|
+
return {
|
|
147
|
+
...defaultMetadata,
|
|
148
|
+
topMetadataBlock: {
|
|
149
|
+
primary: [ElementName.AuthorGroup, ElementName.ModifiedOn, ElementName.State, ElementName.DueOn],
|
|
150
|
+
secondary: [],
|
|
151
|
+
subtitle: []
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
...defaultMetadata,
|
|
157
|
+
topMetadataBlock: {
|
|
158
|
+
primary: [ElementName.AuthorGroup, ElementName.State, ElementName.DueOn],
|
|
159
|
+
secondary: [],
|
|
160
|
+
subtitle: []
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
case 'google-object-provider':
|
|
164
|
+
return {
|
|
165
|
+
...defaultMetadata,
|
|
166
|
+
topMetadataBlock: {
|
|
167
|
+
primary: [ElementName.AuthorGroup, ElementName.ModifiedOn],
|
|
168
|
+
secondary: [],
|
|
169
|
+
subtitle: []
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
default:
|
|
173
|
+
return defaultMetadata;
|
|
174
|
+
}
|
|
76
175
|
};
|
package/dist/esm/constants.js
CHANGED
|
@@ -100,6 +100,8 @@ export var SmartLinkWidth = /*#__PURE__*/function (SmartLinkWidth) {
|
|
|
100
100
|
* (src/view/FlexibleCard/components/blocks/utils.tsx)
|
|
101
101
|
*/
|
|
102
102
|
export var ElementName = /*#__PURE__*/function (ElementName) {
|
|
103
|
+
ElementName["AssignedTo"] = "AssignedTo";
|
|
104
|
+
ElementName["AssignedToGroup"] = "AssignedToGroup";
|
|
103
105
|
ElementName["AttachmentCount"] = "AttachmentCount";
|
|
104
106
|
ElementName["AuthorGroup"] = "AuthorGroup";
|
|
105
107
|
ElementName["ChecklistProgress"] = "ChecklistProgress";
|
|
@@ -114,15 +116,18 @@ export var ElementName = /*#__PURE__*/function (ElementName) {
|
|
|
114
116
|
ElementName["ModifiedBy"] = "ModifiedBy";
|
|
115
117
|
ElementName["ModifiedOn"] = "ModifiedOn";
|
|
116
118
|
ElementName["OwnedBy"] = "OwnedBy";
|
|
119
|
+
ElementName["OwnedByGroup"] = "OwnedByGroup";
|
|
117
120
|
ElementName["Preview"] = "Preview";
|
|
118
121
|
ElementName["Priority"] = "Priority";
|
|
119
122
|
ElementName["ProgrammingLanguage"] = "ProgrammingLanguage";
|
|
120
123
|
ElementName["Provider"] = "Provider";
|
|
121
124
|
ElementName["ReactCount"] = "ReactCount";
|
|
125
|
+
ElementName["ReadTime"] = "ReadTime";
|
|
122
126
|
ElementName["Snippet"] = "Snippet";
|
|
123
127
|
ElementName["SourceBranch"] = "SourceBranch";
|
|
124
128
|
ElementName["State"] = "State";
|
|
125
129
|
ElementName["SubscriberCount"] = "SubscriberCount";
|
|
130
|
+
ElementName["SubTasksProgress"] = "SubTasksProgress";
|
|
126
131
|
ElementName["TargetBranch"] = "TargetBranch";
|
|
127
132
|
ElementName["Title"] = "Title";
|
|
128
133
|
ElementName["ViewCount"] = "ViewCount";
|
|
@@ -146,6 +151,7 @@ export var ActionName = /*#__PURE__*/function (ActionName) {
|
|
|
146
151
|
/**
|
|
147
152
|
* Flexible UI icons - each mapped to AK icons.
|
|
148
153
|
*/
|
|
154
|
+
|
|
149
155
|
export var IconType = /*#__PURE__*/function (IconType) {
|
|
150
156
|
IconType["Archive"] = "FileType:Archive";
|
|
151
157
|
IconType["Audio"] = "FileType:Audio";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { extractSummary } from '../common/primitives';
|
|
2
2
|
import { extractLinkIcon } from './icon';
|
|
3
|
-
import { extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractModifiedBy, extractProgrammingLanguage, extractSubscriberCount, extractViewCount, extractReactCount, extractVoteCount, extractSourceBranch, extractTargetBranch, extractDueOn, extractLocation, extractOwnedBy } from './utils';
|
|
3
|
+
import { extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractModifiedBy, extractProgrammingLanguage, extractSubscriberCount, extractViewCount, extractReactCount, extractVoteCount, extractSourceBranch, extractTargetBranch, extractDueOn, extractLocation, extractOwnedBy, extractAssignedTo, extractSubTasksProgress, extractReadTime, extractPersonAssignedToAsArray } from './utils';
|
|
4
4
|
import { extractPersonsUpdatedBy } from './collaboratorGroup';
|
|
5
|
-
import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink } from '@atlaskit/link-extractors';
|
|
5
|
+
import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink, extractPersonOwnedBy } from '@atlaskit/link-extractors';
|
|
6
6
|
import extractPriority from './extract-priority';
|
|
7
7
|
import extractProviderIcon from './icon/extract-provider-icon';
|
|
8
8
|
import extractPreview from './extract-preview';
|
|
@@ -25,8 +25,10 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
25
25
|
var url = extractLink(data);
|
|
26
26
|
var showLozengeAction = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.useLozengeAction) === 'experiment';
|
|
27
27
|
return {
|
|
28
|
+
assignedToGroup: extractPersonAssignedToAsArray(data),
|
|
28
29
|
attachmentCount: extractAttachmentCount(data),
|
|
29
30
|
authorGroup: extractPersonCreatedBy(data),
|
|
31
|
+
ownedByGroup: extractPersonOwnedBy(data),
|
|
30
32
|
collaboratorGroup: extractPersonsUpdatedBy(data),
|
|
31
33
|
commentCount: extractCommentCount(data),
|
|
32
34
|
viewCount: extractViewCount(data),
|
|
@@ -35,6 +37,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
35
37
|
checklistProgress: extractChecklistProgress(data),
|
|
36
38
|
createdBy: extractCreatedBy(data),
|
|
37
39
|
ownedBy: extractOwnedBy(data),
|
|
40
|
+
assignedTo: extractAssignedTo(data),
|
|
38
41
|
createdOn: extractDateCreated(data),
|
|
39
42
|
dueOn: extractDueOn(data),
|
|
40
43
|
previewAction: extractPreviewAction(response),
|
|
@@ -49,11 +52,13 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
49
52
|
priority: extractPriority(data),
|
|
50
53
|
provider: extractProviderIcon(data),
|
|
51
54
|
programmingLanguage: extractProgrammingLanguage(data),
|
|
55
|
+
readTime: extractReadTime(data),
|
|
52
56
|
snippet: extractSummary(data) || undefined,
|
|
53
57
|
// Explicitly set here to remove an empty string
|
|
54
58
|
sourceBranch: extractSourceBranch(data),
|
|
55
59
|
state: extractState(response, showServerActions || showLozengeAction, id),
|
|
56
60
|
subscriberCount: extractSubscriberCount(data),
|
|
61
|
+
subTasksProgress: extractSubTasksProgress(data),
|
|
57
62
|
targetBranch: extractTargetBranch(data),
|
|
58
63
|
title: extractTitle(data) || url,
|
|
59
64
|
url: url
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import { extractPersonOwnedBy, extractPersonCreatedBy, extractPersonUpdatedBy } from '@atlaskit/link-extractors';
|
|
2
|
+
import { extractPersonOwnedBy, extractPersonCreatedBy, extractPersonUpdatedBy, extractPersonAssignedTo } from '@atlaskit/link-extractors';
|
|
3
3
|
var extractLinkName = function extractLinkName(link) {
|
|
4
4
|
if (link && _typeof(link) === 'object' && link['@type'] === 'Link') {
|
|
5
5
|
return link.name;
|
|
@@ -29,6 +29,16 @@ export var extractOwnedBy = function extractOwnedBy(data) {
|
|
|
29
29
|
return persons[0].name;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
export var extractAssignedTo = function extractAssignedTo(data) {
|
|
33
|
+
var person = extractPersonAssignedTo(data);
|
|
34
|
+
if (person) {
|
|
35
|
+
return person.name;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export var extractPersonAssignedToAsArray = function extractPersonAssignedToAsArray(data) {
|
|
39
|
+
var person = extractPersonAssignedTo(data);
|
|
40
|
+
return person ? [person] : undefined;
|
|
41
|
+
};
|
|
32
42
|
export var extractCreatedBy = function extractCreatedBy(data) {
|
|
33
43
|
var persons = extractPersonCreatedBy(data);
|
|
34
44
|
if (persons && persons.length) {
|
|
@@ -70,4 +80,11 @@ export var extractLocation = function extractLocation(data) {
|
|
|
70
80
|
url: url
|
|
71
81
|
};
|
|
72
82
|
}
|
|
83
|
+
};
|
|
84
|
+
export var extractSubTasksProgress = function extractSubTasksProgress(data) {
|
|
85
|
+
var subTasksObject = extractValue(data, 'atlassian:subTasks');
|
|
86
|
+
return subTasksObject && subTasksObject.totalCount ? "".concat(subTasksObject.resolvedCount, "/").concat(subTasksObject.totalCount) : undefined;
|
|
87
|
+
};
|
|
88
|
+
export var extractReadTime = function extractReadTime(data) {
|
|
89
|
+
return extractValue(data, 'atlassian:readTimeInMinutes');
|
|
73
90
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementName } from '../../constants';
|
|
2
|
-
var elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
2
|
+
export var elementNamesToItems = function elementNamesToItems(elementNames) {
|
|
3
3
|
return elementNames.filter(function (element) {
|
|
4
4
|
return element in ElementName;
|
|
5
5
|
}).map(function (elementName) {
|
package/dist/esm/messages.js
CHANGED
|
@@ -10,6 +10,11 @@ export var messages = defineMessages({
|
|
|
10
10
|
defaultMessage: 'Add account',
|
|
11
11
|
description: 'Allows to add a new account'
|
|
12
12
|
},
|
|
13
|
+
assigned_to: {
|
|
14
|
+
id: 'fabric.linking.assigned_to',
|
|
15
|
+
defaultMessage: 'Assigned to {context}',
|
|
16
|
+
description: 'Indicates the person or entity that the resource is assigned to.'
|
|
17
|
+
},
|
|
13
18
|
cancel: {
|
|
14
19
|
id: 'fabric.linking.cancel',
|
|
15
20
|
defaultMessage: 'Cancel',
|
|
@@ -306,6 +311,11 @@ export var messages = defineMessages({
|
|
|
306
311
|
defaultMessage: 'Your access request is pending',
|
|
307
312
|
description: 'Shown when a user has requested an access but status is pending.'
|
|
308
313
|
},
|
|
314
|
+
read_time: {
|
|
315
|
+
id: 'fabric.linking.read_time',
|
|
316
|
+
defaultMessage: '{context} min read',
|
|
317
|
+
description: 'Estimated time to read this resource'
|
|
318
|
+
},
|
|
309
319
|
restricted_link: {
|
|
310
320
|
id: 'fabric.linking.restricted_link',
|
|
311
321
|
defaultMessage: 'Restricted link, try another account',
|
package/dist/esm/version.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import React, { useEffect, useState } from 'react';
|
|
3
4
|
import FlexibleCard from '../../../FlexibleCard';
|
|
4
5
|
import TitleBlock from '../../../FlexibleCard/components/blocks/title-block';
|
|
5
6
|
import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock } from '../../../FlexibleCard/components/blocks';
|
|
6
|
-
import {
|
|
7
|
+
import { metadataBlockCss, titleBlockCss } from './styled';
|
|
8
|
+
import { ActionName, CardDisplay, ElementName, MediaPlacement, SmartLinkPosition, SmartLinkSize } from '../../../../constants';
|
|
7
9
|
import uuid from 'uuid';
|
|
8
|
-
import {
|
|
10
|
+
import { getSimulatedMetadata, getSimulatedBetterMetadata } from './utils';
|
|
11
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
|
|
9
13
|
/**
|
|
10
14
|
* This view represents a Block card that has an 'Resolved' status.
|
|
11
15
|
* @see SmartLinkStatus
|
|
12
16
|
* @see FlexibleCardProps
|
|
13
17
|
*/
|
|
14
18
|
var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
15
|
-
var _cardState$details, _cardState$details2;
|
|
16
19
|
var id = _ref.id,
|
|
17
20
|
cardState = _ref.cardState,
|
|
18
21
|
onClick = _ref.onClick,
|
|
@@ -37,30 +40,10 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
37
40
|
}),
|
|
38
41
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
39
42
|
analyticsId = _useState4[0];
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, {
|
|
45
|
-
name: ElementName.CommentCount
|
|
46
|
-
}, {
|
|
47
|
-
name: ElementName.ReactCount
|
|
48
|
-
}, {
|
|
49
|
-
name: ElementName.SubscriberCount
|
|
50
|
-
}, {
|
|
51
|
-
name: ElementName.ViewCount
|
|
52
|
-
}, {
|
|
53
|
-
name: ElementName.VoteCount
|
|
54
|
-
}, {
|
|
55
|
-
name: ElementName.ChecklistProgress
|
|
56
|
-
}, {
|
|
57
|
-
name: ElementName.DueOn
|
|
58
|
-
}];
|
|
59
|
-
var metadata = cardState !== null && cardState !== void 0 && (_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && _cardState$details.data && extractOwnedBy(cardState === null || cardState === void 0 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data) ? [{
|
|
60
|
-
name: ElementName.OwnedBy
|
|
61
|
-
}].concat(baseMetadata) : [{
|
|
62
|
-
name: ElementName.ModifiedBy
|
|
63
|
-
}].concat(baseMetadata);
|
|
43
|
+
var _ref2 = getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') ? getSimulatedBetterMetadata(cardState.details) : getSimulatedMetadata(cardState.details),
|
|
44
|
+
titleMetadata = _ref2.titleMetadata,
|
|
45
|
+
topMetadata = _ref2.topMetadata,
|
|
46
|
+
bottomMetadata = _ref2.bottomMetadata;
|
|
64
47
|
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
65
48
|
analytics: analytics,
|
|
66
49
|
appearance: "block",
|
|
@@ -72,25 +55,27 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
72
55
|
testId: testId,
|
|
73
56
|
ui: ui,
|
|
74
57
|
url: url
|
|
75
|
-
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
58
|
+
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({
|
|
76
59
|
position: SmartLinkPosition.Center,
|
|
77
|
-
metadata:
|
|
78
|
-
name: ElementName.AuthorGroup
|
|
79
|
-
}, {
|
|
80
|
-
name: ElementName.Priority
|
|
81
|
-
}, {
|
|
82
|
-
name: ElementName.State
|
|
83
|
-
}],
|
|
60
|
+
metadata: titleMetadata,
|
|
84
61
|
hideRetry: true,
|
|
85
62
|
subtitle: [{
|
|
86
63
|
name: ElementName.Location
|
|
87
64
|
}],
|
|
88
65
|
metadataPosition: SmartLinkPosition.Top,
|
|
89
66
|
anchorTarget: anchorTarget
|
|
90
|
-
}
|
|
91
|
-
|
|
67
|
+
}, getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && {
|
|
68
|
+
overrideCss: titleBlockCss,
|
|
69
|
+
size: SmartLinkSize.Large
|
|
70
|
+
})), /*#__PURE__*/React.createElement(MetadataBlock, _extends({
|
|
71
|
+
primary: topMetadata,
|
|
72
|
+
maxLines: 1
|
|
73
|
+
}, getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && {
|
|
74
|
+
overrideCss: metadataBlockCss
|
|
75
|
+
})), /*#__PURE__*/React.createElement(SnippetBlock, null), getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
76
|
+
primary: bottomMetadata,
|
|
92
77
|
maxLines: 1
|
|
93
|
-
}),
|
|
78
|
+
}), !isPreviewBlockErrored ? /*#__PURE__*/React.createElement(PreviewBlock, {
|
|
94
79
|
placement: MediaPlacement.Right,
|
|
95
80
|
ignoreContainerPadding: true,
|
|
96
81
|
onError: function onError() {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
|
|
5
|
+
// in editor prosemirror adds padding-left so we need to overwrite it
|
|
6
|
+
export var metadataBlockCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* primary element group */\n [data-smart-element-avatar-group] {\n > ul {\n padding-left: 0px;\n }\n }\n"])));
|
|
7
|
+
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n gap: 0.5em;\n"])));
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ElementName } from '../../../../constants';
|
|
2
|
+
import { extractOwnedBy, extractAssignedTo } from '../../../../extractors/flexible/utils';
|
|
3
|
+
import { getExtensionKey } from '../../../../state/helpers';
|
|
4
|
+
var baseTopMetadata = [{
|
|
5
|
+
name: ElementName.ModifiedOn
|
|
6
|
+
}, {
|
|
7
|
+
name: ElementName.AttachmentCount
|
|
8
|
+
}, {
|
|
9
|
+
name: ElementName.SubscriberCount
|
|
10
|
+
}, {
|
|
11
|
+
name: ElementName.VoteCount
|
|
12
|
+
}, {
|
|
13
|
+
name: ElementName.DueOn
|
|
14
|
+
}, {
|
|
15
|
+
name: ElementName.ReadTime
|
|
16
|
+
}];
|
|
17
|
+
var baseBottomMetaData = [{
|
|
18
|
+
name: ElementName.ReactCount
|
|
19
|
+
}, {
|
|
20
|
+
name: ElementName.CommentCount
|
|
21
|
+
}, {
|
|
22
|
+
name: ElementName.ViewCount
|
|
23
|
+
}, {
|
|
24
|
+
name: ElementName.Priority
|
|
25
|
+
}, {
|
|
26
|
+
name: ElementName.SubTasksProgress
|
|
27
|
+
}, {
|
|
28
|
+
name: ElementName.ChecklistProgress
|
|
29
|
+
}];
|
|
30
|
+
export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(cardDetails) {
|
|
31
|
+
var _getExtensionKey;
|
|
32
|
+
var extensionKey = (_getExtensionKey = getExtensionKey(cardDetails)) !== null && _getExtensionKey !== void 0 ? _getExtensionKey : '';
|
|
33
|
+
var data = cardDetails === null || cardDetails === void 0 ? void 0 : cardDetails.data;
|
|
34
|
+
var defaultTitleMetadata = [{
|
|
35
|
+
name: ElementName.State
|
|
36
|
+
}];
|
|
37
|
+
var defaultTopMetadata = [{
|
|
38
|
+
name: ElementName.AuthorGroup
|
|
39
|
+
}, {
|
|
40
|
+
name: ElementName.CreatedBy
|
|
41
|
+
}].concat(baseTopMetadata);
|
|
42
|
+
var defaultBottomMetadata = baseBottomMetaData;
|
|
43
|
+
switch (extensionKey) {
|
|
44
|
+
case 'confluence-object-provider':
|
|
45
|
+
return {
|
|
46
|
+
titleMetadata: defaultTitleMetadata,
|
|
47
|
+
topMetadata: extractOwnedBy(data) ? [{
|
|
48
|
+
name: ElementName.OwnedByGroup
|
|
49
|
+
}, {
|
|
50
|
+
name: ElementName.OwnedBy
|
|
51
|
+
}].concat(baseTopMetadata) : defaultTopMetadata,
|
|
52
|
+
bottomMetadata: defaultBottomMetadata
|
|
53
|
+
};
|
|
54
|
+
case 'jira-object-provider':
|
|
55
|
+
return {
|
|
56
|
+
titleMetadata: defaultTitleMetadata,
|
|
57
|
+
topMetadata: extractAssignedTo(data) ? [{
|
|
58
|
+
name: ElementName.AssignedToGroup
|
|
59
|
+
}, {
|
|
60
|
+
name: ElementName.AssignedTo
|
|
61
|
+
}].concat(baseTopMetadata) : defaultTopMetadata,
|
|
62
|
+
bottomMetadata: defaultBottomMetadata
|
|
63
|
+
};
|
|
64
|
+
default:
|
|
65
|
+
return {
|
|
66
|
+
titleMetadata: defaultTitleMetadata,
|
|
67
|
+
topMetadata: defaultTopMetadata,
|
|
68
|
+
bottomMetadata: defaultBottomMetadata
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export var getSimulatedMetadata = function getSimulatedMetadata(cardDetails) {
|
|
73
|
+
var baseMetadata = [{
|
|
74
|
+
name: ElementName.ModifiedOn
|
|
75
|
+
}, {
|
|
76
|
+
name: ElementName.AttachmentCount
|
|
77
|
+
}, {
|
|
78
|
+
name: ElementName.CommentCount
|
|
79
|
+
}, {
|
|
80
|
+
name: ElementName.ReactCount
|
|
81
|
+
}, {
|
|
82
|
+
name: ElementName.SubscriberCount
|
|
83
|
+
}, {
|
|
84
|
+
name: ElementName.ViewCount
|
|
85
|
+
}, {
|
|
86
|
+
name: ElementName.VoteCount
|
|
87
|
+
}, {
|
|
88
|
+
name: ElementName.ChecklistProgress
|
|
89
|
+
}, {
|
|
90
|
+
name: ElementName.DueOn
|
|
91
|
+
}];
|
|
92
|
+
var topMetadata = cardDetails !== null && cardDetails !== void 0 && cardDetails.data && extractOwnedBy(cardDetails === null || cardDetails === void 0 ? void 0 : cardDetails.data) ? [{
|
|
93
|
+
name: ElementName.OwnedBy
|
|
94
|
+
}].concat(baseMetadata) : [{
|
|
95
|
+
name: ElementName.ModifiedBy
|
|
96
|
+
}].concat(baseMetadata);
|
|
97
|
+
var titleMetadata = [{
|
|
98
|
+
name: ElementName.AuthorGroup
|
|
99
|
+
}, {
|
|
100
|
+
name: ElementName.Priority
|
|
101
|
+
}, {
|
|
102
|
+
name: ElementName.State
|
|
103
|
+
}];
|
|
104
|
+
return {
|
|
105
|
+
titleMetadata: titleMetadata,
|
|
106
|
+
topMetadata: topMetadata
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -1,46 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
|
|
4
|
-
var _excluded = ["popupMountPointId", "onClose"];
|
|
4
|
+
var _excluded = ["onClose"];
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import ReactDOM from 'react-dom';
|
|
8
8
|
import { IntlProvider } from 'react-intl-next';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export var openPreviewModal = function openPreviewModal(_ref) {
|
|
12
|
-
var analytics = _ref.analytics,
|
|
13
|
-
download = _ref.downloadUrl,
|
|
14
|
-
isSupportTheming = _ref.isSupportTheming,
|
|
15
|
-
linkIcon = _ref.linkIcon,
|
|
16
|
-
_ref$onClose = _ref.onClose,
|
|
17
|
-
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
18
|
-
providerName = _ref.providerName,
|
|
19
|
-
src = _ref.src,
|
|
20
|
-
title = _ref.title,
|
|
21
|
-
url = _ref.url;
|
|
22
|
-
var EmbedIcon = {
|
|
23
|
-
icon: /*#__PURE__*/React.createElement(Icon, _extends({}, linkIcon, {
|
|
24
|
-
size: SmartLinkSize.Large
|
|
25
|
-
})),
|
|
26
|
-
isFlexibleUi: true
|
|
27
|
-
};
|
|
28
|
-
return previewFunction({
|
|
29
|
-
popupMountPointId: 'twp-editor-preview-iframe',
|
|
30
|
-
showModal: true,
|
|
31
|
-
iframeName: 'twp-editor-preview-iframe',
|
|
32
|
-
onClose: onClose,
|
|
33
|
-
download: download,
|
|
34
|
-
icon: EmbedIcon,
|
|
35
|
-
providerName: providerName || 'Preview',
|
|
36
|
-
src: src,
|
|
37
|
-
title: title,
|
|
38
|
-
url: url,
|
|
39
|
-
analytics: analytics,
|
|
40
|
-
origin: 'smartLinkCard',
|
|
41
|
-
isSupportTheming: isSupportTheming
|
|
42
|
-
});
|
|
43
|
-
};
|
|
9
|
+
var IFRAME_NAME = 'twp-editor-preview-iframe';
|
|
10
|
+
var POPUP_MOUNT_POINT_ID = 'twp-editor-preview-iframe';
|
|
44
11
|
|
|
45
12
|
/*
|
|
46
13
|
Explanatory note:
|
|
@@ -55,44 +22,53 @@ export var openPreviewModal = function openPreviewModal(_ref) {
|
|
|
55
22
|
you find an elegant solution around this, you should definitely feel free to
|
|
56
23
|
refactor it.
|
|
57
24
|
*/
|
|
58
|
-
export function
|
|
59
|
-
return
|
|
25
|
+
export function openEmbedModal() {
|
|
26
|
+
return _openEmbedModal.apply(this, arguments);
|
|
60
27
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
var
|
|
28
|
+
function _openEmbedModal() {
|
|
29
|
+
_openEmbedModal = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
30
|
+
var _ref,
|
|
31
|
+
_ref$onClose,
|
|
32
|
+
_onClose,
|
|
33
|
+
props,
|
|
34
|
+
popupMountPoint,
|
|
35
|
+
Modal,
|
|
36
|
+
_args = arguments;
|
|
64
37
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
65
38
|
while (1) switch (_context2.prev = _context2.next) {
|
|
66
39
|
case 0:
|
|
67
|
-
|
|
68
|
-
|
|
40
|
+
_ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
41
|
+
_ref$onClose = _ref.onClose, _onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose, props = _objectWithoutProperties(_ref, _excluded);
|
|
42
|
+
popupMountPoint = document.getElementById(POPUP_MOUNT_POINT_ID);
|
|
69
43
|
if (!popupMountPoint) {
|
|
70
44
|
popupMountPoint = document.createElement('div');
|
|
71
|
-
popupMountPoint.id =
|
|
45
|
+
popupMountPoint.id = POPUP_MOUNT_POINT_ID;
|
|
72
46
|
popupMountPoint.setAttribute('data-testid', 'preview-modal');
|
|
73
47
|
document.body.appendChild(popupMountPoint);
|
|
74
48
|
}
|
|
75
|
-
_context2.next =
|
|
49
|
+
_context2.next = 6;
|
|
76
50
|
return import('./index');
|
|
77
|
-
case
|
|
51
|
+
case 6:
|
|
78
52
|
Modal = _context2.sent;
|
|
79
53
|
ReactDOM.render( /*#__PURE__*/React.createElement(IntlProvider, {
|
|
80
54
|
locale: "en"
|
|
81
|
-
}, /*#__PURE__*/React.createElement(Modal.default, _extends({},
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Modal.default, _extends({}, props, {
|
|
56
|
+
iframeName: IFRAME_NAME,
|
|
82
57
|
onClose: function onClose(_context) {
|
|
83
58
|
if (popupMountPoint) {
|
|
84
59
|
ReactDOM.unmountComponentAtNode(popupMountPoint);
|
|
85
60
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
61
|
+
if (_onClose) {
|
|
62
|
+
_onClose(_context);
|
|
88
63
|
}
|
|
89
|
-
}
|
|
64
|
+
},
|
|
65
|
+
showModal: true
|
|
90
66
|
}))), popupMountPoint);
|
|
91
|
-
case
|
|
67
|
+
case 8:
|
|
92
68
|
case "end":
|
|
93
69
|
return _context2.stop();
|
|
94
70
|
}
|
|
95
71
|
}, _callee);
|
|
96
72
|
}));
|
|
97
|
-
return
|
|
73
|
+
return _openEmbedModal.apply(this, arguments);
|
|
98
74
|
}
|
|
@@ -6,10 +6,10 @@ import React from 'react';
|
|
|
6
6
|
import Action from '../index';
|
|
7
7
|
import { useFlexibleUiAnalyticsContext } from '../../../../../../state/flexible-ui-context';
|
|
8
8
|
import { useSmartLinkAnalytics } from '../../../../../../state';
|
|
9
|
-
import { openPreviewModal } from '../../../../../EmbedModal/utils';
|
|
10
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
10
|
import { messages } from '../../../../../../messages';
|
|
12
11
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
12
|
+
import { openEmbedModalWithFlexibleUiIcon } from '../../../utils';
|
|
13
13
|
var PreviewAction = function PreviewAction(props) {
|
|
14
14
|
var appearance = props.appearance,
|
|
15
15
|
asDropDownItem = props.asDropDownItem,
|
|
@@ -28,7 +28,7 @@ var PreviewAction = function PreviewAction(props) {
|
|
|
28
28
|
var previewText = enableImprovedPreviewAction ? messages.preview_improved : messages.preview;
|
|
29
29
|
if (src && url) {
|
|
30
30
|
var embedModal = function embedModal() {
|
|
31
|
-
return
|
|
31
|
+
return openEmbedModalWithFlexibleUiIcon({
|
|
32
32
|
title: title,
|
|
33
33
|
providerName: providerName,
|
|
34
34
|
downloadUrl: downloadUrl,
|
|
@@ -15,7 +15,7 @@ import ElementGroup from './element-group';
|
|
|
15
15
|
|
|
16
16
|
// Determine whether the element can be display as inline/block.
|
|
17
17
|
|
|
18
|
-
export var ElementDisplaySchema = (_ElementDisplaySchema = {}, _defineProperty(_ElementDisplaySchema, ElementName.AttachmentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AuthorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ChecklistProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CollaboratorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CommentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.DueOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LatestCommit, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LinkIcon, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Location, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Preview, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.Priority, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ProgrammingLanguage, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Provider, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReactCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Snippet, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.SourceBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.State, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubscriberCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.TargetBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Title, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ViewCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.VoteCount, ['inline']), _ElementDisplaySchema);
|
|
18
|
+
export var ElementDisplaySchema = (_ElementDisplaySchema = {}, _defineProperty(_ElementDisplaySchema, ElementName.AssignedTo, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AssignedToGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AttachmentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AuthorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ChecklistProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CollaboratorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CommentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.DueOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LatestCommit, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LinkIcon, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Location, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedByGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Preview, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.Priority, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ProgrammingLanguage, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Provider, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReactCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReadTime, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Snippet, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.SourceBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.State, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubscriberCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubTasksProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.TargetBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Title, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ViewCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.VoteCount, ['inline']), _ElementDisplaySchema);
|
|
19
19
|
var getDirectionStyles = function getDirectionStyles(direction) {
|
|
20
20
|
switch (direction) {
|
|
21
21
|
case SmartLinkDirection.Vertical:
|