@atlaskit/smart-card 45.24.0 → 45.24.2

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,20 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 45.24.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`95f65ea31d9b4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/95f65ea31d9b4) -
8
+ Remove the feature gate for SmartLink click analytics, [platform_smartlink_3pclick_analytics]
9
+ (https://switcheroo.atlassian.com/ui/gates/fdd68661-5e95-468e-b92d-4489c112762a/key/platform_smartlink_3pclick_analytics?xpis=eyJicmlkZ2UiOiJzbWFydExpbmtzIiwiaWQiOiIxNzg5NTA4NjkzNzY2Iiwic291cmNlIjoiYml0YnVja2V0In0%3D)
10
+ 3P click analytics is now always enabled.
11
+
12
+ ## 45.24.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 45.24.0
4
19
 
5
20
  ### Minor Changes
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getFirstPartyIdentifier = void 0;
7
- var _fg = require("@atlaskit/platform-feature-flags/fg");
8
7
  // Helper function to extract page ID from standard Confluence page URLs
9
8
  var extractPageIdFromURL = function extractPageIdFromURL(url) {
10
9
  try {
@@ -107,7 +106,7 @@ var getProductFromWindowURL = function getProductFromWindowURL() {
107
106
  return undefined;
108
107
  };
109
108
  var getFirstPartyIdentifier = exports.getFirstPartyIdentifier = function getFirstPartyIdentifier() {
110
- if (!(0, _fg.fg)('platform_smartlink_3pclick_analytics')) {
109
+ if (typeof window === 'undefined') {
111
110
  return undefined;
112
111
  }
113
112
  var product = getProductFromWindowURL();
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getThirdPartyARI = void 0;
7
- var _fg = require("@atlaskit/platform-feature-flags/fg");
8
7
  var getThirdPartyARI = exports.getThirdPartyARI = function getThirdPartyARI(details) {
9
- if ((0, _fg.fg)('platform_smartlink_3pclick_analytics')) {
10
- if (details !== null && details !== void 0 && details.entityData && 'thirdPartyAri' in details.entityData && details.entityData.thirdPartyAri) {
11
- return details.entityData.thirdPartyAri;
12
- }
13
- if (details !== null && details !== void 0 && details.data && 'atlassian:ari' in details.data && typeof details.data['atlassian:ari'] === 'string') {
14
- var ari = details.data['atlassian:ari'];
15
- if (ari.includes('ari:third-party')) {
16
- return ari;
17
- }
8
+ if (details !== null && details !== void 0 && details.entityData && 'thirdPartyAri' in details.entityData && details.entityData.thirdPartyAri) {
9
+ return details.entityData.thirdPartyAri;
10
+ }
11
+ if (details !== null && details !== void 0 && details.data && 'atlassian:ari' in details.data && typeof details.data['atlassian:ari'] === 'string') {
12
+ var ari = details.data['atlassian:ari'];
13
+ if (ari.includes('ari:third-party')) {
14
+ return ari;
18
15
  }
19
16
  }
20
17
  return undefined;
@@ -24,7 +24,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
24
24
  var context = exports.context = {
25
25
  componentName: 'smart-cards',
26
26
  packageName: "@atlaskit/smart-card" || '',
27
- packageVersion: "45.23.4" || ''
27
+ packageVersion: "45.24.1" || ''
28
28
  };
29
29
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
30
30
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -124,12 +124,10 @@ function Component(_ref) {
124
124
 
125
125
  // TODO: [ZS] Add new experiment flag to determine if the Rovo Actions CTA should be shown
126
126
  var rovoActionsCtaShown = false;
127
- var fire3PClickEvent = (0, _fg.fg)('platform_smartlink_3pclick_analytics') ?
128
- // eslint-disable-next-line react-hooks/rules-of-hooks
129
- (0, _useFire3PWorkflowsClickEvent.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
127
+ var fire3PClickEvent = (0, _useFire3PWorkflowsClickEvent.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI);
130
128
 
131
129
  // Shared scope guard for all 3P-click handlers.
132
- var shouldFire3PClickEvent = thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix) && (0, _getClickUrl2.getClickUrl)(url, state.details) === url && fire3PClickEvent && (0, _fg.fg)('platform_smartlink_3pclick_analytics');
130
+ var shouldFire3PClickEvent = thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix) && (0, _getClickUrl2.getClickUrl)(url, state.details) === url && fire3PClickEvent;
133
131
  var getDestinationUrl = (0, _react.useCallback)(function () {
134
132
  var _getClickUrl, _appendCrossProductAn;
135
133
  // FIXME: destinationUrl should be rendered in the DOM anchor href instead of derived at click time
@@ -11,7 +11,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _reactErrorBoundary = require("react-error-boundary");
13
13
  var _reactIntl = require("react-intl");
14
- var _fg = require("@atlaskit/platform-feature-flags/fg");
15
14
  var _getFirstPartyIdentifier = require("../../../state/getFirstPartyIdentifier");
16
15
  var _getThirdPartyARI = require("../../../state/getThirdPartyARI");
17
16
  var _useResolveHyperlink2 = _interopRequireDefault(require("../../../state/hooks/use-resolve-hyperlink"));
@@ -44,12 +43,10 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
44
43
  state = _useResolveHyperlink.state;
45
44
  var thirdPartyARI = (0, _getThirdPartyARI.getThirdPartyARI)(state === null || state === void 0 ? void 0 : state.details);
46
45
  var firstPartyIdentifier = (0, _getFirstPartyIdentifier.getFirstPartyIdentifier)();
47
- var fire3PClickEvent = (0, _fg.fg)('platform_smartlink_3pclick_analytics') ?
48
- // eslint-disable-next-line react-hooks/rules-of-hooks
49
- (0, _useFire3PWorkflowsClickEvent.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
46
+ var fire3PClickEvent = (0, _useFire3PWorkflowsClickEvent.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI);
50
47
 
51
48
  // Shared scope guard for all 3P-click handlers.
52
- var shouldFire3PClickEvent = (state === null || state === void 0 ? void 0 : state.status) === 'resolved' && fire3PClickEvent && (0, _fg.fg)('platform_smartlink_3pclick_analytics');
49
+ var shouldFire3PClickEvent = (state === null || state === void 0 ? void 0 : state.status) === 'resolved' && fire3PClickEvent;
53
50
  var onClick = (0, _react.useCallback)(function (e) {
54
51
  // button === 0 is left-click, see
55
52
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
@@ -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: "45.23.4",
22
+ packageVersion: "45.24.1",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -1,5 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
-
3
1
  // Helper function to extract page ID from standard Confluence page URLs
4
2
  const extractPageIdFromURL = url => {
5
3
  try {
@@ -102,7 +100,7 @@ const getProductFromWindowURL = () => {
102
100
  return undefined;
103
101
  };
104
102
  export const getFirstPartyIdentifier = () => {
105
- if (!fg('platform_smartlink_3pclick_analytics')) {
103
+ if (typeof window === 'undefined') {
106
104
  return undefined;
107
105
  }
108
106
  const product = getProductFromWindowURL();
@@ -1,14 +1,11 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
1
  export const getThirdPartyARI = details => {
3
- if (fg('platform_smartlink_3pclick_analytics')) {
4
- if (details !== null && details !== void 0 && details.entityData && 'thirdPartyAri' in details.entityData && details.entityData.thirdPartyAri) {
5
- return details.entityData.thirdPartyAri;
6
- }
7
- if (details !== null && details !== void 0 && details.data && 'atlassian:ari' in details.data && typeof details.data['atlassian:ari'] === 'string') {
8
- const ari = details.data['atlassian:ari'];
9
- if (ari.includes('ari:third-party')) {
10
- return ari;
11
- }
2
+ if (details !== null && details !== void 0 && details.entityData && 'thirdPartyAri' in details.entityData && details.entityData.thirdPartyAri) {
3
+ return details.entityData.thirdPartyAri;
4
+ }
5
+ if (details !== null && details !== void 0 && details.data && 'atlassian:ari' in details.data && typeof details.data['atlassian:ari'] === 'string') {
6
+ const ari = details.data['atlassian:ari'];
7
+ if (ari.includes('ari:third-party')) {
8
+ return ari;
12
9
  }
13
10
  }
14
11
  return undefined;
@@ -3,7 +3,7 @@ export const ANALYTICS_CHANNEL = 'media';
3
3
  export const context = {
4
4
  componentName: 'smart-cards',
5
5
  packageName: "@atlaskit/smart-card" || '',
6
- packageVersion: "45.23.4" || ''
6
+ packageVersion: "45.24.1" || ''
7
7
  };
8
8
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
9
9
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -115,12 +115,10 @@ function Component({
115
115
 
116
116
  // TODO: [ZS] Add new experiment flag to determine if the Rovo Actions CTA should be shown
117
117
  const rovoActionsCtaShown = false;
118
- const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
119
- // eslint-disable-next-line react-hooks/rules-of-hooks
120
- useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
118
+ const fire3PClickEvent = useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI);
121
119
 
122
120
  // Shared scope guard for all 3P-click handlers.
123
- const shouldFire3PClickEvent = thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix) && getClickUrl(url, state.details) === url && fire3PClickEvent && fg('platform_smartlink_3pclick_analytics');
121
+ const shouldFire3PClickEvent = thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix) && getClickUrl(url, state.details) === url && fire3PClickEvent;
124
122
  const getDestinationUrl = useCallback(() => {
125
123
  var _getClickUrl, _appendCrossProductAn;
126
124
  // FIXME: destinationUrl should be rendered in the DOM anchor href instead of derived at click time
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback } from 'react';
3
3
  import { withErrorBoundary as withReactErrorBoundary } from 'react-error-boundary';
4
4
  import { injectIntl } from 'react-intl';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { getFirstPartyIdentifier } from '../../../state/getFirstPartyIdentifier';
7
6
  import { getThirdPartyARI } from '../../../state/getThirdPartyARI';
8
7
  import useResolveHyperlink from '../../../state/hooks/use-resolve-hyperlink';
@@ -31,12 +30,10 @@ const HyperlinkWithSmartLinkResolverInner = ({
31
30
  });
32
31
  const thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
33
32
  const firstPartyIdentifier = getFirstPartyIdentifier();
34
- const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
35
- // eslint-disable-next-line react-hooks/rules-of-hooks
36
- useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
33
+ const fire3PClickEvent = useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI);
37
34
 
38
35
  // Shared scope guard for all 3P-click handlers.
39
- const shouldFire3PClickEvent = (state === null || state === void 0 ? void 0 : state.status) === 'resolved' && fire3PClickEvent && fg('platform_smartlink_3pclick_analytics');
36
+ const shouldFire3PClickEvent = (state === null || state === void 0 ? void 0 : state.status) === 'resolved' && fire3PClickEvent;
40
37
  const onClick = useCallback(e => {
41
38
  // button === 0 is left-click, see
42
39
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
@@ -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: "45.23.4",
12
+ packageVersion: "45.24.1",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const LinkUrl = ({
@@ -1,5 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
-
3
1
  // Helper function to extract page ID from standard Confluence page URLs
4
2
  var extractPageIdFromURL = function extractPageIdFromURL(url) {
5
3
  try {
@@ -102,7 +100,7 @@ var getProductFromWindowURL = function getProductFromWindowURL() {
102
100
  return undefined;
103
101
  };
104
102
  export var getFirstPartyIdentifier = function getFirstPartyIdentifier() {
105
- if (!fg('platform_smartlink_3pclick_analytics')) {
103
+ if (typeof window === 'undefined') {
106
104
  return undefined;
107
105
  }
108
106
  var product = getProductFromWindowURL();
@@ -1,14 +1,11 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
1
  export var getThirdPartyARI = function getThirdPartyARI(details) {
3
- if (fg('platform_smartlink_3pclick_analytics')) {
4
- if (details !== null && details !== void 0 && details.entityData && 'thirdPartyAri' in details.entityData && details.entityData.thirdPartyAri) {
5
- return details.entityData.thirdPartyAri;
6
- }
7
- if (details !== null && details !== void 0 && details.data && 'atlassian:ari' in details.data && typeof details.data['atlassian:ari'] === 'string') {
8
- var ari = details.data['atlassian:ari'];
9
- if (ari.includes('ari:third-party')) {
10
- return ari;
11
- }
2
+ if (details !== null && details !== void 0 && details.entityData && 'thirdPartyAri' in details.entityData && details.entityData.thirdPartyAri) {
3
+ return details.entityData.thirdPartyAri;
4
+ }
5
+ if (details !== null && details !== void 0 && details.data && 'atlassian:ari' in details.data && typeof details.data['atlassian:ari'] === 'string') {
6
+ var ari = details.data['atlassian:ari'];
7
+ if (ari.includes('ari:third-party')) {
8
+ return ari;
12
9
  }
13
10
  }
14
11
  return undefined;
@@ -3,7 +3,7 @@ export var ANALYTICS_CHANNEL = 'media';
3
3
  export var context = {
4
4
  componentName: 'smart-cards',
5
5
  packageName: "@atlaskit/smart-card" || '',
6
- packageVersion: "45.23.4" || ''
6
+ packageVersion: "45.24.1" || ''
7
7
  };
8
8
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
9
9
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -115,12 +115,10 @@ function Component(_ref) {
115
115
 
116
116
  // TODO: [ZS] Add new experiment flag to determine if the Rovo Actions CTA should be shown
117
117
  var rovoActionsCtaShown = false;
118
- var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
119
- // eslint-disable-next-line react-hooks/rules-of-hooks
120
- useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
118
+ var fire3PClickEvent = useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI);
121
119
 
122
120
  // Shared scope guard for all 3P-click handlers.
123
- var shouldFire3PClickEvent = thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix) && getClickUrl(url, state.details) === url && fire3PClickEvent && fg('platform_smartlink_3pclick_analytics');
121
+ var shouldFire3PClickEvent = thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix) && getClickUrl(url, state.details) === url && fire3PClickEvent;
124
122
  var getDestinationUrl = useCallback(function () {
125
123
  var _getClickUrl, _appendCrossProductAn;
126
124
  // FIXME: destinationUrl should be rendered in the DOM anchor href instead of derived at click time
@@ -4,7 +4,6 @@ var _excluded = ["onClick"];
4
4
  import React, { useCallback } from 'react';
5
5
  import { withErrorBoundary as withReactErrorBoundary } from 'react-error-boundary';
6
6
  import { injectIntl } from 'react-intl';
7
- import { fg } from '@atlaskit/platform-feature-flags/fg';
8
7
  import { getFirstPartyIdentifier } from '../../../state/getFirstPartyIdentifier';
9
8
  import { getThirdPartyARI } from '../../../state/getThirdPartyARI';
10
9
  import useResolveHyperlink from '../../../state/hooks/use-resolve-hyperlink';
@@ -35,12 +34,10 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
35
34
  state = _useResolveHyperlink.state;
36
35
  var thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
37
36
  var firstPartyIdentifier = getFirstPartyIdentifier();
38
- var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
39
- // eslint-disable-next-line react-hooks/rules-of-hooks
40
- useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
37
+ var fire3PClickEvent = useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI);
41
38
 
42
39
  // Shared scope guard for all 3P-click handlers.
43
- var shouldFire3PClickEvent = (state === null || state === void 0 ? void 0 : state.status) === 'resolved' && fire3PClickEvent && fg('platform_smartlink_3pclick_analytics');
40
+ var shouldFire3PClickEvent = (state === null || state === void 0 ? void 0 : state.status) === 'resolved' && fire3PClickEvent;
44
41
  var onClick = useCallback(function (e) {
45
42
  // button === 0 is left-click, see
46
43
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
@@ -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: "45.23.4",
15
+ packageVersion: "45.24.1",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "45.24.0",
3
+ "version": "45.24.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,6 +27,9 @@
27
27
  },
28
28
  "team": "Navigation Experiences - Linking Platform",
29
29
  "website": {
30
+ "tags": [
31
+ "platform-labs"
32
+ ],
30
33
  "name": "Smart Card"
31
34
  }
32
35
  },
@@ -70,7 +73,7 @@
70
73
  "@atlaskit/lozenge": "^15.4.0",
71
74
  "@atlaskit/menu": "^10.2.0",
72
75
  "@atlaskit/modal-dialog": "^16.6.0",
73
- "@atlaskit/motion": "^8.6.0",
76
+ "@atlaskit/motion": "^8.7.0",
74
77
  "@atlaskit/object": "^2.3.0",
75
78
  "@atlaskit/outbound-auth-flow-client": "^4.2.0",
76
79
  "@atlaskit/platform-feature-experiments": "^0.3.0",
@@ -79,7 +82,7 @@
79
82
  "@atlaskit/popup": "^6.3.0",
80
83
  "@atlaskit/primitives": "^22.5.0",
81
84
  "@atlaskit/react-compiler-gating": "^0.2.0",
82
- "@atlaskit/react-ufo": "^7.10.0",
85
+ "@atlaskit/react-ufo": "^7.11.0",
83
86
  "@atlaskit/rovo-triggers": "^11.0.0",
84
87
  "@atlaskit/section-message": "^10.2.0",
85
88
  "@atlaskit/select": "^22.11.0",
@@ -90,7 +93,7 @@
90
93
  "@atlaskit/textfield": "^10.2.0",
91
94
  "@atlaskit/theme": "^28.2.0",
92
95
  "@atlaskit/tile": "^4.1.0",
93
- "@atlaskit/tmp-editor-statsig": "^197.0.0",
96
+ "@atlaskit/tmp-editor-statsig": "^198.0.0",
94
97
  "@atlaskit/tokens": "^17.0.0",
95
98
  "@atlaskit/tooltip": "^24.3.0",
96
99
  "@atlaskit/ufo": "^1.2.0",
@@ -184,9 +187,6 @@
184
187
  "product-terminology-refresh": {
185
188
  "type": "boolean"
186
189
  },
187
- "platform_smartlink_3pclick_analytics": {
188
- "type": "boolean"
189
- },
190
190
  "jfp-magma-platform-lozenge-jump-fix": {
191
191
  "type": "boolean"
192
192
  },