@atlaskit/smart-card 38.8.0 → 38.9.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 (109) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/extractors/common/context/index.js +2 -1
  3. package/dist/cjs/extractors/embed/index.js +4 -16
  4. package/dist/cjs/extractors/flexible/extract-link-title.js +2 -4
  5. package/dist/cjs/extractors/flexible/index.js +12 -14
  6. package/dist/cjs/extractors/inline/index.js +7 -18
  7. package/dist/cjs/state/hooks/use-resolve/index.js +1 -2
  8. package/dist/cjs/utils/analytics/analytics.js +1 -1
  9. package/dist/cjs/view/BlockCard/index.js +4 -2
  10. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +1 -1
  11. package/dist/cjs/view/BlockCard/views/NotFoundView.js +1 -1
  12. package/dist/cjs/view/BlockCard/views/ResolvedView.js +3 -1
  13. package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +2 -3
  14. package/dist/cjs/view/CardWithUrl/component.js +15 -10
  15. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +3 -2
  16. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
  17. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -2
  18. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +47 -15
  19. package/dist/cjs/view/FlexibleCard/components/elements/common/base-icon-element/index.js +7 -3
  20. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +5 -3
  21. package/dist/cjs/view/FlexibleCard/utils.js +5 -8
  22. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -1
  23. package/dist/cjs/view/HoverCard/components/ImagePreview.js +2 -15
  24. package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +3 -4
  25. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -3
  26. package/dist/cjs/view/InlineCard/ErroredView/index.js +3 -3
  27. package/dist/cjs/view/InlineCard/index.js +3 -5
  28. package/dist/cjs/view/LinkUrl/index.js +1 -1
  29. package/dist/es2019/extractors/common/context/index.js +2 -1
  30. package/dist/es2019/extractors/embed/index.js +6 -19
  31. package/dist/es2019/extractors/flexible/extract-link-title.js +3 -5
  32. package/dist/es2019/extractors/flexible/index.js +15 -15
  33. package/dist/es2019/extractors/inline/index.js +8 -22
  34. package/dist/es2019/state/hooks/use-resolve/index.js +1 -2
  35. package/dist/es2019/utils/analytics/analytics.js +1 -1
  36. package/dist/es2019/view/BlockCard/index.js +4 -2
  37. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +2 -2
  38. package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -2
  39. package/dist/es2019/view/BlockCard/views/ResolvedView.js +3 -1
  40. package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +3 -4
  41. package/dist/es2019/view/CardWithUrl/component.js +16 -11
  42. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +3 -2
  43. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +2 -0
  44. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -1
  45. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +49 -22
  46. package/dist/es2019/view/FlexibleCard/components/elements/common/base-icon-element/index.js +7 -4
  47. package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +5 -3
  48. package/dist/es2019/view/FlexibleCard/utils.js +7 -8
  49. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -1
  50. package/dist/es2019/view/HoverCard/components/ImagePreview.js +2 -15
  51. package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +4 -5
  52. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +3 -4
  53. package/dist/es2019/view/InlineCard/ErroredView/index.js +4 -4
  54. package/dist/es2019/view/InlineCard/index.js +5 -7
  55. package/dist/es2019/view/LinkUrl/index.js +1 -1
  56. package/dist/esm/extractors/common/context/index.js +2 -1
  57. package/dist/esm/extractors/embed/index.js +6 -18
  58. package/dist/esm/extractors/flexible/extract-link-title.js +3 -5
  59. package/dist/esm/extractors/flexible/index.js +15 -15
  60. package/dist/esm/extractors/inline/index.js +8 -21
  61. package/dist/esm/state/hooks/use-resolve/index.js +1 -2
  62. package/dist/esm/utils/analytics/analytics.js +1 -1
  63. package/dist/esm/view/BlockCard/index.js +4 -2
  64. package/dist/esm/view/BlockCard/views/ForbiddenView.js +2 -2
  65. package/dist/esm/view/BlockCard/views/NotFoundView.js +2 -2
  66. package/dist/esm/view/BlockCard/views/ResolvedView.js +3 -1
  67. package/dist/esm/view/BlockCard/views/UnauthorisedView.js +3 -4
  68. package/dist/esm/view/CardWithUrl/component.js +16 -11
  69. package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +3 -2
  70. package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
  71. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -2
  72. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +46 -14
  73. package/dist/esm/view/FlexibleCard/components/elements/common/base-icon-element/index.js +7 -3
  74. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +5 -3
  75. package/dist/esm/view/FlexibleCard/utils.js +7 -8
  76. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -1
  77. package/dist/esm/view/HoverCard/components/ImagePreview.js +2 -15
  78. package/dist/esm/view/HoverCard/components/views/forbidden/index.js +4 -5
  79. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -4
  80. package/dist/esm/view/InlineCard/ErroredView/index.js +4 -4
  81. package/dist/esm/view/InlineCard/index.js +5 -7
  82. package/dist/esm/view/LinkUrl/index.js +1 -1
  83. package/dist/types/ssr.d.ts +1 -0
  84. package/dist/types/view/BlockCard/index.d.ts +1 -1
  85. package/dist/types/view/BlockCard/types.d.ts +1 -0
  86. package/dist/types/view/BlockCard/views/types.d.ts +1 -1
  87. package/dist/types/view/Card/types.d.ts +1 -0
  88. package/dist/types/view/CardWithUrl/types.d.ts +1 -0
  89. package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
  90. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
  91. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +4 -0
  92. package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
  93. package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +1 -0
  94. package/dist/types/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +5 -1
  95. package/dist/types/view/FlexibleCard/types.d.ts +4 -0
  96. package/dist/types-ts4.5/ssr.d.ts +1 -0
  97. package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
  98. package/dist/types-ts4.5/view/BlockCard/types.d.ts +1 -0
  99. package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
  100. package/dist/types-ts4.5/view/Card/types.d.ts +1 -0
  101. package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
  102. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
  103. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
  104. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +4 -0
  105. package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
  106. package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +1 -0
  107. package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +5 -1
  108. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +4 -0
  109. package/package.json +10 -4
