@atlaskit/smart-card 42.3.5 → 43.0.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 (32) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/analytics.spec.yaml +63 -7
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -0
  5. package/dist/cjs/view/InlineCard/common/action-button/index.compiled.css +9 -0
  6. package/dist/cjs/view/InlineCard/common/action-button/index.js +11 -2
  7. package/dist/cjs/view/LinkUrl/HyperlinkResolver/index.js +2 -6
  8. package/dist/cjs/view/LinkUrl/HyperlinkResolver/unauthorize-view.js +11 -15
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/es2019/utils/analytics/analytics.js +1 -1
  11. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -0
  12. package/dist/es2019/view/InlineCard/common/action-button/index.compiled.css +9 -0
  13. package/dist/es2019/view/InlineCard/common/action-button/index.js +9 -1
  14. package/dist/es2019/view/LinkUrl/HyperlinkResolver/index.js +2 -5
  15. package/dist/es2019/view/LinkUrl/HyperlinkResolver/unauthorize-view.js +4 -4
  16. package/dist/es2019/view/LinkUrl/index.js +1 -1
  17. package/dist/esm/utils/analytics/analytics.js +1 -1
  18. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -0
  19. package/dist/esm/view/InlineCard/common/action-button/index.compiled.css +9 -0
  20. package/dist/esm/view/InlineCard/common/action-button/index.js +11 -2
  21. package/dist/esm/view/LinkUrl/HyperlinkResolver/index.js +2 -6
  22. package/dist/esm/view/LinkUrl/HyperlinkResolver/unauthorize-view.js +11 -13
  23. package/dist/esm/view/LinkUrl/index.js +1 -1
  24. package/dist/types/common/analytics/generated/analytics.types.d.ts +29 -29
  25. package/dist/types/view/Card/types.d.ts +1 -1
  26. package/dist/types/view/InlineCard/common/action-button/index.d.ts +11 -1
  27. package/dist/types/view/LinkUrl/HyperlinkResolver/unauthorize-view.d.ts +2 -1
  28. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +29 -29
  29. package/dist/types-ts4.5/view/Card/types.d.ts +1 -1
  30. package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +11 -1
  31. package/dist/types-ts4.5/view/LinkUrl/HyperlinkResolver/unauthorize-view.d.ts +2 -1
  32. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`27d1948b0874f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/27d1948b0874f) -
8
+ [ux] @atlaskit/smart-card: Added experiment variation coloring for the inline smartlink connect
9
+ button. @atlaskit/tmp-editor-statsig: Added experiment gate to test config and overrides setup
10
+ - Updated dependencies
11
+
12
+ ## 43.0.0
13
+
14
+ ### Major Changes
15
+
16
+ - [`ec9cef4db241c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ec9cef4db241c) -
17
+ [ux] Show connect button for unauthorized blue hyperlinks, following the same auth flow as Smart
18
+ Links
19
+
3
20
  ## 42.3.5
4
21
 
5
22
  ### 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: "0.0.0-development"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -54,6 +54,7 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
