@atlaskit/smart-card 36.8.1 → 36.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/constants.js +2 -0
- package/dist/cjs/extractors/embed/index.js +25 -1
- package/dist/cjs/extractors/flexible/index.js +1 -0
- package/dist/cjs/extractors/flexible/utils.js +4 -1
- package/dist/cjs/messages.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +10 -4
- package/dist/cjs/view/BlockCard/views/utils/index.js +3 -1
- package/dist/cjs/view/EmbedCard/index.js +5 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/applied-to-components-count/index.js +35 -0
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +7 -0
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +14 -7
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +2 -2
- package/dist/es2019/constants.js +2 -0
- package/dist/es2019/extractors/embed/index.js +35 -9
- package/dist/es2019/extractors/flexible/index.js +2 -1
- package/dist/es2019/extractors/flexible/utils.js +1 -0
- package/dist/es2019/messages.js +4 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +3 -0
- package/dist/es2019/view/BlockCard/views/utils/index.js +3 -1
- package/dist/es2019/view/EmbedCard/index.js +6 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/applied-to-components-count/index.js +26 -0
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +8 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +1 -1
- package/dist/esm/constants.js +2 -0
- package/dist/esm/extractors/embed/index.js +26 -2
- package/dist/esm/extractors/flexible/index.js +2 -1
- package/dist/esm/extractors/flexible/utils.js +3 -0
- package/dist/esm/messages.js +4 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +8 -4
- package/dist/esm/view/BlockCard/views/utils/index.js +3 -1
- package/dist/esm/view/EmbedCard/index.js +6 -8
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/applied-to-components-count/index.js +25 -0
- package/dist/esm/view/FlexibleCard/components/elements/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +14 -7
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +1 -1
- package/dist/types/__fixtures__/compass-scorecard.d.ts +44 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/extractors/embed/index.d.ts +2 -2
- package/dist/types/extractors/flexible/utils.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +6 -0
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +8 -1
- package/dist/types/view/FlexibleCard/components/elements/applied-to-components-count/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +1 -0
- package/dist/types-ts4.5/__fixtures__/compass-scorecard.d.ts +44 -0
- package/dist/types-ts4.5/constants.d.ts +2 -0
- package/dist/types-ts4.5/extractors/embed/index.d.ts +2 -2
- package/dist/types-ts4.5/extractors/flexible/utils.d.ts +1 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +6 -0
- package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +8 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/applied-to-components-count/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 36.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#141991](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141991)
|
|
8
|
+
[`bcca20c11f791`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bcca20c11f791) -
|
|
9
|
+
[ux] Adds functionality to show a count of applied components to a Compass Scorecard Smartlink.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#144847](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144847)
|
|
14
|
+
[`00cb7d91843fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/00cb7d91843fd) -
|
|
15
|
+
Internal change to move towards Compiled CSS-in-JS styling.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 36.8.2
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#144118](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144118)
|
|
23
|
+
[`74eae7139b13d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/74eae7139b13d) -
|
|
24
|
+
Enable resolve embed-view with nounData behind ff: smart_links_noun_support
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 36.8.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/cjs/constants.js
CHANGED
|
@@ -105,6 +105,7 @@ var SmartLinkWidth = exports.SmartLinkWidth = /*#__PURE__*/function (SmartLinkWi
|
|
|
105
105
|
* (src/view/FlexibleCard/components/blocks/utils.tsx)
|
|
106
106
|
*/
|
|
107
107
|
var ElementName = exports.ElementName = /*#__PURE__*/function (ElementName) {
|
|
108
|
+
ElementName["AppliedToComponentsCount"] = "AppliedToComponentsCount";
|
|
108
109
|
ElementName["AssignedTo"] = "AssignedTo";
|
|
109
110
|
ElementName["AssignedToGroup"] = "AssignedToGroup";
|
|
110
111
|
ElementName["AttachmentCount"] = "AttachmentCount";
|
|
@@ -217,6 +218,7 @@ var IconType = exports.IconType = /*#__PURE__*/function (IconType) {
|
|
|
217
218
|
IconType["Attachment"] = "Badge:Attachment";
|
|
218
219
|
IconType["CheckItem"] = "Badge:Task";
|
|
219
220
|
IconType["Comment"] = "Badge:Comment";
|
|
221
|
+
IconType["Component"] = "Badge:Component";
|
|
220
222
|
IconType["View"] = "Badge:View";
|
|
221
223
|
IconType["React"] = "Badge:React";
|
|
222
224
|
IconType["Vote"] = "Badge:Vote";
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.extractEmbedProps = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
+
var _jsonld = require("../../utils/jsonld");
|
|
10
12
|
var _icon = require("../common/icon");
|
|
11
13
|
var _extractIsSupportTheming = require("../common/meta/extractIsSupportTheming");
|
|
12
14
|
var _extractIsTrusted = require("../common/meta/extractIsTrusted");
|
|
@@ -42,7 +44,29 @@ function generateContext(jsonLd) {
|
|
|
42
44
|
icon: icon ? icon : provider.icon
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
|
-
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* We can migrate this to link extractors once we have deprecated JsonLd
|
|
50
|
+
*/
|
|
51
|
+
function extractSmartLinkContext(response) {
|
|
52
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
53
|
+
return (0, _linkExtractors.extractEntityProvider)(response);
|
|
54
|
+
}
|
|
55
|
+
return generateContext(response === null || response === void 0 ? void 0 : response.data);
|
|
56
|
+
}
|
|
57
|
+
var extractEmbedProps = exports.extractEmbedProps = function extractEmbedProps(response, platform, iframeUrlType) {
|
|
58
|
+
var meta = response === null || response === void 0 ? void 0 : response.meta;
|
|
59
|
+
var jsonLd = (response === null || response === void 0 ? void 0 : response.data) || (0, _jsonld.getEmptyJsonLd)();
|
|
60
|
+
if ((0, _platformFeatureFlags.fg)('smart_links_noun_support')) {
|
|
61
|
+
return {
|
|
62
|
+
link: (0, _linkExtractors.extractSmartLinkUrl)(response) || '',
|
|
63
|
+
title: (0, _linkExtractors.extractSmartLinkTitle)(response),
|
|
64
|
+
context: extractSmartLinkContext(response),
|
|
65
|
+
preview: (0, _linkExtractors.extractSmartLinkEmbed)(response, iframeUrlType),
|
|
66
|
+
isTrusted: (0, _extractIsTrusted.extractIsTrusted)(meta),
|
|
67
|
+
isSupportTheming: (0, _extractIsSupportTheming.extractIsSupportTheming)(meta)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
46
70
|
return {
|
|
47
71
|
link: (0, _linkExtractors.extractLink)(jsonLd) || '',
|
|
48
72
|
title: (0, _linkExtractors.extractTitle)(jsonLd),
|
|
@@ -46,6 +46,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
46
46
|
response: response,
|
|
47
47
|
url: props.url // Use the original URL in edge cases, such as short links for AI summary and copy link actions.
|
|
48
48
|
}),
|
|
49
|
+
appliedToComponentsCount: (0, _utils.extractAppliedToComponentsCount)(data),
|
|
49
50
|
assignedToGroup: (0, _utils.extractPersonAssignedToAsArray)(data),
|
|
50
51
|
attachmentCount: (0, _utils.extractAttachmentCount)(data),
|
|
51
52
|
authorGroup: (0, _linkExtractors.extractPersonCreatedBy)(data),
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.extractVoteCount = exports.extractViewCount = exports.extractTargetBranch = exports.extractSubscriberCount = exports.extractSubTasksProgress = exports.extractStoryPoints = exports.extractSourceBranch = exports.extractSentOn = exports.extractReadTime = exports.extractReactCount = exports.extractProgrammingLanguage = exports.extractPersonAssignedToAsArray = exports.extractOwnedBy = exports.extractModifiedBy = exports.extractLocation = exports.extractDueOn = exports.extractCreatedBy = exports.extractCommentCount = exports.extractChecklistProgress = exports.extractAttachmentCount = exports.extractAssignedTo = void 0;
|
|
7
|
+
exports.extractVoteCount = exports.extractViewCount = exports.extractTargetBranch = exports.extractSubscriberCount = exports.extractSubTasksProgress = exports.extractStoryPoints = exports.extractSourceBranch = exports.extractSentOn = exports.extractReadTime = exports.extractReactCount = exports.extractProgrammingLanguage = exports.extractPersonAssignedToAsArray = exports.extractOwnedBy = exports.extractModifiedBy = exports.extractLocation = exports.extractDueOn = exports.extractCreatedBy = exports.extractCommentCount = exports.extractChecklistProgress = exports.extractAttachmentCount = exports.extractAssignedTo = exports.extractAppliedToComponentsCount = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
10
10
|
var extractLinkName = function extractLinkName(link) {
|
|
@@ -18,6 +18,9 @@ var extractValue = function extractValue(data, key) {
|
|
|
18
18
|
var extractCommentCount = exports.extractCommentCount = function extractCommentCount(data) {
|
|
19
19
|
return extractValue(data, 'schema:commentCount');
|
|
20
20
|
};
|
|
21
|
+
var extractAppliedToComponentsCount = exports.extractAppliedToComponentsCount = function extractAppliedToComponentsCount(data) {
|
|
22
|
+
return extractValue(data, 'atlassian:appliedToComponentsCount');
|
|
23
|
+
};
|
|
21
24
|
var extractDueOn = exports.extractDueOn = function extractDueOn(data) {
|
|
22
25
|
return extractValue(data, 'endTime');
|
|
23
26
|
};
|
package/dist/cjs/messages.js
CHANGED
|
@@ -136,6 +136,10 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
136
136
|
defaultMessage: 'Check this link',
|
|
137
137
|
description: 'Link safety warning modal header'
|
|
138
138
|
},
|
|
139
|
+
compass_applied_components_count: {
|
|
140
|
+
id: 'compass.applied_components_count.non-final',
|
|
141
|
+
defaultMessage: 'Applied to {numberOfComponents, plural, one {{numberOfComponents, number} component} other {{numberOfComponents, number} components}}'
|
|
142
|
+
},
|
|
139
143
|
connect_to: {
|
|
140
144
|
id: 'fabric.linking.connect_to',
|
|
141
145
|
defaultMessage: 'Connect to {name}',
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "36.
|
|
14
|
+
packageVersion: "36.9.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -748,6 +748,12 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
748
748
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphAttachment" */'@atlaskit/icon/core/migration/task'));
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
|
+
}), _constants.IconType.Component, {
|
|
752
|
+
default: function _default() {
|
|
753
|
+
return Promise.resolve().then(function () {
|
|
754
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphComponent" */'@atlaskit/icon/core/migration/component'));
|
|
755
|
+
});
|
|
756
|
+
}
|
|
751
757
|
}), _constants.IconType.Comment, {
|
|
752
758
|
default: function _default() {
|
|
753
759
|
return Promise.resolve().then(function () {
|
|
@@ -772,13 +778,13 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
772
778
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/arrow-up'));
|
|
773
779
|
});
|
|
774
780
|
}
|
|
775
|
-
}), _constants.IconType.PriorityBlocker, {
|
|
781
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.PriorityBlocker, {
|
|
776
782
|
default: function _default() {
|
|
777
783
|
return Promise.resolve().then(function () {
|
|
778
784
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphBlocker" */'@atlaskit/icon-priority/glyph/priority-blocker'));
|
|
779
785
|
});
|
|
780
786
|
}
|
|
781
|
-
}),
|
|
787
|
+
}), _constants.IconType.PriorityCritical, {
|
|
782
788
|
default: function _default() {
|
|
783
789
|
return Promise.resolve().then(function () {
|
|
784
790
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphCritical" */'@atlaskit/icon-priority/glyph/priority-critical'));
|
|
@@ -832,13 +838,13 @@ var getLazyIcons = exports.getLazyIcons = function getLazyIcons() {
|
|
|
832
838
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphTrivial" */'@atlaskit/icon-priority/glyph/priority-trivial'));
|
|
833
839
|
});
|
|
834
840
|
}
|
|
835
|
-
}), _constants.IconType.PriorityUndefined, {
|
|
841
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref3, _constants.IconType.PriorityUndefined, {
|
|
836
842
|
default: function _default() {
|
|
837
843
|
return Promise.resolve().then(function () {
|
|
838
844
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphUndefined" */'@atlaskit/icon/core/migration/question-circle--question'));
|
|
839
845
|
});
|
|
840
846
|
}
|
|
841
|
-
}),
|
|
847
|
+
}), _constants.IconType.ProgrammingLanguage, {
|
|
842
848
|
default: function _default() {
|
|
843
849
|
return Promise.resolve().then(function () {
|
|
844
850
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_glyphProgrammingLanguage" */'@atlaskit/icon/core/migration/angle-brackets--code'));
|
|
@@ -71,7 +71,9 @@ var getSimulatedBetterMetadata = exports.getSimulatedBetterMetadata = function g
|
|
|
71
71
|
}, {
|
|
72
72
|
name: _constants.ElementName.OwnedBy
|
|
73
73
|
}].concat(baseTopMetadata) : defaultTopMetadata,
|
|
74
|
-
bottomMetadata:
|
|
74
|
+
bottomMetadata: [{
|
|
75
|
+
name: _constants.ElementName.AppliedToComponentsCount
|
|
76
|
+
}].concat(baseBottomMetaData)
|
|
75
77
|
};
|
|
76
78
|
} else {
|
|
77
79
|
return {
|
|
@@ -46,8 +46,6 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
46
46
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
47
47
|
var status = cardState.status,
|
|
48
48
|
details = cardState.details;
|
|
49
|
-
var data = details && details.data || (0, _jsonld.getEmptyJsonLd)();
|
|
50
|
-
var meta = details && details.meta;
|
|
51
49
|
var extensionKey = (0, _helpers.getExtensionKey)(details);
|
|
52
50
|
var isProductIntegrationSupported = (0, _helpers.hasAuthScopeOverrides)(details);
|
|
53
51
|
var _useControlDataExport = (0, _useControlDataExportConfig.useControlDataExportConfig)(),
|
|
@@ -67,7 +65,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
67
65
|
testId: testId ? "".concat(testId, "-resolving-view") : 'embed-card-resolving-view'
|
|
68
66
|
});
|
|
69
67
|
case 'resolved':
|
|
70
|
-
var resolvedViewProps = (0, _embed.extractEmbedProps)(
|
|
68
|
+
var resolvedViewProps = (0, _embed.extractEmbedProps)(details, platform, iframeUrlType);
|
|
71
69
|
if (onResolve) {
|
|
72
70
|
var _resolvedViewProps$pr;
|
|
73
71
|
onResolve({
|
|
@@ -78,7 +76,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
78
76
|
}
|
|
79
77
|
if ((0, _platformFeatureFlags.fg)('platform_smart_links_controlled_dsp_export_view')) {
|
|
80
78
|
if ((0, _shouldDataExport.getIsDataExportEnabled)(shouldControlDataExport, cardState.details)) {
|
|
81
|
-
var unauthViewProps = (0, _embed.extractEmbedProps)(
|
|
79
|
+
var unauthViewProps = (0, _embed.extractEmbedProps)(details, platform);
|
|
82
80
|
return /*#__PURE__*/_react.default.createElement(_unauthorizedView.default, {
|
|
83
81
|
context: unauthViewProps.context,
|
|
84
82
|
extensionKey: extensionKey,
|
|
@@ -131,7 +129,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
131
129
|
status: status
|
|
132
130
|
});
|
|
133
131
|
}
|
|
134
|
-
var unauthorisedViewProps = (0, _embed.extractEmbedProps)(
|
|
132
|
+
var unauthorisedViewProps = (0, _embed.extractEmbedProps)(details, platform);
|
|
135
133
|
return /*#__PURE__*/_react.default.createElement(_unauthorizedView.default, {
|
|
136
134
|
context: unauthorisedViewProps.context,
|
|
137
135
|
extensionKey: extensionKey,
|
|
@@ -151,7 +149,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
151
149
|
status: status
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
|
-
var forbiddenViewProps = (0, _embed.extractEmbedProps)(
|
|
152
|
+
var forbiddenViewProps = (0, _embed.extractEmbedProps)(details, platform);
|
|
155
153
|
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
|
|
156
154
|
if (forbiddenViewProps.preview) {
|
|
157
155
|
return /*#__PURE__*/_react.default.createElement(_ResolvedView3.EmbedCardResolvedView, (0, _extends2.default)({}, forbiddenViewProps, {
|
|
@@ -186,7 +184,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
186
184
|
status: status
|
|
187
185
|
});
|
|
188
186
|
}
|
|
189
|
-
var notFoundViewProps = (0, _embed.extractEmbedProps)(
|
|
187
|
+
var notFoundViewProps = (0, _embed.extractEmbedProps)(details, platform);
|
|
190
188
|
var notFoundAccessContext = details !== null && details !== void 0 && details.meta ? (0, _extractAccessContext.extractRequestAccessContextImproved)({
|
|
191
189
|
jsonLd: details === null || details === void 0 ? void 0 : details.meta,
|
|
192
190
|
url: url,
|
|
@@ -22,7 +22,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
// Determine whether the element can be display as inline/block.
|
|
24
24
|
|
|
25
|
-
var ElementDisplaySchema = exports.ElementDisplaySchema = (_ElementDisplaySchema = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AssignedTo, ['inline']), _constants.ElementName.AssignedToGroup, ['inline']), _constants.ElementName.AttachmentCount, ['inline']), _constants.ElementName.AuthorGroup, ['inline']), _constants.ElementName.
|
|
25
|
+
var ElementDisplaySchema = exports.ElementDisplaySchema = (_ElementDisplaySchema = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AssignedTo, ['inline']), _constants.ElementName.AssignedToGroup, ['inline']), _constants.ElementName.AttachmentCount, ['inline']), _constants.ElementName.AuthorGroup, ['inline']), _constants.ElementName.AppliedToComponentsCount, ['inline']), _constants.ElementName.ChecklistProgress, ['inline']), _constants.ElementName.CollaboratorGroup, ['inline']), _constants.ElementName.CommentCount, ['inline']), _constants.ElementName.CreatedBy, ['inline']), _constants.ElementName.CreatedOn, ['inline']), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.DueOn, ['inline']), _constants.ElementName.LatestCommit, ['inline']), _constants.ElementName.LinkIcon, ['inline']), _constants.ElementName.Location, ['inline']), _constants.ElementName.ModifiedBy, ['inline']), _constants.ElementName.ModifiedOn, ['inline']), _constants.ElementName.OwnedBy, ['inline']), _constants.ElementName.OwnedByGroup, ['inline']), _constants.ElementName.Preview, ['block']), _constants.ElementName.Priority, ['inline']), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ProgrammingLanguage, ['inline']), _constants.ElementName.Provider, ['inline']), _constants.ElementName.ReactCount, ['inline']), _constants.ElementName.ReadTime, ['inline']), _constants.ElementName.Snippet, ['block']), _constants.ElementName.SourceBranch, ['inline']), _constants.ElementName.SentOn, ['inline']), _constants.ElementName.State, ['inline']), _constants.ElementName.SubscriberCount, ['inline']), _constants.ElementName.SubTasksProgress, ['inline']), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.StoryPoints, ['inline']), _constants.ElementName.TargetBranch, ['inline']), _constants.ElementName.Title, ['inline']), _constants.ElementName.ViewCount, ['inline']), _constants.ElementName.VoteCount, ['inline']));
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Get gap size between elements inside a block
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _reactIntlNext = require("react-intl-next");
|
|
12
|
+
var _constants = require("../../../../../constants");
|
|
13
|
+
var _messages = require("../../../../../messages");
|
|
14
|
+
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
15
|
+
var _badge = _interopRequireDefault(require("../badge"));
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
var AppliedToComponentsCount = function AppliedToComponentsCount(props) {
|
|
19
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
20
|
+
formatMessage = _useIntl.formatMessage;
|
|
21
|
+
var context = (0, _react.useContext)(_flexibleUiContext.FlexibleUiContext);
|
|
22
|
+
if (
|
|
23
|
+
// Check for null and undefined, render if it's 0.
|
|
24
|
+
(context === null || context === void 0 ? void 0 : context.appliedToComponentsCount) === null || (context === null || context === void 0 ? void 0 : context.appliedToComponentsCount) === undefined) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
var label = formatMessage(_messages.messages.compass_applied_components_count, {
|
|
28
|
+
numberOfComponents: context.appliedToComponentsCount
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_badge.default, (0, _extends2.default)({
|
|
31
|
+
icon: _constants.IconType.Component,
|
|
32
|
+
label: label
|
|
33
|
+
}, props));
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = AppliedToComponentsCount;
|
|
@@ -4,6 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
Object.defineProperty(exports, "AppliedToComponentsCount", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _appliedToComponentsCount.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
exports.OwnedByGroup = exports.OwnedBy = exports.ModifiedOn = exports.ModifiedBy = exports.Location = exports.LinkIcon = exports.LatestCommit = exports.DueOn = exports.CreatedOn = exports.CreatedBy = exports.CommentCount = exports.CollaboratorGroup = exports.ChecklistProgress = exports.AuthorGroup = exports.AttachmentCount = exports.AssignedToGroup = exports.AssignedTo = void 0;
|
|
8
14
|
Object.defineProperty(exports, "Preview", {
|
|
9
15
|
enumerable: true,
|
|
@@ -23,6 +29,7 @@ var _constants = require("../../../../constants");
|
|
|
23
29
|
var _utils = require("./utils");
|
|
24
30
|
var _preview = _interopRequireDefault(require("./preview"));
|
|
25
31
|
var _snippetElement = _interopRequireDefault(require("./snippet-element"));
|
|
32
|
+
var _appliedToComponentsCount = _interopRequireDefault(require("./applied-to-components-count"));
|
|
26
33
|
// Attention: Keep the export name and element name the same.
|
|
27
34
|
// This will help reducing the code for mapping elements inside
|
|
28
35
|
// createElement and renderElementItems
|
|
@@ -14,6 +14,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
14
14
|
var _constants = require("../../../../constants");
|
|
15
15
|
var _messages = require("../../../../messages");
|
|
16
16
|
var _flexibleUiContext = require("../../../../state/flexible-ui-context");
|
|
17
|
+
var _appliedToComponentsCount = _interopRequireDefault(require("./applied-to-components-count"));
|
|
17
18
|
var _atlaskitBadge = _interopRequireDefault(require("./atlaskit-badge"));
|
|
18
19
|
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
19
20
|
var _badge = _interopRequireDefault(require("./badge"));
|
|
@@ -26,7 +27,12 @@ var _text = _interopRequireDefault(require("./text"));
|
|
|
26
27
|
var _elementMappings;
|
|
27
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
|
-
var elementMappings = (_elementMappings = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_elementMappings, _constants.ElementName.
|
|
30
|
+
var elementMappings = (_elementMappings = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_elementMappings, _constants.ElementName.AppliedToComponentsCount, {
|
|
31
|
+
component: _appliedToComponentsCount.default,
|
|
32
|
+
props: {
|
|
33
|
+
icon: _constants.IconType.Component
|
|
34
|
+
}
|
|
35
|
+
}), _constants.ElementName.AttachmentCount, {
|
|
30
36
|
component: _badge.default,
|
|
31
37
|
props: {
|
|
32
38
|
icon: _constants.IconType.Attachment
|
|
@@ -62,9 +68,9 @@ var elementMappings = (_elementMappings = {}, (0, _defineProperty2.default)((0,
|
|
|
62
68
|
}
|
|
63
69
|
}), _constants.ElementName.CreatedBy, {
|
|
64
70
|
component: _text.default
|
|
65
|
-
}), _constants.ElementName.OwnedBy, {
|
|
71
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_elementMappings, _constants.ElementName.OwnedBy, {
|
|
66
72
|
component: _text.default
|
|
67
|
-
}),
|
|
73
|
+
}), _constants.ElementName.AssignedTo, {
|
|
68
74
|
component: _text.default
|
|
69
75
|
}), _constants.ElementName.AssignedToGroup, {
|
|
70
76
|
component: _avatarGroup.default
|
|
@@ -85,9 +91,9 @@ var elementMappings = (_elementMappings = {}, (0, _defineProperty2.default)((0,
|
|
|
85
91
|
component: _text.default
|
|
86
92
|
}), _constants.ElementName.ModifiedOn, {
|
|
87
93
|
component: _dateTime.default
|
|
88
|
-
}), _constants.ElementName.Preview, {
|
|
94
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_elementMappings, _constants.ElementName.Preview, {
|
|
89
95
|
component: _media.default
|
|
90
|
-
}),
|
|
96
|
+
}), _constants.ElementName.Priority, {
|
|
91
97
|
component: _badge.default
|
|
92
98
|
}), _constants.ElementName.ProgrammingLanguage, {
|
|
93
99
|
component: _badge.default,
|
|
@@ -114,9 +120,9 @@ var elementMappings = (_elementMappings = {}, (0, _defineProperty2.default)((0,
|
|
|
114
120
|
props: {
|
|
115
121
|
icon: _constants.IconType.SubTasksProgress
|
|
116
122
|
}
|
|
117
|
-
}), _constants.ElementName.StoryPoints, {
|
|
123
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_elementMappings, _constants.ElementName.StoryPoints, {
|
|
118
124
|
component: _atlaskitBadge.default
|
|
119
|
-
}),
|
|
125
|
+
}), _constants.ElementName.TargetBranch, {
|
|
120
126
|
component: _text.default
|
|
121
127
|
}), _constants.ElementName.Title, {
|
|
122
128
|
component: _link.default
|
|
@@ -144,6 +150,7 @@ var getData = function getData(elementName, contextKey, context) {
|
|
|
144
150
|
var AvatarGroupsWithFallback = [_constants.ElementName.AssignedToGroup];
|
|
145
151
|
var showFallbackAvatar = AvatarGroupsWithFallback.includes(elementName);
|
|
146
152
|
return toAvatarGroupProps(data, showFallbackAvatar);
|
|
153
|
+
case _constants.ElementName.AppliedToComponentsCount:
|
|
147
154
|
case _constants.ElementName.AttachmentCount:
|
|
148
155
|
case _constants.ElementName.ChecklistProgress:
|
|
149
156
|
case _constants.ElementName.CommentCount:
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "36.
|
|
23
|
+
packageVersion: "36.9.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var
|
|
13
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
14
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
15
15
|
var _constants = require("../../constants");
|
|
16
16
|
var _messages = require("../../messages");
|
|
@@ -35,7 +35,7 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
35
35
|
values: {
|
|
36
36
|
context: providerName
|
|
37
37
|
}
|
|
38
|
-
})) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.connect_unauthorised_account_description_no_provider), ' ', (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(
|
|
38
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.connect_unauthorised_account_description_no_provider), ' ', (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
39
39
|
href: isProductIntegrationSupported ? _constants.CONTENT_URL_3P_ACCOUNT_AUTH : _constants.CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
40
40
|
target: "_blank",
|
|
41
41
|
testId: "".concat(testId, "-learn-more"),
|
package/dist/es2019/constants.js
CHANGED
|
@@ -106,6 +106,7 @@ export let SmartLinkWidth = /*#__PURE__*/function (SmartLinkWidth) {
|
|
|
106
106
|
* (src/view/FlexibleCard/components/blocks/utils.tsx)
|
|
107
107
|
*/
|
|
108
108
|
export let ElementName = /*#__PURE__*/function (ElementName) {
|
|
109
|
+
ElementName["AppliedToComponentsCount"] = "AppliedToComponentsCount";
|
|
109
110
|
ElementName["AssignedTo"] = "AssignedTo";
|
|
110
111
|
ElementName["AssignedToGroup"] = "AssignedToGroup";
|
|
111
112
|
ElementName["AttachmentCount"] = "AttachmentCount";
|
|
@@ -220,6 +221,7 @@ export let IconType = /*#__PURE__*/function (IconType) {
|
|
|
220
221
|
IconType["Attachment"] = "Badge:Attachment";
|
|
221
222
|
IconType["CheckItem"] = "Badge:Task";
|
|
222
223
|
IconType["Comment"] = "Badge:Comment";
|
|
224
|
+
IconType["Component"] = "Badge:Component";
|
|
223
225
|
IconType["View"] = "Badge:View";
|
|
224
226
|
IconType["React"] = "Badge:React";
|
|
225
227
|
IconType["Vote"] = "Badge:Vote";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { extractLink, extractPreview, extractProvider, extractProviderIcon, extractTitle, extractUrlFromIconJsonLd } from '@atlaskit/link-extractors';
|
|
1
|
+
import { extractEntityProvider, extractLink, extractPreview, extractProvider, extractProviderIcon, extractSmartLinkEmbed, extractSmartLinkTitle, extractSmartLinkUrl, extractTitle, extractUrlFromIconJsonLd, isEntityPresent } from '@atlaskit/link-extractors';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { getEmptyJsonLd } from '../../utils/jsonld';
|
|
2
4
|
import { prioritiseIcon } from '../common/icon';
|
|
3
5
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
4
6
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
@@ -34,11 +36,35 @@ function generateContext(jsonLd) {
|
|
|
34
36
|
icon: icon ? icon : provider.icon
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* We can migrate this to link extractors once we have deprecated JsonLd
|
|
42
|
+
*/
|
|
43
|
+
function extractSmartLinkContext(response) {
|
|
44
|
+
if (isEntityPresent(response)) {
|
|
45
|
+
return extractEntityProvider(response);
|
|
46
|
+
}
|
|
47
|
+
return generateContext(response === null || response === void 0 ? void 0 : response.data);
|
|
48
|
+
}
|
|
49
|
+
export const extractEmbedProps = (response, platform, iframeUrlType) => {
|
|
50
|
+
const meta = response === null || response === void 0 ? void 0 : response.meta;
|
|
51
|
+
const jsonLd = (response === null || response === void 0 ? void 0 : response.data) || getEmptyJsonLd();
|
|
52
|
+
if (fg('smart_links_noun_support')) {
|
|
53
|
+
return {
|
|
54
|
+
link: extractSmartLinkUrl(response) || '',
|
|
55
|
+
title: extractSmartLinkTitle(response),
|
|
56
|
+
context: extractSmartLinkContext(response),
|
|
57
|
+
preview: extractSmartLinkEmbed(response, iframeUrlType),
|
|
58
|
+
isTrusted: extractIsTrusted(meta),
|
|
59
|
+
isSupportTheming: extractIsSupportTheming(meta)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
link: extractLink(jsonLd) || '',
|
|
64
|
+
title: extractTitle(jsonLd),
|
|
65
|
+
context: generateContext(jsonLd),
|
|
66
|
+
preview: extractEmbedPreview(jsonLd, platform, iframeUrlType),
|
|
67
|
+
isTrusted: extractIsTrusted(meta),
|
|
68
|
+
isSupportTheming: extractIsSupportTheming(meta)
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -8,7 +8,7 @@ import extractState from './extract-state';
|
|
|
8
8
|
import { extractLinkIcon } from './icon';
|
|
9
9
|
import extractProviderIcon from './icon/extract-provider-icon';
|
|
10
10
|
import { extractLatestCommit } from './latest-commit';
|
|
11
|
-
import { extractAssignedTo, extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractDueOn, extractLocation, extractModifiedBy, extractOwnedBy, extractPersonAssignedToAsArray, extractProgrammingLanguage, extractReactCount, extractReadTime, extractSentOn, extractSourceBranch, extractStoryPoints, extractSubscriberCount, extractSubTasksProgress, extractTargetBranch, extractViewCount, extractVoteCount } from './utils';
|
|
11
|
+
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';
|
|
12
12
|
const extractFlexibleUiContext = ({
|
|
13
13
|
appearance,
|
|
14
14
|
fireEvent,
|
|
@@ -37,6 +37,7 @@ const extractFlexibleUiContext = ({
|
|
|
37
37
|
response,
|
|
38
38
|
url: props.url // Use the original URL in edge cases, such as short links for AI summary and copy link actions.
|
|
39
39
|
}),
|
|
40
|
+
appliedToComponentsCount: extractAppliedToComponentsCount(data),
|
|
40
41
|
assignedToGroup: extractPersonAssignedToAsArray(data),
|
|
41
42
|
attachmentCount: extractAttachmentCount(data),
|
|
42
43
|
authorGroup: extractPersonCreatedBy(data),
|
|
@@ -8,6 +8,7 @@ const extractValue = (data, key) => {
|
|
|
8
8
|
return data === null || data === void 0 ? void 0 : data[key];
|
|
9
9
|
};
|
|
10
10
|
export const extractCommentCount = data => extractValue(data, 'schema:commentCount');
|
|
11
|
+
export const extractAppliedToComponentsCount = data => extractValue(data, 'atlassian:appliedToComponentsCount');
|
|
11
12
|
export const extractDueOn = data => extractValue(data, 'endTime');
|
|
12
13
|
export const extractViewCount = data => extractValue(data, 'atlassian:viewCount');
|
|
13
14
|
export const extractReactCount = data => extractValue(data, 'atlassian:reactCount');
|
package/dist/es2019/messages.js
CHANGED
|
@@ -130,6 +130,10 @@ export const messages = defineMessages({
|
|
|
130
130
|
defaultMessage: 'Check this link',
|
|
131
131
|
description: 'Link safety warning modal header'
|
|
132
132
|
},
|
|
133
|
+
compass_applied_components_count: {
|
|
134
|
+
id: 'compass.applied_components_count.non-final',
|
|
135
|
+
defaultMessage: 'Applied to {numberOfComponents, plural, one {{numberOfComponents, number} component} other {{numberOfComponents, number} components}}'
|
|
136
|
+
},
|
|
133
137
|
connect_to: {
|
|
134
138
|
id: 'fabric.linking.connect_to',
|
|
135
139
|
defaultMessage: 'Connect to {name}',
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "36.
|
|
5
|
+
packageVersion: "36.9.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -283,6 +283,9 @@ export const getLazyIcons = () => {
|
|
|
283
283
|
[IconType.CheckItem]: {
|
|
284
284
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphAttachment" */'@atlaskit/icon/core/migration/task')
|
|
285
285
|
},
|
|
286
|
+
[IconType.Component]: {
|
|
287
|
+
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphComponent" */'@atlaskit/icon/core/migration/component')
|
|
288
|
+
},
|
|
286
289
|
[IconType.Comment]: {
|
|
287
290
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/comment')
|
|
288
291
|
},
|
|
@@ -65,7 +65,9 @@ export const getSimulatedBetterMetadata = cardDetails => {
|
|
|
65
65
|
}, {
|
|
66
66
|
name: ElementName.OwnedBy
|
|
67
67
|
}, ...baseTopMetadata] : defaultTopMetadata,
|
|
68
|
-
bottomMetadata:
|
|
68
|
+
bottomMetadata: [{
|
|
69
|
+
name: ElementName.AppliedToComponentsCount
|
|
70
|
+
}, ...baseBottomMetaData]
|
|
69
71
|
};
|
|
70
72
|
} else {
|
|
71
73
|
return {
|