@atlaskit/smart-card 26.15.11 → 26.16.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 (72) 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 +5 -1
  5. package/dist/cjs/messages.js +10 -0
  6. package/dist/cjs/utils/analytics/analytics.js +1 -1
  7. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
  8. package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +5 -0
  9. package/dist/cjs/view/FlexibleCard/components/elements/index.js +8 -2
  10. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +4 -0
  11. package/dist/cjs/view/HoverCard/components/{SnippetOrPreview.js → ImagePreview.js} +19 -17
  12. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +5 -5
  13. package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +2 -1
  14. package/dist/cjs/view/HoverCard/styled.js +10 -6
  15. package/dist/cjs/view/LinkUrl/index.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/messages.js +10 -0
  20. package/dist/es2019/utils/analytics/analytics.js +1 -1
  21. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -0
  22. package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +5 -0
  23. package/dist/es2019/view/FlexibleCard/components/elements/index.js +5 -0
  24. package/dist/es2019/view/FlexibleCard/components/elements/utils.js +5 -0
  25. package/dist/es2019/view/HoverCard/components/ImagePreview.js +43 -0
  26. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +5 -5
  27. package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +2 -0
  28. package/dist/es2019/view/HoverCard/styled.js +10 -3
  29. package/dist/es2019/view/LinkUrl/index.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/messages.js +10 -0
  34. package/dist/esm/utils/analytics/analytics.js +1 -1
  35. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
  36. package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +5 -0
  37. package/dist/esm/view/FlexibleCard/components/elements/index.js +5 -0
  38. package/dist/esm/view/FlexibleCard/components/elements/utils.js +4 -0
  39. package/dist/esm/view/HoverCard/components/ImagePreview.js +49 -0
  40. package/dist/esm/view/HoverCard/components/views/resolved/index.js +5 -5
  41. package/dist/esm/view/HoverCard/components/views/resolving/styled.js +2 -1
  42. package/dist/esm/view/HoverCard/styled.js +8 -5
  43. package/dist/esm/view/LinkUrl/index.js +1 -1
  44. package/dist/types/constants.d.ts +2 -1
  45. package/dist/types/extractors/flexible/utils.d.ts +1 -0
  46. package/dist/types/messages.d.ts +1 -1
  47. package/dist/types/state/flexible-ui-context/types.d.ts +6 -0
  48. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +8 -1
  49. package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +1 -0
  50. package/dist/types/view/FlexibleCard/components/elements/date-time/types.d.ts +2 -2
  51. package/dist/types/view/FlexibleCard/components/elements/index.d.ts +5 -0
  52. package/dist/types/view/HoverCard/components/ImagePreview.d.ts +4 -0
  53. package/dist/types/view/HoverCard/styled.d.ts +1 -0
  54. package/dist/types/view/HoverCard/types.d.ts +2 -2
  55. package/dist/types-ts4.5/constants.d.ts +2 -1
  56. package/dist/types-ts4.5/extractors/flexible/utils.d.ts +1 -0
  57. package/dist/types-ts4.5/messages.d.ts +1 -1
  58. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +6 -0
  59. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +8 -1
  60. package/dist/types-ts4.5/view/FlexibleCard/components/elements/date-time/index.d.ts +1 -0
  61. package/dist/types-ts4.5/view/FlexibleCard/components/elements/date-time/types.d.ts +2 -2
  62. package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +5 -0
  63. package/dist/types-ts4.5/view/HoverCard/components/ImagePreview.d.ts +4 -0
  64. package/dist/types-ts4.5/view/HoverCard/styled.d.ts +1 -0
  65. package/dist/types-ts4.5/view/HoverCard/types.d.ts +2 -2
  66. package/package.json +2 -2
  67. package/report.api.md +8 -0
  68. package/tmp/api-report-tmp.d.ts +8 -1
  69. package/dist/es2019/view/HoverCard/components/SnippetOrPreview.js +0 -41
  70. package/dist/esm/view/HoverCard/components/SnippetOrPreview.js +0 -47
  71. package/dist/types/view/HoverCard/components/SnippetOrPreview.d.ts +0 -4
  72. package/dist/types-ts4.5/view/HoverCard/components/SnippetOrPreview.d.ts +0 -4
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
8
8
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
9
  const PACKAGE_DATA = {
10
10
  packageName: "@atlaskit/smart-card",
11
- packageVersion: "26.15.11",
11
+ packageVersion: "26.16.1",
12
12
  componentName: 'linkUrl'
13
13
  };
