@atlaskit/smart-card 44.5.4 → 44.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-exploratory-low-share-previewing-headline-and-short-connect-label--default.png +3 -0
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-no-context-percentage-headline-with-short-connect-label--default.png +3 -0
  4. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-persisted-percentage-previews-headline-30-and-short-connect-label--default.png +3 -0
  5. package/dist/cjs/messages.js +20 -0
  6. package/dist/cjs/state/hooks/use-incoming-outgoing-links/index.js +20 -5
  7. package/dist/cjs/state/services/current-site-cloud-id/index.js +2 -1
  8. package/dist/cjs/utils/analytics/analytics.js +1 -1
  9. package/dist/cjs/view/InlineCard/UnauthorisedView/index.compiled.css +21 -0
  10. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +108 -14
  11. package/dist/cjs/view/InlineCard/common/action-button/index.compiled.css +4 -7
  12. package/dist/cjs/view/InlineCard/common/action-button/index.js +21 -3
  13. package/dist/cjs/view/LinkUrl/index.js +1 -1
  14. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-exploratory-low-share-previewing-headline-and-short-connect-label--default.png +3 -0
  15. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-no-context-percentage-headline-with-short-connect-label--default.png +3 -0
  16. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-persisted-percentage-previews-headline-30-and-short-connect-label--default.png +3 -0
  17. package/dist/es2019/messages.js +20 -0
  18. package/dist/es2019/state/hooks/use-incoming-outgoing-links/index.js +4 -2
  19. package/dist/es2019/state/services/current-site-cloud-id/index.js +2 -2
  20. package/dist/es2019/utils/analytics/analytics.js +1 -1
  21. package/dist/es2019/view/InlineCard/UnauthorisedView/index.compiled.css +21 -0
  22. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +95 -2
  23. package/dist/es2019/view/InlineCard/common/action-button/index.compiled.css +4 -7
  24. package/dist/es2019/view/InlineCard/common/action-button/index.js +19 -2
  25. package/dist/es2019/view/LinkUrl/index.js +1 -1
  26. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-exploratory-low-share-previewing-headline-and-short-connect-label--default.png +3 -0
  27. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-no-context-percentage-headline-with-short-connect-label--default.png +3 -0
  28. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-unauthorised-social-proof-persisted-percentage-previews-headline-30-and-short-connect-label--default.png +3 -0
  29. package/dist/esm/messages.js +20 -0
  30. package/dist/esm/state/hooks/use-incoming-outgoing-links/index.js +20 -5
  31. package/dist/esm/state/services/current-site-cloud-id/index.js +2 -1
  32. package/dist/esm/utils/analytics/analytics.js +1 -1
  33. package/dist/esm/view/InlineCard/UnauthorisedView/index.compiled.css +21 -0
  34. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +108 -14
  35. package/dist/esm/view/InlineCard/common/action-button/index.compiled.css +4 -7
  36. package/dist/esm/view/InlineCard/common/action-button/index.js +21 -3
  37. package/dist/esm/view/LinkUrl/index.js +1 -1
  38. package/dist/types/messages.d.ts +1 -1
  39. package/dist/types/state/services/current-site-cloud-id/index.d.ts +1 -1
  40. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  41. package/dist/types/view/InlineCard/common/action-button/index.d.ts +7 -0
  42. package/dist/types-ts4.5/messages.d.ts +1 -1
  43. package/dist/types-ts4.5/state/services/current-site-cloud-id/index.d.ts +1 -1
  44. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  45. package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +7 -0
  46. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 44.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7ff5ab02ad66b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7ff5ab02ad66b) -
8
+ Add an unauthorised inline smart link CTA that can show team usage context and a short Connect
9
+ button. Also fix copy in unauthorised hover card content.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 44.5.4
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5c8377b1d3f1c46152e4056e25fac995df7a0c309fc3bd720342e3f5c83a290
3
+ size 18488
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36b68e91316715be24892707009d7e486e55f1b86c08e879640c90ba6b7edd86
3
+ size 19001
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8333dc40a888fb5ecb629497b5c97541a43beaf45b4d1a5dc3b347747c308c02
3
+ size 19222
@@ -181,6 +181,26 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
181
181
  defaultMessage: 'Connect to {context}',
182
182
  description: 'Shown on a button to connect user external account to their Atlassian account.'
