@atlaskit/analytics-cross-product 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/globalInteractionSessionTracking.js +4 -3
- package/dist/cjs/useCrossProductUrlWrapper.js +2 -3
- package/dist/es2019/globalInteractionSessionTracking.js +4 -3
- package/dist/es2019/useCrossProductUrlWrapper.js +3 -3
- package/dist/esm/globalInteractionSessionTracking.js +4 -3
- package/dist/esm/useCrossProductUrlWrapper.js +3 -3
- package/globalInteractionSessionTracking/package.json +17 -0
- package/package.json +1 -1
- package/useCrossProductUrlWrapper/package.json +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
1
|
# @atlaskit/analytics-cross-product
|
|
2
|
+
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3f23aba4db7f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f23aba4db7f2) -
|
|
8
|
+
Autofix: add explicit package exports (barrel removal)
|
|
9
|
+
|
|
10
|
+
## 1.0.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`b4f0528444f65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4f0528444f65) -
|
|
15
|
+
Cleanup console error logs
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.INTERNAL_CLIENT_WINDOW_KEY = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
// WARNING: This value is shared between @atlaskit/analytics-cross-product and
|
|
11
|
+
// @atlassiansox/analytics-cross-product-interaction-client. Take care when updating.
|
|
10
12
|
var INTERNAL_CLIENT_WINDOW_KEY = exports.INTERNAL_CLIENT_WINDOW_KEY = 'analyticsInteractionSesssionTrackingClient';
|
|
11
13
|
var GlobalInteractionSessionTracking = exports.default = /*#__PURE__*/function () {
|
|
12
14
|
function GlobalInteractionSessionTracking() {
|
|
@@ -21,9 +23,8 @@ var GlobalInteractionSessionTracking = exports.default = /*#__PURE__*/function (
|
|
|
21
23
|
if (INTERNAL_CLIENT_WINDOW_KEY in window) {
|
|
22
24
|
interactionSessionTracking = window[INTERNAL_CLIENT_WINDOW_KEY];
|
|
23
25
|
}
|
|
24
|
-
} catch (
|
|
25
|
-
//
|
|
26
|
-
console.error("Error fetching InteractionSessionTracking from window - ".concat(error instanceof Error ? error.message : String(error)));
|
|
26
|
+
} catch (err) {
|
|
27
|
+
// Silently swallow exception
|
|
27
28
|
}
|
|
28
29
|
return interactionSessionTracking;
|
|
29
30
|
}
|
|
@@ -12,6 +12,8 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
13
|
var _generateUrlWithParams = require("./generateUrlWithParams");
|
|
14
14
|
var _globalInteractionSessionTracking = _interopRequireDefault(require("./globalInteractionSessionTracking"));
|
|
15
|
+
// WARNING: This value is shared between @atlaskit/analytics-cross-product and
|
|
16
|
+
// @atlassiansox/analytics-cross-product-interaction-client. Take care when updating.
|
|
15
17
|
var INTERACTION_SESSION_ID_UPDATED_EVENT = exports.INTERACTION_SESSION_ID_UPDATED_EVENT = 'interactionSessionIdUpdated';
|
|
16
18
|
|
|
17
19
|
/**
|
|
@@ -60,9 +62,6 @@ function useCrossProductUrlWrapper(options) {
|
|
|
60
62
|
if (interactionSessionClient) {
|
|
61
63
|
var _currentSessionId = interactionSessionClient.getCurrentInteractionSessionId();
|
|
62
64
|
_currentSessionId && setInteractionSessionId(_currentSessionId);
|
|
63
|
-
} else {
|
|
64
|
-
// eslint-disable-next-line no-console
|
|
65
|
-
console.error("INTERACTION_SESSION_ID_UPDATED_EVENT received but interactionSessionClient not present on window");
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// WARNING: This value is shared between @atlaskit/analytics-cross-product and
|
|
2
|
+
// @atlassiansox/analytics-cross-product-interaction-client. Take care when updating.
|
|
1
3
|
export const INTERNAL_CLIENT_WINDOW_KEY = 'analyticsInteractionSesssionTrackingClient';
|
|
2
4
|
export default class GlobalInteractionSessionTracking {
|
|
3
5
|
static getInstance() {
|
|
@@ -7,9 +9,8 @@ export default class GlobalInteractionSessionTracking {
|
|
|
7
9
|
if (INTERNAL_CLIENT_WINDOW_KEY in window) {
|
|
8
10
|
interactionSessionTracking = window[INTERNAL_CLIENT_WINDOW_KEY];
|
|
9
11
|
}
|
|
10
|
-
} catch (
|
|
11
|
-
//
|
|
12
|
-
console.error(`Error fetching InteractionSessionTracking from window - ${error instanceof Error ? error.message : String(error)}`);
|
|
12
|
+
} catch (err) {
|
|
13
|
+
// Silently swallow exception
|
|
13
14
|
}
|
|
14
15
|
return interactionSessionTracking;
|
|
15
16
|
}
|
|
@@ -3,6 +3,9 @@ import { bind } from 'bind-event-listener';
|
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { generateUrlWithParams } from './generateUrlWithParams';
|
|
5
5
|
import GlobalInteractionSessionTracking from './globalInteractionSessionTracking';
|
|
6
|
+
|
|
7
|
+
// WARNING: This value is shared between @atlaskit/analytics-cross-product and
|
|
8
|
+
// @atlassiansox/analytics-cross-product-interaction-client. Take care when updating.
|
|
6
9
|
export const INTERACTION_SESSION_ID_UPDATED_EVENT = 'interactionSessionIdUpdated';
|
|
7
10
|
|
|
8
11
|
/**
|
|
@@ -50,9 +53,6 @@ export default function useCrossProductUrlWrapper(options) {
|
|
|
50
53
|
if (interactionSessionClient) {
|
|
51
54
|
const currentSessionId = interactionSessionClient.getCurrentInteractionSessionId();
|
|
52
55
|
currentSessionId && setInteractionSessionId(currentSessionId);
|
|
53
|
-
} else {
|
|
54
|
-
// eslint-disable-next-line no-console
|
|
55
|
-
console.error(`INTERACTION_SESSION_ID_UPDATED_EVENT received but interactionSessionClient not present on window`);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
// WARNING: This value is shared between @atlaskit/analytics-cross-product and
|
|
4
|
+
// @atlassiansox/analytics-cross-product-interaction-client. Take care when updating.
|
|
3
5
|
export var INTERNAL_CLIENT_WINDOW_KEY = 'analyticsInteractionSesssionTrackingClient';
|
|
4
6
|
var GlobalInteractionSessionTracking = /*#__PURE__*/function () {
|
|
5
7
|
function GlobalInteractionSessionTracking() {
|
|
@@ -14,9 +16,8 @@ var GlobalInteractionSessionTracking = /*#__PURE__*/function () {
|
|
|
14
16
|
if (INTERNAL_CLIENT_WINDOW_KEY in window) {
|
|
15
17
|
interactionSessionTracking = window[INTERNAL_CLIENT_WINDOW_KEY];
|
|
16
18
|
}
|
|
17
|
-
} catch (
|
|
18
|
-
//
|
|
19
|
-
console.error("Error fetching InteractionSessionTracking from window - ".concat(error instanceof Error ? error.message : String(error)));
|
|
19
|
+
} catch (err) {
|
|
20
|
+
// Silently swallow exception
|
|
20
21
|
}
|
|
21
22
|
return interactionSessionTracking;
|
|
22
23
|
}
|
|
@@ -4,6 +4,9 @@ import { bind } from 'bind-event-listener';
|
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { generateUrlWithParams } from './generateUrlWithParams';
|
|
6
6
|
import GlobalInteractionSessionTracking from './globalInteractionSessionTracking';
|
|
7
|
+
|
|
8
|
+
// WARNING: This value is shared between @atlaskit/analytics-cross-product and
|
|
9
|
+
// @atlassiansox/analytics-cross-product-interaction-client. Take care when updating.
|
|
7
10
|
export var INTERACTION_SESSION_ID_UPDATED_EVENT = 'interactionSessionIdUpdated';
|
|
8
11
|
|
|
9
12
|
/**
|
|
@@ -52,9 +55,6 @@ export default function useCrossProductUrlWrapper(options) {
|
|
|
52
55
|
if (interactionSessionClient) {
|
|
53
56
|
var _currentSessionId = interactionSessionClient.getCurrentInteractionSessionId();
|
|
54
57
|
_currentSessionId && setInteractionSessionId(_currentSessionId);
|
|
55
|
-
} else {
|
|
56
|
-
// eslint-disable-next-line no-console
|
|
57
|
-
console.error("INTERACTION_SESSION_ID_UPDATED_EVENT received but interactionSessionClient not present on window");
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/analytics-cross-product/globalInteractionSessionTracking",
|
|
3
|
+
"main": "../dist/cjs/globalInteractionSessionTracking.js",
|
|
4
|
+
"module": "../dist/esm/globalInteractionSessionTracking.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/globalInteractionSessionTracking.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/globalInteractionSessionTracking.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/globalInteractionSessionTracking.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/analytics-cross-product/useCrossProductUrlWrapper",
|
|
3
|
+
"main": "../dist/cjs/useCrossProductUrlWrapper.js",
|
|
4
|
+
"module": "../dist/esm/useCrossProductUrlWrapper.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/useCrossProductUrlWrapper.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/useCrossProductUrlWrapper.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/useCrossProductUrlWrapper.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|