@@ -4,8 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import ButtonOld from '@atlaskit/button';
7
- import ErrorIconCore from '@atlaskit/icon/core/migration/error';
8
- import ErrorIcon from '@atlaskit/icon/utility/migration/error';
7
+ import ErrorIcon from '@atlaskit/icon/core/migration/error';
9
8
  import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { Box } from '@atlaskit/primitives/compiled';
11
10
  import { messages } from '../../../messages';
@@ -20,7 +19,7 @@ var styles = {
20
19
  };
21
20
  var fallbackIcon = function fallbackIcon() {
22
21
  if (fg('platform-linking-visual-refresh-v1')) {
23
- return /*#__PURE__*/React.createElement(ErrorIconCore, {
22
+ return /*#__PURE__*/React.createElement(ErrorIcon, {
24
23
  color: "var(--ds-icon-danger, #C9372C)",
25
24
  label: "error",
26
25
  LEGACY_size: "small",
@@ -34,7 +33,8 @@ var fallbackIcon = function fallbackIcon() {
34
33
  color: "var(--ds-icon-danger, #C9372C)",
35
34
  label: "error",
36
35
  LEGACY_size: "small",
37
- testId: "errored-view-default-icon"
36
+ testId: "errored-view-default-icon",
37
+ size: "small"
38
38
  }));
39
39
  };
40
40
  export var InlineCardErroredView = function InlineCardErroredView(_ref) {
@@ -1,13 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect } from 'react';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
- import { extractProvider, extractSmartLinkProvider } from '@atlaskit/link-extractors';
5
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
6
5
  import { SmartLinkStatus } from '../../constants';
7
6
  import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
8
7
  import { extractInlineProps } from '../../extractors/inline';
9
8
  import { getExtensionKey } from '../../state/helpers';
10
- import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
9
+ import { getForbiddenJsonLd } from '../../utils/jsonld';
11
10
  import { CardLinkView } from '../LinkView';
12
11
  import { InlineCardErroredView } from './ErroredView';
13
12
  import { InlineCardForbiddenView } from './ForbiddenView';
@@ -39,7 +38,6 @@ export var InlineCard = function InlineCard(_ref) {
39
38
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
40
39
  var status = cardState.status,
41
40
  details = cardState.details;
42
- var cardDetails = details && details.data || getEmptyJsonLd();
43
41
  var extensionKey = getExtensionKey(details);
44
42
  var testIdWithStatus = testId ? "".concat(testId, "-").concat(status, "-view") : undefined;
45
43
  var resolvedProps = status === SmartLinkStatus.Resolved ? extractInlineProps(details, renderers, removeTextHighlightingFromTitle, false) : {};
@@ -91,7 +89,7 @@ export var InlineCard = function InlineCard(_ref) {
91
89
  truncateInline: truncateInline
92
90
  }));
93
91
  case 'unauthorized':
94
- var provider = fg('smart_links_noun_support') ? extractSmartLinkProvider(details) : extractProvider(cardDetails);
92
+ var provider = extractSmartLinkProvider(details);
95
93
  return /*#__PURE__*/React.createElement(InlineCardUnauthorizedView, {
96
94
  icon: provider && provider.icon,
97
95
  context: provider && provider.text,
@@ -106,7 +104,7 @@ export var InlineCard = function InlineCard(_ref) {
106
104
  truncateInline: truncateInline
107
105
  });
108
106
  case 'forbidden':
109
- var providerForbidden = fg('smart_links_noun_support') ? extractSmartLinkProvider(details) : extractProvider(cardDetails);
107
+ var providerForbidden = extractSmartLinkProvider(details);
110
108
  var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
111
109
  var requestAccessContext = extractRequestAccessContextImproved({
112
110
  jsonLd: cardMetadata,
@@ -127,7 +125,7 @@ export var InlineCard = function InlineCard(_ref) {
127
125
  truncateInline: truncateInline
128
126
  });
129
127
  case 'not_found':
130
- var providerNotFound = fg('smart_links_noun_support') ? extractSmartLinkProvider(details) : extractProvider(cardDetails);
128
+ var providerNotFound = extractSmartLinkProvider(details);
131
129
  return /*#__PURE__*/React.createElement(InlineCardErroredView, {
132
130
  url: url,
133
131
  icon: providerNotFound && providerNotFound.icon,
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "38.8.0",
16
+ packageVersion: "38.9.1",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -2,5 +2,6 @@ import React from 'react';
2
2
  import type { CardProps } from './types';
3
3
  export type CardSSRProps = CardProps & {
4
4
  url: string;
5
+ hideIconLoadingSkeleton?: boolean;
5
6
  };
6
7
  export declare const CardSSR: (props: CardSSRProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type BlockCardProps } from './types';
3
- export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, CompetitorPrompt, }: BlockCardProps) => React.JSX.Element;
3
+ export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, CompetitorPrompt, hideIconLoadingSkeleton, }: BlockCardProps) => React.JSX.Element;
@@ -20,4 +20,5 @@ export type BlockCardProps = {
20
20
  sourceUrl: string;
21
21
  linkType?: string;
22
22
  }>;
23
+ hideIconLoadingSkeleton?: boolean;
23
24
  };
@@ -1,2 +1,2 @@
1
1
  import { type FlexibleCardProps } from '../../FlexibleCard/types';
2
- export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url' | 'CompetitorPrompt'>;
2
+ export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url' | 'CompetitorPrompt' | 'hideIconLoadingSkeleton'>;
@@ -170,6 +170,7 @@ export interface EmbedProps {
170
170
  * Informs Smart Link of the device it is rendered in. Available values are `web` and `mobile`.
171
171
  * It is used together with link response `data.preview["atlassian:supportedPlatforms"]`.
172
172
  * To make embed content available on all supported urls, use `web`.
173
+ * @deprecated The support for platform prop will be removed and `web` used as default
173
174
  */
174
175
  platform?: CardPlatform;
175
176
  }
@@ -34,4 +34,5 @@ export type CardWithUrlContentProps = {
34
34
  sourceUrl: string;
35
35
  linkType?: string;
36
36
  }>;
37
+ hideIconLoadingSkeleton?: boolean;
37
38
  };
