@adobe/alloy 2.19.0-beta.7 → 2.19.0-beta.9
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/DataCollector/index.js +12 -21
- package/libEs5/components/DataCollector/validateApplyResponse.js +2 -2
- package/libEs5/components/DataCollector/validateUserEventOptions.js +6 -4
- package/libEs5/components/Personalization/constants/scopeType.js +6 -2
- package/libEs5/components/Personalization/createApplyPropositions.js +4 -4
- package/libEs5/components/Personalization/createClickStorage.js +21 -13
- package/libEs5/components/Personalization/createComponent.js +3 -3
- package/libEs5/components/Personalization/createFetchDataHandler.js +5 -5
- package/libEs5/components/Personalization/createOnClickHandler.js +4 -5
- package/libEs5/components/Personalization/createPersonalizationDetails.js +6 -6
- package/libEs5/components/Personalization/createViewCacheManager.js +11 -11
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +43 -23
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +7 -1
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +1 -1
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +13 -15
- package/libEs5/components/Personalization/index.js +4 -4
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/core/createEventManager.js +19 -26
- package/libEs6/components/DataCollector/index.js +7 -15
- package/libEs6/components/DataCollector/validateApplyResponse.js +2 -2
- package/libEs6/components/DataCollector/validateUserEventOptions.js +6 -4
- package/libEs6/components/Personalization/constants/scopeType.js +3 -1
- package/libEs6/components/Personalization/createApplyPropositions.js +4 -4
- package/libEs6/components/Personalization/createClickStorage.js +18 -10
- package/libEs6/components/Personalization/createComponent.js +3 -3
- package/libEs6/components/Personalization/createFetchDataHandler.js +5 -5
- package/libEs6/components/Personalization/createOnClickHandler.js +5 -6
- package/libEs6/components/Personalization/createPersonalizationDetails.js +6 -6
- package/libEs6/components/Personalization/createViewCacheManager.js +8 -10
- package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +28 -12
- package/libEs6/components/Personalization/handlers/createProcessDomAction.js +5 -1
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +1 -1
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +12 -15
- package/libEs6/components/Personalization/index.js +4 -4
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/core/createEventManager.js +9 -19
- package/package.json +3 -3
- package/libEs5/components/Personalization/utils/isPageWideScope.js +0 -20
- package/libEs6/components/Personalization/utils/isPageWideScope.js +0 -15
|
@@ -91,7 +91,7 @@ const createPersonalization = ({
|
|
|
91
91
|
schemaProcessors,
|
|
92
92
|
logger
|
|
93
93
|
});
|
|
94
|
-
const
|
|
94
|
+
const renderedPropositions = createAsyncArray();
|
|
95
95
|
const fetchDataHandler = createFetchDataHandler({
|
|
96
96
|
prehidingStyle,
|
|
97
97
|
showContainers,
|
|
@@ -100,7 +100,7 @@ const createPersonalization = ({
|
|
|
100
100
|
collect,
|
|
101
101
|
processPropositions,
|
|
102
102
|
createProposition,
|
|
103
|
-
|
|
103
|
+
renderedPropositions
|
|
104
104
|
});
|
|
105
105
|
const onClickHandler = createOnClickHandler({
|
|
106
106
|
mergeDecisionsMeta,
|
|
@@ -115,7 +115,7 @@ const createPersonalization = ({
|
|
|
115
115
|
const applyPropositions = createApplyPropositions({
|
|
116
116
|
processPropositions,
|
|
117
117
|
createProposition,
|
|
118
|
-
|
|
118
|
+
renderedPropositions,
|
|
119
119
|
viewCache
|
|
120
120
|
});
|
|
121
121
|
const setTargetMigration = createSetTargetMigration({
|
|
@@ -134,7 +134,7 @@ const createPersonalization = ({
|
|
|
134
134
|
applyPropositions,
|
|
135
135
|
setTargetMigration,
|
|
136
136
|
mergeDecisionsMeta,
|
|
137
|
-
|
|
137
|
+
renderedPropositions
|
|
138
138
|
});
|
|
139
139
|
};
|
|
140
140
|
createPersonalization.namespace = "Personalization";
|
|
@@ -32,19 +32,13 @@ export default (({
|
|
|
32
32
|
return {
|
|
33
33
|
createEvent,
|
|
34
34
|
/**
|
|
35
|
-
* Sends an event. This includes running the event and payload through
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @param {Object} event This will be JSON stringified and used inside
|
|
39
|
-
*
|
|
40
|
-
* @param {Object} [options]
|
|
41
|
-
*
|
|
42
|
-
* @param {Array} [options.decisionScopes] Note: this option will soon
|
|
43
|
-
* be deprecated, please use *personalization.decisionScopes* instead
|
|
44
|
-
* @param {Object} [options.personalization]
|
|
45
|
-
* @param {Object} [options.serverState]
|
|
46
|
-
* This will be passed to components
|
|
47
|
-
* so they can take appropriate action.
|
|
35
|
+
* Sends an event. This includes running the event and payload through the
|
|
36
|
+
* appropriate lifecycle hooks, sending the request to the server, and
|
|
37
|
+
* handling the response.
|
|
38
|
+
* @param {Object} event This will be JSON stringified and used inside the
|
|
39
|
+
* request payload.
|
|
40
|
+
* @param {Object} [options] Options to pass on to the onBeforeEvent
|
|
41
|
+
* lifecycle method
|
|
48
42
|
* @param {Object} [options.edgeConfigOverrides] Settings that take
|
|
49
43
|
* precedence over the global datastream configuration, including which
|
|
50
44
|
* datastream to use.
|
|
@@ -52,10 +46,8 @@ export default (({
|
|
|
52
46
|
*/
|
|
53
47
|
sendEvent(event, options = {}) {
|
|
54
48
|
const {
|
|
55
|
-
renderDecisions = false,
|
|
56
|
-
decisionScopes,
|
|
57
49
|
edgeConfigOverrides: localConfigOverrides,
|
|
58
|
-
|
|
50
|
+
...otherOptions
|
|
59
51
|
} = options;
|
|
60
52
|
const requestParams = createRequestParams({
|
|
61
53
|
payload: createDataCollectionRequestPayload(),
|
|
@@ -66,10 +58,8 @@ export default (({
|
|
|
66
58
|
const onResponseCallbackAggregator = createCallbackAggregator();
|
|
67
59
|
const onRequestFailureCallbackAggregator = createCallbackAggregator();
|
|
68
60
|
return lifecycle.onBeforeEvent({
|
|
61
|
+
...otherOptions,
|
|
69
62
|
event,
|
|
70
|
-
renderDecisions,
|
|
71
|
-
decisionScopes,
|
|
72
|
-
personalization,
|
|
73
63
|
onResponse: onResponseCallbackAggregator.add,
|
|
74
64
|
onRequestFailure: onRequestFailureCallbackAggregator.add
|
|
75
65
|
}).then(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.19.0-beta.
|
|
3
|
+
"version": "2.19.0-beta.9",
|
|
4
4
|
"description": "Adobe Experience Platform Web SDK",
|
|
5
5
|
"main": "libEs5/index.js",
|
|
6
6
|
"module": "libEs6/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"uuid": "^3.3.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@adobe/alloy": "^2.19.0-beta.
|
|
69
|
+
"@adobe/alloy": "^2.19.0-beta.7",
|
|
70
70
|
"@babel/cli": "^7.12.8",
|
|
71
71
|
"@babel/core": "^7.2.2",
|
|
72
72
|
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"eslint-config-airbnb-base": "^14.0.0",
|
|
85
85
|
"eslint-config-prettier": "^6.4.0",
|
|
86
86
|
"eslint-plugin-ban": "^1.5.2",
|
|
87
|
-
"eslint-plugin-import": "^2.
|
|
87
|
+
"eslint-plugin-import": "^2.28.1",
|
|
88
88
|
"eslint-plugin-prettier": "^3.0.1",
|
|
89
89
|
"eslint-plugin-testcafe": "^0.2.1",
|
|
90
90
|
"glob": "^7.1.3",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _surfaceUtils = require("./surfaceUtils");
|
|
5
|
-
var _pageWideScope = require("../../../constants/pageWideScope");
|
|
6
|
-
/*
|
|
7
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
8
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
governing permissions and limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
var _default = function _default(scope) {
|
|
18
|
-
return scope === _pageWideScope.default || (0, _surfaceUtils.isPageWideSurface)(scope);
|
|
19
|
-
};
|
|
20
|
-
exports.default = _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { isPageWideSurface } from "./surfaceUtils";
|
|
14
|
-
import PAGE_WIDE_SCOPE from "../../../constants/pageWideScope";
|
|
15
|
-
export default (scope => scope === PAGE_WIDE_SCOPE || isPageWideSurface(scope));
|