@atlaskit/smart-card 38.5.5 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
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
+
3
16
  ## 38.5.5
4
17
 
5
18
  ### Patch Changes
package/compass.yml CHANGED
@@ -1,6 +1,10 @@
1
1
  name: Smart Links
2
2
  id: 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/bee4b8ee-1ffd-432c-9fea-327a379f645d'
3
- description: Smart Links transform ordinary URLs into rich, interactive elements—such as cards, embeds, and lists—directly within Atlassian products. This functionality allows users to preview, interact with, and manage content from over 2,000 external and Atlassian apps without leaving their workspace, streamlining collaboration and reducing context switching.
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.
4
8
  configVersion: 1
5
9
  typeId: CAPABILITY
6
10
  ownerId: 'ari:cloud:identity::team/9683a6ac-2d3f-44c8-a0fe-56128ca69e20'
@@ -75,4 +79,4 @@ customFields:
75
79
  value: null
76
80
  - name: statsig_target_application
77
81
  type: text
78
- value: null
82
+ value: null
@@ -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.5"
14
+ packageVersion: "38.6.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -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.5",
23
+ packageVersion: "38.6.0",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -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.5"
5
+ packageVersion: "38.6.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -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.5",
13
+ packageVersion: "38.6.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -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.5"
7
+ packageVersion: "38.6.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -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.5",
16
+ packageVersion: "38.6.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -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;
@@ -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.5",
3
+ "version": "38.6.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -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"