@atlaskit/smart-card 46.20.4 → 46.21.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 46.21.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d2d28a9303775`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2d28a9303775) -
8
+ Removed the `mode` prop from `Popup`, as `@atlaskit/popup` no longer has it.
9
+ - Updated dependencies
10
+
11
+ ## 46.21.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`c5b72834f2613`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c5b72834f2613) -
16
+ Move `@atlaskit/link-test-helpers` from `dependencies` to `devDependencies`. It is only imported
17
+ by smart-card's own tests, so shipping it as a runtime dependency pulled `fetch-mock` — and
18
+ through it a vulnerable `path-to-regexp` — into the dependency tree of every consumer.
19
+
20
+ No exports, entrypoints or behaviour change. Consumers that imported `@atlaskit/link-test-helpers`
21
+ without declaring it, relying on it being hoisted via `@atlaskit/smart-card`, should add it to
22
+ their own `devDependencies`.
23
+
24
+ ### Patch Changes
25
+
26
+ - [`a346e2fe9ed1e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a346e2fe9ed1e) -
27
+ Keep social proof for eligible unauthorised block cards and remove the experiment lookup.
28
+ - Updated dependencies
29
+
3
30
  ## 46.20.4
4
31
 
5
32
  ### Patch Changes
@@ -6,23 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = exports.SOCIAL_PROOF_TIER_THRESHOLD = exports.SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY = void 0;
8
8
  var _react = require("react");
9
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
9
  var _useSocialProof2 = _interopRequireDefault(require("../use-social-proof"));
11
10
  var _getSocialProofTier2 = require("./getSocialProofTier");
11
+ // Stable key for existing smart link analytics.
12
12
  var SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY = exports.SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY = 'social_proof_3p_unauth_block_exp';
13
13
  var SOCIAL_PROOF_TIER_THRESHOLD = exports.SOCIAL_PROOF_TIER_THRESHOLD = 30;
14
14
 
15
15
  /**
16
- * Returns enrollment and treatment state for the social proof unauth block card experiment.
16
+ * Returns eligibility and tier for social proof in unauthorised block cards.
17
17
  *
18
18
  * Delegates data-fetching to `useSocialProof` (Sasha's shared service layer),
19
19
  * which handles cloudId resolution, TAP trait fetch, localStorage caching,
20
20
  * request deduping, and sync reads.
21
21
  *
22
- * This hook adds the experiment/cohort layer on top:
23
- * - Only fires exposure (via editorExperiment) when data has loaded.
24
- * - Derives `tier` and `isTreatment` for rendering decisions.
25
- *
26
22
  * Expected to be called only inside the fg-enabled branch (via componentWithFG).
27
23
  *
28
24
  * @param extensionKey - The extensionKey of the current 3P provider (e.g. 'google-object-provider').
@@ -36,9 +32,7 @@ var useSocialProofExperiment = function useSocialProofExperiment(extensionKey) {
36
32
  return (0, _react.useMemo)(function () {
37
33
  var _getSocialProofTier;
38
34
  var hasSocialProofData = connectedPct !== undefined;
39
-
40
- // Only fire exposure when data has loaded (prevents exposure inflation)
41
- var isTreatment = isEnabled && !isLoading && hasSocialProofData ? (0, _expValEquals.expValEquals)(SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY, 'isEnabled', true) : false;
35
+ var isTreatment = isEnabled && !isLoading && hasSocialProofData;
42
36
  var tier = (_getSocialProofTier = (0, _getSocialProofTier2.getSocialProofTier)(connectedPct)) !== null && _getSocialProofTier !== void 0 ? _getSocialProofTier : 'low';
43
37
  return {
44
38
  isTreatment: isTreatment,
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
25
25
  var context = exports.context = {
26
26
  componentName: 'smart-cards',
27
27
  packageName: "@atlaskit/smart-card" || '',
28
- packageVersion: "46.20.3" || ''
28
+ packageVersion: "46.21.0" || ''
29
29
  };
30
30
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
31
31
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -241,7 +241,7 @@ var UnauthorisedViewBase = function UnauthorisedViewBase(_ref4) {
241
241
  };
242
242
 
243
243
  /**
244
- * Experiment wrapper: fires social proof exposure and renders social proof UI for the treatment cohort.
244
+ * Renders social proof when the provider has eligible data.
245
245
  */
