@adobe/alloy 2.13.0-beta.2 → 2.13.0-beta.4
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/libEs5/components/Personalization/createApplyPropositions.js +2 -2
- package/libEs5/components/Personalization/createOnClickHandler.js +2 -2
- package/libEs5/components/Personalization/createPersonalizationDetails.js +4 -4
- package/libEs5/components/Personalization/groupDecisions.js +2 -2
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/{components/Personalization/constants/scope.js → constants/pageWideScope.js} +0 -0
- package/libEs5/core/createEventManager.js +3 -1
- package/libEs6/components/Personalization/createApplyPropositions.js +1 -1
- package/libEs6/components/Personalization/createOnClickHandler.js +1 -1
- package/libEs6/components/Personalization/createPersonalizationDetails.js +1 -1
- package/libEs6/components/Personalization/groupDecisions.js +1 -1
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/{components/Personalization/constants/scope.js → constants/pageWideScope.js} +0 -0
- package/libEs6/core/createEventManager.js +2 -1
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ var _utils = require("../../utils");
|
|
|
8
8
|
|
|
9
9
|
var _schema = require("./constants/schema");
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _pageWideScope = require("../../constants/pageWideScope");
|
|
12
12
|
|
|
13
13
|
var _validateApplyPropositionsOptions = require("./validateApplyPropositionsOptions");
|
|
14
14
|
|
|
@@ -52,7 +52,7 @@ var _default = function _default(_ref) {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
var filterPropositionsPredicate = function filterPropositionsPredicate(proposition) {
|
|
55
|
-
return !(proposition.scope ===
|
|
55
|
+
return !(proposition.scope === _pageWideScope.default && proposition.renderAttempted);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
var preparePropositions = function preparePropositions(_ref3) {
|
|
@@ -8,7 +8,7 @@ var _eventType = require("./constants/eventType");
|
|
|
8
8
|
|
|
9
9
|
var _propositionEventType = require("./constants/propositionEventType");
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _pageWideScope = require("../../constants/pageWideScope");
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
14
|
Copyright 2020 Adobe. All rights reserved.
|
|
@@ -41,7 +41,7 @@ var _default = function _default(_ref) {
|
|
|
41
41
|
};
|
|
42
42
|
var scope = decisionsMeta[0].scope;
|
|
43
43
|
|
|
44
|
-
if (scope !==
|
|
44
|
+
if (scope !== _pageWideScope.default) {
|
|
45
45
|
xdm.web = {
|
|
46
46
|
webPageDetails: {
|
|
47
47
|
viewName: scope
|
|
@@ -4,7 +4,7 @@ exports.default = void 0;
|
|
|
4
4
|
|
|
5
5
|
var _utils = require("../../utils");
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _pageWideScope = require("../../constants/pageWideScope");
|
|
8
8
|
|
|
9
9
|
var _schema = require("./constants/schema");
|
|
10
10
|
|
|
@@ -44,13 +44,13 @@ var _default = function _default(_ref) {
|
|
|
44
44
|
createQueryDetails: function createQueryDetails() {
|
|
45
45
|
var scopes = _toConsumableArray(decisionScopes);
|
|
46
46
|
|
|
47
|
-
if (!this.isCacheInitialized() && !(0, _utils.includes)(scopes,
|
|
48
|
-
scopes.push(
|
|
47
|
+
if (!this.isCacheInitialized() && !(0, _utils.includes)(scopes, _pageWideScope.default)) {
|
|
48
|
+
scopes.push(_pageWideScope.default);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
var schemas = [_schema.DEFAULT_CONTENT_ITEM, _schema.HTML_CONTENT_ITEM, _schema.JSON_CONTENT_ITEM, _schema.REDIRECT_ITEM];
|
|
52
52
|
|
|
53
|
-
if ((0, _utils.includes)(scopes,
|
|
53
|
+
if ((0, _utils.includes)(scopes, _pageWideScope.default)) {
|
|
54
54
|
schemas.push(_schema.DOM_ACTION);
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -8,7 +8,7 @@ var _schema = require("./constants/schema");
|
|
|
8
8
|
|
|
9
9
|
var _scopeType = require("./constants/scopeType");
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _pageWideScope = require("../../constants/pageWideScope");
|
|
12
12
|
|
|
13
13
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
14
14
|
|
|
@@ -118,7 +118,7 @@ var extractDecisionsByScope = function extractDecisionsByScope(decisions) {
|
|
|
118
118
|
|
|
119
119
|
if ((0, _utils.isNonEmptyArray)(decisions)) {
|
|
120
120
|
decisions.forEach(function (decision) {
|
|
121
|
-
if (decision.scope ===
|
|
121
|
+
if (decision.scope === _pageWideScope.default) {
|
|
122
122
|
pageWideScopeDecisions.push(decision);
|
|
123
123
|
} else if (isViewScope(decision.scopeDetails)) {
|
|
124
124
|
appendScopeDecision(viewScopeDecisions, decision);
|
|
@@ -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.13.0-beta.
|
|
18
|
+
var _default = "2.13.0-beta.4";
|
|
19
19
|
exports.default = _default;
|
|
File without changes
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
|
|
5
|
+
var _pageWideScope = require("../constants/pageWideScope");
|
|
6
|
+
|
|
5
7
|
var _utils = require("../utils");
|
|
6
8
|
|
|
7
9
|
/*
|
|
@@ -113,7 +115,7 @@ var _default = function _default(_ref) {
|
|
|
113
115
|
return lifecycle.onBeforeEvent({
|
|
114
116
|
event: event,
|
|
115
117
|
renderDecisions: renderDecisions,
|
|
116
|
-
decisionScopes: [],
|
|
118
|
+
decisionScopes: [_pageWideScope.default],
|
|
117
119
|
onResponse: onResponseCallbackAggregator.add,
|
|
118
120
|
onRequestFailure: _utils.noop
|
|
119
121
|
}).then(function () {
|
|
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
|
|
|
12
12
|
import composePersonalizationResultingObject from "./utils/composePersonalizationResultingObject";
|
|
13
13
|
import { isNonEmptyArray, isObject } from "../../utils";
|
|
14
14
|
import { DOM_ACTION, HTML_CONTENT_ITEM } from "./constants/schema";
|
|
15
|
-
import PAGE_WIDE_SCOPE from "
|
|
15
|
+
import PAGE_WIDE_SCOPE from "../../constants/pageWideScope";
|
|
16
16
|
import { EMPTY_PROPOSITIONS } from "./validateApplyPropositionsOptions";
|
|
17
17
|
export const SUPPORTED_SCHEMAS = [DOM_ACTION, HTML_CONTENT_ITEM];
|
|
18
18
|
export default (({
|
|
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
|
|
|
12
12
|
import { isNonEmptyArray } from "../../utils";
|
|
13
13
|
import { INTERACT } from "./constants/eventType";
|
|
14
14
|
import { PropositionEventType } from "./constants/propositionEventType";
|
|
15
|
-
import PAGE_WIDE_SCOPE from "
|
|
15
|
+
import PAGE_WIDE_SCOPE from "../../constants/pageWideScope";
|
|
16
16
|
export default (({
|
|
17
17
|
mergeDecisionsMeta,
|
|
18
18
|
collectClicks,
|
|
@@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { includes } from "../../utils";
|
|
13
|
-
import PAGE_WIDE_SCOPE from "
|
|
13
|
+
import PAGE_WIDE_SCOPE from "../../constants/pageWideScope";
|
|
14
14
|
import { DEFAULT_CONTENT_ITEM, DOM_ACTION, HTML_CONTENT_ITEM, JSON_CONTENT_ITEM, REDIRECT_ITEM } from "./constants/schema";
|
|
15
15
|
import isNonEmptyString from "../../utils/isNonEmptyString";
|
|
16
16
|
export default (({
|
|
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
|
|
|
12
12
|
import { isNonEmptyArray, includes } from "../../utils";
|
|
13
13
|
import { DOM_ACTION, REDIRECT_ITEM, DEFAULT_CONTENT_ITEM, MEASUREMENT_SCHEMA } from "./constants/schema";
|
|
14
14
|
import { VIEW_SCOPE_TYPE } from "./constants/scopeType";
|
|
15
|
-
import PAGE_WIDE_SCOPE from "
|
|
15
|
+
import PAGE_WIDE_SCOPE from "../../constants/pageWideScope";
|
|
16
16
|
|
|
17
17
|
const splitItems = (items, schemas) => {
|
|
18
18
|
const matched = [];
|
|
File without changes
|
|
@@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
9
9
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
import PAGE_WIDE_SCOPE from "../constants/pageWideScope";
|
|
12
13
|
import { createCallbackAggregator, noop } from "../utils";
|
|
13
14
|
const EVENT_CANCELLATION_MESSAGE = "Event was canceled because the onBeforeEventSend callback returned false.";
|
|
14
15
|
export default (({
|
|
@@ -109,7 +110,7 @@ export default (({
|
|
|
109
110
|
return lifecycle.onBeforeEvent({
|
|
110
111
|
event,
|
|
111
112
|
renderDecisions,
|
|
112
|
-
decisionScopes: [],
|
|
113
|
+
decisionScopes: [PAGE_WIDE_SCOPE],
|
|
113
114
|
onResponse: onResponseCallbackAggregator.add,
|
|
114
115
|
onRequestFailure: noop
|
|
115
116
|
}).then(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.13.0-beta.
|
|
3
|
+
"version": "2.13.0-beta.4",
|
|
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.13.0-beta.
|
|
67
|
+
"@adobe/alloy": "^2.13.0-beta.3",
|
|
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",
|