@@ -12,5 +12,5 @@ import { type TitleBlockProps } from './types';
12
12
  * @see TitleBlockResolvedViewNew
13
13
  * @see TitleBlockErroredViewNew
14
14
  */
15
- declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, CompetitorPrompt, url, ...props }: TitleBlockProps) => JSX.Element;
15
+ declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, CompetitorPrompt, url, hideIconLoadingSkeleton, ...props }: TitleBlockProps) => JSX.Element;
16
16
  export default TitleBlock;
@@ -5,5 +5,5 @@ import { type TitleBlockViewProps } from '../types';
5
5
  * This should render when a Smart Link returns a valid response.
6
6
  * @see TitleBlock
7
7
  */
8
- declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, ...blockProps }: TitleBlockViewProps) => JSX.Element;
8
+ declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, hideIconLoadingSkeleton, ...blockProps }: TitleBlockViewProps) => JSX.Element;
9
9
  export default TitleBlockResolvedView;
@@ -56,6 +56,10 @@ export type BlockProps = {
56
56
  * A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
57
57
  */
58
58
  placeholderId?: string;
59
+ /**
60
+ * For image icons in the title, whether to hide the loading skeleton while the image is loading.
61
+ */
62
+ hideIconLoadingSkeleton?: boolean;
59
63
  };
