@adobe/alloy 2.13.0-beta.3 → 2.13.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.
@@ -8,7 +8,7 @@ var _utils = require("../../utils");
8
8
 
9
9
  var _schema = require("./constants/schema");
10
10
 
11
- var _scope = require("./constants/scope");
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 === _scope.default && proposition.renderAttempted);
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 _scope = require("./constants/scope");
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 !== _scope.default) {
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 _scope = require("./constants/scope");
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, _scope.default)) {
48
- scopes.push(_scope.default);
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, _scope.default)) {
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 _scope = require("./constants/scope");
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 === _scope.default) {
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.3";
18
+ var _default = "2.13.0";
19
19
  exports.default = _default;
@@ -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 "./constants/scope";
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 "./constants/scope";
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 "./constants/scope";
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 "./constants/scope";
15
+ import PAGE_WIDE_SCOPE from "../../constants/pageWideScope";
16
16
 
17
17
  const splitItems = (items, schemas) => {
18
18
  const matched = [];
@@ -11,4 +11,4 @@ governing permissions and limitations under the License.
11
11
  */
12
12
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
13
13
  // see babel-plugin-version
14
- export default "2.13.0-beta.3";
14
+ export default "2.13.0";
@@ -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",
3
+ "version": "2.13.0",
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.2",
67
+ "@adobe/alloy": "^2.13.0-beta.4",
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",