14
14
  const Link = withLinkClickedEvent('a');
@@ -133,6 +133,7 @@ export var ElementName = /*#__PURE__*/function (ElementName) {
133
133
  ElementName["Title"] = "Title";
134
134
  ElementName["ViewCount"] = "ViewCount";
135
135
  ElementName["VoteCount"] = "VoteCount";
136
+ ElementName["SentOn"] = "SentOn";
136
137
  return ElementName;
137
138
  }({});
138
139
 
@@ -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, extractStoryPoints, 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, extractSentOn, 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';
@@ -53,6 +53,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
53
53
  provider: extractProviderIcon(data),
54
54
  programmingLanguage: extractProgrammingLanguage(data),
55
55
  readTime: extractReadTime(data),
56
+ sentOn: extractSentOn(data),
56
57
  snippet: extractSummary(data) || undefined,
57
58
  // Explicitly set here to remove an empty string
58
59
  sourceBranch: extractSourceBranch(data),
@@ -88,6 +88,9 @@ export var extractSubTasksProgress = function extractSubTasksProgress(data) {
88
88
  export var extractReadTime = function extractReadTime(data) {
89
89
  return extractValue(data, 'atlassian:readTimeInMinutes');
90
90
  };
91
+ export var extractSentOn = function extractSentOn(data) {
92
+ return extractValue(data, 'dateSent');
93
+ };
91
94
  export var extractStoryPoints = function extractStoryPoints(data) {
92
95
  return extractValue(data, 'atlassian:storyPoints');
93
96
  };
@@ -360,6 +360,16 @@ export var messages = defineMessages({
360
360
  defaultMessage: 'Save',
361
361
  description: 'Just the "save" word'
362
362
  },
363
+ sent_on_relative: {
364
+ id: 'fabric.linking.sent_on_relative',
365
+ defaultMessage: 'Sent {context}',
366
+ description: 'Indicated when entity was sent (relative form)'
367
+ },
368
+ sent_on_absolute: {
369
+ id: 'fabric.linking.sent_on_absolute',
370
+ defaultMessage: 'Sent on {context}',
371
+ description: 'Indicated when entity was sent (absolute form)'
372
+ },
363
373
  status_change_load_error: {
364
374
  id: 'fabric.linking.status_change_load_error',
365
375
  defaultMessage: 'We couldn’t load the statuses and transitions',
@@ -13,7 +13,7 @@ export var ANALYTICS_CHANNEL = 'media';
13
13
  export var context = {
14
14
  componentName: 'smart-cards',
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "26.15.11"
16
+ packageVersion: "26.16.1"
17
17
  };
18
18
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
19
19
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -15,7 +15,7 @@ import ElementGroup from './element-group';
15
15
 
16
16
  // Determine whether the element can be display as inline/block.
17
17
 
18
- export var ElementDisplaySchema = (_ElementDisplaySchema = {}, _defineProperty(_ElementDisplaySchema, ElementName.AssignedTo, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AssignedToGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AttachmentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AuthorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ChecklistProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CollaboratorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CommentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.DueOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LatestCommit, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LinkIcon, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Location, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedByGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Preview, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.Priority, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ProgrammingLanguage, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Provider, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReactCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReadTime, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Snippet, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.SourceBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.State, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubscriberCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubTasksProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.StoryPoints, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.TargetBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Title, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ViewCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.VoteCount, ['inline']), _ElementDisplaySchema);
18
+ export var ElementDisplaySchema = (_ElementDisplaySchema = {}, _defineProperty(_ElementDisplaySchema, ElementName.AssignedTo, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AssignedToGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AttachmentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.AuthorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ChecklistProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CollaboratorGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CommentCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.CreatedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.DueOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LatestCommit, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.LinkIcon, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Location, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ModifiedOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedBy, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.OwnedByGroup, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Preview, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.Priority, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ProgrammingLanguage, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Provider, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReactCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ReadTime, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Snippet, ['block']), _defineProperty(_ElementDisplaySchema, ElementName.SourceBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SentOn, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.State, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubscriberCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.SubTasksProgress, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.StoryPoints, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.TargetBranch, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.Title, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.ViewCount, ['inline']), _defineProperty(_ElementDisplaySchema, ElementName.VoteCount, ['inline']), _ElementDisplaySchema);
19
19
  var getDirectionStyles = function getDirectionStyles(direction) {
20
20
  switch (direction) {
21
21
  case SmartLinkDirection.Vertical:
@@ -18,6 +18,10 @@ var typeToDescriptorMap = {
18
18
  modified: {
19
19
  relative: messages.modified_on_relative,
20
20
  absolute: messages.modified_on_absolute
21
+ },
22
+ sent: {
23
+ relative: messages.sent_on_relative,
24
+ absolute: messages.sent_on_absolute
21
25
  }
22
26
  };
23
27
 
@@ -27,6 +31,7 @@ var typeToDescriptorMap = {
27
31
  * @param {DateTimeProps} DateTimeProps - The props necessary for the DateTime element.
28
32
  * @see CreatedOn
29
33
  * @see ModifiedOn
34
+ * @see SentOn
30
35
  */
31
36
  var DateTime = function DateTime(_ref) {
32
37
  var date = _ref.date,
@@ -117,6 +117,11 @@ export var ReactCount = createElement(ElementName.ReactCount);
117
117
  * Creates a ReadTime Text element using the data from readTime in the Flexible UI Context
118
118
  */
119
119
  export var ReadTime = createElement(ElementName.ReadTime);
120
+ /**
121
+ * Creates a SentOn DateTime element using the data from SentOn in the Flexible UI Context.
122
+ * @see DateTime
123
+ */
124
+ export var SentOn = createElement(ElementName.SentOn);
120
125
  /**
121
126
  * Creates a Snippet element using the data from Snippet in the Flexible UI Context.
122
127
  * @see Text
@@ -92,6 +92,8 @@ var elementMappings = (_elementMappings = {}, _defineProperty(_elementMappings,
92
92
  component: Badge
93
93
  }), _defineProperty(_elementMappings, ElementName.ReadTime, {
94
94
  component: Text
95
+ }), _defineProperty(_elementMappings, ElementName.SentOn, {
96
+ component: DateTime
95
97
  }), _defineProperty(_elementMappings, ElementName.Snippet, {
96
98
  component: Text,
97
99
  props: {
@@ -167,6 +169,8 @@ var getData = function getData(elementName, contextKey, context) {
167
169
  return toFormattedTextProps(messages.modified_by, context.modifiedBy);
168
170
  case ElementName.ModifiedOn:
169
171
  return toDateTimeProps('modified', context.modifiedOn);
172
+ case ElementName.SentOn:
173
+ return toDateTimeProps('sent', context.sentOn);
170
174
  case ElementName.ReadTime:
171
175
  return toFormattedTextProps(messages.read_time, data);
172
176
  case ElementName.Snippet:
@@ -0,0 +1,49 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import React, { useCallback, useState, useRef } from 'react';
4
+ import extractPreview from '../../../extractors/flexible/extract-preview';
5
+ import { PreviewBlock } from '../../FlexibleCard/components/blocks';
6
+ import { getTransitionStyles, getPreviewBlockStyles } from '../styled';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
+ var ImagePreview = function ImagePreview(_ref) {
9
+ var data = _ref.data,
10
+ fallbackElementHeight = _ref.fallbackElementHeight;
11
+ var transitionStarted = useRef(false);
12
+ var previewBlockRef = useRef(null);
13
+ var _useState = useState(true),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ showPreview = _useState2[0],
16
+ setShowPreview = _useState2[1];
17
+ var _useState3 = useState(),
18
+ _useState4 = _slicedToArray(_useState3, 2),
19
+ previewCss = _useState4[0],
20
+ setPreviewCss = _useState4[1];
21
+
22
+ // Set Preview to a fixed height to enable transitions
23
+ var onPreviewRender = useCallback(function () {
24
+ var _previewBlockRef$curr;
25
+ previewBlockRef.current && setPreviewCss(getPreviewBlockStyles((_previewBlockRef$curr = previewBlockRef.current) === null || _previewBlockRef$curr === void 0 ? void 0 : _previewBlockRef$curr.getBoundingClientRect().height));
26
+ }, []);
27
+
28
+ // On error set Preview to Fallback height with transition
29
+ var onPreviewError = useCallback(function () {
30
+ if (transitionStarted.current === false) {
31
+ setPreviewCss(getTransitionStyles(fallbackElementHeight));
32
+ transitionStarted.current = true;
33
+ }
34
+ }, [fallbackElementHeight]);
35
+ var onPreviewTransitionEnd = useCallback(function () {
36
+ setShowPreview(false);
37
+ }, []);
38
+ return showPreview && data && extractPreview(data) ? /*#__PURE__*/React.createElement(PreviewBlock, _extends({
39
+ onError: onPreviewError
40
+ }, getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && {
41
+ ignoreContainerPadding: true
42
+ }, {
43
+ overrideCss: previewCss,
44
+ onTransitionEnd: onPreviewTransitionEnd,
45
+ blockRef: previewBlockRef,
46
+ onRender: onPreviewRender
47
+ })) : null;
48
+ };
49
+ export default ImagePreview;
@@ -5,7 +5,7 @@ import { FooterBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../.
5
5
  import { footerBlockCss, hiddenSnippetStyles, metadataBlockCss } from './styled';
6
6
  import FlexibleCard from '../../../../FlexibleCard';
7
7
  import { getSimulatedMetadata, getSimulatedBetterMetadata } from '../../../utils';
8
- import SnippetOrPreview from '../../SnippetOrPreview';
8
+ import ImagePreview from '../../ImagePreview';
9
9
  import { extractMetadata, elementNamesToItems } from '../../../../../extractors/hover/extractMetadata';
10
10
  import { messages } from '../../../../../messages';
11
11
  import { FormattedMessage } from 'react-intl-next';
@@ -89,11 +89,11 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
89
89
  var _snippetBlockRef$curr, _snippetBlockRef$curr2;
90
90
  snippetHeight.current = (_snippetBlockRef$curr = (_snippetBlockRef$curr2 = snippetBlockRef.current) === null || _snippetBlockRef$curr2 === void 0 ? void 0 : _snippetBlockRef$curr2.getBoundingClientRect().height) !== null && _snippetBlockRef$curr !== void 0 ? _snippetBlockRef$curr : 0;
91
91
  }, []);
92
- var body = SnippetOrPreview({
92
+ var imagePreview = ImagePreview({
93
93
  data: data,
94
- snippetHeight: snippetHeight.current
94
+ fallbackElementHeight: snippetHeight.current
95
95
  });
96
- return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
96
+ return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
97
97
  metadataPosition: SmartLinkPosition.Top
98
98
  })), /*#__PURE__*/React.createElement(MetadataBlock, _extends({
99
99
  primary: topPrimary,
@@ -103,7 +103,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
103
103
  size: SmartLinkSize.Large
104
104
  }, getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && {
105
105
  size: SmartLinkSize.Medium
106
- })), body, /*#__PURE__*/React.createElement(SnippetBlock, {
106
+ })), !imagePreview && /*#__PURE__*/React.createElement(SnippetBlock, null), !getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && imagePreview, /*#__PURE__*/React.createElement(SnippetBlock, {
107
107
  testId: 'hidden-snippet',
108
108
  onRender: onSnippetRender,
109
109
  blockRef: snippetBlockRef,
@@ -1,7 +1,8 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
3
  import { css } from '@emotion/react';
4
- export var loadingViewContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
4
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
+ export var loadingViewContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') ? "padding: 1rem;" : "");
5
6
  export var skeletonContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 0.625rem;\n align-items: center;\n"])));
6
7
  export var getTitleStyles = function getTitleStyles(height) {
7
8
  return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1 0 auto;\n height: ", "rem;\n\n span {\n width: 100%;\n }\n "])), height);
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { css } from '@emotion/react';
@@ -16,11 +16,11 @@ export var flexibleUiOptions = _objectSpread({
16
16
  hideBackground: true,
17
17
  hideElevation: true,
18
18
  size: SmartLinkSize.Medium,
19
- hidePadding: true,
20
19
  hideHoverCardPreviewButton: false,
21
20
  zIndex: HOVER_CARD_Z_INDEX + 1
22
21
  }, !getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') && {
23
- theme: SmartLinkTheme.Black
22
+ theme: SmartLinkTheme.Black,
23
+ hidePadding: true
24
24
  });
25
25
  export var CARD_WIDTH_REM = 24;
26
26
  // gap between mouse cursor and hover card
@@ -28,7 +28,7 @@ export var CARD_GAP_PX = 10;
28
28
  var blockGap = '0.5rem';
29
29
  var elementGap = '0.5rem';
30
30
  export var separatorCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-separator] + [data-separator]:before {\n margin-right: ", ";\n }\n ", "\n"])), elementGap, getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') ? " [data-smart-element-avatar-group] + [data-separator]:before {\n content: '\u2022';\n margin-right: ".concat(elementGap, ";\n }") : "");
31
- export var HoverCardContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: none;\n border-width: 0;\n box-sizing: border-box;\n width: ", "rem;\n padding: 1rem;\n\n .", " {\n display: none;\n }\n"])), CARD_WIDTH_REM, loadingPlaceholderClassName);
31
+ export var HoverCardContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: none;\n border-width: 0;\n box-sizing: border-box;\n width: ", "rem;\n ", "\n\n .", " {\n display: none;\n }\n"])), CARD_WIDTH_REM, !getBooleanFF('platform.linking-platform.smart-card.enable-better-metadata_iojwg') ? "padding: 1rem;" : "", loadingPlaceholderClassName);
32
32
  export var titleBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n gap: ", ";\n\n ", "\n\n // title and subtitle element group\n [data-smart-element-group] {\n // gap between title and subtitle\n gap: 0.06rem;\n display: flex;\n /* subtitle element group */\n > [data-smart-element-group] {\n > span {\n margin-right: ", ";\n }\n }\n }\n\n ", "\n"])), blockGap, separatorCss, elementGap, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? "[data-smart-element=\"Title\"] {\n font-weight: 600;\n }" : "");
33
33
  export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
34
34
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
@@ -39,4 +39,7 @@ export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _t
39
39
  })(), themed({
40
40
  light: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))",
41
41
  dark: "var(--ds-shadow-overlay, 0px 0px 0px rgba(188, 214, 240, 0.12),0px 8px 12px rgba(3, 4, 4, 0.36),0px 0px 1px rgba(3, 4, 4, 0.5))"
42
- })());
42
+ })());
43
+ export var getPreviewBlockStyles = function getPreviewBlockStyles(snippetHeight) {
44
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: ", "px;\n ", "\n"])), snippetHeight, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? " border-top-left-radius: ".concat("var(--ds-border-radius-300, 12px)", ";\n border-top-right-radius: ", "var(--ds-border-radius-300, 12px)", ";\n margin-bottom: ", blockGap, ";\n }") : "");
45
+ };
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
11
11
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
12
  var PACKAGE_DATA = {
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "26.15.11",
14
+ packageVersion: "26.16.1",
15
15
  componentName: 'linkUrl'
16
16
  };
