@atlaskit/smart-card 36.8.2 → 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 +15 -0
- package/dist/cjs/constants.js +2 -0
- 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/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/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/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/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/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/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/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/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/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,20 @@
|
|
|
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
|
+
|
|
3
18
|
## 36.8.2
|
|
4
19
|
|
|
5
20
|
### 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";
|
|
@@ -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 {
|
|
@@ -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";
|
|
@@ -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 {
|
|
@@ -13,6 +13,7 @@ export const ElementDisplaySchema = {
|
|
|
13
13
|
[ElementName.AssignedToGroup]: ['inline'],
|
|
14
14
|
[ElementName.AttachmentCount]: ['inline'],
|
|
15
15
|
[ElementName.AuthorGroup]: ['inline'],
|
|
16
|
+
[ElementName.AppliedToComponentsCount]: ['inline'],
|
|
16
17
|
[ElementName.ChecklistProgress]: ['inline'],
|
|
17
18
|
[ElementName.CollaboratorGroup]: ['inline'],
|
|
18
19
|
[ElementName.CommentCount]: ['inline'],
|
package/dist/es2019/view/FlexibleCard/components/elements/applied-to-components-count/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { IconType } from '../../../../../constants';
|
|
5
|
+
import { messages } from '../../../../../messages';
|
|
6
|
+
import { FlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
7
|
+
import Badge from '../badge';
|
|
8
|
+
const AppliedToComponentsCount = props => {
|
|
9
|
+
const {
|
|
10
|
+
formatMessage
|
|
11
|
+
} = useIntl();
|
|
12
|
+
const context = useContext(FlexibleUiContext);
|
|
13
|
+
if (
|
|
14
|
+
// Check for null and undefined, render if it's 0.
|
|
15
|
+
(context === null || context === void 0 ? void 0 : context.appliedToComponentsCount) === null || (context === null || context === void 0 ? void 0 : context.appliedToComponentsCount) === undefined) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const label = formatMessage(messages.compass_applied_components_count, {
|
|
19
|
+
numberOfComponents: context.appliedToComponentsCount
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/React.createElement(Badge, _extends({
|
|
22
|
+
icon: IconType.Component,
|
|
23
|
+
label: label
|
|
24
|
+
}, props));
|
|
25
|
+
};
|
|
26
|
+
export default AppliedToComponentsCount;
|
|
@@ -173,4 +173,5 @@ export const ViewCount = createElement(ElementName.ViewCount);
|
|
|
173
173
|
* Creates a VoteCount Badge element using the data from VoteCount in the Flexible UI Context.
|
|
174
174
|
* @see Badge
|
|
175
175
|
*/
|
|
176
|
-
export const VoteCount = createElement(ElementName.VoteCount);
|
|
176
|
+
export const VoteCount = createElement(ElementName.VoteCount);
|
|
177
|
+
export { default as AppliedToComponentsCount } from './applied-to-components-count';
|
|
@@ -4,6 +4,7 @@ import { FormattedDate } from 'react-intl-next';
|
|
|
4
4
|
import { ElementName, IconType, SmartLinkInternalTheme } from '../../../../constants';
|
|
5
5
|
import { messages } from '../../../../messages';
|
|
6
6
|
import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
7
|
+
import AppliedToComponentsCount from './applied-to-components-count';
|
|
7
8
|
import AtlaskitBadge from './atlaskit-badge';
|
|
8
9
|
import AvatarGroup from './avatar-group';
|
|
9
10
|
import Badge from './badge';
|
|
@@ -14,6 +15,12 @@ import Lozenge from './lozenge';
|
|
|
14
15
|
import Media from './media';
|
|
15
16
|
import Text from './text';
|
|
16
17
|
const elementMappings = {
|
|
18
|
+
[ElementName.AppliedToComponentsCount]: {
|
|
19
|
+
component: AppliedToComponentsCount,
|
|
20
|
+
props: {
|
|
21
|
+
icon: IconType.Component
|
|
22
|
+
}
|
|
23
|
+
},
|
|
17
24
|
[ElementName.AttachmentCount]: {
|
|
18
25
|
component: Badge,
|
|
19
26
|
props: {
|
|
@@ -165,6 +172,7 @@ const getData = (elementName, contextKey, context) => {
|
|
|
165
172
|
const AvatarGroupsWithFallback = [ElementName.AssignedToGroup];
|
|
166
173
|
const showFallbackAvatar = AvatarGroupsWithFallback.includes(elementName);
|
|
167
174
|
return toAvatarGroupProps(data, showFallbackAvatar);
|
|
175
|
+
case ElementName.AppliedToComponentsCount:
|
|
168
176
|
case ElementName.AttachmentCount:
|
|
169
177
|
case ElementName.ChecklistProgress:
|
|
170
178
|
case ElementName.CommentCount:
|
|
@@ -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: "36.
|
|
13
|
+
packageVersion: "36.9.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { Anchor } from '@atlaskit/primitives';
|
|
5
|
+
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
6
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
7
7
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
8
8
|
import { messages } from '../../messages';
|
package/dist/esm/constants.js
CHANGED
|
@@ -106,6 +106,7 @@ export var SmartLinkWidth = /*#__PURE__*/function (SmartLinkWidth) {
|
|
|
106
106
|
* (src/view/FlexibleCard/components/blocks/utils.tsx)
|
|
107
107
|
*/
|
|
108
108
|
export var 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 var 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";
|
|
@@ -10,7 +10,7 @@ import extractState from './extract-state';
|
|
|
10
10
|
import { extractLinkIcon } from './icon';
|
|
11
11
|
import extractProviderIcon from './icon/extract-provider-icon';
|
|
12
12
|
import { extractLatestCommit } from './latest-commit';
|
|
13
|
-
import { extractAssignedTo, extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractDueOn, extractLocation, extractModifiedBy, extractOwnedBy, extractPersonAssignedToAsArray, extractProgrammingLanguage, extractReactCount, extractReadTime, extractSentOn, extractSourceBranch, extractStoryPoints, extractSubscriberCount, extractSubTasksProgress, extractTargetBranch, extractViewCount, extractVoteCount } from './utils';
|
|
13
|
+
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';
|
|
14
14
|
var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
15
15
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
16
|
var appearance = _ref.appearance,
|
|
@@ -39,6 +39,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
39
39
|
response: response,
|
|
40
40
|
url: props.url // Use the original URL in edge cases, such as short links for AI summary and copy link actions.
|
|
41
41
|
}),
|
|
42
|
+
appliedToComponentsCount: extractAppliedToComponentsCount(data),
|
|
42
43
|
assignedToGroup: extractPersonAssignedToAsArray(data),
|
|
43
44
|
attachmentCount: extractAttachmentCount(data),
|
|
44
45
|
authorGroup: extractPersonCreatedBy(data),
|
|
@@ -11,6 +11,9 @@ var extractValue = function extractValue(data, key) {
|
|
|
11
11
|
export var extractCommentCount = function extractCommentCount(data) {
|
|
12
12
|
return extractValue(data, 'schema:commentCount');
|
|
13
13
|
};
|
|
14
|
+
export var extractAppliedToComponentsCount = function extractAppliedToComponentsCount(data) {
|
|
15
|
+
return extractValue(data, 'atlassian:appliedToComponentsCount');
|
|
16
|
+
};
|
|
14
17
|
export var extractDueOn = function extractDueOn(data) {
|
|
15
18
|
return extractValue(data, 'endTime');
|
|
16
19
|
};
|
package/dist/esm/messages.js
CHANGED
|
@@ -130,6 +130,10 @@ export var 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}',
|
|
@@ -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: "36.
|
|
7
|
+
packageVersion: "36.9.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -496,6 +496,10 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
496
496
|
default: function _default() {
|
|
497
497
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphAttachment" */'@atlaskit/icon/core/migration/task');
|
|
498
498
|
}
|
|
499
|
+
}), IconType.Component, {
|
|
500
|
+
default: function _default() {
|
|
501
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphComponent" */'@atlaskit/icon/core/migration/component');
|
|
502
|
+
}
|
|
499
503
|
}), IconType.Comment, {
|
|
500
504
|
default: function _default() {
|
|
501
505
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/comment');
|
|
@@ -512,11 +516,11 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
512
516
|
default: function _default() {
|
|
513
517
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphComment" */'@atlaskit/icon/core/migration/arrow-up');
|
|
514
518
|
}
|
|
515
|
-
}), IconType.PriorityBlocker, {
|
|
519
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.PriorityBlocker, {
|
|
516
520
|
default: function _default() {
|
|
517
521
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphBlocker" */'@atlaskit/icon-priority/glyph/priority-blocker');
|
|
518
522
|
}
|
|
519
|
-
}),
|
|
523
|
+
}), IconType.PriorityCritical, {
|
|
520
524
|
default: function _default() {
|
|
521
525
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphCritical" */'@atlaskit/icon-priority/glyph/priority-critical');
|
|
522
526
|
}
|
|
@@ -552,11 +556,11 @@ export var getLazyIcons = function getLazyIcons() {
|
|
|
552
556
|
default: function _default() {
|
|
553
557
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphTrivial" */'@atlaskit/icon-priority/glyph/priority-trivial');
|
|
554
558
|
}
|
|
555
|
-
}), IconType.PriorityUndefined, {
|
|
559
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.PriorityUndefined, {
|
|
556
560
|
default: function _default() {
|
|
557
561
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphUndefined" */'@atlaskit/icon/core/migration/question-circle--question');
|
|
558
562
|
}
|
|
559
|
-
}),
|
|
563
|
+
}), IconType.ProgrammingLanguage, {
|
|
560
564
|
default: function _default() {
|
|
561
565
|
return import( /* webpackChunkName: "@atlaskit-internal_glyphProgrammingLanguage" */'@atlaskit/icon/core/migration/angle-brackets--code');
|
|
562
566
|
}
|
|
@@ -65,7 +65,9 @@ export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(card
|
|
|
65
65
|
}, {
|
|
66
66
|
name: ElementName.OwnedBy
|
|
67
67
|
}].concat(baseTopMetadata) : defaultTopMetadata,
|
|
68
|
-
bottomMetadata:
|
|
68
|
+
bottomMetadata: [{
|
|
69
|
+
name: ElementName.AppliedToComponentsCount
|
|
70
|
+
}].concat(baseBottomMetaData)
|
|
69
71
|
};
|
|
70
72
|
} else {
|
|
71
73
|
return {
|
|
@@ -13,7 +13,7 @@ import ElementGroup from './element-group';
|
|
|
13
13
|
|
|
14
14
|
// Determine whether the element can be display as inline/block.
|
|
15
15
|
|
|
16
|
-
export var ElementDisplaySchema = (_ElementDisplaySchema = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ElementDisplaySchema, ElementName.AssignedTo, ['inline']), ElementName.AssignedToGroup, ['inline']), ElementName.AttachmentCount, ['inline']), ElementName.AuthorGroup, ['inline']), ElementName.
|
|
16
|
+
export var ElementDisplaySchema = (_ElementDisplaySchema = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ElementDisplaySchema, ElementName.AssignedTo, ['inline']), ElementName.AssignedToGroup, ['inline']), ElementName.AttachmentCount, ['inline']), ElementName.AuthorGroup, ['inline']), ElementName.AppliedToComponentsCount, ['inline']), ElementName.ChecklistProgress, ['inline']), ElementName.CollaboratorGroup, ['inline']), ElementName.CommentCount, ['inline']), ElementName.CreatedBy, ['inline']), ElementName.CreatedOn, ['inline']), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ElementDisplaySchema, ElementName.DueOn, ['inline']), ElementName.LatestCommit, ['inline']), ElementName.LinkIcon, ['inline']), ElementName.Location, ['inline']), ElementName.ModifiedBy, ['inline']), ElementName.ModifiedOn, ['inline']), ElementName.OwnedBy, ['inline']), ElementName.OwnedByGroup, ['inline']), ElementName.Preview, ['block']), ElementName.Priority, ['inline']), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ElementDisplaySchema, ElementName.ProgrammingLanguage, ['inline']), ElementName.Provider, ['inline']), ElementName.ReactCount, ['inline']), ElementName.ReadTime, ['inline']), ElementName.Snippet, ['block']), ElementName.SourceBranch, ['inline']), ElementName.SentOn, ['inline']), ElementName.State, ['inline']), ElementName.SubscriberCount, ['inline']), ElementName.SubTasksProgress, ['inline']), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ElementDisplaySchema, ElementName.StoryPoints, ['inline']), ElementName.TargetBranch, ['inline']), ElementName.Title, ['inline']), ElementName.ViewCount, ['inline']), ElementName.VoteCount, ['inline']));
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Get gap size between elements inside a block
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { IconType } from '../../../../../constants';
|
|
5
|
+
import { messages } from '../../../../../messages';
|
|
6
|
+
import { FlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
7
|
+
import Badge from '../badge';
|
|
8
|
+
var AppliedToComponentsCount = function AppliedToComponentsCount(props) {
|
|
9
|
+
var _useIntl = useIntl(),
|
|
10
|
+
formatMessage = _useIntl.formatMessage;
|
|
11
|
+
var context = useContext(FlexibleUiContext);
|
|
12
|
+
if (
|
|
13
|
+
// Check for null and undefined, render if it's 0.
|
|
14
|
+
(context === null || context === void 0 ? void 0 : context.appliedToComponentsCount) === null || (context === null || context === void 0 ? void 0 : context.appliedToComponentsCount) === undefined) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
var label = formatMessage(messages.compass_applied_components_count, {
|
|
18
|
+
numberOfComponents: context.appliedToComponentsCount
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/React.createElement(Badge, _extends({
|
|
21
|
+
icon: IconType.Component,
|
|
22
|
+
label: label
|
|
23
|
+
}, props));
|
|
24
|
+
};
|
|
25
|
+
export default AppliedToComponentsCount;
|
|
@@ -173,4 +173,5 @@ export var ViewCount = createElement(ElementName.ViewCount);
|
|
|
173
173
|
* Creates a VoteCount Badge element using the data from VoteCount in the Flexible UI Context.
|
|
174
174
|
* @see Badge
|
|
175
175
|
*/
|
|
176
|
-
export var VoteCount = createElement(ElementName.VoteCount);
|
|
176
|
+
export var VoteCount = createElement(ElementName.VoteCount);
|
|
177
|
+
export { default as AppliedToComponentsCount } from './applied-to-components-count';
|
|
@@ -7,6 +7,7 @@ import { FormattedDate } from 'react-intl-next';
|
|
|
7
7
|
import { ElementName, IconType, SmartLinkInternalTheme } from '../../../../constants';
|
|
8
8
|
import { messages } from '../../../../messages';
|
|
9
9
|
import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
10
|
+
import AppliedToComponentsCount from './applied-to-components-count';
|
|
10
11
|
import AtlaskitBadge from './atlaskit-badge';
|
|
11
12
|
import AvatarGroup from './avatar-group';
|
|
12
13
|
import Badge from './badge';
|
|
@@ -16,7 +17,12 @@ import Link from './link';
|
|
|
16
17
|
import Lozenge from './lozenge';
|
|
17
18
|
import Media from './media';
|
|
18
19
|
import Text from './text';
|
|
19
|
-
var elementMappings = (_elementMappings = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.
|
|
20
|
+
var elementMappings = (_elementMappings = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.AppliedToComponentsCount, {
|
|
21
|
+
component: AppliedToComponentsCount,
|
|
22
|
+
props: {
|
|
23
|
+
icon: IconType.Component
|
|
24
|
+
}
|
|
25
|
+
}), ElementName.AttachmentCount, {
|
|
20
26
|
component: Badge,
|
|
21
27
|
props: {
|
|
22
28
|
icon: IconType.Attachment
|
|
@@ -52,9 +58,9 @@ var elementMappings = (_elementMappings = {}, _defineProperty(_defineProperty(_d
|
|
|
52
58
|
}
|
|
53
59
|
}), ElementName.CreatedBy, {
|
|
54
60
|
component: Text
|
|
55
|
-
}), ElementName.OwnedBy, {
|
|
61
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.OwnedBy, {
|
|
56
62
|
component: Text
|
|
57
|
-
}),
|
|
63
|
+
}), ElementName.AssignedTo, {
|
|
58
64
|
component: Text
|
|
59
65
|
}), ElementName.AssignedToGroup, {
|
|
60
66
|
component: AvatarGroup
|
|
@@ -75,9 +81,9 @@ var elementMappings = (_elementMappings = {}, _defineProperty(_defineProperty(_d
|
|
|
75
81
|
component: Text
|
|
76
82
|
}), ElementName.ModifiedOn, {
|
|
77
83
|
component: DateTime
|
|
78
|
-
}), ElementName.Preview, {
|
|
84
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.Preview, {
|
|
79
85
|
component: Media
|
|
80
|
-
}),
|
|
86
|
+
}), ElementName.Priority, {
|
|
81
87
|
component: Badge
|
|
82
88
|
}), ElementName.ProgrammingLanguage, {
|
|
83
89
|
component: Badge,
|
|
@@ -104,9 +110,9 @@ var elementMappings = (_elementMappings = {}, _defineProperty(_defineProperty(_d
|
|
|
104
110
|
props: {
|
|
105
111
|
icon: IconType.SubTasksProgress
|
|
106
112
|
}
|
|
107
|
-
}), ElementName.StoryPoints, {
|
|
113
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_elementMappings, ElementName.StoryPoints, {
|
|
108
114
|
component: AtlaskitBadge
|
|
109
|
-
}),
|
|
115
|
+
}), ElementName.TargetBranch, {
|
|
110
116
|
component: Text
|
|
111
117
|
}), ElementName.Title, {
|
|
112
118
|
component: Link
|
|
@@ -134,6 +140,7 @@ var getData = function getData(elementName, contextKey, context) {
|
|
|
134
140
|
var AvatarGroupsWithFallback = [ElementName.AssignedToGroup];
|
|
135
141
|
var showFallbackAvatar = AvatarGroupsWithFallback.includes(elementName);
|
|
136
142
|
return toAvatarGroupProps(data, showFallbackAvatar);
|
|
143
|
+
case ElementName.AppliedToComponentsCount:
|
|
137
144
|
case ElementName.AttachmentCount:
|
|
138
145
|
case ElementName.ChecklistProgress:
|
|
139
146
|
case ElementName.CommentCount:
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "36.
|
|
16
|
+
packageVersion: "36.9.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { Anchor } from '@atlaskit/primitives';
|
|
5
|
+
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
6
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
7
7
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
8
8
|
import { messages } from '../../messages';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
meta: {
|
|
3
|
+
access: string;
|
|
4
|
+
visibility: string;
|
|
5
|
+
product: string;
|
|
6
|
+
resourceType: string;
|
|
7
|
+
key: string;
|
|
8
|
+
};
|
|
9
|
+
data: {
|
|
10
|
+
'@context': {
|
|
11
|
+
'@vocab': string;
|
|
12
|
+
atlassian: string;
|
|
13
|
+
schema: string;
|
|
14
|
+
};
|
|
15
|
+
'@type': string[];
|
|
16
|
+
url: string;
|
|
17
|
+
name: string;
|
|
18
|
+
icon: {
|
|
19
|
+
'@type': string;
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
preview: {
|
|
23
|
+
'@type': string;
|
|
24
|
+
href: string;
|
|
25
|
+
'atlassian:supportedPlatforms': string[];
|
|
26
|
+
};
|
|
27
|
+
generator: {
|
|
28
|
+
'@type': string;
|
|
29
|
+
name: string;
|
|
30
|
+
icon: {
|
|
31
|
+
'@type': string;
|
|
32
|
+
url: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
'atlassian:ownedBy': {
|
|
36
|
+
'@type': string;
|
|
37
|
+
name: string;
|
|
38
|
+
icon: string;
|
|
39
|
+
};
|
|
40
|
+
'atlassian:appliedToComponentsCount': number;
|
|
41
|
+
summary: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
@@ -88,6 +88,7 @@ export declare enum SmartLinkWidth {
|
|
|
88
88
|
* (src/view/FlexibleCard/components/blocks/utils.tsx)
|
|
89
89
|
*/
|
|
90
90
|
export declare enum ElementName {
|
|
91
|
+
AppliedToComponentsCount = "AppliedToComponentsCount",
|
|
91
92
|
AssignedTo = "AssignedTo",
|
|
92
93
|
AssignedToGroup = "AssignedToGroup",
|
|
93
94
|
AttachmentCount = "AttachmentCount",
|
|
@@ -192,6 +193,7 @@ export declare enum IconType {
|
|
|
192
193
|
Attachment = "Badge:Attachment",
|
|
193
194
|
CheckItem = "Badge:Task",
|
|
194
195
|
Comment = "Badge:Comment",
|
|
196
|
+
Component = "Badge:Component",
|
|
195
197
|
View = "Badge:View",
|
|
196
198
|
React = "Badge:React",
|
|
197
199
|
Vote = "Badge:Vote",
|
|
@@ -3,6 +3,7 @@ import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
|
3
3
|
import { type LinkLocation } from '../../state/flexible-ui-context/types';
|
|
4
4
|
export type LinkCommentType = JsonLd.Data.Document | JsonLd.Data.Page | JsonLd.Data.Project | JsonLd.Data.SourceCodeCommit | JsonLd.Data.TaskType;
|
|
5
5
|
export declare const extractCommentCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
6
|
+
export declare const extractAppliedToComponentsCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
6
7
|
export declare const extractDueOn: (data: JsonLd.Data.BaseData) => string | undefined;
|
|
7
8
|
export declare const extractViewCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
8
9
|
export declare const extractReactCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'more_information_about_this_work_item' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'status_change_permission_errorIssueTermRefresh';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'more_information_about_this_work_item' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'status_change_permission_errorIssueTermRefresh';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -23,6 +23,12 @@ export type FlexibleUiDataContext = {
|
|
|
23
23
|
* @see AttachmentCount
|
|
24
24
|
*/
|
|
25
25
|
attachmentCount?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Contains the number of applied components on the linked resource.
|
|
28
|
+
* @type number
|
|
29
|
+
* @see AppliedToComponentsCount
|
|
30
|
+
*/
|
|
31
|
+
appliedToComponentsCount?: number;
|
|
26
32
|
/**
|
|
27
33
|
* An array containing data used to populate the AuthorGroup element.
|
|
28
34
|
* @see AvatarGroup
|
|
@@ -185,7 +185,7 @@ export type OnActionMenuOpenChangeOptions = {
|
|
|
185
185
|
/**
|
|
186
186
|
* A type that contains all the possible combinations of elements with their corresponding props.
|
|
187
187
|
*/
|
|
188
|
-
export type ElementItemProps = AssignedTo | AssignedToGroup | AttachmentCount | AuthorGroup | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | Location | ModifiedBy | ModifiedOn | OwnedBy | OwnedByGroup | Preview | Priority | ProgrammingLanguage | Provider | ReactCount | ReadTime | SentOn | Snippet | SourceBranch | State | SubscriberCount | SubTasksProgress | StoryPoints | TargetBranch | Title | ViewCount | VoteCount;
|
|
188
|
+
export type ElementItemProps = AssignedTo | AssignedToGroup | AttachmentCount | AuthorGroup | AppliedToComponentsCount | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | Location | ModifiedBy | ModifiedOn | OwnedBy | OwnedByGroup | Preview | Priority | ProgrammingLanguage | Provider | ReactCount | ReadTime | SentOn | Snippet | SourceBranch | State | SubscriberCount | SubTasksProgress | StoryPoints | TargetBranch | Title | ViewCount | VoteCount;
|
|
189
189
|
/**
|
|
190
190
|
* Represents the props available for an AttachmentCount element.
|
|
191
191
|
* @see AttachmentCount
|
|
@@ -193,6 +193,13 @@ export type ElementItemProps = AssignedTo | AssignedToGroup | AttachmentCount |
|
|
|
193
193
|
export type AttachmentCount = {
|
|
194
194
|
name: ElementName.AttachmentCount;
|
|
195
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Represents the props available for an AppliedToComponentsCount element.
|
|
198
|
+
* @see AppliedToComponentsCount
|
|
199
|
+
*/
|
|
200
|
+
export type AppliedToComponentsCount = {
|
|
201
|
+
name: ElementName.AppliedToComponentsCount;
|
|
202
|
+
};
|
|
196
203
|
/**
|
|
197
204
|
* Represents the props available for an AuthorGroup element.
|
|
198
205
|
* @see AuthorGroup
|
|
@@ -177,3 +177,4 @@ export declare const ViewCount: import("react").ComponentType<BadgeProps>;
|
|
|
177
177
|
* @see Badge
|
|
178
178
|
*/
|
|
179
179
|
export declare const VoteCount: import("react").ComponentType<BadgeProps>;
|
|
180
|
+
export { default as AppliedToComponentsCount } from './applied-to-components-count';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
meta: {
|
|
3
|
+
access: string;
|
|
4
|
+
visibility: string;
|
|
5
|
+
product: string;
|
|
6
|
+
resourceType: string;
|
|
7
|
+
key: string;
|
|
8
|
+
};
|
|
9
|
+
data: {
|
|
10
|
+
'@context': {
|
|
11
|
+
'@vocab': string;
|
|
12
|
+
atlassian: string;
|
|
13
|
+
schema: string;
|
|
14
|
+
};
|
|
15
|
+
'@type': string[];
|
|
16
|
+
url: string;
|
|
17
|
+
name: string;
|
|
18
|
+
icon: {
|
|
19
|
+
'@type': string;
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
preview: {
|
|
23
|
+
'@type': string;
|
|
24
|
+
href: string;
|
|
25
|
+
'atlassian:supportedPlatforms': string[];
|
|
26
|
+
};
|
|
27
|
+
generator: {
|
|
28
|
+
'@type': string;
|
|
29
|
+
name: string;
|
|
30
|
+
icon: {
|
|
31
|
+
'@type': string;
|
|
32
|
+
url: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
'atlassian:ownedBy': {
|
|
36
|
+
'@type': string;
|
|
37
|
+
name: string;
|
|
38
|
+
icon: string;
|
|
39
|
+
};
|
|
40
|
+
'atlassian:appliedToComponentsCount': number;
|
|
41
|
+
summary: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
@@ -88,6 +88,7 @@ export declare enum SmartLinkWidth {
|
|
|
88
88
|
* (src/view/FlexibleCard/components/blocks/utils.tsx)
|
|
89
89
|
*/
|
|
90
90
|
export declare enum ElementName {
|
|
91
|
+
AppliedToComponentsCount = "AppliedToComponentsCount",
|
|
91
92
|
AssignedTo = "AssignedTo",
|
|
92
93
|
AssignedToGroup = "AssignedToGroup",
|
|
93
94
|
AttachmentCount = "AttachmentCount",
|
|
@@ -192,6 +193,7 @@ export declare enum IconType {
|
|
|
192
193
|
Attachment = "Badge:Attachment",
|
|
193
194
|
CheckItem = "Badge:Task",
|
|
194
195
|
Comment = "Badge:Comment",
|
|
196
|
+
Component = "Badge:Component",
|
|
195
197
|
View = "Badge:View",
|
|
196
198
|
React = "Badge:React",
|
|
197
199
|
Vote = "Badge:Vote",
|
|
@@ -3,6 +3,7 @@ import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
|
3
3
|
import { type LinkLocation } from '../../state/flexible-ui-context/types';
|
|
4
4
|
export type LinkCommentType = JsonLd.Data.Document | JsonLd.Data.Page | JsonLd.Data.Project | JsonLd.Data.SourceCodeCommit | JsonLd.Data.TaskType;
|
|
5
5
|
export declare const extractCommentCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
6
|
+
export declare const extractAppliedToComponentsCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
6
7
|
export declare const extractDueOn: (data: JsonLd.Data.BaseData) => string | undefined;
|
|
7
8
|
export declare const extractViewCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
8
9
|
export declare const extractReactCount: (data: JsonLd.Data.BaseData) => number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'more_information_about_this_work_item' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'status_change_permission_errorIssueTermRefresh';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'more_information_about_this_work_item' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_title' | 'related_links_modal_error_message' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_header' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_message' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_modal_title_v2' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_found_in_v2' | 'related_links_includes_links_to' | 'related_links_includes_links_to_v2' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'status_change_permission_errorIssueTermRefresh';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -23,6 +23,12 @@ export type FlexibleUiDataContext = {
|
|
|
23
23
|
* @see AttachmentCount
|
|
24
24
|
*/
|
|
25
25
|
attachmentCount?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Contains the number of applied components on the linked resource.
|
|
28
|
+
* @type number
|
|
29
|
+
* @see AppliedToComponentsCount
|
|
30
|
+
*/
|
|
31
|
+
appliedToComponentsCount?: number;
|
|
26
32
|
/**
|
|
27
33
|
* An array containing data used to populate the AuthorGroup element.
|
|
28
34
|
* @see AvatarGroup
|
|
@@ -185,7 +185,7 @@ export type OnActionMenuOpenChangeOptions = {
|
|
|
185
185
|
/**
|
|
186
186
|
* A type that contains all the possible combinations of elements with their corresponding props.
|
|
187
187
|
*/
|
|
188
|
-
export type ElementItemProps = AssignedTo | AssignedToGroup | AttachmentCount | AuthorGroup | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | Location | ModifiedBy | ModifiedOn | OwnedBy | OwnedByGroup | Preview | Priority | ProgrammingLanguage | Provider | ReactCount | ReadTime | SentOn | Snippet | SourceBranch | State | SubscriberCount | SubTasksProgress | StoryPoints | TargetBranch | Title | ViewCount | VoteCount;
|
|
188
|
+
export type ElementItemProps = AssignedTo | AssignedToGroup | AttachmentCount | AuthorGroup | AppliedToComponentsCount | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | Location | ModifiedBy | ModifiedOn | OwnedBy | OwnedByGroup | Preview | Priority | ProgrammingLanguage | Provider | ReactCount | ReadTime | SentOn | Snippet | SourceBranch | State | SubscriberCount | SubTasksProgress | StoryPoints | TargetBranch | Title | ViewCount | VoteCount;
|
|
189
189
|
/**
|
|
190
190
|
* Represents the props available for an AttachmentCount element.
|
|
191
191
|
* @see AttachmentCount
|
|
@@ -193,6 +193,13 @@ export type ElementItemProps = AssignedTo | AssignedToGroup | AttachmentCount |
|
|
|
193
193
|
export type AttachmentCount = {
|
|
194
194
|
name: ElementName.AttachmentCount;
|
|
195
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Represents the props available for an AppliedToComponentsCount element.
|
|
198
|
+
* @see AppliedToComponentsCount
|
|
199
|
+
*/
|
|
200
|
+
export type AppliedToComponentsCount = {
|
|
201
|
+
name: ElementName.AppliedToComponentsCount;
|
|
202
|
+
};
|
|
196
203
|
/**
|
|
197
204
|
* Represents the props available for an AuthorGroup element.
|
|
198
205
|
* @see AuthorGroup
|
|
@@ -177,3 +177,4 @@ export declare const ViewCount: import("react").ComponentType<BadgeProps>;
|
|
|
177
177
|
* @see Badge
|
|
178
178
|
*/
|
|
179
179
|
export declare const VoteCount: import("react").ComponentType<BadgeProps>;
|
|
180
|
+
export { default as AppliedToComponentsCount } from './applied-to-components-count';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.9.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@atlaskit/avatar-group": "^12.0.0",
|
|
34
34
|
"@atlaskit/badge": "^18.1.0",
|
|
35
35
|
"@atlaskit/button": "^23.0.0",
|
|
36
|
-
"@atlaskit/checkbox": "^17.
|
|
36
|
+
"@atlaskit/checkbox": "^17.1.0",
|
|
37
37
|
"@atlaskit/css": "^0.10.0",
|
|
38
|
-
"@atlaskit/dropdown-menu": "^14.
|
|
38
|
+
"@atlaskit/dropdown-menu": "^14.1.0",
|
|
39
39
|
"@atlaskit/form": "^12.0.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^3.0.0",
|
|
41
41
|
"@atlaskit/heading": "^5.2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/icon-object": "^7.1.0",
|
|
46
46
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
47
47
|
"@atlaskit/image": "^3.0.0",
|
|
48
|
-
"@atlaskit/json-ld-types": "^1.
|
|
48
|
+
"@atlaskit/json-ld-types": "^1.2.0",
|
|
49
49
|
"@atlaskit/legacy-custom-icons": "^0.22.0",
|
|
50
50
|
"@atlaskit/link": "^3.1.0",
|
|
51
51
|
"@atlaskit/link-analytics": "^9.1.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/popup": "^4.1.0",
|
|
63
63
|
"@atlaskit/primitives": "^14.4.0",
|
|
64
64
|
"@atlaskit/section-message": "^8.2.0",
|
|
65
|
-
"@atlaskit/select": "^20.
|
|
65
|
+
"@atlaskit/select": "^20.4.0",
|
|
66
66
|
"@atlaskit/spinner": "^18.0.0",
|
|
67
67
|
"@atlaskit/textarea": "^8.0.0",
|
|
68
68
|
"@atlaskit/textfield": "^8.0.0",
|