183
183
  },
184
+ connect_inline_social_proof: {
185
+ id: 'fabric.linking.connect_inline_social_proof',
186
+ defaultMessage: 'Connect',
187
+ description: 'Shown on a button for unauthorised inline smart links when the social proof inline CTA experiment is active. Replaces the longer "Connect your {context} account" label.'
188
+ },
189
+ social_proof_inline_cta_tag_high_with_context: {
190
+ id: 'fabric.linking.social_proof_inline_cta_tag_high_with_context',
191
+ defaultMessage: '<b>{connectedPct}%</b> of your team previews {context}',
192
+ description: 'Social-proof tag pill beside the shortcut "Connect" on an unauthorised inline smart link when adoption is not in the exploratory range. {connectedPct} is the approximate share previewing/using the integration; {context} is the provider display name.'
193
+ },
194
+ social_proof_inline_cta_tag_high_no_context: {
195
+ id: 'fabric.linking.social_proof_inline_cta_tag_high_no_context',
196
+ defaultMessage: '<b>{connectedPct}%</b> of your team previews this',
197
+ description: 'Social-proof tag pill when adoption is above the exploratory threshold and no provider display name is available; {connectedPct} is the approximate share previewing the integration.'
198
+ },
199
+ social_proof_inline_cta_tag_low_with_context: {
200
+ id: 'fabric.linking.social_proof_inline_cta_tag_low_with_context',
201
+ defaultMessage: 'Your team is previewing {context}',
202
+ description: 'Social-proof tag pill when share is below the percentage headline threshold; shown only when a provider display name is available. Omit the pill entirely when personalization is unavailable or the provider name is unknown.'
203
+ },
184
204
  connect_unauthorised_account_description: {
185
205
  id: 'fabric.linking.connect_unauthorised_account_description',
186
206
  defaultMessage: 'Connect your {context} account to collaborate on work across Atlassian products.',
@@ -9,6 +9,8 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _react = require("react");
11
11
  var _linkingCommon = require("@atlaskit/linking-common");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _useCurrentSiteCloudId = require("../use-current-site-cloud-id");
12
14
  var _query = require("./query");
13
15
  /**
14
16
  * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
@@ -77,11 +79,24 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
77
79
  }
78
80
  return _context3.abrupt("return", match[2]);
79
81
  case 4:
80
- _context3.next = 6;
81
- return getCurrentSiteId();
82
- case 6:
83
- return _context3.abrupt("return", _context3.sent);
82
+ if (!(0, _platformFeatureFlags.fg)('platform_sl_3p_preauth_soc_proof_inline_killswitch')) {
83
+ _context3.next = 10;
84
+ break;
85
+ }
86
+ _context3.next = 7;
87
+ return (0, _useCurrentSiteCloudId.getCurrentSiteCloudId)(baseUriWithNoTrailingSlash);
84
88
  case 7:
89
+ _context3.t0 = _context3.sent;
90
+ _context3.next = 13;
91
+ break;
92
+ case 10:
93
+ _context3.next = 12;
94
+ return getCurrentSiteId();
95
+ case 12:
96
+ _context3.t0 = _context3.sent;
97
+ case 13:
98
+ return _context3.abrupt("return", _context3.t0);
99
+ case 14:
85
100
  case "end":
86
101
  return _context3.stop();
87
102
  }
@@ -90,7 +105,7 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
90
105
  return function (_x3) {
91
106
  return _ref3.apply(this, arguments);
92
107
  };
93
- }(), [getCurrentSiteId]);
108
+ }(), [getCurrentSiteId, baseUriWithNoTrailingSlash]);
94
109
  var getIncomingOutgoingAris = (0, _react.useCallback)(
95
110
  /*#__PURE__*/
96
111
  /**
@@ -151,11 +151,12 @@ var CurrentSiteCloudIdService = exports.CurrentSiteCloudIdService = /*#__PURE__*
151
151
  return _get.apply(this, arguments);
152
152
  }
153
153
  return get;
154
- }() /** Clears the session pin so the next {@link get} may run `tenant_info` again (e.g. tests). */)
154
+ }() /** Clears session pin and persisted storage so the next {@link get} is a fresh tenant_info fetch. */)
155
155
  }, {
156
156
  key: "clearCache",
157
157
  value: function clearCache() {
158
158
  this.tenantInfoInflightPromise = null;
159
+ smartCardStorage.removeItem(CURRENT_SITE_CLOUD_ID_STORAGE_ITEM_KEY);
159
160
  }
160
161
  }]);