17
17
  var Link = withLinkClickedEvent('a');
@@ -116,7 +116,8 @@ export declare enum ElementName {
116
116
  TargetBranch = "TargetBranch",
117
117
  Title = "Title",
118
118
  ViewCount = "ViewCount",
119
- VoteCount = "VoteCount"
119
+ VoteCount = "VoteCount",
120
+ SentOn = "SentOn"
120
121
  }
121
122
  /**
122
123
  * Flexible UI action (button)
@@ -20,4 +20,5 @@ export declare const extractChecklistProgress: (data: JsonLd.Data.BaseData) => s
20
20
  export declare const extractLocation: (data: JsonLd.Data.BaseData) => LinkLocation | undefined;
21
21
  export declare const extractSubTasksProgress: (data: JsonLd.Data.BaseData) => string | undefined;
22
22
  export declare const extractReadTime: (data: JsonLd.Data.BaseData) => string | undefined;
23
+ export declare const extractSentOn: (data: JsonLd.Data.BaseData) => string | undefined;
23
24
  export declare const extractStoryPoints: (data: JsonLd.Data.BaseData) => number | undefined;
@@ -1,6 +1,6 @@
1
1
  import { 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_description' | 'request_denied_description';
3
- export type MessageKey = 'assigned_to' | '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' | 'could_not_load_link' | 'download' | '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' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | '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' | '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' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
3
+ export type MessageKey = 'assigned_to' | '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' | 'could_not_load_link' | 'download' | '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' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | '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' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -167,6 +167,12 @@ export type FlexibleUiDataContext = {
167
167
  * Contains read time (time taken to read) of the resource
168
168
  */