60
64
  /**
61
65
  * Used to represent a metadata element to be rendered.
@@ -4,5 +4,5 @@
4
4
  */
5
5
  /// <reference types="react" />
6
6
  import { type ImageIconProps } from './types';
7
- declare const ImageIcon: ({ defaultIcon, testId, url, width, height, appearance, onError, onLoad, }: ImageIconProps) => JSX.Element;
7
+ declare const ImageIcon: ({ defaultIcon, testId, url, width, height, appearance, onError, onLoad, hideLoadingSkeleton, }: ImageIconProps) => string | number | boolean | Iterable<import("react").ReactNode> | JSX.Element | null | undefined;
8
8
  export default ImageIcon;
@@ -8,4 +8,5 @@ export type ImageIconProps = {
8
8
  onError?: () => void;
9
9
  onLoad?: () => void;
10
10
  appearance?: 'square' | 'round';
11
+ hideLoadingSkeleton?: boolean;
11
12
  };
@@ -34,6 +34,10 @@ export type BaseIconElementProps = ElementProps & {
34
34
  * Whether to display the icon as a square or round image.
35
35
  */
36
36
  appearance?: 'square' | 'round';
37
+ /**
38
+ * For images, whether to hide the loading skeleton while the image is loading.
39
+ */
40
+ hideLoadingSkeleton?: boolean;
37
41
  };
38
42
  /**
39
43
  * A base element that displays an Icon or favicon.
@@ -41,7 +45,7 @@ export type BaseIconElementProps = ElementProps & {
41
45
  * @param props - The props necessary for the Icon element.
42
46
  * @see LinkIcon
43
47
  */
44
- declare const IconElement: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, }: BaseIconElementProps) => JSX.Element;
48
+ declare const IconElement: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, hideLoadingSkeleton, }: BaseIconElementProps) => JSX.Element;
45
49
  export default IconElement;
46
50
  export declare const toLinkIconProps: (data: FlexibleUiDataContext[keyof FlexibleUiDataContext] | undefined, type: FlexibleUiDataContext['type']) => string[] | import("../../../../../../state/flexible-ui-context/types").LinkTitle | import("../../../../../../state/flexible-ui-context/types").LinkLocation | import("../../../../../../state/flexible-ui-context/types").Media | import("../../../../../../state/flexible-ui-context/types").FlexibleUiActions | import("../../../../../../state/flexible-ui-context/types").PreviewActionData | import("../../../../../../extractors/common/lozenge/types").LinkLozenge | import("@atlaskit/link-extractors").LinkPerson[] | {
47
51
  objectId?: string | undefined;
@@ -94,6 +94,10 @@ export type FlexibleCardProps = {
94
94
  sourceUrl: string;
95
95
  linkType?: string;
96
96
  }>;
97
+ /**
98
+ * For image icons in the title, whether to show a loading skeleton while the image is loading.
99
+ */
100
+ hideIconLoadingSkeleton?: boolean;
97
101
  };
