@atlaskit/smart-card 26.14.6 → 26.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/constants.js +1 -0
  3. package/dist/cjs/extractors/flexible/index.js +1 -0
  4. package/dist/cjs/extractors/flexible/utils.js +6 -2
  5. package/dist/cjs/i18n/en.js +8 -1
  6. package/dist/cjs/i18n/en_GB.js +8 -1
  7. package/dist/cjs/i18n/en_ZZ.js +8 -1
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/cjs/view/BlockCard/views/flexible/utils.js +2 -0
  10. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
  11. package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +37 -0
  12. package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/types.js +5 -0
  13. package/dist/cjs/view/FlexibleCard/components/elements/index.js +8 -2
  14. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +10 -0
  15. package/dist/cjs/view/HoverCard/utils.js +1 -1
  16. package/dist/es2019/constants.js +1 -0
  17. package/dist/es2019/extractors/flexible/index.js +2 -1
  18. package/dist/es2019/extractors/flexible/utils.js +3 -0
  19. package/dist/es2019/i18n/en.js +8 -1
  20. package/dist/es2019/i18n/en_GB.js +8 -1
  21. package/dist/es2019/i18n/en_ZZ.js +8 -1
  22. package/dist/es2019/version.json +1 -1
  23. package/dist/es2019/view/BlockCard/views/flexible/utils.js +2 -0
  24. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -0
  25. package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +28 -0
  26. package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/types.js +1 -0
  27. package/dist/es2019/view/FlexibleCard/components/elements/index.js +5 -0
  28. package/dist/es2019/view/FlexibleCard/components/elements/utils.js +11 -0
  29. package/dist/es2019/view/HoverCard/utils.js +1 -1
  30. package/dist/esm/constants.js +1 -0
  31. package/dist/esm/extractors/flexible/index.js +2 -1
  32. package/dist/esm/extractors/flexible/utils.js +3 -0
  33. package/dist/esm/i18n/en.js +8 -1
  34. package/dist/esm/i18n/en_GB.js +8 -1
  35. package/dist/esm/i18n/en_ZZ.js +8 -1
  36. package/dist/esm/version.json +1 -1
  37. package/dist/esm/view/BlockCard/views/flexible/utils.js +2 -0
  38. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
  39. package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +28 -0
  40. package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/types.js +1 -0
  41. package/dist/esm/view/FlexibleCard/components/elements/index.js +5 -0
  42. package/dist/esm/view/FlexibleCard/components/elements/utils.js +10 -0
  43. package/dist/esm/view/HoverCard/utils.js +1 -1
  44. package/dist/types/constants.d.ts +1 -0
  45. package/dist/types/extractors/flexible/utils.d.ts +1 -0
  46. package/dist/types/i18n/en.d.ts +7 -0
  47. package/dist/types/i18n/en_GB.d.ts +7 -0
  48. package/dist/types/i18n/en_ZZ.d.ts +7 -0
  49. package/dist/types/state/flexible-ui-context/types.d.ts +6 -0
  50. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +8 -2
  51. package/dist/types/view/FlexibleCard/components/elements/atlaskit-badge/index.d.ts +10 -0
  52. package/dist/types/view/FlexibleCard/components/elements/atlaskit-badge/types.d.ts +4 -0
  53. package/dist/types/view/FlexibleCard/components/elements/index.d.ts +6 -0
  54. package/dist/types-ts4.5/constants.d.ts +1 -0
  55. package/dist/types-ts4.5/extractors/flexible/utils.d.ts +1 -0
  56. package/dist/types-ts4.5/i18n/en.d.ts +7 -0
  57. package/dist/types-ts4.5/i18n/en_GB.d.ts +7 -0
  58. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +7 -0
  59. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +6 -0
  60. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +8 -2
  61. package/dist/types-ts4.5/view/FlexibleCard/components/elements/atlaskit-badge/index.d.ts +10 -0
  62. package/dist/types-ts4.5/view/FlexibleCard/components/elements/atlaskit-badge/types.d.ts +4 -0
  63. package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +6 -0
  64. package/package.json +3 -2
  65. package/report.api.md +8 -0
  66. package/tmp/api-report-tmp.d.ts +8 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`60b5cb9448d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/60b5cb9448d) - Add StoryPoints FlexUI Element to Jira Block & Hover Card
8
+
9
+ ## 26.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`560f5be1d2c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/560f5be1d2c) - Add FlexUI element for dispalying StoryPoints as a Badge
14
+
3
15
  ## 26.14.6
4
16
 
5
17
  ### Patch Changes