169
169
  readTime?: string;
170
+ /**
171
+ * Contains the ISO timestamp of when the resource was created.
172
+ * @type string - ISO Timestamp
173
+ * @see SentOn
174
+ */
175
+ sentOn?: string;
170
176
  /**
171
177
  * Contains the source branch name of the link typed pull request.
172
178
  * @type string
@@ -168,7 +168,7 @@ export type OnActionMenuOpenChangeOptions = {
168
168
  /**
169
169
  * A type that contains all the possible combinations of elements with their corresponding props.
170
170
  */
171
- 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 | Snippet | SourceBranch | State | SubscriberCount | SubTasksProgress | StoryPoints | TargetBranch | Title | ViewCount | VoteCount;
171
+ 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;
172
172
  /**
173
173
  * Represents the props available for an AttachmentCount element.
174
174
  * @see AttachmentCount
@@ -336,6 +336,13 @@ export type ReactCount = {
336
336
  export type ReadTime = {
337
337
  name: ElementName.ReadTime;
338
338
  };
339
+ /**
340
+ * Represents the props available for an SentOn element.
341
+ * @see SentOn
342
+ */
343
+ export type SentOn = {
344
+ name: ElementName.SentOn;
345
+ };
339
346
  /**
340
347
  * Represents the props available for an Snippet element.
341
348
  * @see Snippet
@@ -7,6 +7,7 @@ import { DateTimeProps } from './types';
7
7
  * @param {DateTimeProps} DateTimeProps - The props necessary for the DateTime element.
8
8
  * @see CreatedOn
9
9
  * @see ModifiedOn
10
+ * @see SentOn
10
11
  */
