@adobe/alloy 2.9.0-alpha.2 → 2.9.0-alpha.3
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.
|
@@ -6,6 +6,8 @@ var _utils = require("../../utils");
|
|
|
6
6
|
|
|
7
7
|
var _eventType = require("./constants/eventType");
|
|
8
8
|
|
|
9
|
+
var _scope = require("./constants/scope");
|
|
10
|
+
|
|
9
11
|
/*
|
|
10
12
|
Copyright 2020 Adobe. All rights reserved.
|
|
11
13
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -32,9 +34,20 @@ var _default = function _default(_ref) {
|
|
|
32
34
|
var decisionsMeta = collectClicks(clickedElement, selectors, getClickMetasBySelector);
|
|
33
35
|
|
|
34
36
|
if ((0, _utils.isNonEmptyArray)(decisionsMeta)) {
|
|
35
|
-
|
|
37
|
+
var xdm = {
|
|
36
38
|
eventType: _eventType.INTERACT
|
|
37
|
-
}
|
|
39
|
+
};
|
|
40
|
+
var scope = decisionsMeta[0].scope;
|
|
41
|
+
|
|
42
|
+
if (scope !== _scope.default) {
|
|
43
|
+
xdm.web = {
|
|
44
|
+
webPageDetails: {
|
|
45
|
+
viewName: scope
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
event.mergeXdm(xdm);
|
|
38
51
|
mergeDecisionsMeta(event, decisionsMeta);
|
|
39
52
|
}
|
|
40
53
|
}
|
|
@@ -15,5 +15,5 @@ governing permissions and limitations under the License.
|
|
|
15
15
|
*/
|
|
16
16
|
// The __VERSION__ keyword will be replace at alloy build time with the package.json version.
|
|
17
17
|
// see babel-plugin-version
|
|
18
|
-
var _default = "2.9.0-alpha.
|
|
18
|
+
var _default = "2.9.0-alpha.3";
|
|
19
19
|
exports.default = _default;
|
|
@@ -11,6 +11,7 @@ governing permissions and limitations under the License.
|
|
|
11
11
|
*/
|
|
12
12
|
import { isNonEmptyArray } from "../../utils";
|
|
13
13
|
import { INTERACT } from "./constants/eventType";
|
|
14
|
+
import PAGE_WIDE_SCOPE from "./constants/scope";
|
|
14
15
|
export default (({
|
|
15
16
|
mergeDecisionsMeta,
|
|
16
17
|
collectClicks,
|
|
@@ -28,9 +29,20 @@ export default (({
|
|
|
28
29
|
const decisionsMeta = collectClicks(clickedElement, selectors, getClickMetasBySelector);
|
|
29
30
|
|
|
30
31
|
if (isNonEmptyArray(decisionsMeta)) {
|
|
31
|
-
|
|
32
|
+
const xdm = {
|
|
32
33
|
eventType: INTERACT
|
|
33
|
-
}
|
|
34
|
+
};
|
|
35
|
+
const scope = decisionsMeta[0].scope;
|
|
36
|
+
|
|
37
|
+
if (scope !== PAGE_WIDE_SCOPE) {
|
|
38
|
+
xdm.web = {
|
|
39
|
+
webPageDetails: {
|
|
40
|
+
viewName: scope
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
event.mergeXdm(xdm);
|
|
34
46
|
mergeDecisionsMeta(event, decisionsMeta);
|
|
35
47
|
}
|
|
36
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.9.0-alpha.
|
|
3
|
+
"version": "2.9.0-alpha.3",
|
|
4
4
|
"description": "Adobe Experience Platform Web SDK",
|
|
5
5
|
"main": "libEs5/index.js",
|
|
6
6
|
"module": "libEs6/index.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"uuid": "^3.3.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@adobe/alloy": "^2.9.0-alpha.
|
|
67
|
+
"@adobe/alloy": "^2.9.0-alpha.2",
|
|
68
68
|
"@babel/cli": "^7.12.8",
|
|
69
69
|
"@babel/core": "^7.2.2",
|
|
70
70
|
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
|