@@ -136,6 +136,7 @@ var ElementName = /*#__PURE__*/function (ElementName) {
136
136
  ElementName["State"] = "State";
137
137
  ElementName["SubscriberCount"] = "SubscriberCount";
138
138
  ElementName["SubTasksProgress"] = "SubTasksProgress";
139
+ ElementName["StoryPoints"] = "StoryPoints";
139
140
  ElementName["TargetBranch"] = "TargetBranch";
140
141
  ElementName["Title"] = "Title";
141
142
  ElementName["ViewCount"] = "ViewCount";
@@ -66,6 +66,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
66
66
  state: (0, _extractState.default)(response, showServerActions || showLozengeAction, id),
67
67
  subscriberCount: (0, _utils.extractSubscriberCount)(data),
68
68
  subTasksProgress: (0, _utils.extractSubTasksProgress)(data),
69
+ storyPoints: (0, _utils.extractStoryPoints)(data),
69
70
  targetBranch: (0, _utils.extractTargetBranch)(data),
70
71
  title: (0, _linkExtractors.extractTitle)(data) || url,
71
72
  url: url
@@ -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.extractSourceBranch = 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.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;
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) {
@@ -113,4 +113,8 @@ exports.extractSubTasksProgress = extractSubTasksProgress;
113
113
  var extractReadTime = function extractReadTime(data) {
114
114
  return extractValue(data, 'atlassian:readTimeInMinutes');
115
115
  };
116
- exports.extractReadTime = extractReadTime;
116
+ exports.extractReadTime = extractReadTime;
117
+ var extractStoryPoints = function extractStoryPoints(data) {
118
+ return extractValue(data, 'atlassian:storyPoints');
119
+ };
120
+ exports.extractStoryPoints = extractStoryPoints;
@@ -15,6 +15,7 @@ exports.default = void 0;
15
15
  var _default = {
16
16
  'fabric.linking.actions': 'Actions',
17
17
  'fabric.linking.add_account': 'Add account',
18
+ 'fabric.linking.assigned_to': 'Assigned to {context}',
18
19
  'fabric.linking.cancel': 'Cancel',
19
20
  'fabric.linking.cannot_connect': "Can't connect, try again",
20
21
  'fabric.linking.cannot_find_link': "Can't find link",
@@ -29,7 +30,8 @@ var _default = {
29
30
  'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
30
31
  'fabric.linking.connect_to': 'Connect to {name}',
31
32
  'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
32
- 'fabric.linking.connect_unauthorised_account_description': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
33
+ 'fabric.linking.connect_unauthorised_account_description': 'Connect {context} to Atlassian to view more details of your work and collaborate from one place.',
34
+ 'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
33
35
  'fabric.linking.continue': 'Continue',
34
36
  'fabric.linking.copy_url_to_clipboard': 'Copy link',
35
37
  'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
@@ -73,6 +75,7 @@ var _default = {
73
75
  'fabric.linking.priority_minor': 'Minor',
74
76
  'fabric.linking.priority_trivial': 'Trivial',
75
77
  'fabric.linking.priority_undefined': 'Undefined',
78
+ 'fabric.linking.read_time': '{context} min read',
76
79
  'fabric.linking.request_access': 'Request access',
77
80
  'fabric.linking.request_access_description': 'Request access to {context} view this preview.',
78
81
  'fabric.linking.request_access_pending': 'Access pending',
@@ -90,6 +93,10 @@ var _default = {
90
93
  'fabric.linking.status_change_update_error': 'We couldn’t update the status',
91
94
  'fabric.linking.try_again': 'Try again',
92
95
  'fabric.linking.try_another_account': 'Try another account',
96
+ 'fabric.linking.unauthorised_account_description': "You're trying to preview a link to a private {context} page. We recommend you review the URL or contact the page owner.",
97
+ 'fabric.linking.unauthorised_account_description_no_provider': "You're trying to preview a link to a private page. We recommend you review the URL or contact the page owner.",
98
+ 'fabric.linking.unauthorised_account_name': "We can't display private pages from {context}",
99
+ 'fabric.linking.unauthorised_account_name_no_provider': "We can't display private pages",
93
100
  'fabric.linking.unlink_account': 'Unlink Account',
94
101
  'fabric.linking.updated_by': 'Modified by {context}',
95
102
  'fabric.linking.view': 'View'
@@ -15,6 +15,7 @@ exports.default = void 0;
15
15
  var _default = {
16
16
  'fabric.linking.actions': 'Actions',
17
17
  'fabric.linking.add_account': 'Add account',
18
+ 'fabric.linking.assigned_to': 'Assigned to {context}',
18
19
  'fabric.linking.cancel': 'Cancel',
19
20
  'fabric.linking.cannot_connect': "Can't connect, try again",
20
21
  'fabric.linking.cannot_find_link': "Can't find link",
@@ -29,7 +30,8 @@ var _default = {
29
30
  'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
30
31
  'fabric.linking.connect_to': 'Connect to {name}',
31
32
  'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
32
- 'fabric.linking.connect_unauthorised_account_description': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
33
+ 'fabric.linking.connect_unauthorised_account_description': 'Connect {context} to Atlassian to view more details of your work and collaborate from one place.',
34
+ 'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
33
35
  'fabric.linking.continue': 'Continue',
34
36
  'fabric.linking.copy_url_to_clipboard': 'Copy link',
35
37
  'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
@@ -73,6 +75,7 @@ var _default = {
73
75
  'fabric.linking.priority_minor': 'Minor',
74
76
  'fabric.linking.priority_trivial': 'Trivial',
75
77
  'fabric.linking.priority_undefined': 'Undefined',
78
+ 'fabric.linking.read_time': '{context} min read',
76
79
  'fabric.linking.request_access': 'Request access',
77
80
  'fabric.linking.request_access_description': 'Request access to {context} view this preview.',
78
81
  'fabric.linking.request_access_pending': 'Access pending',
@@ -90,6 +93,10 @@ var _default = {
90
93
  'fabric.linking.status_change_update_error': 'We couldn’t update the status',
91
94
  'fabric.linking.try_again': 'Try again',
92
95
  'fabric.linking.try_another_account': 'Try another account',
96
+ 'fabric.linking.unauthorised_account_description': "You're trying to preview a link to a private {context} page. We recommend you review the URL or contact the page owner.",
97
+ 'fabric.linking.unauthorised_account_description_no_provider': "You're trying to preview a link to a private page. We recommend you review the URL or contact the page owner.",
98
+ 'fabric.linking.unauthorised_account_name': "We can't display private pages from {context}",
99
+ 'fabric.linking.unauthorised_account_name_no_provider': "We can't display private pages",
93
100
  'fabric.linking.unlink_account': 'Unlink Account',
94
101
  'fabric.linking.updated_by': 'Modified by {context}',
95
102
  'fabric.linking.view': 'View'
@@ -15,6 +15,7 @@ exports.default = void 0;
15
15
  var _default = {
16
16
  'fabric.linking.actions': '⁣⁢Actions؜‌‌⁠‌⁡‌‌؜⁣⁤',
17
17
  'fabric.linking.add_account': '⁣⁢Add account‌‍‌⁡⁠⁠‌‌⁡‌⁠⁣⁤',
18
+ 'fabric.linking.assigned_to': '⁣⁢Assigned to {context}؜‌‍‍⁡؜؜‌‌‍⁡‍⁠⁠؜⁣⁤',
18
19
  'fabric.linking.cancel': '⁣⁢Cancel؜⁡‌‌؜⁡‌‌⁠‍‍‍⁣⁤',
19
20
  'fabric.linking.cannot_connect': "⁣⁢Can't connect, try again‌‍‍⁡؜؜⁡‌⁡⁣⁤",
20
21
  'fabric.linking.cannot_find_link': "⁣⁢Can't find link⁡‌‌‌‌⁡‍⁡⁣⁤",
@@ -29,7 +30,8 @@ var _default = {
29
30
  'fabric.linking.connect_link_account_card_view_name': '⁣⁢Connect your {context} account‍؜⁡‌⁠⁡؜‍‍⁠⁡⁠‌⁣⁤',
30
31
  'fabric.linking.connect_to': '⁣⁢Connect to {name}؜‌؜⁡‌؜‍⁡‌‍⁣⁤',
31
32
  'fabric.linking.connect_unauthorised_account_action': '⁣⁢Connect to {context}‌⁠⁠⁡‌؜‌؜⁣⁤',
32
- 'fabric.linking.connect_unauthorised_account_description': '⁣⁢Connect to Atlassian to view more details of your work and collaborate from one place.⁠⁡؜⁡؜⁡⁡‌؜‍؜‌‍⁣⁤',
33
+ 'fabric.linking.connect_unauthorised_account_description': '⁣⁢Connect {context} to Atlassian to view more details of your work and collaborate from one place.؜‍‍‍؜؜‍‌‍‌⁣⁤',
34
+ 'fabric.linking.connect_unauthorised_account_description_no_provider': '⁣⁢Connect to Atlassian to view more details of your work and collaborate from one place.⁠‌⁠‍⁠‍‌‌⁡‍⁡⁡⁣⁤',
33
35
  'fabric.linking.continue': '⁣⁢Continue‌؜⁡؜⁠⁡⁠‌؜⁠⁣⁤',
34
36
  'fabric.linking.copy_url_to_clipboard': '⁣⁢Copy link⁡‍⁠‍‌‍⁡⁠⁣⁤',
35
37
  'fabric.linking.couldnt_load_link': "⁣⁢We couldn't load this link for an unknown reason.؜‍⁡⁡؜‌‌؜⁡؜⁣⁤",
@@ -73,6 +75,7 @@ var _default = {
73
75
  'fabric.linking.priority_minor': '⁣⁢Minor⁠⁠‍؜‍⁠⁣⁤',
74
76
  'fabric.linking.priority_trivial': '⁣⁢Trivial⁡‌⁠؜؜‍؜⁡⁡⁠⁡⁡⁡⁣⁤',
75
77
  'fabric.linking.priority_undefined': '⁣⁢Undefined⁠⁡⁡؜‌⁡⁠‍⁠⁡⁠⁣⁤',
78
+ 'fabric.linking.read_time': '⁣⁢{context} min read؜‍⁠؜‌⁠⁠⁣⁤',
76
79
  'fabric.linking.request_access': '⁣⁢Request access؜‌؜‌‍‌‌⁠⁡⁣⁤',
77
80
  'fabric.linking.request_access_description': '⁣⁢Request access to {context} view this preview.؜‌‌⁡‌‍‌‍⁣⁤',
78
81
  'fabric.linking.request_access_pending': '⁣⁢Access pending؜؜⁠؜؜؜⁠‌‍؜؜‌؜⁣⁤',
@@ -90,6 +93,10 @@ var _default = {
90
93
  'fabric.linking.status_change_update_error': '⁣⁢We couldn’t update the status⁠‌⁠‍⁠‍‍⁡⁠‍‌⁠⁡‌‍⁣⁤',
91
94
  'fabric.linking.try_again': '⁣⁢Try again؜؜؜⁠‍⁠‌⁡‌⁣⁤',
92
95
  'fabric.linking.try_another_account': '⁣⁢Try another account؜‌؜؜‍‍؜‌⁠⁠⁠⁠⁣⁤',
96
+ 'fabric.linking.unauthorised_account_description': "⁣⁢You're trying to preview a link to a private {context} page. We recommend you review the URL or contact the page owner.؜‌؜‍⁣⁤",
97
+ 'fabric.linking.unauthorised_account_description_no_provider': "⁣⁢You're trying to preview a link to a private page. We recommend you review the URL or contact the page owner.⁡⁠‌⁠‌‌‍⁣⁤",
98
+ 'fabric.linking.unauthorised_account_name': "⁣⁢We can't display private pages from {context}‌؜‍⁠‌⁡؜⁠‍⁣⁤",
99
+ 'fabric.linking.unauthorised_account_name_no_provider': "⁣⁢We can't display private pages‌⁡؜⁠؜‌؜‌⁡⁠⁣⁤",
93
100
  'fabric.linking.unlink_account': '⁣⁢Unlink Account⁠⁡⁡‌⁡⁣⁤',
94
101
  'fabric.linking.updated_by': '⁣⁢Modified by {context}؜⁠‍‍⁡⁡‌⁡‌⁣⁤',
95
102
  'fabric.linking.view': '⁣⁢View⁡‍⁠‍⁠؜؜⁠⁡؜‌‌⁣⁤'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.14.6",
3
+ "version": "26.15.1",
4
4
  "sideEffects": false
5
5
  }
@@ -74,6 +74,8 @@ var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(cardDetails
74
74
  name: _constants.ElementName.ModifiedOn
75
75
  }],
76
76
  bottomMetadata: [{
77
+ name: _constants.ElementName.StoryPoints
78
+ }, {
77
79
  name: _constants.ElementName.Priority
78
80
  }, {
79
81
  name: _constants.ElementName.SubTasksProgress
@@ -24,7 +24,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
  // Determine whether the element can be display as inline/block.
26
26
 
27
- var ElementDisplaySchema = (_ElementDisplaySchema = {}, (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AssignedTo, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AssignedToGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AttachmentCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AuthorGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ChecklistProgress, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CollaboratorGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CommentCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CreatedBy, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CreatedOn, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.DueOn, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.LatestCommit, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.LinkIcon, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Location, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ModifiedBy, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ModifiedOn, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.OwnedBy, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.OwnedByGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Preview, ['block']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Priority, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ProgrammingLanguage, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Provider, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ReactCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ReadTime, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Snippet, ['block']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.SourceBranch, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.State, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.SubscriberCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.SubTasksProgress, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.TargetBranch, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Title, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ViewCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.VoteCount, ['inline']), _ElementDisplaySchema);
27
+ var ElementDisplaySchema = (_ElementDisplaySchema = {}, (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AssignedTo, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AssignedToGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AttachmentCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.AuthorGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ChecklistProgress, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CollaboratorGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CommentCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CreatedBy, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.CreatedOn, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.DueOn, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.LatestCommit, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.LinkIcon, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Location, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ModifiedBy, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ModifiedOn, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.OwnedBy, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.OwnedByGroup, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Preview, ['block']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Priority, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ProgrammingLanguage, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Provider, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ReactCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ReadTime, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Snippet, ['block']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.SourceBranch, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.State, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.SubscriberCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.SubTasksProgress, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.StoryPoints, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.TargetBranch, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.Title, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.ViewCount, ['inline']), (0, _defineProperty2.default)(_ElementDisplaySchema, _constants.ElementName.VoteCount, ['inline']), _ElementDisplaySchema);
28
28
  exports.ElementDisplaySchema = ElementDisplaySchema;
29
29
  var getDirectionStyles = function getDirectionStyles(direction) {
30
30
  switch (direction) {
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _badge = _interopRequireDefault(require("@atlaskit/badge"));
10
+ var _react2 = require("@emotion/react");
11
+ /** @jsx jsx */
12
+
13
+ /**
14
+ * A base element that displays a visual indicator for a numeric value
15
+ * @internal
16
+ * @see StoryPoints
17
+ * */
18
+
19
+ var AtlaskitBadge = function AtlaskitBadge(_ref) {
20
+ var value = _ref.value,
21
+ name = _ref.name,
22
+ overrideCss = _ref.overrideCss,
23
+ _ref$testId = _ref.testId,
24
+ testId = _ref$testId === void 0 ? 'smart-element-atlaskit-badge' : _ref$testId;
25
+ if (!value) {
26
+ return null;
27
+ }
28
+ return (0, _react2.jsx)("span", {
29
+ css: overrideCss,
30
+ "data-fit-to-content": true,
31
+ "data-smart-element": name,
32
+ "data-smart-element-atlaskit-badge": true,
33
+ "data-testid": testId
34
+ }, (0, _react2.jsx)(_badge.default, null, value));
35
+ };
36
+ var _default = AtlaskitBadge;
37
+ exports.default = _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.VoteCount = exports.ViewCount = exports.Title = exports.TargetBranch = exports.SubscriberCount = exports.SubTasksProgress = exports.State = exports.SourceBranch = exports.Snippet = exports.ReadTime = exports.ReactCount = exports.Provider = exports.ProgrammingLanguage = exports.Priority = exports.Preview = 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;
6
+ exports.VoteCount = exports.ViewCount = exports.Title = exports.TargetBranch = exports.SubscriberCount = exports.SubTasksProgress = exports.StoryPoints = exports.State = exports.SourceBranch = exports.Snippet = exports.ReadTime = exports.ReactCount = exports.Provider = exports.ProgrammingLanguage = exports.Priority = exports.Preview = 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;
7
7
  var _utils = require("./utils");
8
8
  var _constants = require("../../../../constants");
9
9
  // Attention: Keep the export name and element name the same.
@@ -175,11 +175,17 @@ var SubscriberCount = (0, _utils.createElement)(_constants.ElementName.Subscribe
175
175
  */
176
176
  exports.SubscriberCount = SubscriberCount;
177
177
  var SubTasksProgress = (0, _utils.createElement)(_constants.ElementName.SubTasksProgress);
178
+ /**
179
+ * Create a StoryPoints Badge element using the data from storyPoints in the Flexible UI Context.
180
+ * @see AtlaskitBadge
181
+ */
182
+ exports.SubTasksProgress = SubTasksProgress;
183
+ var StoryPoints = (0, _utils.createElement)(_constants.ElementName.StoryPoints);
178
184
  /**
179
185
  * Creates a TargetBranch Text element using the data from targetBranch in the Flexible UI Context.
180
186
  * @see Text
181
187
  */
182
- exports.SubTasksProgress = SubTasksProgress;
188
+ exports.StoryPoints = StoryPoints;
183
189
  var TargetBranch = (0, _utils.createElement)(_constants.ElementName.TargetBranch);
184
190
  /**
185
191
  * Creates a Title Link element using the data from Title in the Flexible UI Context.
@@ -25,6 +25,7 @@ var _text = _interopRequireDefault(require("./text"));
25
25
  var _messages = require("../../../../messages");
26
26
  var _dateTime = _interopRequireDefault(require("./date-time"));
27
27
  var _token = require("../../../../utils/token");
28
+ var _atlaskitBadge = _interopRequireDefault(require("./atlaskit-badge"));
28
29
  var _templateObject, _elementMappings;
29
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
31
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -121,6 +122,8 @@ var elementMappings = (_elementMappings = {}, (0, _defineProperty2.default)(_ele
121
122
  props: {
122
123
  icon: _constants.IconType.SubTasksProgress
123
124
  }
125
+ }), (0, _defineProperty2.default)(_elementMappings, _constants.ElementName.StoryPoints, {
126
+ component: _atlaskitBadge.default
124
127
  }), (0, _defineProperty2.default)(_elementMappings, _constants.ElementName.TargetBranch, {
125
128
  component: _text.default
126
129
  }), (0, _defineProperty2.default)(_elementMappings, _constants.ElementName.Title, {
@@ -158,6 +161,8 @@ var getData = function getData(elementName, contextKey, context) {
158
161
  case _constants.ElementName.LatestCommit:
159
162
  case _constants.ElementName.SubTasksProgress:
160
163
  return toBadgeProps(data);
164
+ case _constants.ElementName.StoryPoints:
165
+ return toAtlaskitBadgeProps(data);
161
166
  case _constants.ElementName.CreatedBy:
162
167
  return toFormattedTextProps(_messages.messages.created_by, context.createdBy);
163
168
  case _constants.ElementName.AssignedTo:
@@ -194,6 +199,11 @@ var toBadgeProps = function toBadgeProps(label) {
194
199
  label: label
195
200
  } : undefined;
196
201
  };
202
+ var toAtlaskitBadgeProps = function toAtlaskitBadgeProps(value) {
203
+ return value ? {
204
+ value: value
205
+ } : undefined;
206
+ };
197
207
  var toDateLozengeProps = function toDateLozengeProps(dateString) {
198
208
  if (dateString) {
199
209
  var text = Date.parse(dateString) ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedDate, {
@@ -139,7 +139,7 @@ var getSimulatedBetterMetadata = function getSimulatedBetterMetadata() {
139
139
  case 'jira-object-provider':
140
140
  return _objectSpread(_objectSpread({}, defaultMetadata), {}, {
141
141
  topMetadataBlock: {
142
- primary: [_constants.ElementName.AssignedToGroup, _constants.ElementName.State, _constants.ElementName.Priority],
142
+ primary: [_constants.ElementName.AssignedToGroup, _constants.ElementName.State, _constants.ElementName.StoryPoints, _constants.ElementName.Priority],
143
143
  secondary: [],
144
144
  subtitle: []
145
145
  }
@@ -128,6 +128,7 @@ export let ElementName = /*#__PURE__*/function (ElementName) {
128
128
  ElementName["State"] = "State";
129
129
  ElementName["SubscriberCount"] = "SubscriberCount";
130
130
  ElementName["SubTasksProgress"] = "SubTasksProgress";
131
+ ElementName["StoryPoints"] = "StoryPoints";
131
132
  ElementName["TargetBranch"] = "TargetBranch";
132
133
  ElementName["Title"] = "Title";
133
134
  ElementName["ViewCount"] = "ViewCount";
@@ -1,6 +1,6 @@
1
1
  import { extractSummary } from '../common/primitives';
2
2
  import { extractLinkIcon } from './icon';
3
- import { extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractModifiedBy, extractProgrammingLanguage, extractSubscriberCount, extractViewCount, extractReactCount, extractVoteCount, extractSourceBranch, extractTargetBranch, extractDueOn, extractLocation, extractOwnedBy, extractAssignedTo, extractSubTasksProgress, extractReadTime, extractPersonAssignedToAsArray } from './utils';
3
+ import { extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractCreatedBy, extractModifiedBy, extractProgrammingLanguage, extractSubscriberCount, extractViewCount, extractReactCount, extractVoteCount, extractSourceBranch, extractTargetBranch, extractDueOn, extractLocation, extractOwnedBy, extractAssignedTo, extractSubTasksProgress, extractStoryPoints, extractReadTime, extractPersonAssignedToAsArray } from './utils';
4
4
  import { extractPersonsUpdatedBy } from './collaboratorGroup';
5
5
  import { extractPersonCreatedBy, extractTitle, extractDateUpdated, extractDateCreated, extractLink, extractPersonOwnedBy } from '@atlaskit/link-extractors';
6
6
  import extractPriority from './extract-priority';
@@ -59,6 +59,7 @@ const extractFlexibleUiContext = ({
59
59
  state: extractState(response, showServerActions || showLozengeAction, id),
60
60
  subscriberCount: extractSubscriberCount(data),
61
61
  subTasksProgress: extractSubTasksProgress(data),
62
+ storyPoints: extractStoryPoints(data),
62
63
  targetBranch: extractTargetBranch(data),
63
64
  title: extractTitle(data) || url,
64
65
  url
@@ -67,4 +67,7 @@ export const extractSubTasksProgress = data => {
67
67
  };
68
68
  export const extractReadTime = data => {
69
69
  return extractValue(data, 'atlassian:readTimeInMinutes');
70
+ };
71
+ export const extractStoryPoints = data => {
72
+ return extractValue(data, 'atlassian:storyPoints');
70
73
  };
@@ -9,6 +9,7 @@
9
9
  export default {
10
10
  'fabric.linking.actions': 'Actions',
11
11
  'fabric.linking.add_account': 'Add account',
12
+ 'fabric.linking.assigned_to': 'Assigned to {context}',
12
13
  'fabric.linking.cancel': 'Cancel',
13
14
  'fabric.linking.cannot_connect': "Can't connect, try again",
14
15
  'fabric.linking.cannot_find_link': "Can't find link",
@@ -23,7 +24,8 @@ export default {
23
24
  'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
24
25
  'fabric.linking.connect_to': 'Connect to {name}',
25
26
  'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
26
- 'fabric.linking.connect_unauthorised_account_description': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
27
+ 'fabric.linking.connect_unauthorised_account_description': 'Connect {context} to Atlassian to view more details of your work and collaborate from one place.',
28
+ 'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
27
29
  'fabric.linking.continue': 'Continue',
28
30
  'fabric.linking.copy_url_to_clipboard': 'Copy link',
29
31
  'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
@@ -67,6 +69,7 @@ export default {
67
69
  'fabric.linking.priority_minor': 'Minor',
68
70
  'fabric.linking.priority_trivial': 'Trivial',
69
71
  'fabric.linking.priority_undefined': 'Undefined',
72
+ 'fabric.linking.read_time': '{context} min read',
70
73
  'fabric.linking.request_access': 'Request access',
71
74
  'fabric.linking.request_access_description': 'Request access to {context} view this preview.',
72
75
  'fabric.linking.request_access_pending': 'Access pending',
@@ -84,6 +87,10 @@ export default {
84
87
  'fabric.linking.status_change_update_error': 'We couldn’t update the status',
85
88
  'fabric.linking.try_again': 'Try again',
86
89
  'fabric.linking.try_another_account': 'Try another account',
90
+ 'fabric.linking.unauthorised_account_description': "You're trying to preview a link to a private {context} page. We recommend you review the URL or contact the page owner.",
91
+ 'fabric.linking.unauthorised_account_description_no_provider': "You're trying to preview a link to a private page. We recommend you review the URL or contact the page owner.",
92
+ 'fabric.linking.unauthorised_account_name': "We can't display private pages from {context}",
93
+ 'fabric.linking.unauthorised_account_name_no_provider': "We can't display private pages",
87
94
  'fabric.linking.unlink_account': 'Unlink Account',
88
95
  'fabric.linking.updated_by': 'Modified by {context}',
89
96
  'fabric.linking.view': 'View'
@@ -9,6 +9,7 @@
9
9
  export default {
10
10
  'fabric.linking.actions': 'Actions',
11
11
  'fabric.linking.add_account': 'Add account',
12
+ 'fabric.linking.assigned_to': 'Assigned to {context}',
12
13
  'fabric.linking.cancel': 'Cancel',
13
14
  'fabric.linking.cannot_connect': "Can't connect, try again",
14
15
  'fabric.linking.cannot_find_link': "Can't find link",
@@ -23,7 +24,8 @@ export default {
23
24
  'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
24
25
  'fabric.linking.connect_to': 'Connect to {name}',
25
26
  'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
26
- 'fabric.linking.connect_unauthorised_account_description': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
27
+ 'fabric.linking.connect_unauthorised_account_description': 'Connect {context} to Atlassian to view more details of your work and collaborate from one place.',
28
+ 'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect to Atlassian to view more details of your work and collaborate from one place.',
27
29
  'fabric.linking.continue': 'Continue',
28
30
  'fabric.linking.copy_url_to_clipboard': 'Copy link',
29
31
  'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
@@ -67,6 +69,7 @@ export default {
67
69
  'fabric.linking.priority_minor': 'Minor',
68
70
  'fabric.linking.priority_trivial': 'Trivial',
69
71
  'fabric.linking.priority_undefined': 'Undefined',
72
+ 'fabric.linking.read_time': '{context} min read',
70
73
  'fabric.linking.request_access': 'Request access',
71
74
  'fabric.linking.request_access_description': 'Request access to {context} view this preview.',
72
75
  'fabric.linking.request_access_pending': 'Access pending',
@@ -84,6 +87,10 @@ export default {
84
87
  'fabric.linking.status_change_update_error': 'We couldn’t update the status',
85
88
  'fabric.linking.try_again': 'Try again',
86
89
  'fabric.linking.try_another_account': 'Try another account',
90
+ 'fabric.linking.unauthorised_account_description': "You're trying to preview a link to a private {context} page. We recommend you review the URL or contact the page owner.",
91
+ 'fabric.linking.unauthorised_account_description_no_provider': "You're trying to preview a link to a private page. We recommend you review the URL or contact the page owner.",
92
+ 'fabric.linking.unauthorised_account_name': "We can't display private pages from {context}",
93
+ 'fabric.linking.unauthorised_account_name_no_provider': "We can't display private pages",
87
94
  'fabric.linking.unlink_account': 'Unlink Account',
88
95
  'fabric.linking.updated_by': 'Modified by {context}',
89
96
  'fabric.linking.view': 'View'
@@ -9,6 +9,7 @@
9
9
  export default {
10
10
  'fabric.linking.actions': '⁣⁢Actions؜‌‌⁠‌⁡‌‌؜⁣⁤',
11
11
  'fabric.linking.add_account': '⁣⁢Add account‌‍‌⁡⁠⁠‌‌⁡‌⁠⁣⁤',
12
+ 'fabric.linking.assigned_to': '⁣⁢Assigned to {context}؜‌‍‍⁡؜؜‌‌‍⁡‍⁠⁠؜⁣⁤',
12
13
  'fabric.linking.cancel': '⁣⁢Cancel؜⁡‌‌؜⁡‌‌⁠‍‍‍⁣⁤',
13
14
  'fabric.linking.cannot_connect': "⁣⁢Can't connect, try again‌‍‍⁡؜؜⁡‌⁡⁣⁤",
14
15
  'fabric.linking.cannot_find_link': "⁣⁢Can't find link⁡‌‌‌‌⁡‍⁡⁣⁤",
@@ -23,7 +24,8 @@ export default {
23
24
  'fabric.linking.connect_link_account_card_view_name': '⁣⁢Connect your {context} account‍؜⁡‌⁠⁡؜‍‍⁠⁡⁠‌⁣⁤',
24
25
  'fabric.linking.connect_to': '⁣⁢Connect to {name}؜‌؜⁡‌؜‍⁡‌‍⁣⁤',
25
26
  'fabric.linking.connect_unauthorised_account_action': '⁣⁢Connect to {context}‌⁠⁠⁡‌؜‌؜⁣⁤',
26
- 'fabric.linking.connect_unauthorised_account_description': '⁣⁢Connect to Atlassian to view more details of your work and collaborate from one place.⁠⁡؜⁡؜⁡⁡‌؜‍؜‌‍⁣⁤',
27
+ 'fabric.linking.connect_unauthorised_account_description': '⁣⁢Connect {context} to Atlassian to view more details of your work and collaborate from one place.؜‍‍‍؜؜‍‌‍‌⁣⁤',
28
+ 'fabric.linking.connect_unauthorised_account_description_no_provider': '⁣⁢Connect to Atlassian to view more details of your work and collaborate from one place.⁠‌⁠‍⁠‍‌‌⁡‍⁡⁡⁣⁤',
27
29
  'fabric.linking.continue': '⁣⁢Continue‌؜⁡؜⁠⁡⁠‌؜⁠⁣⁤',
28
30
  'fabric.linking.copy_url_to_clipboard': '⁣⁢Copy link⁡‍⁠‍‌‍⁡⁠⁣⁤',
29
31
  'fabric.linking.couldnt_load_link': "⁣⁢We couldn't load this link for an unknown reason.؜‍⁡⁡؜‌‌؜⁡؜⁣⁤",
@@ -67,6 +69,7 @@ export default {
67
69
  'fabric.linking.priority_minor': '⁣⁢Minor⁠⁠‍؜‍⁠⁣⁤',
68
70
  'fabric.linking.priority_trivial': '⁣⁢Trivial⁡‌⁠؜؜‍؜⁡⁡⁠⁡⁡⁡⁣⁤',
69
71
  'fabric.linking.priority_undefined': '⁣⁢Undefined⁠⁡⁡؜‌⁡⁠‍⁠⁡⁠⁣⁤',
72
+ 'fabric.linking.read_time': '⁣⁢{context} min read؜‍⁠؜‌⁠⁠⁣⁤',
70
73
  'fabric.linking.request_access': '⁣⁢Request access؜‌؜‌‍‌‌⁠⁡⁣⁤',
71
74
  'fabric.linking.request_access_description': '⁣⁢Request access to {context} view this preview.؜‌‌⁡‌‍‌‍⁣⁤',
72
75
  'fabric.linking.request_access_pending': '⁣⁢Access pending؜؜⁠؜؜؜⁠‌‍؜؜‌؜⁣⁤',
@@ -84,6 +87,10 @@ export default {
84
87
  'fabric.linking.status_change_update_error': '⁣⁢We couldn’t update the status⁠‌⁠‍⁠‍‍⁡⁠‍‌⁠⁡‌‍⁣⁤',
85
88
  'fabric.linking.try_again': '⁣⁢Try again؜؜؜⁠‍⁠‌⁡‌⁣⁤',
86
89
  'fabric.linking.try_another_account': '⁣⁢Try another account؜‌؜؜‍‍؜‌⁠⁠⁠⁠⁣⁤',
90
+ 'fabric.linking.unauthorised_account_description': "⁣⁢You're trying to preview a link to a private {context} page. We recommend you review the URL or contact the page owner.؜‌؜‍⁣⁤",
91
+ 'fabric.linking.unauthorised_account_description_no_provider': "⁣⁢You're trying to preview a link to a private page. We recommend you review the URL or contact the page owner.⁡⁠‌⁠‌‌‍⁣⁤",
92
+ 'fabric.linking.unauthorised_account_name': "⁣⁢We can't display private pages from {context}‌؜‍⁠‌⁡؜⁠‍⁣⁤",
93
+ 'fabric.linking.unauthorised_account_name_no_provider': "⁣⁢We can't display private pages‌⁡؜⁠؜‌؜‌⁡⁠⁣⁤",
87
94
  'fabric.linking.unlink_account': '⁣⁢Unlink Account⁠⁡⁡‌⁡⁣⁤',
88
95
  'fabric.linking.updated_by': '⁣⁢Modified by {context}؜⁠‍‍⁡⁡‌⁡‌⁣⁤',
89
96
  'fabric.linking.view': '⁣⁢View⁡‍⁠‍⁠؜؜⁠⁡؜‌‌⁣⁤'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.14.6",
3
+ "version": "26.15.1",
4
4
  "sideEffects": false
5
5
  }
@@ -68,6 +68,8 @@ export const getSimulatedBetterMetadata = cardDetails => {
68
68
  name: ElementName.ModifiedOn
69
69
  }],
70
70
  bottomMetadata: [{
71
+ name: ElementName.StoryPoints
72
+ }, {
71
73
  name: ElementName.Priority
72
74
  }, {
73
75
  name: ElementName.SubTasksProgress
@@ -38,6 +38,7 @@ export const ElementDisplaySchema = {
38
38
  [ElementName.State]: ['inline'],
39
39
  [ElementName.SubscriberCount]: ['inline'],
40
40
  [ElementName.SubTasksProgress]: ['inline'],
41
+ [ElementName.StoryPoints]: ['inline'],
41
42
  [ElementName.TargetBranch]: ['inline'],
42
43
  [ElementName.Title]: ['inline'],
43
44
  [ElementName.ViewCount]: ['inline'],
@@ -0,0 +1,28 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import AKBadge from '@atlaskit/badge';
4
+ import { jsx } from '@emotion/react';
5
+ /**
6
+ * A base element that displays a visual indicator for a numeric value
7
+ * @internal
8
+ * @see StoryPoints
9
+ * */
10
+
11
+ const AtlaskitBadge = ({
12
+ value,
13
+ name,
14
+ overrideCss,
15
+ testId = 'smart-element-atlaskit-badge'
16
+ }) => {
17
+ if (!value) {
18
+ return null;
19
+ }
20
+ return jsx("span", {
21
+ css: overrideCss,
22
+ "data-fit-to-content": true,
23
+ "data-smart-element": name,
24
+ "data-smart-element-atlaskit-badge": true,
25
+ "data-testid": testId
26
+ }, jsx(AKBadge, null, value));
27
+ };
28
+ export default AtlaskitBadge;
@@ -142,6 +142,11 @@ export const SubscriberCount = createElement(ElementName.SubscriberCount);
142
142
  * @see Badge
143
143
  */
144
144
  export const SubTasksProgress = createElement(ElementName.SubTasksProgress);
145
+ /**
146
+ * Create a StoryPoints Badge element using the data from storyPoints in the Flexible UI Context.
147
+ * @see AtlaskitBadge
148
+ */
149
+ export const StoryPoints = createElement(ElementName.StoryPoints);
145
150
  /**
146
151
  * Creates a TargetBranch Text element using the data from targetBranch in the Flexible UI Context.
147
152
  * @see Text
@@ -14,6 +14,7 @@ import Text from './text';
14
14
  import { messages } from '../../../../messages';
15
15
  import DateTime from './date-time';
16
16
  import { tokens } from '../../../../utils/token';
17
+ import AtlaskitBadge from './atlaskit-badge';
17
18
  const SNIPPET_DEFAULT_MAX_LINES = 3;
18
19
  const elementMappings = {
19
20
  [ElementName.AttachmentCount]: {
@@ -139,6 +140,9 @@ const elementMappings = {
139
140
  icon: IconType.SubTasksProgress
140
141
  }
141
142
  },
143
+ [ElementName.StoryPoints]: {
144
+ component: AtlaskitBadge
145
+ },
142
146
  [ElementName.TargetBranch]: {
143
147
  component: Text
144
148
  },
@@ -179,6 +183,8 @@ const getData = (elementName, contextKey, context) => {
179
183
  case ElementName.LatestCommit:
180
184
  case ElementName.SubTasksProgress:
181
185
  return toBadgeProps(data);
186
+ case ElementName.StoryPoints:
187
+ return toAtlaskitBadgeProps(data);
182
188
  case ElementName.CreatedBy:
183
189
  return toFormattedTextProps(messages.created_by, context.createdBy);
184
190
  case ElementName.AssignedTo:
@@ -215,6 +221,11 @@ const toBadgeProps = label => {
215
221
  label
216
222
  } : undefined;
217
223
  };
224
+ const toAtlaskitBadgeProps = value => {
225
+ return value ? {
226
+ value
227
+ } : undefined;
228
+ };
218
229
  const toDateLozengeProps = dateString => {
219
230
  if (dateString) {
220
231
  const text = Date.parse(dateString) ? /*#__PURE__*/React.createElement(FormattedDate, {
@@ -127,7 +127,7 @@ export const getSimulatedBetterMetadata = (extensionKey = '', data) => {
127
127
  return {
128
128
  ...defaultMetadata,
129
129
  topMetadataBlock: {
130
- primary: [ElementName.AssignedToGroup, ElementName.State, ElementName.Priority],
130
+ primary: [ElementName.AssignedToGroup, ElementName.State, ElementName.StoryPoints, ElementName.Priority],
131
131
  secondary: [],
132
132
  subtitle: []
133
133
  }