@atlaskit/smart-card 42.3.5 → 43.0.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,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`ec9cef4db241c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ec9cef4db241c) -
8
+ [ux] Show connect button for unauthorized blue hyperlinks, following the same auth flow as Smart
9
+ Links
10
+
3
11
  ## 42.3.5
4
12
 
5
13
  ### Patch Changes
@@ -165,7 +165,7 @@ attributes:
165
165
  description: The definitionId of the Smart Link resolver invoked.
166
166
  display:
167
167
  required: false
168
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
168
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
169
169
  description: Whether the card was an Inline, Block, Embed or Flexible UI.
170
170
  resourceType:
171
171
  required: false
@@ -313,7 +313,7 @@ events:
313
313
  description: The unique ID for this Smart Link
314
314
  display:
315
315
  required: true
316
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
316
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
317
317
  description: Whether the card was an Inline, Block, Embed or Flexible UI
318
318
  definitionId:
319
319
  required: false
@@ -337,7 +337,7 @@ events:
337
337
  description: The unique ID for this Smart Link.
338
338
  display:
339
339
  required: true
340
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
340
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
341
341
  description: Whether the card was an Inline, Block, Embed or Flexible UI.
342
342
  definitionId:
343
343
  required: false
@@ -480,7 +480,7 @@ events:
480
480
  <<: [*PackageMetaDataContext, *CommonContext]
481
481
  display:
482
482
  required: true
483
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
483
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
484
484
  description: Whether the card was an Inline, Block, Embed or Flexible UI.
485
485
  definitionId:
486
486
  required: false
@@ -516,6 +516,62 @@ events:
516
516
  required: false
517
517
  type: string
518
518
  description: Failure reason
519
+ - hyperlink resolved:
520
+ type: operational
521
+ description: Fires an event when a hyperlink is successfully resolved.
522
+ attributes:
523
+ packageName:
524
+ type: string
525
+ description: name of the package the event was fired from
526
+ packageVersion:
527
+ type: string
528
+ description: version of the package the event was fired from
529
+ extensionKey:
530
+ type: string
531
+ required: false
532
+ description: The provider identifier of the resolver that was used to resolve the link
533
+ definitionId:
534
+ required: false
535
+ type: string
536
+ description: The definitionId of the Smart Link resolver invoked.
537
+ resourceType:
538
+ required: false
539
+ type: string
540
+ description: Type of resource the link is pointing to
541
+ duration:
542
+ required: false
543
+ type: number
544
+ description: Total time the hyperlink resolution took to complete
545
+ - hyperlink unresolved:
546
+ type: operational
547
+ description: Fires an event when a hyperlink fails to resolve.
548
+ attributes:
549
+ packageName:
550
+ type: string
551
+ description: name of the package the event was fired from
552
+ packageVersion:
553
+ type: string
554
+ description: version of the package the event was fired from
555
+ extensionKey:
556
+ type: string
557
+ required: false
558
+ description: The provider identifier of the resolver that was used to resolve the link
559
+ definitionId:
560
+ required: false
561
+ type: string
562
+ description: The definitionId of the Smart Link resolver invoked.
563
+ resourceType:
564
+ required: false
565
+ type: string
566
+ description: Type of resource the link is pointing to
567
+ reason:
568
+ required: false
569
+ type: string
570
+ description: The status/reason why the hyperlink failed to resolve
571
+ error:
572
+ required: false
573
+ type: object
574
+ description: Error object providing more details about the failure
519
575
  - smartLink clicked:
520
576
  type: ui
521
577
  description: fires an event that represents when a user clicks on a Smart Link.
@@ -623,7 +679,7 @@ events:
623
679
  <<: [*PackageMetaDataContext, *CommonContext]
624
680
  display:
625
681
  required: true
626
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
682
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
627
683
  description: Whether the card was an Inline, Block, Embed or Flexible UI.
628
684
  definitionId:
629
685
  required: false
@@ -638,7 +694,7 @@ events:
638
694
  <<: [*PackageMetaDataContext, *CommonContext]
639
695
  display:
640
696
  required: true
641
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
697
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
642
698
  description: Whether the card was an Inline, Block, Embed or Flexible UI.
643
699
  definitionId:
644
700
  required: false
@@ -653,7 +709,7 @@ events:
653
709
  <<: [*PackageMetaDataContext, *CommonContext]
654
710
  display:
655
711
  required: true
656
- type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
712
+ type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'hyperlink']
657
713
  description: Whether the card was an Inline, Block, Embed or Flexible UI.
658
714
  definitionId:
659
715
  required: false
@@ -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: "42.3.4"
14
+ packageVersion: "42.3.5"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -54,15 +54,10 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
54
54
  }
55
55
  onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
56
56
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
57
-
58
- // TODO: AI3W-1113: Show auth button
59
57
  var onAuthorize = (0, _platformFeatureFlags.fg)('platform_linking_plain_hyperlink_connect_button') ?
60
58
  // eslint-disable-next-line react-hooks/rules-of-hooks
61
59
  (0, _react.useCallback)(function () {
62
- return (
63
- // TODO: Need to add hyperlink type
64
- actions.authorize('inline')
65
- );
60
+ return actions.authorize('hyperlink');
66
61
  }, [actions]) : undefined;
67
62
  if ((0, _platformFeatureFlags.fg)('platform_linking_plain_hyperlink_connect_button')) {
68
63
  switch (state === null || state === void 0 ? void 0 : state.status) {
@@ -71,6 +66,7 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
71
66
  return /*#__PURE__*/_react.default.createElement(_unauthorizeView.default, (0, _extends2.default)({}, props, {
72
67
  onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
73
68
  onClick: onClick,
69
+ showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
74
70
  provider: provider
75
71
  }));
76
72
  default:
@@ -1,34 +1,30 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _react = _interopRequireWildcard(require("react"));
10
+ var _react = _interopRequireDefault(require("react"));
12
11
  var _reactIntlNext = require("react-intl-next");
13
12
  var _messages = require("../../../messages");
14
13
  var _actionButton = require("../../InlineCard/common/action-button");
15
14
  var _Hyperlink = _interopRequireDefault(require("../Hyperlink"));
16
- var _excluded = ["onAuthorize", "provider"];
17
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
+ var _excluded = ["onAuthorize", "provider", "showConnectBtn"];
18
16
  var HyperlinkUnauthorizedView = function HyperlinkUnauthorizedView(_ref) {
19
17
  var onAuthorize = _ref.onAuthorize,
20
18
  provider = _ref.provider,
19
+ showConnectBtn = _ref.showConnectBtn,
21
20
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
- var actionButton = (0, _react.useMemo)(function () {
23
- return onAuthorize ? /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
24
- onClick: onAuthorize,
25
- testId: "button-connect-account"
26
- }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
27
- values: {
28
- context: provider === null || provider === void 0 ? void 0 : provider.text
29
- }
30
- }))) : null;
31
- }, [onAuthorize, provider === null || provider === void 0 ? void 0 : provider.text]);
32
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Hyperlink.default, props), actionButton);
21
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Hyperlink.default, props), showConnectBtn && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
22
+ onClick: onAuthorize,
23
+ testId: "button-connect-account"
24
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
25
+ values: {
26
+ context: provider === null || provider === void 0 ? void 0 : provider.text
27
+ }
28
+ })))));
33
29
  };
34
30
  var _default = exports.default = HyperlinkUnauthorizedView;
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "42.3.4",
25
+ packageVersion: "42.3.5",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  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: "42.3.4"
5
+ packageVersion: "42.3.5"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -41,13 +41,9 @@ const HyperlinkWithSmartLinkResolverInner = ({
41
41
  }
42
42
  onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback(e);
43
43
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
44
-
45
- // TODO: AI3W-1113: Show auth button
46
44
  const onAuthorize = fg('platform_linking_plain_hyperlink_connect_button') ?
47
45
  // eslint-disable-next-line react-hooks/rules-of-hooks
48
- useCallback(() =>
49
- // TODO: Need to add hyperlink type
50
- actions.authorize('inline'), [actions]) : undefined;
46
+ useCallback(() => actions.authorize('hyperlink'), [actions]) : undefined;
51
47
  if (fg('platform_linking_plain_hyperlink_connect_button')) {
52
48
  switch (state === null || state === void 0 ? void 0 : state.status) {
53
49
  case 'unauthorized':
@@ -55,6 +51,7 @@ const HyperlinkWithSmartLinkResolverInner = ({
55
51
  return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
56
52
  onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
57
53
  onClick: onClick,
54
+ showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
58
55
  provider: provider
59
56
  }));
60
57
  default:
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useMemo } from 'react';
2
+ import React from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import { messages } from '../../../messages';
5
5
  import { ActionButton } from '../../InlineCard/common/action-button';
@@ -7,16 +7,16 @@ import Hyperlink from '../Hyperlink';
7
7
  const HyperlinkUnauthorizedView = ({
8
8
  onAuthorize,
9
9
  provider,
10
+ showConnectBtn,
10
11
  ...props
11
12
  }) => {
12
- const actionButton = useMemo(() => onAuthorize ? /*#__PURE__*/React.createElement(ActionButton, {
13
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Hyperlink, props), showConnectBtn && /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(ActionButton, {
13
14
  onClick: onAuthorize,
14
15
  testId: "button-connect-account"
15
16
  }, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
16
17
  values: {
17
18
  context: provider === null || provider === void 0 ? void 0 : provider.text
18
19
  }
19
- }))) : null, [onAuthorize, provider === null || provider === void 0 ? void 0 : provider.text]);
20
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Hyperlink, props), actionButton);
20
+ })))));
21
21
  };
22
22
  export default HyperlinkUnauthorizedView;
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "42.3.4",
15
+ packageVersion: "42.3.5",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  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: "42.3.4"
7
+ packageVersion: "42.3.5"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -45,15 +45,10 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
45
45
  }
46
46
  onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
47
47
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
48
-
49
- // TODO: AI3W-1113: Show auth button
50
48
  var onAuthorize = fg('platform_linking_plain_hyperlink_connect_button') ?
51
49
  // eslint-disable-next-line react-hooks/rules-of-hooks
52
50
  useCallback(function () {
53
- return (
54
- // TODO: Need to add hyperlink type
55
- actions.authorize('inline')
56
- );
51
+ return actions.authorize('hyperlink');
57
52
  }, [actions]) : undefined;
58
53
  if (fg('platform_linking_plain_hyperlink_connect_button')) {
59
54
  switch (state === null || state === void 0 ? void 0 : state.status) {
@@ -62,6 +57,7 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
62
57
  return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
63
58
  onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
64
59
  onClick: onClick,
60
+ showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
65
61
  provider: provider
66
62
  }));
67
63
  default:
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["onAuthorize", "provider"];
4
- import React, { useMemo } from 'react';
3
+ var _excluded = ["onAuthorize", "provider", "showConnectBtn"];
4
+ import React from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import { messages } from '../../../messages';
7
7
  import { ActionButton } from '../../InlineCard/common/action-button';
@@ -9,17 +9,15 @@ import Hyperlink from '../Hyperlink';
9
9
  var HyperlinkUnauthorizedView = function HyperlinkUnauthorizedView(_ref) {
10
10
  var onAuthorize = _ref.onAuthorize,
11
11
  provider = _ref.provider,
12
+ showConnectBtn = _ref.showConnectBtn,
12
13
  props = _objectWithoutProperties(_ref, _excluded);
13
- var actionButton = useMemo(function () {
14
- return onAuthorize ? /*#__PURE__*/React.createElement(ActionButton, {
15
- onClick: onAuthorize,
16
- testId: "button-connect-account"
17
- }, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
18
- values: {
19
- context: provider === null || provider === void 0 ? void 0 : provider.text
20
- }
21
- }))) : null;
22
- }, [onAuthorize, provider === null || provider === void 0 ? void 0 : provider.text]);
23
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Hyperlink, props), actionButton);
14
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Hyperlink, props), showConnectBtn && /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(ActionButton, {
15
+ onClick: onAuthorize,
16
+ testId: "button-connect-account"
17
+ }, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
18
+ values: {
19
+ context: provider === null || provider === void 0 ? void 0 : provider.text
20
+ }
21
+ })))));
24
22
  };
25
23
  export default HyperlinkUnauthorizedView;
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "42.3.4",
18
+ packageVersion: "42.3.5",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::932bd7921a1bd5e7a45d04e6fef57e12>>
6
+ * @codegen <<SignedSource::a9e05f4749fe4c5f7aaded5bdf6a8822>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -37,35 +37,35 @@ export type ButtonClickedCopyLinkAttributesType = {
37
37
  actionType: string | null;
38
38
  id: string | null;
39
39
  definitionId: string | null;
40
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
40
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
41
41
  resourceType: string | null;
42
42
  };
43
43
  export type ButtonClickedDownloadDocumentAttributesType = {
44
44
  actionType: string | null;
45
45
  id: string | null;
46
46
  definitionId: string | null;
47
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
47
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
48
48
  resourceType: string | null;
49
49
  };
50
50
  export type ButtonClickedInvokePreviewScreenAttributesType = {
51
51
  actionType: string | null;
52
52
  id: string | null;
53
53
  definitionId: string | null;
54
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
54
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
55
55
  resourceType: string | null;
56
56
  };
57
57
  export type ButtonClickedShortcutGoToLinkAttributesType = {
58
58
  actionType: string | null;
59
59
  id: string | null;
60
60
  definitionId: string | null;
61
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
61
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
62
62
  resourceType: string | null;
63
63
  };
64
64
  export type ButtonClickedIssueStatusUpdateAttributesType = {
65
65
  actionType: string | null;
66
66
  id: string | null;
67
67
  definitionId: string | null;
68
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
68
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
69
69
  resourceType: string | null;
70
70
  };
71
71
  export type ButtonClickedAiSummaryAttributesType = {};
@@ -99,14 +99,14 @@ export type RelatedLinksFailedAttributesType = {
99
99
  };
100
100
  export type SmartLinkIframeDwelledAttributesType = {
101
101
  id: string;
102
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
102
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
103
103
  definitionId: string | null;
104
104
  dwellTime: number;
105
105
  dwellPercentVisible: number;
106
106
  };
107
107
  export type SmartLinkIframeFocusedAttributesType = {
108
108
  id: string;
109
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
109
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
110
110
  definitionId: string | null;
111
111
  };
112
112
  export type ApplicationAccountConnectedAttributesType = {
@@ -147,7 +147,7 @@ export type SmartLinkUnresolvedAttributesType = {
147
147
  reason: string;
148
148
  };
149
149
  export type SmartLinkChunkLoadFailedAttributesType = {
150
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
150
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
151
151
  definitionId: string | null;
152
152
  error: Record<string, unknown>;
153
153
  errorInfo: Record<string, unknown>;
@@ -156,7 +156,7 @@ export type SmartLinkActionResolvedAttributesType = {
156
156
  actionType: string | null;
157
157
  id: string | null;
158
158
  definitionId: string | null;
159
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
159
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
160
160
  resourceType: string | null;
161
161
  duration: number | null;
162
162
  };
@@ -164,23 +164,11 @@ export type SmartLinkActionUnresolvedAttributesType = {
164
164
  actionType: string | null;
165
165
  id: string | null;
166
166
  definitionId: string | null;
167
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
167
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
168
168
  resourceType: string | null;
169
169
  duration: number | null;
170
170
  reason: string | null;
171
171
  };
172
- export type SmartLinkClickedAttributesType = {
173
- id: string;
174
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
175
- definitionId: string | null;
176
- isModifierKeyPressed: boolean | null;
177
- };
178
- export type SmartLinkClickedTitleGoToLinkAttributesType = {
179
- id: string;
180
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
181
- definitionId: string | null;
182
- isModifierKeyPressed: boolean | null;
183
- };
184
172
  export type HyperlinkResolvedAttributesType = {
185
173
  definitionId: string | null;
186
174
  extensionKey: string | null;
@@ -191,8 +179,20 @@ export type HyperlinkUnresolvedAttributesType = {
191
179
  definitionId: string | null;
192
180
  extensionKey: string | null;
193
181
  resourceType: string | null;
182
+ reason: string | null;
194
183
  error: Record<string, unknown> | null;
195
- reason: string;
184
+ };
185
+ export type SmartLinkClickedAttributesType = {
186
+ id: string;
187
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
188
+ definitionId: string | null;
189
+ isModifierKeyPressed: boolean | null;
190
+ };
191
+ export type SmartLinkClickedTitleGoToLinkAttributesType = {
192
+ id: string;
193
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
194
+ definitionId: string | null;
195
+ isModifierKeyPressed: boolean | null;
196
196
  };
197
197
  export type SmartLinkClickedPreviewHoverCardAttributesType = {
198
198
  id: string;
@@ -211,15 +211,15 @@ export type HoverCardDismissedAttributesType = {
211
211
  definitionId: string | null;
212
212
  };
213
213
  export type ButtonClickedConnectAccountAttributesType = {
214
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
214
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
215
215
  definitionId: string | null;
216
216
  };
217
217
  export type SmartLinkClickedTryAnotherAccountAttributesType = {
218
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
218
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
219
219
  definitionId: string | null;
220
220
  };
221
221
  export type ConsentModalClosedAttributesType = {
222
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
222
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
223
223
  definitionId: string | null;
224
224
  };
225
225
  export type ModalClosedEmbedPreviewAttributesType = {
@@ -358,10 +358,10 @@ export type AnalyticsEventAttributes = {
358
358
  * Fires an event when a Smart Link action is failed to resolved. */
359
359
  'operational.smartLinkAction.unresolved': SmartLinkActionUnresolvedAttributesType;
360
360
  /**
361
- * Fires an event when a Hyperlink is successfully resolved. */
361
+ * Fires an event when a hyperlink is successfully resolved. */
362
362
  'operational.hyperlink.resolved': HyperlinkResolvedAttributesType;
363
363
  /**
364
- * Fires an event when a Hyperlink is failed to resolve. */
364
+ * Fires an event when a hyperlink fails to resolve. */
365
365
  'operational.hyperlink.unresolved': HyperlinkUnresolvedAttributesType;
366
366
  /**
367
367
  * fires an event that represents when a user clicks on a Smart Link. */
@@ -7,7 +7,7 @@ import { type FlexibleUiOptions } from '../FlexibleCard/types';
7
7
  import { type HoverPreviewOptions } from '../HoverCard/types';
8
8
  import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
9
9
  export type { CardAppearance, CardPlatform };
10
- export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
10
+ export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
11
11
  export type EmbedIframeUrlType = 'href' | 'interactiveHref';
12
12
  export type OnResolveCallback = (data: {
13
13
  aspectRatio?: number;
@@ -4,6 +4,7 @@ import type { LinkUrlProps } from '../types';
4
4
  type HyperlinkUnauthorizedViewProps = LinkUrlProps & {
5
5
  onAuthorize?: () => void;
6
6
  provider?: LinkProvider;
7
+ showConnectBtn?: boolean;
7
8
  };
8
- declare const HyperlinkUnauthorizedView: ({ onAuthorize, provider, ...props }: HyperlinkUnauthorizedViewProps) => React.JSX.Element;
9
+ declare const HyperlinkUnauthorizedView: ({ onAuthorize, provider, showConnectBtn, ...props }: HyperlinkUnauthorizedViewProps) => React.JSX.Element;
9
10
  export default HyperlinkUnauthorizedView;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::932bd7921a1bd5e7a45d04e6fef57e12>>
6
+ * @codegen <<SignedSource::a9e05f4749fe4c5f7aaded5bdf6a8822>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -37,35 +37,35 @@ export type ButtonClickedCopyLinkAttributesType = {
37
37
  actionType: string | null;
38
38
  id: string | null;
39
39
  definitionId: string | null;
40
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
40
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
41
41
  resourceType: string | null;
42
42
  };
43
43
  export type ButtonClickedDownloadDocumentAttributesType = {
44
44
  actionType: string | null;
45
45
  id: string | null;
46
46
  definitionId: string | null;
47
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
47
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
48
48
  resourceType: string | null;
49
49
  };
50
50
  export type ButtonClickedInvokePreviewScreenAttributesType = {
51
51
  actionType: string | null;
52
52
  id: string | null;
53
53
  definitionId: string | null;
54
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
54
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
55
55
  resourceType: string | null;
56
56
  };
57
57
  export type ButtonClickedShortcutGoToLinkAttributesType = {
58
58
  actionType: string | null;
59
59
  id: string | null;
60
60
  definitionId: string | null;
61
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
61
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
62
62
  resourceType: string | null;
63
63
  };
64
64
  export type ButtonClickedIssueStatusUpdateAttributesType = {
65
65
  actionType: string | null;
66
66
  id: string | null;
67
67
  definitionId: string | null;
68
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
68
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
69
69
  resourceType: string | null;
70
70
  };
71
71
  export type ButtonClickedAiSummaryAttributesType = {};
@@ -99,14 +99,14 @@ export type RelatedLinksFailedAttributesType = {
99
99
  };
100
100
  export type SmartLinkIframeDwelledAttributesType = {
101
101
  id: string;
102
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
102
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
103
103
  definitionId: string | null;
104
104
  dwellTime: number;
105
105
  dwellPercentVisible: number;
106
106
  };
107
107
  export type SmartLinkIframeFocusedAttributesType = {
108
108
  id: string;
109
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
109
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
110
110
  definitionId: string | null;
111
111
  };
112
112
  export type ApplicationAccountConnectedAttributesType = {
@@ -147,7 +147,7 @@ export type SmartLinkUnresolvedAttributesType = {
147
147
  reason: string;
148
148
  };
149
149
  export type SmartLinkChunkLoadFailedAttributesType = {
150
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
150
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
151
151
  definitionId: string | null;
152
152
  error: Record<string, unknown>;
153
153
  errorInfo: Record<string, unknown>;
@@ -156,7 +156,7 @@ export type SmartLinkActionResolvedAttributesType = {
156
156
  actionType: string | null;
157
157
  id: string | null;
158
158
  definitionId: string | null;
159
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
159
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
160
160
  resourceType: string | null;
161
161
  duration: number | null;
162
162
  };
@@ -164,23 +164,11 @@ export type SmartLinkActionUnresolvedAttributesType = {
164
164
  actionType: string | null;
165
165
  id: string | null;
166
166
  definitionId: string | null;
167
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | null;
167
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink' | null;
168
168
  resourceType: string | null;
169
169
  duration: number | null;
170
170
  reason: string | null;
171
171
  };
172
- export type SmartLinkClickedAttributesType = {
173
- id: string;
174
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
175
- definitionId: string | null;
176
- isModifierKeyPressed: boolean | null;
177
- };
178
- export type SmartLinkClickedTitleGoToLinkAttributesType = {
179
- id: string;
180
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
181
- definitionId: string | null;
182
- isModifierKeyPressed: boolean | null;
183
- };
184
172
  export type HyperlinkResolvedAttributesType = {
185
173
  definitionId: string | null;
186
174
  extensionKey: string | null;
@@ -191,8 +179,20 @@ export type HyperlinkUnresolvedAttributesType = {
191
179
  definitionId: string | null;
192
180
  extensionKey: string | null;
193
181
  resourceType: string | null;
182
+ reason: string | null;
194
183
  error: Record<string, unknown> | null;
195
- reason: string;
184
+ };
185
+ export type SmartLinkClickedAttributesType = {
186
+ id: string;
187
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
188
+ definitionId: string | null;
189
+ isModifierKeyPressed: boolean | null;
190
+ };
191
+ export type SmartLinkClickedTitleGoToLinkAttributesType = {
192
+ id: string;
193
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
194
+ definitionId: string | null;
195
+ isModifierKeyPressed: boolean | null;
196
196
  };
197
197
  export type SmartLinkClickedPreviewHoverCardAttributesType = {
198
198
  id: string;
@@ -211,15 +211,15 @@ export type HoverCardDismissedAttributesType = {
211
211
  definitionId: string | null;
212
212
  };
213
213
  export type ButtonClickedConnectAccountAttributesType = {
214
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
214
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
215
215
  definitionId: string | null;
216
216
  };
217
217
  export type SmartLinkClickedTryAnotherAccountAttributesType = {
218
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
218
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
219
219
  definitionId: string | null;
220
220
  };
221
221
  export type ConsentModalClosedAttributesType = {
222
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
222
+ display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
223
223
  definitionId: string | null;
224
224
  };
225
225
  export type ModalClosedEmbedPreviewAttributesType = {
@@ -358,10 +358,10 @@ export type AnalyticsEventAttributes = {
358
358
  * Fires an event when a Smart Link action is failed to resolved. */
359
359
  'operational.smartLinkAction.unresolved': SmartLinkActionUnresolvedAttributesType;
360
360
  /**
361
- * Fires an event when a Hyperlink is successfully resolved. */
361
+ * Fires an event when a hyperlink is successfully resolved. */
362
362
  'operational.hyperlink.resolved': HyperlinkResolvedAttributesType;
363
363
  /**
364
- * Fires an event when a Hyperlink is failed to resolve. */
364
+ * Fires an event when a hyperlink fails to resolve. */
365
365
  'operational.hyperlink.unresolved': HyperlinkUnresolvedAttributesType;
366
366
  /**
367
367
  * fires an event that represents when a user clicks on a Smart Link. */
@@ -7,7 +7,7 @@ import { type FlexibleUiOptions } from '../FlexibleCard/types';
7
7
  import { type HoverPreviewOptions } from '../HoverCard/types';
8
8
  import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
9
9
  export type { CardAppearance, CardPlatform };
10
- export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
10
+ export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'hyperlink';
11
11
  export type EmbedIframeUrlType = 'href' | 'interactiveHref';
12
12
  export type OnResolveCallback = (data: {
13
13
  aspectRatio?: number;
@@ -4,6 +4,7 @@ import type { LinkUrlProps } from '../types';
4
4
  type HyperlinkUnauthorizedViewProps = LinkUrlProps & {
5
5
  onAuthorize?: () => void;
6
6
  provider?: LinkProvider;
7
+ showConnectBtn?: boolean;
7
8
  };
8
- declare const HyperlinkUnauthorizedView: ({ onAuthorize, provider, ...props }: HyperlinkUnauthorizedViewProps) => React.JSX.Element;
9
+ declare const HyperlinkUnauthorizedView: ({ onAuthorize, provider, showConnectBtn, ...props }: HyperlinkUnauthorizedViewProps) => React.JSX.Element;
9
10
  export default HyperlinkUnauthorizedView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "42.3.5",
3
+ "version": "43.0.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,9 +41,9 @@
41
41
  "@atlaskit/form": "^14.2.0",
42
42
  "@atlaskit/frontend-utilities": "^3.2.0",
43
43
  "@atlaskit/heading": "^5.2.0",
44
- "@atlaskit/icon": "^28.3.0",
44
+ "@atlaskit/icon": "^28.4.0",
45
45
  "@atlaskit/icon-file-type": "^7.0.0",
46
- "@atlaskit/icon-lab": "^5.8.0",
46
+ "@atlaskit/icon-lab": "^5.9.0",
47
47
  "@atlaskit/icon-object": "^7.2.0",
48
48
  "@atlaskit/icon-priority": "^6.3.0",
49
49
  "@atlaskit/image": "^3.0.0",