246
246
  var UnauthorisedView = function UnauthorisedView(_ref5) {
247
247
  var _props$cardState, _extractSmartLinkProv2;
@@ -332,7 +332,6 @@ function OneClickChatSpotlight(_ref4) {
332
332
  }, /*#__PURE__*/_react.default.createElement(SpotlightOpenContext.Provider, {
333
333
  value: hasPermission
334
334
  }, /*#__PURE__*/_react.default.createElement(_popup.Popup, {
335
- mode: "manual",
336
335
  popupComponent: SpotlightSurface,
337
336
  shouldFitViewport: true,
338
337
  isOpen: hasPermission,
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "46.20.3",
22
+ packageVersion: "46.21.0",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -1,21 +1,17 @@
1
1
  import { useMemo } from 'react';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import useSocialProof from '../use-social-proof';
4
3
  import { getSocialProofTier } from './getSocialProofTier';
4
+ // Stable key for existing smart link analytics.
5
5
  export const SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY = 'social_proof_3p_unauth_block_exp';
6
6
  export const SOCIAL_PROOF_TIER_THRESHOLD = 30;
7
7
 
8
8
  /**
9
- * Returns enrollment and treatment state for the social proof unauth block card experiment.
9
+ * Returns eligibility and tier for social proof in unauthorised block cards.
10
10
  *
11
11
  * Delegates data-fetching to `useSocialProof` (Sasha's shared service layer),
12
12
  * which handles cloudId resolution, TAP trait fetch, localStorage caching,
13
13
  * request deduping, and sync reads.
14
14
  *
15
- * This hook adds the experiment/cohort layer on top:
16
- * - Only fires exposure (via editorExperiment) when data has loaded.
17
- * - Derives `tier` and `isTreatment` for rendering decisions.
18
- *
19
15
  * Expected to be called only inside the fg-enabled branch (via componentWithFG).
20
16
  *
21
17
  * @param extensionKey - The extensionKey of the current 3P provider (e.g. 'google-object-provider').
@@ -29,9 +25,7 @@ const useSocialProofExperiment = (extensionKey, baseUriWithNoTrailingSlash = '')
29
25
  return useMemo(() => {
30
26
  var _getSocialProofTier;
31
27
  const hasSocialProofData = connectedPct !== undefined;
32
-
33
- // Only fire exposure when data has loaded (prevents exposure inflation)
34
- const isTreatment = isEnabled && !isLoading && hasSocialProofData ? expValEquals(SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY, 'isEnabled', true) : false;
28
+ const isTreatment = isEnabled && !isLoading && hasSocialProofData;
35
29
  const tier = (_getSocialProofTier = getSocialProofTier(connectedPct)) !== null && _getSocialProofTier !== void 0 ? _getSocialProofTier : 'low';
36
30
  return {
37
31
  isTreatment,
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "46.20.3" || ''
7
+ packageVersion: "46.21.0" || ''
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -234,7 +234,7 @@ const UnauthorisedViewBase = ({
234
234
  };
235
235
 
236
236
  /**
237
- * Experiment wrapper: fires social proof exposure and renders social proof UI for the treatment cohort.
237
+ * Renders social proof when the provider has eligible data.
238
238
  */
239
239
  const UnauthorisedView = ({
240
240
  testId = 'smart-block-unauthorized-view',
@@ -310,7 +310,6 @@ export function OneClickChatSpotlight({
310
310
  }, /*#__PURE__*/React.createElement(SpotlightOpenContext.Provider, {
311
311
  value: hasPermission
312
312
  }, /*#__PURE__*/React.createElement(Popup, {
313
- mode: "manual",
314
313
  popupComponent: SpotlightSurface,
315
314
  shouldFitViewport: true,
316
315
  isOpen: hasPermission,
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "46.20.3",
12
+ packageVersion: "46.21.0",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const LinkUrl = ({
@@ -1,21 +1,17 @@
1
1
  import { useMemo } from 'react';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import useSocialProof from '../use-social-proof';
4
3
  import { getSocialProofTier } from './getSocialProofTier';
4
+ // Stable key for existing smart link analytics.
5
5
  export var SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY = 'social_proof_3p_unauth_block_exp';
6
6
  export var SOCIAL_PROOF_TIER_THRESHOLD = 30;
7
7
 
8
8
  /**
9
- * Returns enrollment and treatment state for the social proof unauth block card experiment.
9
+ * Returns eligibility and tier for social proof in unauthorised block cards.
10
10
  *
11
11
  * Delegates data-fetching to `useSocialProof` (Sasha's shared service layer),
12
12
  * which handles cloudId resolution, TAP trait fetch, localStorage caching,
13
13
  * request deduping, and sync reads.
14
14
  *
15
- * This hook adds the experiment/cohort layer on top:
16
- * - Only fires exposure (via editorExperiment) when data has loaded.
17
- * - Derives `tier` and `isTreatment` for rendering decisions.
18
- *
19
15
  * Expected to be called only inside the fg-enabled branch (via componentWithFG).
20
16
  *
21
17
  * @param extensionKey - The extensionKey of the current 3P provider (e.g. 'google-object-provider').
@@ -29,9 +25,7 @@ var useSocialProofExperiment = function useSocialProofExperiment(extensionKey) {
29
25
  return useMemo(function () {
30
26
  var _getSocialProofTier;
31
27
  var hasSocialProofData = connectedPct !== undefined;
32
-
33
- // Only fire exposure when data has loaded (prevents exposure inflation)
34
- var isTreatment = isEnabled && !isLoading && hasSocialProofData ? expValEquals(SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY, 'isEnabled', true) : false;
28
+ var isTreatment = isEnabled && !isLoading && hasSocialProofData;
35
29
  var tier = (_getSocialProofTier = getSocialProofTier(connectedPct)) !== null && _getSocialProofTier !== void 0 ? _getSocialProofTier : 'low';
36
30
  return {
37
31
  isTreatment: isTreatment,
@@ -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: "46.20.3" || ''
7
+ packageVersion: "46.21.0" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -232,7 +232,7 @@ var UnauthorisedViewBase = function UnauthorisedViewBase(_ref4) {
232
232
  };
233
233
 
234
234
  /**
235
- * Experiment wrapper: fires social proof exposure and renders social proof UI for the treatment cohort.
235
+ * Renders social proof when the provider has eligible data.
236
236
  */
237
237
  var UnauthorisedView = function UnauthorisedView(_ref5) {
238
238
  var _props$cardState, _extractSmartLinkProv2;
@@ -324,7 +324,6 @@ export function OneClickChatSpotlight(_ref4) {
324
324
  }, /*#__PURE__*/React.createElement(SpotlightOpenContext.Provider, {
325
325
  value: hasPermission
326
326
  }, /*#__PURE__*/React.createElement(Popup, {
327
- mode: "manual",
328
327
  popupComponent: SpotlightSurface,
329
328
  shouldFitViewport: true,
330
329
  isOpen: hasPermission,
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "46.20.3",
15
+ packageVersion: "46.21.0",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -17,8 +17,7 @@ export interface SocialProofExperiment {
17
17
  */
18
18
  isLoading: boolean;
19
19
  /**
20
- * True when the user is in the treatment cohort and should see the
21
- * social proof UI. All treatment surfaces should gate on this.
20
+ * True when social proof data is ready and the UI can render it.
22
21
  */
23
22
  isTreatment: boolean;
24
23
  /**
@@ -30,16 +29,12 @@ export interface SocialProofExperiment {
30
29
  }
31
30
  export declare const SOCIAL_PROOF_TIER_THRESHOLD = 30;
32
31
  /**
33
- * Returns enrollment and treatment state for the social proof unauth block card experiment.
32
+ * Returns eligibility and tier for social proof in unauthorised block cards.
34
33
  *
35
34
  * Delegates data-fetching to `useSocialProof` (Sasha's shared service layer),
36
35
  * which handles cloudId resolution, TAP trait fetch, localStorage caching,
37
36
  * request deduping, and sync reads.
38
37
  *
39
- * This hook adds the experiment/cohort layer on top:
40
- * - Only fires exposure (via editorExperiment) when data has loaded.
41
- * - Derives `tier` and `isTreatment` for rendering decisions.
42
- *
43
38
  * Expected to be called only inside the fg-enabled branch (via componentWithFG).
44
39
  *
45
40
  * @param extensionKey - The extensionKey of the current 3P provider (e.g. 'google-object-provider').
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "46.20.4",
3
+ "version": "46.21.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,6 @@
15
15
  "sideEffects": [
16
16
  "**/*.compiled.css"
17
17
  ],
18
- "atlaskit:src": "src/index.ts",
19
18
  "atlassian": {
20
19
  "i18n": true,
21
20
  "react-compiler": {
@@ -68,7 +67,6 @@
68
67
  "@atlaskit/link-analytics": "^13.0.0",
69
68
  "@atlaskit/link-client-extension": "^8.0.0",
70
69
  "@atlaskit/link-extractors": "^5.0.0",
71
- "@atlaskit/link-test-helpers": "^11.2.0",
72
70
  "@atlaskit/linking-common": "^13.1.0",
73
71
  "@atlaskit/linking-types": "^16.1.0",
74
72
  "@atlaskit/logo": "^23.3.0",
@@ -81,13 +79,13 @@
81
79
  "@atlaskit/platform-feature-experiments": "^0.3.0",
82
80
  "@atlaskit/platform-feature-flags": "^2.2.0",
83
81
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
84
- "@atlaskit/popup": "^10.2.0",
82
+ "@atlaskit/popup": "^11.0.0",
85
83
  "@atlaskit/primitives": "^22.9.0",
86
84
  "@atlaskit/react-compiler-gating": "^0.2.0",
87
85
  "@atlaskit/react-ufo": "^8.5.0",
88
- "@atlaskit/rovo-triggers": "^12.19.0",
86
+ "@atlaskit/rovo-triggers": "^12.20.0",
89
87
  "@atlaskit/section-message": "^10.3.0",
90
- "@atlaskit/select": "^23.2.0",
88
+ "@atlaskit/select": "^23.3.0",
91
89
  "@atlaskit/spinner": "^20.4.0",
92
90
  "@atlaskit/tabs": "^21.3.0",
93
91
  "@atlaskit/tag": "^17.1.0",
@@ -95,7 +93,7 @@
95
93
  "@atlaskit/textfield": "^11.0.0",
96
94
  "@atlaskit/theme": "^28.2.0",
97
95
  "@atlaskit/tile": "^5.0.0",
98
- "@atlaskit/tmp-editor-statsig": "^274.0.0",
96
+ "@atlaskit/tmp-editor-statsig": "^276.0.0",
99
97
  "@atlaskit/tokens": "^20.15.0",
100
98
  "@atlaskit/tooltip": "^24.4.0",
101
99
  "@atlaskit/top-layer": "^8.2.0",
@@ -130,6 +128,7 @@
130
128
  "@atlaskit/datetime-picker": "^19.5.0",
131
129
  "@atlaskit/inline-message": "^16.4.0",
132
130
  "@atlaskit/link-provider": "^6.4.0",
131
+ "@atlaskit/link-test-helpers": "^11.2.0",
133
132
  "@atlaskit/media-test-helpers": "^43.0.0",
134
133
  "@atlaskit/page": "^15.3.0",
135
134
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^3.5.0",