98
102
  export type InternalFlexibleUiOptions = FlexibleUiOptions & {
99
103
  hideLegacyButton?: boolean;
@@ -2,5 +2,6 @@ import React from 'react';
2
2
  import type { CardProps } from './types';
3
3
  export type CardSSRProps = CardProps & {
4
4
  url: string;
5
+ hideIconLoadingSkeleton?: boolean;
5
6
  };
6
7
  export declare const CardSSR: (props: CardSSRProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type BlockCardProps } from './types';
3
- export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, CompetitorPrompt, }: BlockCardProps) => React.JSX.Element;
3
+ export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, CompetitorPrompt, hideIconLoadingSkeleton, }: BlockCardProps) => React.JSX.Element;
@@ -20,4 +20,5 @@ export type BlockCardProps = {
20
20
  sourceUrl: string;
21
21
  linkType?: string;
22
22
  }>;
23
+ hideIconLoadingSkeleton?: boolean;
23
24
  };
@@ -1,2 +1,2 @@
1
1
  import { type FlexibleCardProps } from '../../FlexibleCard/types';
2
- export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url' | 'CompetitorPrompt'>;
2
+ export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url' | 'CompetitorPrompt' | 'hideIconLoadingSkeleton'>;
@@ -170,6 +170,7 @@ export interface EmbedProps {
170
170
  * Informs Smart Link of the device it is rendered in. Available values are `web` and `mobile`.
171
171
  * It is used together with link response `data.preview["atlassian:supportedPlatforms"]`.
172
172
  * To make embed content available on all supported urls, use `web`.
173
+ * @deprecated The support for platform prop will be removed and `web` used as default
173
174
  */
174
175
  platform?: CardPlatform;
175
176
  }
@@ -34,4 +34,5 @@ export type CardWithUrlContentProps = {
34
34
  sourceUrl: string;
35
35
  linkType?: string;
36
36
  }>;
37
+ hideIconLoadingSkeleton?: boolean;
37
38
  };
@@ -12,5 +12,5 @@ import { type TitleBlockProps } from './types';
12
12
  * @see TitleBlockResolvedViewNew
13
13
  * @see TitleBlockErroredViewNew
14
14
  */
15
- declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, CompetitorPrompt, url, ...props }: TitleBlockProps) => JSX.Element;
15
+ declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, CompetitorPrompt, url, hideIconLoadingSkeleton, ...props }: TitleBlockProps) => JSX.Element;
16
16
  export default TitleBlock;
@@ -5,5 +5,5 @@ import { type TitleBlockViewProps } from '../types';
5
5
  * This should render when a Smart Link returns a valid response.
6
6
  * @see TitleBlock
7
7
  */
8
- declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, ...blockProps }: TitleBlockViewProps) => JSX.Element;
8
+ declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, hideIconLoadingSkeleton, ...blockProps }: TitleBlockViewProps) => JSX.Element;
9
9
  export default TitleBlockResolvedView;
@@ -56,6 +56,10 @@ export type BlockProps = {
56
56
  * A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
57
57
  */
58
58
  placeholderId?: string;
59
+ /**
60
+ * For image icons in the title, whether to hide the loading skeleton while the image is loading.
61
+ */
62
+ hideIconLoadingSkeleton?: boolean;
59
63
  };
60
64
  /**
61
65
  * Used to represent a metadata element to be rendered.
@@ -4,5 +4,5 @@
4
4
  * @jsx jsx
5
5
  */
6
6
  import { type ImageIconProps } from './types';
7
- declare const ImageIcon: ({ defaultIcon, testId, url, width, height, appearance, onError, onLoad, }: ImageIconProps) => JSX.Element;
7
+ declare const ImageIcon: ({ defaultIcon, testId, url, width, height, appearance, onError, onLoad, hideLoadingSkeleton, }: ImageIconProps) => string | number | boolean | Iterable<import("react").ReactNode> | JSX.Element | null | undefined;
8
8
  export default ImageIcon;
@@ -8,4 +8,5 @@ export type ImageIconProps = {
8
8
  onError?: () => void;
9
9
  onLoad?: () => void;
10
10
  appearance?: 'square' | 'round';
11
+ hideLoadingSkeleton?: boolean;
11
12
  };