161
162
  }();
@@ -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: "44.5.3" || ''
14
+ packageVersion: "44.5.4" || ''
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,21 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18m915vq{overflow-y:hidden}
3
+ ._19bv12x7{padding-left:var(--ds-space-075,6px)}
4
+ ._1bto1l2s{text-overflow:ellipsis}
5
+ ._1e0c116y{display:inline-flex}
6
+ ._1e0c1nu9{display:inline}
7
+ ._1reo15vq{overflow-x:hidden}
8
+ ._1wybtjj4{font-size:.8em}
9
+ ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
10
+ ._4cvr1h6o{align-items:center}
11
+ ._bfhk1dpa{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
12
+ ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
13
+ ._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
14
+ ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
15
+ ._o5721q9c{white-space:nowrap}
16
+ ._p12f1osq{max-width:100%}
17
+ ._s7n4t94y{vertical-align:1px}
18
+ ._syazazsu{color:var(--ds-text-subtle,#505258)}
19
+ ._u5f312x7{padding-right:var(--ds-space-075,6px)}
20
+ ._vchhusvi{box-sizing:border-box}
21
+ ._y3gn18uv{text-align:initial}
@@ -6,13 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.InlineCardUnauthorizedView = void 0;
9
+ require("./index.compiled.css");
9
10
  var _runtime = require("@compiled/react/runtime");
10
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
12
  var _react = _interopRequireDefault(require("react"));
12
13
  var _reactIntl = require("react-intl");
14
+ var _reactMagneticDi = require("react-magnetic-di");
13
15
  var _lockLocked = _interopRequireDefault(require("@atlaskit/icon/core/lock-locked"));
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
+ var _compiled = require("@atlaskit/primitives/compiled");
18
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
19
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
15
20
  var _messages = require("../../../messages");
21
+ var _personalization = require("../../../state/services/personalization");
16
22
  var _HoverCard = require("../../HoverCard");
17
23
  var _actionButton = require("../common/action-button");
18
24
  var _Frame = require("../Frame");
@@ -23,22 +29,105 @@ var fallbackUnauthorizedIcon = function fallbackUnauthorizedIcon() {
23
29
  label: "error"
24
30
  });
25
31
  };
26
- var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref) {
27
- var url = _ref.url,
28
- id = _ref.id,
29
- icon = _ref.icon,
30
- onAuthorise = _ref.onAuthorise,
31
- onClick = _ref.onClick,
32
- isSelected = _ref.isSelected,
33
- _ref$testId = _ref.testId,
34
- testId = _ref$testId === void 0 ? 'inline-card-unauthorized-view' : _ref$testId,
35
- _ref$showHoverPreview = _ref.showHoverPreview,
36
- showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
37
- truncateInline = _ref.truncateInline,
38
- context = _ref.context;
32
+
33
+ /**
34
+ * When persisted personalization adoption from {@link getCachedProviderPctMapAndRefresh} is strictly below this value,
35
+ * the pill uses exploratory "previewing" copy instead of a percentage headline.
36
+ */
37
+ var SOCIAL_PROOF_TEAM_PREVIEW_THRESHOLD = 30;
38
+ var SOCIAL_PROOF_TRAIT_NAME = 'sl_3p_connected_providers_site_pct';
39
+ var socialProofPillStyles = {
40
+ strong: "_k48pwu06",
41
+ inlineContainer: "_1e0c116y _4cvr1h6o",
42
+ root: "_2rko12b0 _1e0c1nu9 _4cvr1h6o _vchhusvi _p12f1osq _bfhk1dpa _syazazsu _y3gn18uv _1wybtjj4 _s7n4t94y _ca0qv77o _n3tdv77o _u5f312x7 _19bv12x7 _2hwx1b66",
43
+ label: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c"
44
+ };
45
+
46
+ /**
47
+ * Renders the social-proof pill and Connect button using persisted percentages only ({@link getCachedProviderPctMapAndRefresh}) — no
48
+ * loading skeleton; either the cached percentage is shown or the legacy long connect label is used.
49
+ *
50
+ * Only mounted when the parent has passed the killswitch and
51
+ * `platform_sl_3p_preauth_social_proof_inline_cta`. See platform docs: `rules-of-hooks.md` "Should §1".
52
+ */
53
+ var UnauthorisedConnectWithSocialProof = function UnauthorisedConnectWithSocialProof(_ref) {
54
+ var _context$trim;
55
+ var context = _ref.context,
56
+ extensionKey = _ref.extensionKey,
57
+ testId = _ref.testId,
58
+ onConnectClick = _ref.onConnectClick;
59
+ // TODO We need to decide what should we do with FedRAMP. It will not work there (_edge/tenant_info is not available) but so maybe
60
+ // we can just leave it like that and whole feature won't trigger befcause of that.
61
+ var providerPctMap = (0, _personalization.getCachedProviderPctMapAndRefresh)(SOCIAL_PROOF_TRAIT_NAME);
62
+ var connectedPct = extensionKey && providerPctMap ? providerPctMap[extensionKey] : undefined;
63
+ var isEnabled = true;
64
+ var trimmedProviderDisplayName = (_context$trim = context === null || context === void 0 ? void 0 : context.trim()) !== null && _context$trim !== void 0 ? _context$trim : '';
65
+ var hasProviderDisplayName = trimmedProviderDisplayName.length > 0;
66
+ var isSocialProofUsageHighEnough = connectedPct !== undefined && connectedPct >= SOCIAL_PROOF_TEAM_PREVIEW_THRESHOLD;
67
+
68
+ /**
69
+ * Persisted personalization is required. Below {@link SOCIAL_PROOF_TEAM_PREVIEW_THRESHOLD} adoption we also require
70
+ * a provider display name; otherwise omit the pill and use the legacy long connect treatment.
71
+ */
72
+ var showSocialProofPill = isEnabled && connectedPct !== undefined && (isSocialProofUsageHighEnough || hasProviderDisplayName);
73
+ var bold = function bold(chunks) {
74
+ return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
75
+ as: "strong",
76
+ xcss: socialProofPillStyles.strong
77
+ }, chunks);
78
+ };
79
+ var socialProofPillContent = isSocialProofUsageHighEnough ? hasProviderDisplayName ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages.social_proof_inline_cta_tag_high_with_context, {
80
+ values: {
81
+ connectedPct: connectedPct,
82
+ context: trimmedProviderDisplayName,
83
+ b: bold
84
+ }
85
+ })) : /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages.social_proof_inline_cta_tag_high_no_context, {
86
+ values: {
87
+ connectedPct: connectedPct,
88
+ b: bold
89
+ }
90
+ })) : /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages.social_proof_inline_cta_tag_low_with_context, {
91
+ values: {
92
+ context: trimmedProviderDisplayName
93
+ }
94
+ }));
95
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showSocialProofPill ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
96
+ as: "span",
97
+ xcss: socialProofPillStyles.root,
98
+ testId: "".concat(testId, "-social-proof-tag")
99
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
100
+ as: "span",
101
+ xcss: socialProofPillStyles.label
102
+ }, socialProofPillContent)) : null, /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
103
+ onClick: onConnectClick,
104
+ viewType: "unauthorised",
105
+ testId: "button-connect-account",
106
+ isSocialProofInlineUnauthorisedConnect: showSocialProofPill
107
+ }, showSocialProofPill ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.connect_inline_social_proof) : /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
108
+ values: {
109
+ context: context
110
+ }
111
+ }))));
112
+ };
113
+ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref2) {
114
+ var url = _ref2.url,
115
+ id = _ref2.id,
116
+ icon = _ref2.icon,
117
+ onAuthorise = _ref2.onAuthorise,
118
+ onClick = _ref2.onClick,
119
+ isSelected = _ref2.isSelected,
120
+ _ref2$testId = _ref2.testId,
121
+ testId = _ref2$testId === void 0 ? 'inline-card-unauthorized-view' : _ref2$testId,
122
+ _ref2$showHoverPrevie = _ref2.showHoverPreview,
123
+ showHoverPreview = _ref2$showHoverPrevie === void 0 ? false : _ref2$showHoverPrevie,
124
+ truncateInline = _ref2.truncateInline,
125
+ context = _ref2.context,
126
+ extensionKey = _ref2.extensionKey;
39
127
  var frameRef = _react.default.useRef(null);
40
128
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
41
129
  fireEvent = _useAnalyticsEvents.fireEvent;
130
+ var isSocialProofInlineCtaEnabled = onAuthorise && (0, _platformFeatureFlags.fg)('platform_sl_3p_preauth_soc_proof_inline_killswitch') && (0, _expValEquals.expValEquals)('platform_sl_3p_preauth_social_proof_inline_cta', 'isEnabled', true);
42
131
  var handleConnectAccount = _react.default.useCallback(function (event) {
43
132
  event.preventDefault();
44
133
  event.stopPropagation();
@@ -70,7 +159,12 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
70
159
  link: url,
71
160
  onClick: onClick,
72
161
  titleColor: "var(--ds-text-subtle, #505258)"
73
- }), onAuthorise && renderActionButton());
162
+ }), onAuthorise && (isSocialProofInlineCtaEnabled ? /*#__PURE__*/_react.default.createElement(UnauthorisedConnectWithSocialProof, {
163
+ context: context,
164
+ extensionKey: extensionKey,
165
+ testId: testId,
166
+ onConnectClick: handleConnectAccount
167
+ }) : renderActionButton()));
74
168
  if (onAuthorise && showHoverPreview) {
75
169
  return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
76
170
  url: url,
@@ -1,17 +1,16 @@
1
1
 
2
- ._1s7zia51{border-right:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
3
- ._n7zlia51{border-bottom:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
4
- ._x3doia51{border-top:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._13liidpf{border-top-left-radius:0}
5
- ._13lilb4i{border-top-left-radius:var(--ds-radius-xsmall,2px)}
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._13lilb4i{border-top-left-radius:var(--ds-radius-xsmall,2px)}
6
3
  ._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
7
4
  ._19bv12x7{padding-left:var(--ds-space-075,6px)}
8
5
  ._1e0c1bgi{display:contents}
9
6
  ._1e0c1nu9{display:inline}
10
7
  ._1nmz9jpi{word-break:break-all}
11
8
  ._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
9
+ ._1wybtjj4{font-size:.8em}
12
10
  ._1y1m1u8q{background-clip:padding-box}
13
11
  ._2hwxt94y{margin-right:1px}
14
12
  ._2hwxv77o{margin-right:var(--ds-space-025,2px)}
13
+ ._4cvr1h6o{align-items:center}
15
14
  ._80om13gf{cursor:not-allowed}
16
15
  ._80omtlke{cursor:pointer}
17
16
  ._bfhkby5v{background-color:var(--ds-background-disabled,#17171708)}
@@ -21,19 +20,17 @@
21
20
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
22
21
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
23
22
  ._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
24
- ._mrkbidpf{border-bottom-left-radius:0}
25
23
  ._mrkblb4i{border-bottom-left-radius:var(--ds-radius-xsmall,2px)}
26
24
  ._n3tdt94y{padding-bottom:1px}
27
25
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
28
26
  ._o5721btx{white-space:break-spaces}
29
- ._o5721q9c{white-space:nowrap}
30
27
  ._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
28
+ ._s7n4t94y{vertical-align:1px}
31
29
  ._syaz15cr{color:var(--ds-text-inverse,#fff)}
32
30
  ._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
33
31
  ._syazi7uo{color:var(--ds-text,#292a2e)}
34
32
  ._u5f312x7{padding-right:var(--ds-space-075,6px)}
35
33
  ._y3gn18uv{text-align:initial}
36
- ._4cvxq98m:hover{border-color:var(--ds-border-selected,#1868db)}
37
34
  ._irr31q28:hover{background-color:var(--ds-background-selected-bold-hovered,#1558bc)}
38
35
  ._irr3plhp:hover{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
39
36
  ._1di612kk:active{background-color:var(--ds-background-selected-bold-pressed,#123263)}
@@ -13,17 +13,21 @@ var React = _react;
13
13
  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
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _compiled = require("@atlaskit/primitives/compiled");
17
- var _excluded = ["children", "isDisabled", "viewType"];
18
+ var _excluded = ["children", "isDisabled", "viewType", "isSocialProofInlineUnauthorisedConnect"];
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",
21
22
  innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _k48p1wq8 _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _o5721btx _1nmz9jpi",
23
+ innerContainerSocialProofConnect: "_2rko12b0 _syaz15cr _80omtlke _bfhkjmqp _2hwxv77o _1e0c1nu9 _4cvr1h6o _1wybtjj4 _1y1m1u8q _16d9qvcn _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _s7n4t94y _o5721btx _1nmz9jpi _irr31q28 _1di612kk",
22
24
  enabled: "_syazi7uo _80omtlke _bfhki8nm _irr3plhp _1di61gdz",
23
25
  disabled: "_syaz1gmx _80om13gf _bfhkby5v",
24
- unauthorised: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _13lilb4i _mrkblb4i _ca0qt94y _n3tdt94y _2hwxt94y _k48pi7a9 _irr31q28 _1di612kk",
25
- action: "_x3doia51 _1s7zia51 _n7zlia51 _syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _13liidpf _mrkbidpf _2hwxv77o _k48pi7a9 _o5721q9c _4cvxq98m _irr31q28 _1di612kk"
26
+ unauthorised: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _13lilb4i _mrkblb4i _ca0qt94y _n3tdt94y _2hwxt94y _k48pi7a9 _irr31q28 _1di612kk"
26
27
  };
28
+
29
+ /* eslint-enable @compiled/shorthand-property-sorting */
30
+
27
31
  /**
28
32
  * Action button has to be a span for the overflow to work correctly
29
33
  */
@@ -32,7 +36,21 @@ var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(fu
32
36
  isDisabled = _ref.isDisabled,
33
37
  _ref$viewType = _ref.viewType,
34
38
  viewType = _ref$viewType === void 0 ? 'default' : _ref$viewType,
39
+ _ref$isSocialProofInl = _ref.isSocialProofInlineUnauthorisedConnect,
40
+ isSocialProofInlineUnauthorisedConnect = _ref$isSocialProofInl === void 0 ? false : _ref$isSocialProofInl,
35
41
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
42
+ var shouldUseSocialProofConnect = isSocialProofInlineUnauthorisedConnect && viewType === 'unauthorised' && (0, _platformFeatureFlags.fg)('platform_sl_3p_preauth_soc_proof_inline_killswitch');
43
+ if (shouldUseSocialProofConnect && !isDisabled) {
44
+ return /*#__PURE__*/React.createElement(_compiled.Pressable, (0, _extends2.default)({}, props, {
45
+ ref: ref,
46
+ style: {
47
+ font: "inherit"
48
+ },
49
+ xcss: styles.button
50
+ }), /*#__PURE__*/React.createElement("span", {
51
+ className: (0, _runtime.ax)([styles.innerContainerSocialProofConnect])
52
+ }, children));
53
+ }
36
54
  return /*#__PURE__*/React.createElement(_compiled.Pressable, (0, _extends2.default)({}, props, {
37
55
  isDisabled: isDisabled,
38
56
  ref: ref
@@ -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: "44.5.3",
25
+ packageVersion: "44.5.4",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5c8377b1d3f1c46152e4056e25fac995df7a0c309fc3bd720342e3f5c83a290
3
+ size 18488
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36b68e91316715be24892707009d7e486e55f1b86c08e879640c90ba6b7edd86
3
+ size 19001
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8333dc40a888fb5ecb629497b5c97541a43beaf45b4d1a5dc3b347747c308c02
3
+ size 19222
@@ -175,6 +175,26 @@ export const messages = defineMessages({
175
175
  defaultMessage: 'Connect to {context}',
176
176
  description: 'Shown on a button to connect user external account to their Atlassian account.'
177
177
  },
178
+ connect_inline_social_proof: {
179
+ id: 'fabric.linking.connect_inline_social_proof',
180
+ defaultMessage: 'Connect',
181
+ description: 'Shown on a button for unauthorised inline smart links when the social proof inline CTA experiment is active. Replaces the longer "Connect your {context} account" label.'
182
+ },
183
+ social_proof_inline_cta_tag_high_with_context: {
184
+ id: 'fabric.linking.social_proof_inline_cta_tag_high_with_context',
185
+ defaultMessage: '<b>{connectedPct}%</b> of your team previews {context}',
186
+ description: 'Social-proof tag pill beside the shortcut "Connect" on an unauthorised inline smart link when adoption is not in the exploratory range. {connectedPct} is the approximate share previewing/using the integration; {context} is the provider display name.'
187
+ },
188
+ social_proof_inline_cta_tag_high_no_context: {
189
+ id: 'fabric.linking.social_proof_inline_cta_tag_high_no_context',
190
+ defaultMessage: '<b>{connectedPct}%</b> of your team previews this',
191
+ description: 'Social-proof tag pill when adoption is above the exploratory threshold and no provider display name is available; {connectedPct} is the approximate share previewing the integration.'
192
+ },
193
+ social_proof_inline_cta_tag_low_with_context: {
194
+ id: 'fabric.linking.social_proof_inline_cta_tag_low_with_context',
195
+ defaultMessage: 'Your team is previewing {context}',
196
+ description: 'Social-proof tag pill when share is below the percentage headline threshold; shown only when a provider display name is available. Omit the pill entirely when personalization is unavailable or the provider name is unknown.'
197
+ },
178
198
  connect_unauthorised_account_description: {
179
199
  id: 'fabric.linking.connect_unauthorised_account_description',
180
200
  defaultMessage: 'Connect your {context} account to collaborate on work across Atlassian products.',
@@ -1,5 +1,7 @@
1
1
  import { useCallback, useMemo } from 'react';
2
2
  import { request } from '@atlaskit/linking-common';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { getCurrentSiteCloudId } from '../use-current-site-cloud-id';
3
5
  import { queryIncomingOutgoingLinks as queryIncomingOutgoingAris } from './query';
4
6
  /**
5
7
  * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
@@ -31,8 +33,8 @@ const useIncomingOutgoingAri = (baseUriWithNoTrailingSlash = '') => {
31
33
  if (match && match[2]) {
32
34
  return match[2]; // Return the cloud_id (siteId)
33
35
  }
34
- return await getCurrentSiteId();
35
- }, [getCurrentSiteId]);
36
+ return fg('platform_sl_3p_preauth_soc_proof_inline_killswitch') ? await getCurrentSiteCloudId(baseUriWithNoTrailingSlash) : await getCurrentSiteId();
37
+ }, [getCurrentSiteId, baseUriWithNoTrailingSlash]);
36
38
  const getIncomingOutgoingAris = useCallback(
37
39
  /**
38
40
  * Returning aris linking to (outgoing) and from (incoming) a given ari from AGS using
@@ -92,10 +92,10 @@ export class CurrentSiteCloudIdService {
92
92
  }
93
93
  return this.tenantInfoInflightPromise;
94
94
  }
95
-
96
- /** Clears the session pin so the next {@link get} may run `tenant_info` again (e.g. tests). */
95
+ /** Clears session pin and persisted storage so the next {@link get} is a fresh tenant_info fetch. */
97
96
  clearCache() {
98
97
  this.tenantInfoInflightPromise = null;
98
+ smartCardStorage.removeItem(CURRENT_SITE_CLOUD_ID_STORAGE_ITEM_KEY);
99
99
  }
100
100
  }
101
101
  export const currentSiteCloudIdService = new CurrentSiteCloudIdService();
@@ -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: "44.5.3" || ''
5
+ packageVersion: "44.5.4" || ''
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,21 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18m915vq{overflow-y:hidden}
3
+ ._19bv12x7{padding-left:var(--ds-space-075,6px)}
4
+ ._1bto1l2s{text-overflow:ellipsis}
5
+ ._1e0c116y{display:inline-flex}
6
+ ._1e0c1nu9{display:inline}
7
+ ._1reo15vq{overflow-x:hidden}
8
+ ._1wybtjj4{font-size:.8em}
9
+ ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
10
+ ._4cvr1h6o{align-items:center}
11
+ ._bfhk1dpa{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
12
+ ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
13
+ ._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
14
+ ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
15
+ ._o5721q9c{white-space:nowrap}
16
+ ._p12f1osq{max-width:100%}
17
+ ._s7n4t94y{vertical-align:1px}
18
+ ._syazazsu{color:var(--ds-text-subtle,#505258)}
19
+ ._u5f312x7{padding-right:var(--ds-space-075,6px)}
20
+ ._vchhusvi{box-sizing:border-box}
21
+ ._y3gn18uv{text-align:initial}