54
54
  var renderActionButton = _react.default.useCallback(function () {
55
55
  return /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
56
56
  onClick: handleConnectAccount,
57
+ viewType: 'unauthorised',
57
58
  testId: "button-connect-account"
58
59
  }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
59
60
  values: {
@@ -3,18 +3,27 @@
3
3
  ._1e0c1bgi{display:contents}
4
4
  ._1e0c1nu9{display:inline}
5
5
  ._1nmz9jpi{word-break:break-all}
6
+ ._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
6
7
  ._1y1m1u8q{background-clip:padding-box}
7
8
  ._80om13gf{cursor:not-allowed}
8
9
  ._80omtlke{cursor:pointer}
10
+ ._bfhk1fvw{background-color:var(--ds-background-selected-bold,#0c66e4)}
11
+ ._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
9
12
  ._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
10
13
  ._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
11
14
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
12
15
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
13
16
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
14
17
  ._o5721btx{white-space:break-spaces}
18
+ ._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
19
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
15
20
  ._syaz1fxt{color:var(--ds-text,#172b4d)}
16
21
  ._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
17
22
  ._u5f312x7{padding-right:var(--ds-space-075,6px)}
18
23
  ._y3gn18uv{text-align:initial}
19
24
  ._irr315ej:hover{background-color:var(--ds-background-neutral-hovered,#091e4224)}
25
+ ._irr318hz:hover{background-color:var(--ds-background-selected-bold-hovered,#05c)}
26
+ ._irr3e4nv:hover{background-color:var(--ds-background-accent-gray-bolder-hovered,#44546f)}
27
+ ._1di682ra:active{background-color:var(--ds-background-accent-gray-bolder-pressed,#2c3e5d)}
28
+ ._1di6gr1v:active{background-color:var(--ds-background-selected-bold-pressed,#09326c)}
20
29
  ._1di6ip91:active{background-color:var(--ds-background-neutral-pressed,#091e424f)}
@@ -14,7 +14,8 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
15
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
16
  var _compiled = require("@atlaskit/primitives/compiled");
17
- var _excluded = ["children", "isDisabled"];
17
+ var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
18
+ var _excluded = ["children", "isDisabled", "viewType"];
18
19
  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); }
19
20
  var styles = {
20
21
  button: "_1e0c1bgi",
@@ -22,13 +23,21 @@ var styles = {
22
23
  enabled: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
23
24
  disabled: "_syaz1lh4 _80om13gf _bfhksyzs"
24
25
  };
26
+ var experimentEnabledStyles = {
27
+ control: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
28
+ test1: "_syaz15cr _80omtlke _bfhk1fvw _qrwqlb4i _1o0zlb4i _irr318hz _1di6gr1v",
29
+ test2: "_syaz15cr _80omtlke _bfhk1t1b _qrwqlb4i _1o0zlb4i _irr3e4nv _1di682ra"
30
+ };
25
31
  /**
26
32
  * Action button has to be a span for the overflow to work correctly
27
33
  */
28
34
  var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
29
35
  var children = _ref.children,
30
36
  isDisabled = _ref.isDisabled,
37
+ _ref$viewType = _ref.viewType,
38
+ viewType = _ref$viewType === void 0 ? 'default' : _ref$viewType,
31
39
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
40
+ var experimentValue = viewType === 'unauthorised' ? (0, _expVal.expVal)('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
32
41
  return /*#__PURE__*/React.createElement(_compiled.Pressable, (0, _extends2.default)({}, props, {
33
42
  isDisabled: isDisabled,
34
43
  ref: ref
@@ -41,6 +50,6 @@ var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(fu
41
50
  xcss: styles.button
42
51
  }), /*#__PURE__*/React.createElement("span", {
43
52
  tabIndex: isDisabled ? undefined : 0,
44
- className: (0, _runtime.ax)([styles.innerContainer, isDisabled ? styles.disabled : styles.enabled])
53
+ className: (0, _runtime.ax)([styles.innerContainer, isDisabled ? styles.disabled : experimentValue !== 'control' ? experimentEnabledStyles[experimentValue] : styles.enabled])
45
54
  }, children));
46
55
  });
@@ -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: "0.0.0-development",
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: "0.0.0-development"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -47,6 +47,7 @@ export const InlineCardUnauthorizedView = ({
47
47
  const renderActionButton = React.useCallback(() => {
48
48
  return /*#__PURE__*/React.createElement(ActionButton, {
49
49
  onClick: handleConnectAccount,
50
+ viewType: 'unauthorised',
50
51
  testId: "button-connect-account"
51
52
  }, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
52
53
  values: {
@@ -3,18 +3,27 @@
3
3
  ._1e0c1bgi{display:contents}
4
4
  ._1e0c1nu9{display:inline}
5
5
  ._1nmz9jpi{word-break:break-all}
6
+ ._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
6
7
  ._1y1m1u8q{background-clip:padding-box}
7
8
  ._80om13gf{cursor:not-allowed}
8
9
  ._80omtlke{cursor:pointer}
10
+ ._bfhk1fvw{background-color:var(--ds-background-selected-bold,#0c66e4)}
11
+ ._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
9
12
  ._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
10
13
  ._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
11
14
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
12
15
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
13
16
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
14
17
  ._o5721btx{white-space:break-spaces}
18
+ ._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
19
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
15
20
  ._syaz1fxt{color:var(--ds-text,#172b4d)}
16
21
  ._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
17
22
  ._u5f312x7{padding-right:var(--ds-space-075,6px)}
18
23
  ._y3gn18uv{text-align:initial}
19
24
  ._irr315ej:hover{background-color:var(--ds-background-neutral-hovered,#091e4224)}
25
+ ._irr318hz:hover{background-color:var(--ds-background-selected-bold-hovered,#05c)}
26
+ ._irr3e4nv:hover{background-color:var(--ds-background-accent-gray-bolder-hovered,#44546f)}
27
+ ._1di682ra:active{background-color:var(--ds-background-accent-gray-bolder-pressed,#2c3e5d)}
28
+ ._1di6gr1v:active{background-color:var(--ds-background-selected-bold-pressed,#09326c)}
20
29
  ._1di6ip91:active{background-color:var(--ds-background-neutral-pressed,#091e424f)}
@@ -5,20 +5,28 @@ import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { forwardRef } from 'react';
7
7
  import { Pressable } from '@atlaskit/primitives/compiled';
8
+ import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
8
9
  const styles = {
9
10
  button: "_1e0c1bgi",
10
11
  innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _k48p1wq8 _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _o5721btx _1nmz9jpi",
11
12
  enabled: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
12
13
  disabled: "_syaz1lh4 _80om13gf _bfhksyzs"
13
14
  };
15
+ const experimentEnabledStyles = {
16
+ control: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
17
+ test1: "_syaz15cr _80omtlke _bfhk1fvw _qrwqlb4i _1o0zlb4i _irr318hz _1di6gr1v",
18
+ test2: "_syaz15cr _80omtlke _bfhk1t1b _qrwqlb4i _1o0zlb4i _irr3e4nv _1di682ra"
19
+ };
14
20
  /**
15
21
  * Action button has to be a span for the overflow to work correctly
16
22
  */
17
23
  export const ActionButton = /*#__PURE__*/forwardRef(({
18
24
  children,
19
25
  isDisabled,
26
+ viewType = 'default',
20
27
  ...props
21
28
  }, ref) => {
29
+ const experimentValue = viewType === 'unauthorised' ? expVal('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
22
30
  return /*#__PURE__*/React.createElement(Pressable, _extends({}, props, {
23
31
  isDisabled: isDisabled,
24
32
  ref: ref
@@ -31,6 +39,6 @@ export const ActionButton = /*#__PURE__*/forwardRef(({
31
39
  xcss: styles.button
32
40
  }), /*#__PURE__*/React.createElement("span", {
33
41
  tabIndex: isDisabled ? undefined : 0,
34
- className: ax([styles.innerContainer, isDisabled ? styles.disabled : styles.enabled])
42
+ className: ax([styles.innerContainer, isDisabled ? styles.disabled : experimentValue !== 'control' ? experimentEnabledStyles[experimentValue] : styles.enabled])
35
43
  }, children));
36
44
  });
@@ -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: "0.0.0-development",
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: "0.0.0-development"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -47,6 +47,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
47
47
  var renderActionButton = React.useCallback(function () {
48
48
  return /*#__PURE__*/React.createElement(ActionButton, {
49
49
  onClick: handleConnectAccount,
50
+ viewType: 'unauthorised',
50
51
  testId: "button-connect-account"
51
52
  }, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
52
53
  values: {
@@ -3,18 +3,27 @@
3
3
  ._1e0c1bgi{display:contents}
4
4
  ._1e0c1nu9{display:inline}
5
5
  ._1nmz9jpi{word-break:break-all}
6
+ ._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
6
7
  ._1y1m1u8q{background-clip:padding-box}
7
8
  ._80om13gf{cursor:not-allowed}
8
9
  ._80omtlke{cursor:pointer}
10
+ ._bfhk1fvw{background-color:var(--ds-background-selected-bold,#0c66e4)}
11
+ ._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
9
12
  ._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
10
13
  ._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
11
14
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
12
15
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
13
16
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
14
17
  ._o5721btx{white-space:break-spaces}
18
+ ._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
19
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
15
20
  ._syaz1fxt{color:var(--ds-text,#172b4d)}
16
21
  ._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
17
22
  ._u5f312x7{padding-right:var(--ds-space-075,6px)}
18
23
  ._y3gn18uv{text-align:initial}
19
24
  ._irr315ej:hover{background-color:var(--ds-background-neutral-hovered,#091e4224)}
25
+ ._irr318hz:hover{background-color:var(--ds-background-selected-bold-hovered,#05c)}
26
+ ._irr3e4nv:hover{background-color:var(--ds-background-accent-gray-bolder-hovered,#44546f)}
27
+ ._1di682ra:active{background-color:var(--ds-background-accent-gray-bolder-pressed,#2c3e5d)}
28
+ ._1di6gr1v:active{background-color:var(--ds-background-selected-bold-pressed,#09326c)}
20
29
  ._1di6ip91:active{background-color:var(--ds-background-neutral-pressed,#091e424f)}
@@ -1,25 +1,34 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["children", "isDisabled"];
4
+ var _excluded = ["children", "isDisabled", "viewType"];
5
5
  import "./index.compiled.css";
6
6
  import * as React from 'react';
7
7
  import { ax, ix } from "@compiled/react/runtime";
8
8
  import { forwardRef } from 'react';
9
9
  import { Pressable } from '@atlaskit/primitives/compiled';
10
+ import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
10
11
  var styles = {
11
12
  button: "_1e0c1bgi",
12
13
  innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _k48p1wq8 _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _o5721btx _1nmz9jpi",
13
14
  enabled: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
14
15
  disabled: "_syaz1lh4 _80om13gf _bfhksyzs"
15
16
  };
17
+ var experimentEnabledStyles = {
18
+ control: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
19
+ test1: "_syaz15cr _80omtlke _bfhk1fvw _qrwqlb4i _1o0zlb4i _irr318hz _1di6gr1v",
20
+ test2: "_syaz15cr _80omtlke _bfhk1t1b _qrwqlb4i _1o0zlb4i _irr3e4nv _1di682ra"
21
+ };
16
22
  /**
17
23
  * Action button has to be a span for the overflow to work correctly
18
24
  */
19
25
  export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
20
26
  var children = _ref.children,
21
27
  isDisabled = _ref.isDisabled,
28
+ _ref$viewType = _ref.viewType,
29
+ viewType = _ref$viewType === void 0 ? 'default' : _ref$viewType,
22
30
  props = _objectWithoutProperties(_ref, _excluded);
31
+ var experimentValue = viewType === 'unauthorised' ? expVal('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
23
32
  return /*#__PURE__*/React.createElement(Pressable, _extends({}, props, {
24
33
  isDisabled: isDisabled,
25
34
  ref: ref
@@ -32,6 +41,6 @@ export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
41
  xcss: styles.button
33
42
  }), /*#__PURE__*/React.createElement("span", {
34
43
  tabIndex: isDisabled ? undefined : 0,
35
- className: ax([styles.innerContainer, isDisabled ? styles.disabled : styles.enabled])
44
+ className: ax([styles.innerContainer, isDisabled ? styles.disabled : experimentValue !== 'control' ? experimentEnabledStyles[experimentValue] : styles.enabled])
36
45
  }, children));
37
46
  });
@@ -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: "0.0.0-development",
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;
@@ -1,4 +1,14 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ComponentPropsWithRef } from 'react';
6
+ import { Pressable } from '@atlaskit/primitives/compiled';
7
+ type ActionButtonProps = ComponentPropsWithRef<typeof Pressable> & {
8
+ viewType?: 'default' | 'unauthorised';
9
+ };
1
10
  /**
2
11
  * Action button has to be a span for the overflow to work correctly
3
12
  */
4
- export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("@atlaskit/primitives/compiled").PressableProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
13
+ export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<ActionButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
+ export {};
@@ -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;
@@ -1,4 +1,14 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ComponentPropsWithRef } from 'react';
6
+ import { Pressable } from '@atlaskit/primitives/compiled';
7
+ type ActionButtonProps = ComponentPropsWithRef<typeof Pressable> & {
8
+ viewType?: 'default' | 'unauthorised';
9
+ };
1
10
  /**
2
11
  * Action button has to be a span for the overflow to work correctly
3
12
  */
4
- export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("@atlaskit/primitives/compiled").PressableProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
13
+ export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<ActionButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
+ export {};
@@ -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.1",
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",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/link-test-helpers": "^8.4.0",
57
57
  "@atlaskit/linking-common": "^9.7.0",
58
58
  "@atlaskit/linking-types": "^14.0.0",
59
- "@atlaskit/logo": "^19.8.0",
59
+ "@atlaskit/logo": "^19.9.0",
60
60
  "@atlaskit/lozenge": "^13.0.0",
61
61
  "@atlaskit/menu": "^8.4.0",
62
62
  "@atlaskit/modal-dialog": "^14.4.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/textarea": "^8.0.0",
71
71
  "@atlaskit/textfield": "^8.0.0",
72
72
  "@atlaskit/theme": "^21.0.0",
73
- "@atlaskit/tmp-editor-statsig": "^13.2.0",
73
+ "@atlaskit/tmp-editor-statsig": "^13.3.0",
74
74
  "@atlaskit/tokens": "^6.4.0",
75
75
  "@atlaskit/tooltip": "^20.5.0",
76
76
  "@atlaskit/ufo": "^0.4.0",