@@ -34,6 +34,10 @@ export type BaseIconElementProps = ElementProps & {
34
34
  * Whether to display the icon as a square or round image.
35
35
  */
36
36
  appearance?: 'square' | 'round';
37
+ /**
38
+ * For images, whether to hide the loading skeleton while the image is loading.
39
+ */
40
+ hideLoadingSkeleton?: boolean;
37
41
  };
38
42
  /**
39
43
  * A base element that displays an Icon or favicon.
@@ -41,7 +45,7 @@ export type BaseIconElementProps = ElementProps & {
41
45
  * @param props - The props necessary for the Icon element.
42
46
  * @see LinkIcon
43
47
  */
44
- declare const IconElement: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, }: BaseIconElementProps) => JSX.Element;
48
+ declare const IconElement: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, hideLoadingSkeleton, }: BaseIconElementProps) => JSX.Element;
45
49
  export default IconElement;
46
50
  export declare const toLinkIconProps: (data: FlexibleUiDataContext[keyof FlexibleUiDataContext] | undefined, type: FlexibleUiDataContext['type']) => string[] | import("../../../../../../state/flexible-ui-context/types").LinkTitle | import("../../../../../../state/flexible-ui-context/types").LinkLocation | import("../../../../../../state/flexible-ui-context/types").Media | import("../../../../../../state/flexible-ui-context/types").FlexibleUiActions | import("../../../../../../state/flexible-ui-context/types").PreviewActionData | import("../../../../../../extractors/common/lozenge/types").LinkLozenge | import("@atlaskit/link-extractors").LinkPerson[] | {
47
51
  objectId?: string | undefined;
@@ -94,6 +94,10 @@ export type FlexibleCardProps = {
94
94
  sourceUrl: string;
95
95
  linkType?: string;
96
96
  }>;
97
+ /**
98
+ * For image icons in the title, whether to show a loading skeleton while the image is loading.
99
+ */
100
+ hideIconLoadingSkeleton?: boolean;
97
101
  };
98
102
  export type InternalFlexibleUiOptions = FlexibleUiOptions & {
99
103
  hideLegacyButton?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "38.8.0",
3
+ "version": "38.9.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/heading": "^5.2.0",
42
42
  "@atlaskit/icon": "^26.4.0",
43
43
  "@atlaskit/icon-file-type": "^7.0.0",
44
- "@atlaskit/icon-lab": "^4.17.0",
44
+ "@atlaskit/icon-lab": "^4.18.0",
45
45
  "@atlaskit/icon-object": "^7.1.0",
46
46
  "@atlaskit/icon-priority": "^6.3.0",
47
47
  "@atlaskit/image": "^3.0.0",
@@ -62,12 +62,12 @@
62
62
  "@atlaskit/popup": "^4.3.0",
63
63
  "@atlaskit/primitives": "^14.8.0",
64
64
  "@atlaskit/section-message": "^8.2.0",
65
- "@atlaskit/select": "^20.6.0",
65
+ "@atlaskit/select": "^20.7.0",
66
66
  "@atlaskit/spinner": "^18.0.0",
67
67
  "@atlaskit/textarea": "^8.0.0",
68
68
  "@atlaskit/textfield": "^8.0.0",
69
69
  "@atlaskit/theme": "^18.0.0",
70
- "@atlaskit/tokens": "^5.0.0",
70
+ "@atlaskit/tokens": "^5.1.0",
71
71
  "@atlaskit/tooltip": "^20.3.0",
72
72
  "@atlaskit/ufo": "^0.4.0",
73
73
  "@babel/runtime": "^7.0.0",
@@ -261,8 +261,14 @@
261
261
  "fun-1765_wire_up_glance_panel_to_smart_cards": {
262
262
  "type": "boolean"
263
263
  },
264
+ "should-render-to-parent-should-be-true-linking-pla": {
265
+ "type": "boolean"
266
+ },
264
267
  "prompt_whiteboard_competitor_link_gate": {
265
268
  "type": "boolean"
269
+ },
270
+ "platform_fix_block_card_img_icon_vc": {
271
+ "type": "boolean"
266
272
  }
267
273
  },
268
274
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"