11
12
  declare const DateTime: React.FC<DateTimeProps>;
12
13
  export default DateTime;
@@ -1,8 +1,8 @@
1
1
  import { ElementProps } from '../types';
2
- export type DateTimeType = 'created' | 'modified';
2
+ export type DateTimeType = 'created' | 'modified' | 'sent';
3
3
  export type DateTimeProps = ElementProps & {
4
4
  /**
5
- * Whether the date time element text should contain "Modified" or "Created"
5
+ * Whether the date time element text should contain "Modified" or "Created" or "sent"
6
6
  */
7
7
  type?: DateTimeType;
8
8
  /**
@@ -122,6 +122,11 @@ export declare const ReactCount: import("react").FC<BadgeProps>;
122
122
  * Creates a ReadTime Text element using the data from readTime in the Flexible UI Context
123
123
  */
124
124
  export declare const ReadTime: import("react").FC<TextProps>;
125
+ /**
126
+ * Creates a SentOn DateTime element using the data from SentOn in the Flexible UI Context.
127
+ * @see DateTime
128
+ */
129
+ export declare const SentOn: import("react").FC<DateTimeProps>;
125
130
  /**
126
131
  * Creates a Snippet element using the data from Snippet in the Flexible UI Context.
127
132
  * @see Text
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ImagePreviewProps } from '../types';
3
+ declare const ImagePreview: React.FC<ImagePreviewProps>;
4
+ export default ImagePreview;
@@ -8,3 +8,4 @@ export declare const HoverCardContainer: import("@emotion/react").SerializedStyl
8
8
  export declare const titleBlockCss: import("@emotion/react").SerializedStyles;
9
9
  export declare const getTransitionStyles: (snippetHeight: number) => import("@emotion/react").SerializedStyles;
10
10
  export declare const popupContainerStyles: import("@emotion/react").SerializedStyles;
11
+ export declare const getPreviewBlockStyles: (snippetHeight: number) => import("@emotion/react").SerializedStyles;
@@ -92,7 +92,7 @@ export type HoverCardContentProps = {
92
92
  onMouseLeave?: MouseEventHandler;
93
93
  showServerActions?: boolean;
94
94
  };
95
- export type SnippetOrPreviewProps = {
95
+ export type ImagePreviewProps = {
96
96
  data: JsonLd.Data.BaseData;
97
- snippetHeight: number;
97
+ fallbackElementHeight: number;
98
98
  };
@@ -116,7 +116,8 @@ export declare enum ElementName {
116
116
  TargetBranch = "TargetBranch",
117
117
  Title = "Title",
118
118
  ViewCount = "ViewCount",
119
- VoteCount = "VoteCount"
119
+ VoteCount = "VoteCount",
120
+ SentOn = "SentOn"
120
121
  }
121
122
  /**
122
123
  * Flexible UI action (button)
@@ -20,4 +20,5 @@ export declare const extractChecklistProgress: (data: JsonLd.Data.BaseData) => s
20
20
  export declare const extractLocation: (data: JsonLd.Data.BaseData) => LinkLocation | undefined;
21
21
  export declare const extractSubTasksProgress: (data: JsonLd.Data.BaseData) => string | undefined;
22
22
  export declare const extractReadTime: (data: JsonLd.Data.BaseData) => string | undefined;
23
+ export declare const extractSentOn: (data: JsonLd.Data.BaseData) => string | undefined;
23
24
  export declare const extractStoryPoints: (data: JsonLd.Data.BaseData) => number | undefined;
@@ -1,6 +1,6 @@
1
1
  import { 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_description' | 'request_denied_description';
3
- export type MessageKey = 'assigned_to' | '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' | 'could_not_load_link' | 'download' | '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' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | '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' | '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' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
3
+ export type MessageKey = 'assigned_to' | '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' | 'could_not_load_link' | 'download' | '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' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | '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' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -167,6 +167,12 @@ export type FlexibleUiDataContext = {
167
167
  * Contains read time (time taken to read) of the resource
168
168
  */
169
169
  readTime?: string;
170
+ /**
171
+ * Contains the ISO timestamp of when the resource was created.
172
+ * @type string - ISO Timestamp
173
+ * @see SentOn
174
+ */
175
+ sentOn?: string;
170
176
  /**
171
177
  * Contains the source branch name of the link typed pull request.
172
178
  * @type string
@@ -168,7 +168,7 @@ export type OnActionMenuOpenChangeOptions = {
168
168
  /**
169
169
  * A type that contains all the possible combinations of elements with their corresponding props.
170
170
  */
171
- 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 | Snippet | SourceBranch | State | SubscriberCount | SubTasksProgress | StoryPoints | TargetBranch | Title | ViewCount | VoteCount;
171
+ 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;
172
172
  /**
173
173
  * Represents the props available for an AttachmentCount element.
174
174
  * @see AttachmentCount
@@ -336,6 +336,13 @@ export type ReactCount = {
336
336
  export type ReadTime = {
337
337
  name: ElementName.ReadTime;
338
338
  };
339
+ /**
340
+ * Represents the props available for an SentOn element.
341
+ * @see SentOn
342
+ */
343
+ export type SentOn = {
344
+ name: ElementName.SentOn;
345
+ };
339
346
  /**
340
347
  * Represents the props available for an Snippet element.
341
348
  * @see Snippet
@@ -7,6 +7,7 @@ import { DateTimeProps } from './types';
7
7
  * @param {DateTimeProps} DateTimeProps - The props necessary for the DateTime element.
8
8
  * @see CreatedOn
9
9
  * @see ModifiedOn
10
+ * @see SentOn
10
11
  */
11
12
  declare const DateTime: React.FC<DateTimeProps>;
12
13
  export default DateTime;
@@ -1,8 +1,8 @@
1
1
  import { ElementProps } from '../types';
2
- export type DateTimeType = 'created' | 'modified';
2
+ export type DateTimeType = 'created' | 'modified' | 'sent';
3
3
  export type DateTimeProps = ElementProps & {
4
4
  /**
5
- * Whether the date time element text should contain "Modified" or "Created"
5
+ * Whether the date time element text should contain "Modified" or "Created" or "sent"
6
6
  */
7
7
  type?: DateTimeType;
8
8
  /**
@@ -122,6 +122,11 @@ export declare const ReactCount: import("react").FC<BadgeProps>;
122
122
  * Creates a ReadTime Text element using the data from readTime in the Flexible UI Context
123
123
  */
124
124
  export declare const ReadTime: import("react").FC<TextProps>;
125
+ /**
126
+ * Creates a SentOn DateTime element using the data from SentOn in the Flexible UI Context.
127
+ * @see DateTime
128
+ */
129
+ export declare const SentOn: import("react").FC<DateTimeProps>;
125
130
  /**
126
131
  * Creates a Snippet element using the data from Snippet in the Flexible UI Context.
127
132
  * @see Text
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ImagePreviewProps } from '../types';
3
+ declare const ImagePreview: React.FC<ImagePreviewProps>;
4
+ export default ImagePreview;
@@ -8,3 +8,4 @@ export declare const HoverCardContainer: import("@emotion/react").SerializedStyl
8
8
  export declare const titleBlockCss: import("@emotion/react").SerializedStyles;
9
9
  export declare const getTransitionStyles: (snippetHeight: number) => import("@emotion/react").SerializedStyles;
10
10
  export declare const popupContainerStyles: import("@emotion/react").SerializedStyles;
11
+ export declare const getPreviewBlockStyles: (snippetHeight: number) => import("@emotion/react").SerializedStyles;
@@ -92,7 +92,7 @@ export type HoverCardContentProps = {
92
92
  onMouseLeave?: MouseEventHandler;
93
93
  showServerActions?: boolean;
94
94
  };
95
- export type SnippetOrPreviewProps = {
95
+ export type ImagePreviewProps = {
96
96
  data: JsonLd.Data.BaseData;
97
- snippetHeight: number;
97
+ fallbackElementHeight: number;
98
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.15.11",
3
+ "version": "26.16.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/popup": "^1.9.0",
49
49
  "@atlaskit/spinner": "^15.5.0",
50
50
  "@atlaskit/theme": "^12.5.0",
51
- "@atlaskit/tokens": "^1.15.0",
51
+ "@atlaskit/tokens": "^1.16.0",
52
52
  "@atlaskit/tooltip": "^17.8.0",
53
53
  "@atlaskit/ufo": "^0.2.0",
54
54
  "@babel/runtime": "^7.0.0",
package/report.api.md CHANGED
@@ -479,6 +479,7 @@ type ElementItemProps =
479
479
  | Provider_2
480
480
  | ReactCount
481
481
  | ReadTime
482
+ | SentOn
482
483
  | Snippet
483
484
  | SourceBranch
484
485
  | State_2
@@ -539,6 +540,8 @@ export enum ElementName {
539
540
  // (undocumented)
540
541
  ReadTime = 'ReadTime',
541
542
  // (undocumented)
543
+ SentOn = 'SentOn',
544
+ // (undocumented)
542
545
  Snippet = 'Snippet',
543
546
  // (undocumented)
544
547
  SourceBranch = 'SourceBranch',
@@ -808,6 +811,11 @@ type RetryOptions = {
808
811
  // @public (undocumented)
809
812
  type ScreenAuthPopupEventProps = CommonEventProps;
810
813
 
814
+ // @public
815
+ type SentOn = {
816
+ name: ElementName.SentOn;
817
+ };
818
+
811
819
  export { SmartCardContext as Context };
812
820
  export { SmartCardContext };
813
821