@atlaskit/smart-card 38.5.4 → 38.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/compass.yml +72 -26
  3. package/dist/cjs/extractors/inline/index.js +2 -2
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/utils/mocks.js +4 -4
  6. package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -2
  7. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -0
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/es2019/extractors/inline/index.js +2 -2
  10. package/dist/es2019/utils/analytics/analytics.js +1 -1
  11. package/dist/es2019/utils/mocks.js +4 -4
  12. package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +3 -1
  13. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +1 -0
  14. package/dist/es2019/view/LinkUrl/index.js +1 -1
  15. package/dist/esm/extractors/inline/index.js +2 -2
  16. package/dist/esm/utils/analytics/analytics.js +1 -1
  17. package/dist/esm/utils/mocks.js +4 -4
  18. package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -2
  19. package/dist/esm/view/HoverCard/components/views/resolved/index.js +1 -0
  20. package/dist/esm/view/LinkUrl/index.js +1 -1
  21. package/dist/types/__fixtures__/figma-entity.d.ts +1 -1
  22. package/dist/types/utils/mocks.d.ts +1 -1
  23. package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
  24. package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
  25. package/dist/types-ts4.5/__fixtures__/figma-entity.d.ts +1 -1
  26. package/dist/types-ts4.5/utils/mocks.d.ts +1 -1
  27. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
  28. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
  29. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 38.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#164586](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164586)
8
+ [`ef096c9e7bd94`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef096c9e7bd94) -
9
+ Adds analytics for AISnippet component. Updates SnippetBlock in smart-card to pass hidden
10
+ information to prevent logging of metrics in hidden cases
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 38.5.5
17
+
18
+ ### Patch Changes
19
+
20
+ - [#164735](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164735)
21
+ [`e775157fd06b8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e775157fd06b8) -
22
+ Rename nounData to entityData. Fg smart_links_noun_support
23
+ - Updated dependencies
24
+
3
25
  ## 38.5.4
4
26
 
5
27
  ### Patch Changes
package/compass.yml CHANGED
@@ -1,36 +1,82 @@
1
- id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/c9898540-33b1-4cd4-9399-16e575bcedae'
2
- name: '@atlaskit/smart-card'
3
- description: |-
4
- This is a React component library that provides the UI and functionality for displaying Smart Links—enriched link previews that show contextual information about URLs from Atlassian products (like Jira, Confluence, Trello) and popular third-party services (such as GitHub, Google Drive, and more).
5
- When a supported link is pasted or inserted, the Smart Card component fetches and displays rich metadata, such as titles, thumbnails, status, and actions, offering a more informative and interactive experience than plain hyperlinks.
1
+ name: Smart Links
2
+ id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/bee4b8ee-1ffd-432c-9fea-327a379f645d'
3
+ description:
4
+ Smart Links transform ordinary URLs into rich, interactive elements—such as cards, embeds, and
5
+ lists—directly within Atlassian products. This functionality allows users to preview, interact
6
+ with, and manage content from over 2,000 external and Atlassian apps without leaving their
7
+ workspace, streamlining collaboration and reducing context switching.
6
8
  configVersion: 1
7
- typeId: LIBRARY
9
+ typeId: CAPABILITY
8
10
  ownerId: 'ari:cloud:identity::team/9683a6ac-2d3f-44c8-a0fe-56128ca69e20'
9
11
  fields:
10
- tier: 4
12
+ isMonorepoProject: false
13
+ tier: 3
11
14
  lifecycle: Active
12
- isMonorepoProject: true
13
- labels:
14
- - atlassian-platform
15
15
  links:
16
- - name: Bandicoots
17
- type: PROJECT
18
- url: 'https://product-fabric.atlassian.net/jira/software/c/projects/EDM/boards/5176'
19
- - name: '#help-twg-linking-platform'
16
+ - name: ''
20
17
  type: CHAT_CHANNEL
21
18
  url: 'https://atlassian.enterprise.slack.com/archives/CFKGAQZRV'
22
19
  - name: ''
23
20
  type: ON_CALL
24
21
  url: 'https://atlassian.app.opsgenie.com/settings/schedule/detail/b9c8b313-dd6d-4a41-8eeb-d7a9df55be9d'
25
- - name: source code
26
- type: REPOSITORY
27
- url: 'https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/linking-platform/smart-card'
28
- customFields: []
29
- relationships:
30
- DEPENDS_ON:
31
- - 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/1ae351ab-13bb-4886-8e48-1bbd835fc8ff' # json-ld-types
32
- - 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/27e8ffab-42db-4c16-9afb-9eefd72d02ec' # link-analytics
33
- - 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/37dc08cd-d81c-4bbb-9b26-5d6d8a417ea3' # link-client-extension
34
- - 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/9aff9365-c8ad-4ec2-b2f0-17134d49445c' # link-extractors
35
- - 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/18157dad-b7fb-4cde-8b74-e905b5757611' # link-provider
36
- - 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/3d229125-4f9d-4091-a303-84ae4eb643fb' # linking-common
22
+ - name: ''
23
+ type: PROJECT
24
+ url: 'https://product-fabric.atlassian.net/jira/software/c/projects/EDM/boards/5176'
25
+ - name: SignalFx - Smart Links
26
+ type: DASHBOARD
27
+ url: 'https://atlassian.signalfx.com/#/dashboard/GcIfe4aA4AA?groupId=Fcva05QA4AA&configId=GcIfgHgA4AA&startTime=-1w&endTime=Now'
28
+ relationships: null
29
+ labels: null
30
+ customFields:
31
+ - name: Anomaly-Detection
32
+ type: text
33
+ value: null
34
+ - name: Compass Config-as-Code
35
+ type: boolean
36
+ value: true
37
+ - name: Data Domain
38
+ type: multi_select
39
+ value:
40
+ - 6abcbe4f-1063-4cf7-8b32-58ebd01078da
41
+ - name: Engineering Manager
42
+ type: user
43
+ value: 'ari:cloud:identity::user/712020:bc050a72-a59d-487f-8b54-73358ba67dd0'
44
+ - name: FFP per month
45
+ type: number
46
+ value: null
47
+ - name: Is renovate enabled?
48
+ type: boolean
49
+ value: false
50
+ - name: Lineage
51
+ type: text
52
+ value: null
53
+ - name: Maintenance Time (hours/week)
54
+ type: number
55
+ value: null
56
+ - name: Owner or Team Name
57
+ type: single_select
58
+ value: 1e93a963-fa64-4c3a-aebb-cc835e418a0a
59
+ - name: Perimeter
60
+ type: single_select
61
+ value: null
62
+ - name: Perimeter (string)
63
+ type: text
64
+ value: null
65
+ - name: Product Owner
66
+ type: user
67
+ value: null
68
+ - name: Tech Debt
69
+ type: text
70
+ value: null
71
+ - name: Technical Owner
72
+ type: user
73
+ value: null
74
+ - name: anomaly-detection
75
+ type: boolean
76
+ value: false
77
+ - name: forge_runtime_node
78
+ type: single_select
79
+ value: null
80
+ - name: statsig_target_application
81
+ type: text
82
+ value: null
@@ -37,7 +37,7 @@ var extractSmartLinkInlineIcon = function extractSmartLinkInlineIcon(response) {
37
37
  return provider.icon;
38
38
  }
39
39
  // We don't need this for design entities,
40
- // but we can add it back when we support more nouns
40
+ // but we can add it back when we support more entities
41
41
  // it requires extractInlineIcon to be moved to the smart link extractor package.
42
42
  // see: https://product-fabric.atlassian.net/browse/EDM-12375
43
43
  // return extractSmartLinkIcon(response);
@@ -52,7 +52,7 @@ var extractInlineProps = exports.extractInlineProps = function extractInlineProp
52
52
  link: (0, _linkExtractors.extractSmartLinkUrl)(response),
53
53
  title: (0, _linkExtractors.extractSmartLinkTitle)(response, removeTextHighlightingFromTitle),
54
54
  icon: extractSmartLinkInlineIcon(response, showLabel),
55
- // As we migrate to support more nouns we can incorporate these fields
55
+ // As we migrate to support more entities we can incorporate these fields
56
56
  lozenge: (0, _lozenge.extractLozenge)(jsonLd),
57
57
  titleTextColor: (0, _primitives.extractTitleTextColor)(jsonLd),
58
58
  titlePrefix: (0, _titlePrefix.extractTitlePrefix)(jsonLd, renderers, 'inline')
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "38.5.4"
14
+ packageVersion: "38.6.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -100,8 +100,8 @@ var jsonLdResponse = {
100
100
  },
101
101
  data: successfulResponseData
102
102
  };
103
- var nounDataResponse = {
104
- nounData: {
103
+ var entityDataResponse = {
104
+ entityData: {
105
105
  id: 'I love cheese',
106
106
  displayName: 'I love cheese',
107
107
  url: 'https://some.url',
@@ -119,7 +119,7 @@ var nounDataResponse = {
119
119
  };
120
120
  var mocks = exports.mocks = {
121
121
  success: _objectSpread({}, jsonLdResponse),
122
- nounDataSuccess: _objectSpread(_objectSpread({}, jsonLdResponse), {}, {
122
+ entityDataSuccess: _objectSpread(_objectSpread({}, jsonLdResponse), {}, {
123
123
  data: _objectSpread(_objectSpread({}, jsonLdResponse.data), {}, {
124
124
  generator: {
125
125
  '@type': 'Application',
@@ -138,7 +138,7 @@ var mocks = exports.mocks = {
138
138
  }
139
139
  }
140
140
  })
141
- }, nounDataResponse),
141
+ }, entityDataResponse),
142
142
  notFound: {
143
143
  meta: {
144
144
  visibility: 'not_found',
@@ -15,7 +15,7 @@ var _renderers = require("../../../../../state/renderers");
15
15
  var _elements = require("../../elements");
16
16
  var _utils = require("../../utils");
17
17
  var _block = _interopRequireDefault(require("../block"));
18
- var _excluded = ["maxLines", "status", "testId", "text"];
18
+ var _excluded = ["maxLines", "status", "testId", "text", "isHidden"];
19
19
  var DEFAULT_MAX_LINES = 3;
20
20
  var MAXIMUM_MAX_LINES = 6;
21
21
  var MINIMUM_MAX_LINES = 1;
@@ -35,6 +35,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
35
35
  _ref$testId = _ref.testId,
36
36
  testId = _ref$testId === void 0 ? 'smart-block-snippet' : _ref$testId,
37
37
  text = _ref.text,
38
+ _ref$isHidden = _ref.isHidden,
39
+ isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden,
38
40
  blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
39
41
  var context = (0, _platformFeatureFlags.fg)('cc-ai-linking-platform-snippet-renderer') ?
40
42
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -79,7 +81,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
79
81
  contentId: (_context$meta$objectI = context === null || context === void 0 || (_context$meta = context.meta) === null || _context$meta === void 0 ? void 0 : _context$meta.objectId) !== null && _context$meta$objectI !== void 0 ? _context$meta$objectI : '',
80
82
  contentType: (_context$meta$resourc = context === null || context === void 0 || (_context$meta2 = context.meta) === null || _context$meta2 === void 0 ? void 0 : _context$meta2.resourceType) !== null && _context$meta$resourc !== void 0 ? _context$meta$resourc : '',
81
83
  cloudId: (_context$meta$tenantI = context === null || context === void 0 || (_context$meta3 = context.meta) === null || _context$meta3 === void 0 ? void 0 : _context$meta3.tenantId) !== null && _context$meta$tenantI !== void 0 ? _context$meta$tenantI : '',
82
- maxLines: snippetMaxLines
84
+ maxLines: snippetMaxLines,
85
+ isHidden: isHidden
83
86
  }) : snippet);
84
87
  };
85
88
  var _default = exports.default = SnippetBlock;
@@ -106,6 +106,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
106
106
  }, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
107
107
  status: _constants.SmartLinkStatus.Resolved
108
108
  }, {
109
+ isHidden: true,
109
110
  className: (0, _runtime.ax)(["_3um015vq _kqswstnw"])
110
111
  })), /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
111
112
  onClick: onActionClick,
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "38.5.4",
23
+ packageVersion: "38.6.0",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -27,7 +27,7 @@ const extractSmartLinkInlineIcon = (response, showLabel = true) => {
27
27
  return provider.icon;
28
28
  }
29
29
  // We don't need this for design entities,
30
- // but we can add it back when we support more nouns
30
+ // but we can add it back when we support more entities
31
31
  // it requires extractInlineIcon to be moved to the smart link extractor package.
32
32
  // see: https://product-fabric.atlassian.net/browse/EDM-12375
33
33
  // return extractSmartLinkIcon(response);
@@ -41,7 +41,7 @@ export const extractInlineProps = (response, renderers, removeTextHighlightingFr
41
41
  link: extractSmartLinkUrl(response),
42
42
  title: extractSmartLinkTitle(response, removeTextHighlightingFromTitle),
43
43
  icon: extractSmartLinkInlineIcon(response, showLabel),
44
- // As we migrate to support more nouns we can incorporate these fields
44
+ // As we migrate to support more entities we can incorporate these fields
45
45
  lozenge: extractLozenge(jsonLd),
46
46
  titleTextColor: extractTitleTextColor(jsonLd),
47
47
  titlePrefix: extractTitlePrefix(jsonLd, renderers, 'inline'),
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "38.5.4"
5
+ packageVersion: "38.6.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -82,8 +82,8 @@ const jsonLdResponse = {
82
82
  },
83
83
  data: successfulResponseData
84
84
  };
85
- const nounDataResponse = {
86
- nounData: {
85
+ const entityDataResponse = {
86
+ entityData: {
87
87
  id: 'I love cheese',
88
88
  displayName: 'I love cheese',
89
89
  url: 'https://some.url',
@@ -103,7 +103,7 @@ export const mocks = {
103
103
  success: {
104
104
  ...jsonLdResponse
105
105
  },
106
- nounDataSuccess: {
106
+ entityDataSuccess: {
107
107
  ...jsonLdResponse,
108
108
  data: {
109
109
  ...jsonLdResponse.data,
@@ -125,7 +125,7 @@ export const mocks = {
125
125
  }
126
126
  }
127
127
  },
128
- ...nounDataResponse
128
+ ...entityDataResponse
129
129
  },
130
130
  notFound: {
131
131
  meta: {
@@ -22,6 +22,7 @@ const SnippetBlock = ({
22
22
  status = SmartLinkStatus.Fallback,
23
23
  testId = 'smart-block-snippet',
24
24
  text,
25
+ isHidden = false,
25
26
  ...blockProps
26
27
  }) => {
27
28
  var _blockProps$size2, _cardContext$ui2, _ref, _context$meta$objectI, _context$meta, _context$meta$resourc, _context$meta2, _context$meta$tenantI, _context$meta3;
@@ -68,7 +69,8 @@ const SnippetBlock = ({
68
69
  contentId: (_context$meta$objectI = context === null || context === void 0 ? void 0 : (_context$meta = context.meta) === null || _context$meta === void 0 ? void 0 : _context$meta.objectId) !== null && _context$meta$objectI !== void 0 ? _context$meta$objectI : '',
69
70
  contentType: (_context$meta$resourc = context === null || context === void 0 ? void 0 : (_context$meta2 = context.meta) === null || _context$meta2 === void 0 ? void 0 : _context$meta2.resourceType) !== null && _context$meta$resourc !== void 0 ? _context$meta$resourc : '',
70
71
  cloudId: (_context$meta$tenantI = context === null || context === void 0 ? void 0 : (_context$meta3 = context.meta) === null || _context$meta3 === void 0 ? void 0 : _context$meta3.tenantId) !== null && _context$meta$tenantI !== void 0 ? _context$meta$tenantI : '',
71
- maxLines: snippetMaxLines
72
+ maxLines: snippetMaxLines,
73
+ isHidden: isHidden
72
74
  }) : snippet);
73
75
  };
74
76
  export default SnippetBlock;
@@ -100,6 +100,7 @@ const HoverCardResolvedView = ({
100
100
  }, fg('platform-linking-flexible-card-context') ? undefined : {
101
101
  status: SmartLinkStatus.Resolved
102
102
  }, {
103
+ isHidden: true,
103
104
  className: ax(["_3um015vq _kqswstnw"])
104
105
  })), /*#__PURE__*/React.createElement(ActionBlock, {
105
106
  onClick: onActionClick,
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "38.5.4",
13
+ packageVersion: "38.6.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -32,7 +32,7 @@ var extractSmartLinkInlineIcon = function extractSmartLinkInlineIcon(response) {
32
32
  return provider.icon;
33
33
  }
34
34
  // We don't need this for design entities,
35
- // but we can add it back when we support more nouns
35
+ // but we can add it back when we support more entities
36
36
  // it requires extractInlineIcon to be moved to the smart link extractor package.
37
37
  // see: https://product-fabric.atlassian.net/browse/EDM-12375
38
38
  // return extractSmartLinkIcon(response);
@@ -47,7 +47,7 @@ export var extractInlineProps = function extractInlineProps(response, renderers,
47
47
  link: extractSmartLinkUrl(response),
48
48
  title: extractSmartLinkTitle(response, removeTextHighlightingFromTitle),
49
49
  icon: extractSmartLinkInlineIcon(response, showLabel),
50
- // As we migrate to support more nouns we can incorporate these fields
50
+ // As we migrate to support more entities we can incorporate these fields
51
51
  lozenge: extractLozenge(jsonLd),
52
52
  titleTextColor: extractTitleTextColor(jsonLd),
53
53
  titlePrefix: extractTitlePrefix(jsonLd, renderers, 'inline')
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "38.5.4"
7
+ packageVersion: "38.6.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -93,8 +93,8 @@ var jsonLdResponse = {
93
93
  },
94
94
  data: successfulResponseData
95
95
  };
96
- var nounDataResponse = {
97
- nounData: {
96
+ var entityDataResponse = {
97
+ entityData: {
98
98
  id: 'I love cheese',
99
99
  displayName: 'I love cheese',
100
100
  url: 'https://some.url',
@@ -112,7 +112,7 @@ var nounDataResponse = {
112
112
  };
113
113
  export var mocks = {
114
114
  success: _objectSpread({}, jsonLdResponse),
115
- nounDataSuccess: _objectSpread(_objectSpread({}, jsonLdResponse), {}, {
115
+ entityDataSuccess: _objectSpread(_objectSpread({}, jsonLdResponse), {}, {
116
116
  data: _objectSpread(_objectSpread({}, jsonLdResponse.data), {}, {
117
117
  generator: {
118
118
  '@type': 'Application',
@@ -131,7 +131,7 @@ export var mocks = {
131
131
  }
132
132
  }
133
133
  })
134
- }, nounDataResponse),
134
+ }, entityDataResponse),
135
135
  notFound: {
136
136
  meta: {
137
137
  visibility: 'not_found',
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["maxLines", "status", "testId", "text"];
3
+ var _excluded = ["maxLines", "status", "testId", "text", "isHidden"];
4
4
  import React from 'react';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
6
  import { SmartLinkStatus } from '../../../../../constants';
@@ -28,6 +28,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
28
28
  _ref$testId = _ref.testId,
29
29
  testId = _ref$testId === void 0 ? 'smart-block-snippet' : _ref$testId,
30
30
  text = _ref.text,
31
+ _ref$isHidden = _ref.isHidden,
32
+ isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden,
31
33
  blockProps = _objectWithoutProperties(_ref, _excluded);
32
34
  var context = fg('cc-ai-linking-platform-snippet-renderer') ?
33
35
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -72,7 +74,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
72
74
  contentId: (_context$meta$objectI = context === null || context === void 0 || (_context$meta = context.meta) === null || _context$meta === void 0 ? void 0 : _context$meta.objectId) !== null && _context$meta$objectI !== void 0 ? _context$meta$objectI : '',
73
75
  contentType: (_context$meta$resourc = context === null || context === void 0 || (_context$meta2 = context.meta) === null || _context$meta2 === void 0 ? void 0 : _context$meta2.resourceType) !== null && _context$meta$resourc !== void 0 ? _context$meta$resourc : '',
74
76
  cloudId: (_context$meta$tenantI = context === null || context === void 0 || (_context$meta3 = context.meta) === null || _context$meta3 === void 0 ? void 0 : _context$meta3.tenantId) !== null && _context$meta$tenantI !== void 0 ? _context$meta$tenantI : '',
75
- maxLines: snippetMaxLines
77
+ maxLines: snippetMaxLines,
78
+ isHidden: isHidden
76
79
  }) : snippet);
77
80
  };
78
81
  export default SnippetBlock;
@@ -97,6 +97,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
97
97
  }, fg('platform-linking-flexible-card-context') ? undefined : {
98
98
  status: SmartLinkStatus.Resolved
99
99
  }, {
100
+ isHidden: true,
100
101
  className: ax(["_3um015vq _kqswstnw"])
101
102
  })), /*#__PURE__*/React.createElement(ActionBlock, {
102
103
  onClick: onActionClick,
@@ -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.5.4",
16
+ packageVersion: "38.6.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  href: string;
42
42
  };
43
43
  };
44
- nounData: {
44
+ entityData: {
45
45
  id: string;
46
46
  displayName: string;
47
47
  url: string;
@@ -13,7 +13,7 @@ export declare const mockGenerator: {
13
13
  export declare const mockByUrl: (url: string) => JsonLd.Response<JsonLd.Data.BaseData>;
14
14
  export declare const mocks: {
15
15
  success: JsonLd.Response<JsonLd.Data.BaseData>;
16
- nounDataSuccess: SmartLinkResponse;
16
+ entityDataSuccess: SmartLinkResponse;
17
17
  notFound: JsonLd.Response<JsonLd.Data.BaseData>;
18
18
  forbidden: JsonLd.Response<JsonLd.Data.BaseData>;
19
19
  forbiddenWithNoAuth: JsonLd.Response<JsonLd.Data.BaseData>;
@@ -6,5 +6,5 @@ import { type SnippetBlockProps } from './types';
6
6
  * @param {SnippetBlockProps} SnippetBlockProps
7
7
  * @see Block
8
8
  */
9
- declare const SnippetBlock: ({ maxLines, status, testId, text, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
9
+ declare const SnippetBlock: ({ maxLines, status, testId, text, isHidden, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
10
10
  export default SnippetBlock;
@@ -9,4 +9,8 @@ export type SnippetBlockProps = {
9
9
  * The text to display. Overrides the default link description.
10
10
  */
11
11
  text?: string;
12
+ /**
13
+ * The snippet block is rendered hidden at times, this just informs the component and the snippet renderer
14
+ */
15
+ isHidden?: boolean;
12
16
  } & BlockProps;
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  href: string;
42
42
  };
43
43
  };
44
- nounData: {
44
+ entityData: {
45
45
  id: string;
46
46
  displayName: string;
47
47
  url: string;
@@ -13,7 +13,7 @@ export declare const mockGenerator: {
13
13
  export declare const mockByUrl: (url: string) => JsonLd.Response<JsonLd.Data.BaseData>;
14
14
  export declare const mocks: {
15
15
  success: JsonLd.Response<JsonLd.Data.BaseData>;
16
- nounDataSuccess: SmartLinkResponse;
16
+ entityDataSuccess: SmartLinkResponse;
17
17
  notFound: JsonLd.Response<JsonLd.Data.BaseData>;
18
18
  forbidden: JsonLd.Response<JsonLd.Data.BaseData>;
19
19
  forbiddenWithNoAuth: JsonLd.Response<JsonLd.Data.BaseData>;
@@ -6,5 +6,5 @@ import { type SnippetBlockProps } from './types';
6
6
  * @param {SnippetBlockProps} SnippetBlockProps
7
7
  * @see Block
8
8
  */
9
- declare const SnippetBlock: ({ maxLines, status, testId, text, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
9
+ declare const SnippetBlock: ({ maxLines, status, testId, text, isHidden, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
10
10
  export default SnippetBlock;
@@ -9,4 +9,8 @@ export type SnippetBlockProps = {
9
9
  * The text to display. Overrides the default link description.
10
10
  */
11
11
  text?: string;
12
+ /**
13
+ * The snippet block is rendered hidden at times, this just informs the component and the snippet renderer
14
+ */
15
+ isHidden?: boolean;
12
16
  } & BlockProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "38.5.4",
3
+ "version": "38.6.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/link-client-extension": "^5.0.0",
53
53
  "@atlaskit/link-extractors": "^2.3.0",
54
54
  "@atlaskit/linking-common": "^9.0.0",
55
- "@atlaskit/linking-types": "^9.10.0",
55
+ "@atlaskit/linking-types": "^10.0.0",
56
56
  "@atlaskit/logo": "^19.0.0",
57
57
  "@atlaskit/lozenge": "^12.2.0",
58
58
  "@atlaskit/menu": "^8.0.0",
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/textfield": "^8.0.0",
69
69
  "@atlaskit/theme": "^18.0.0",
70
70
  "@atlaskit/tokens": "^5.0.0",
71
- "@atlaskit/tooltip": "^20.2.0",
71
+ "@atlaskit/tooltip": "^20.3.0",
72
72
  "@atlaskit/ufo": "^0.4.0",
73
73
  "@babel/runtime": "^7.0.0",
74
74
  "@compiled/react": "^0.18.3",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^3.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/link-provider": "^3.2.0",
88
+ "@atlaskit/link-provider": "^3.3.0",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
91
91
  "react-intl-next": "npm:react-intl@^5.18.1"