@adobe/alloy 2.20.0 → 2.21.0-beta.1
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/Audiences/injectProcessDestinations.js +1 -1
- package/libEs5/components/Context/index.js +1 -1
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +4 -4
- package/libEs5/components/DataCollector/index.js +2 -2
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +1 -1
- package/libEs5/components/DecisioningEngine/createContextProvider.js +1 -1
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +1 -1
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +1 -1
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +1 -1
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +1 -1
- package/libEs5/components/DecisioningEngine/index.js +1 -1
- package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +4 -4
- package/libEs5/components/Identity/createLegacyIdentity.js +1 -1
- package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +4 -4
- package/libEs5/components/LegacyMediaAnalytics/createGetInstance.js +1 -1
- package/libEs5/components/LegacyMediaAnalytics/createLegacyMediaComponent.js +1 -1
- package/libEs5/components/LibraryInfo/index.js +6 -6
- package/libEs5/components/Personalization/createApplyPropositions.js +33 -16
- package/libEs5/components/Personalization/createClickStorage.js +5 -5
- package/libEs5/components/Personalization/createFetchDataHandler.js +5 -5
- package/libEs5/components/Personalization/createInteractionStorage.js +102 -0
- package/libEs5/components/Personalization/createOnClickHandler.js +49 -21
- package/libEs5/components/Personalization/createPersonalizationDetails.js +5 -5
- package/libEs5/components/Personalization/createPreprocessors.js +1 -1
- package/libEs5/components/Personalization/dom-actions/action.js +4 -4
- package/libEs5/components/Personalization/dom-actions/appendHtml.js +2 -1
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +15 -33
- package/libEs5/components/Personalization/dom-actions/clicks/collectInteractions.js +81 -0
- package/libEs5/components/Personalization/dom-actions/collectInteractions.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/isDomElement.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +4 -4
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +36 -19
- package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +5 -2
- package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +2 -1
- package/libEs5/components/Personalization/dom-actions/prependHtml.js +2 -1
- package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +3 -1
- package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +2 -2
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +2 -2
- package/libEs5/components/Personalization/dom-actions/replaceHtml.js +4 -3
- package/libEs5/components/Personalization/dom-actions/scripts.js +1 -1
- package/libEs5/components/Personalization/dom-actions/setAttributes.js +2 -1
- package/libEs5/components/Personalization/dom-actions/setHtml.js +2 -2
- package/libEs5/components/Personalization/dom-actions/setStyles.js +4 -3
- package/libEs5/components/Personalization/dom-actions/setText.js +2 -1
- package/libEs5/components/Personalization/dom-actions/swapImage.js +2 -1
- package/libEs5/components/Personalization/event.js +1 -1
- package/libEs5/components/Personalization/flicker/index.js +1 -1
- package/libEs5/components/Personalization/handlers/createDecorateProposition.js +60 -0
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +11 -7
- package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +6 -2
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +1 -1
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +6 -6
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +13 -2
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +1 -1
- package/libEs5/components/Personalization/index.js +27 -8
- package/libEs5/components/Personalization/utils/metaUtils.js +33 -0
- package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +12 -1
- package/libEs5/components/Privacy/createComponent.js +1 -1
- package/libEs5/components/Privacy/createConsentHashStore.js +2 -2
- package/libEs5/components/Privacy/parseConsentCookie.js +4 -4
- package/libEs5/components/StreamingMedia/validateMediaEventOptions.js +5 -5
- package/libEs5/constants/decisionProvider.js +3 -2
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/constants/propositionEventType.js +1 -1
- package/libEs5/constants/propositionInteractionType.js +18 -0
- package/libEs5/core/buildAndValidateConfig.js +6 -6
- package/libEs5/core/createEvent.js +5 -5
- package/libEs5/core/createEventManager.js +3 -3
- package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +5 -5
- package/libEs5/core/network/injectSendNetworkRequest.js +1 -1
- package/libEs5/utils/assignConcatArrayValues.js +5 -5
- package/libEs5/utils/createLoggingCookieJar.js +1 -1
- package/libEs5/utils/createSubscription.js +5 -5
- package/libEs5/utils/dom/awaitSelector.js +5 -1
- package/libEs5/utils/filterObject.js +1 -1
- package/libEs5/utils/flattenArray.js +5 -5
- package/libEs5/utils/flattenObject.js +5 -5
- package/libEs5/utils/getBrowser.js +1 -1
- package/libEs5/utils/injectFireReferrerHideableImage.js +4 -4
- package/libEs5/utils/parseUrl.js +1 -1
- package/libEs5/utils/request/createRequestParams.js +2 -2
- package/libEs5/utils/validation/createDeprecatedValidator.js +3 -3
- package/libEs5/utils/validation/index.js +1 -1
- package/libEs6/components/Personalization/createApplyPropositions.js +25 -10
- package/libEs6/components/Personalization/createClickStorage.js +4 -4
- package/libEs6/components/Personalization/createInteractionStorage.js +85 -0
- package/libEs6/components/Personalization/createOnClickHandler.js +49 -22
- package/libEs6/components/Personalization/dom-actions/action.js +4 -4
- package/libEs6/components/Personalization/dom-actions/appendHtml.js +3 -2
- package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +8 -18
- package/libEs6/components/Personalization/dom-actions/clicks/collectInteractions.js +74 -0
- package/libEs6/components/Personalization/dom-actions/collectInteractions.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/isDomElement.js +12 -0
- package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +46 -16
- package/libEs6/components/Personalization/dom-actions/insertHtmlAfter.js +5 -2
- package/libEs6/components/Personalization/dom-actions/insertHtmlBefore.js +3 -2
- package/libEs6/components/Personalization/dom-actions/prependHtml.js +3 -2
- package/libEs6/components/Personalization/dom-actions/rearrangeChildren.js +3 -1
- package/libEs6/components/Personalization/dom-actions/remapCustomCodeOffers.js +2 -2
- package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +2 -2
- package/libEs6/components/Personalization/dom-actions/replaceHtml.js +4 -3
- package/libEs6/components/Personalization/dom-actions/setAttributes.js +2 -1
- package/libEs6/components/Personalization/dom-actions/setHtml.js +2 -2
- package/libEs6/components/Personalization/dom-actions/setStyles.js +2 -1
- package/libEs6/components/Personalization/dom-actions/setText.js +2 -1
- package/libEs6/components/Personalization/dom-actions/swapImage.js +3 -2
- package/libEs6/components/Personalization/handlers/createDecorateProposition.js +59 -0
- package/libEs6/components/Personalization/handlers/createProcessDomAction.js +10 -4
- package/libEs6/components/Personalization/handlers/createProcessHtmlContent.js +6 -2
- package/libEs6/components/Personalization/handlers/createProcessPropositions.js +1 -1
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +12 -1
- package/libEs6/components/Personalization/index.js +32 -8
- package/libEs6/components/Personalization/utils/metaUtils.js +23 -0
- package/libEs6/components/Personalization/validateApplyPropositionsOptions.js +12 -1
- package/libEs6/constants/decisionProvider.js +2 -1
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/constants/propositionInteractionType.js +15 -0
- package/libEs6/utils/dom/awaitSelector.js +5 -1
- package/package.json +23 -22
- package/scripts/build-alloy.js +125 -0
|
@@ -13,8 +13,9 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
13
13
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
14
|
governing permissions and limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
var _default = exports.default = function _default(container, attributes) {
|
|
16
|
+
var _default = exports.default = function _default(container, attributes, decorateProposition) {
|
|
17
17
|
Object.keys(attributes).forEach(function (key) {
|
|
18
18
|
(0, _index.setAttribute)(container, key, attributes[key]);
|
|
19
19
|
});
|
|
20
|
+
decorateProposition(container);
|
|
20
21
|
};
|
|
@@ -21,7 +21,7 @@ var clear = function clear(container) {
|
|
|
21
21
|
var childNodes = (0, _index2.getChildNodes)(container);
|
|
22
22
|
childNodes.forEach(_index.removeNode);
|
|
23
23
|
};
|
|
24
|
-
var _default = exports.default = function _default(container, html) {
|
|
24
|
+
var _default = exports.default = function _default(container, html, decorateProposition) {
|
|
25
25
|
clear(container);
|
|
26
|
-
(0, _appendHtml.default)(container, html);
|
|
26
|
+
return (0, _appendHtml.default)(container, html, decorateProposition);
|
|
27
27
|
};
|
|
@@ -14,12 +14,13 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
14
14
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
15
|
governing permissions and limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function _objectWithoutProperties(
|
|
18
|
-
function _objectWithoutPropertiesLoose(
|
|
19
|
-
var _default = exports.default = function _default(container, styles) {
|
|
17
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
19
|
+
var _default = exports.default = function _default(container, styles, decorateProposition) {
|
|
20
20
|
var priority = styles.priority,
|
|
21
21
|
style = _objectWithoutProperties(styles, _excluded);
|
|
22
22
|
Object.keys(style).forEach(function (key) {
|
|
23
23
|
(0, _index.setStyle)(container, key, style[key], priority);
|
|
24
24
|
});
|
|
25
|
+
decorateProposition(container);
|
|
25
26
|
};
|
|
@@ -12,6 +12,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
12
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
var _default = exports.default = function _default(container, text) {
|
|
15
|
+
var _default = exports.default = function _default(container, text, decorateProposition) {
|
|
16
|
+
decorateProposition(container);
|
|
16
17
|
container.textContent = text;
|
|
17
18
|
};
|
|
@@ -15,13 +15,14 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
15
15
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
16
|
governing permissions and limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
var _default = exports.default = function _default(container, url) {
|
|
18
|
+
var _default = exports.default = function _default(container, url, decorateProposition) {
|
|
19
19
|
if (!(0, _images.isImage)(container)) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// Start downloading the image
|
|
24
24
|
(0, _images.loadImage)(url);
|
|
25
|
+
decorateProposition(container);
|
|
25
26
|
|
|
26
27
|
// Remove "src" so there is no flicker
|
|
27
28
|
(0, _index.removeAttribute)(container, _elementAttribute.SRC);
|
|
@@ -5,7 +5,7 @@ var _eventType = require("../../constants/eventType.js");
|
|
|
5
5
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
11
11
|
Copyright 2019 Adobe. All rights reserved.
|
|
@@ -7,7 +7,7 @@ var _index2 = require("../dom-actions/dom/index.js");
|
|
|
7
7
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
function _defineProperty(
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
13
13
|
Copyright 2019 Adobe. All rights reserved.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = exports.INTERACT_ID_DATA_ATTRIBUTE = exports.CLICK_TOKEN_DATA_ATTRIBUTE = exports.CLICK_LABEL_DATA_ATTRIBUTE = void 0;
|
|
4
|
+
var _index = require("../dom-actions/dom/index.js");
|
|
5
|
+
var _index2 = require("../../../utils/index.js");
|
|
6
|
+
var _initDomActionsModules = require("../dom-actions/initDomActionsModules.js");
|
|
7
|
+
var _propositionInteractionType = require("../../../constants/propositionInteractionType.js");
|
|
8
|
+
/*
|
|
9
|
+
Copyright 2024 Adobe. All rights reserved.
|
|
10
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
12
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
|
|
14
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
15
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
16
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
17
|
+
governing permissions and limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
var INTERACT_ID_DATA_ATTRIBUTE = exports.INTERACT_ID_DATA_ATTRIBUTE = "data-aep-interact-id";
|
|
21
|
+
var CLICK_LABEL_DATA_ATTRIBUTE = exports.CLICK_LABEL_DATA_ATTRIBUTE = "data-aep-click-label";
|
|
22
|
+
var CLICK_TOKEN_DATA_ATTRIBUTE = exports.CLICK_TOKEN_DATA_ATTRIBUTE = "data-aep-click-token";
|
|
23
|
+
var lastInteractId = 0;
|
|
24
|
+
var getInteractId = function getInteractId(propositionId, existingInteractId) {
|
|
25
|
+
if (existingInteractId) {
|
|
26
|
+
return parseInt(existingInteractId, 10);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line no-plusplus
|
|
30
|
+
return ++lastInteractId;
|
|
31
|
+
};
|
|
32
|
+
var interactionTrackingSupported = function interactionTrackingSupported(autoCollectPropositionInteractions, decisionProvider) {
|
|
33
|
+
if (!autoCollectPropositionInteractions) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
if (!autoCollectPropositionInteractions[decisionProvider]) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return (0, _index2.includes)([_propositionInteractionType.ALWAYS, _propositionInteractionType.DECORATED_ELEMENTS_ONLY], autoCollectPropositionInteractions[decisionProvider]);
|
|
40
|
+
};
|
|
41
|
+
var createDecorateProposition = function createDecorateProposition(autoCollectPropositionInteractions, type, propositionId, itemId, trackingLabel, scopeType, notification, storeInteractionMeta) {
|
|
42
|
+
var _notification$scopeDe = notification.scopeDetails,
|
|
43
|
+
scopeDetails = _notification$scopeDe === void 0 ? {} : _notification$scopeDe;
|
|
44
|
+
var decisionProvider = scopeDetails.decisionProvider;
|
|
45
|
+
if (!interactionTrackingSupported(autoCollectPropositionInteractions, decisionProvider) && type !== _initDomActionsModules.DOM_ACTION_CLICK) {
|
|
46
|
+
return _index2.noop;
|
|
47
|
+
}
|
|
48
|
+
return function (element) {
|
|
49
|
+
if (!element.tagName) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
var interactId = getInteractId(propositionId, (0, _index.getAttribute)(element, INTERACT_ID_DATA_ATTRIBUTE));
|
|
53
|
+
storeInteractionMeta(propositionId, itemId, scopeType, notification, interactId);
|
|
54
|
+
(0, _index.setAttribute)(element, INTERACT_ID_DATA_ATTRIBUTE, interactId);
|
|
55
|
+
if (trackingLabel && !(0, _index.getAttribute)(element, CLICK_LABEL_DATA_ATTRIBUTE)) {
|
|
56
|
+
(0, _index.setAttribute)(element, CLICK_LABEL_DATA_ATTRIBUTE, trackingLabel);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
var _default = exports.default = createDecorateProposition;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
|
+
var _createDecorateProposition = require("./createDecorateProposition.js");
|
|
5
|
+
var _initDomActionsModules = require("../dom-actions/initDomActionsModules.js");
|
|
4
6
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
function _defineProperty(
|
|
9
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
10
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
-
/*
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
11
12
|
Copyright 2023 Adobe. All rights reserved.
|
|
12
13
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13
14
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -21,7 +22,9 @@ governing permissions and limitations under the License.
|
|
|
21
22
|
var _default = exports.default = function _default(_ref) {
|
|
22
23
|
var modules = _ref.modules,
|
|
23
24
|
logger = _ref.logger,
|
|
24
|
-
|
|
25
|
+
storeInteractionMeta = _ref.storeInteractionMeta,
|
|
26
|
+
storeClickMeta = _ref.storeClickMeta,
|
|
27
|
+
autoCollectPropositionInteractions = _ref.autoCollectPropositionInteractions;
|
|
25
28
|
return function (item) {
|
|
26
29
|
var _ref2 = item.getData() || {},
|
|
27
30
|
type = _ref2.type,
|
|
@@ -33,7 +36,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
33
36
|
includeInNotification: false
|
|
34
37
|
};
|
|
35
38
|
}
|
|
36
|
-
if (type ===
|
|
39
|
+
if (type === _initDomActionsModules.DOM_ACTION_CLICK) {
|
|
37
40
|
if (!selector) {
|
|
38
41
|
logger.warn("Invalid DOM action data: missing selector.", item.getData());
|
|
39
42
|
return {
|
|
@@ -41,7 +44,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
41
44
|
includeInNotification: false
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
|
-
|
|
47
|
+
storeClickMeta({
|
|
45
48
|
selector: selector,
|
|
46
49
|
meta: _objectSpread(_objectSpread({}, item.getProposition().getNotification()), {}, {
|
|
47
50
|
trackingLabel: item.getTrackingLabel(),
|
|
@@ -60,9 +63,10 @@ var _default = exports.default = function _default(_ref) {
|
|
|
60
63
|
includeInNotification: false
|
|
61
64
|
};
|
|
62
65
|
}
|
|
66
|
+
var decorateProposition = (0, _createDecorateProposition.default)(autoCollectPropositionInteractions, type, item.getProposition().getId(), item.getId(), item.getTrackingLabel(), item.getProposition().getScopeType(), item.getProposition().getNotification(), storeInteractionMeta);
|
|
63
67
|
return {
|
|
64
68
|
render: function render() {
|
|
65
|
-
return modules[type](item.getData());
|
|
69
|
+
return modules[type](item.getData(), decorateProposition);
|
|
66
70
|
},
|
|
67
71
|
setRenderAttempted: true,
|
|
68
72
|
includeInNotification: true
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
|
+
var _createDecorateProposition = require("./createDecorateProposition.js");
|
|
4
5
|
/*
|
|
5
6
|
Copyright 2023 Adobe. All rights reserved.
|
|
6
7
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -14,7 +15,9 @@ governing permissions and limitations under the License.
|
|
|
14
15
|
*/
|
|
15
16
|
var _default = exports.default = function _default(_ref) {
|
|
16
17
|
var modules = _ref.modules,
|
|
17
|
-
logger = _ref.logger
|
|
18
|
+
logger = _ref.logger,
|
|
19
|
+
storeInteractionMeta = _ref.storeInteractionMeta,
|
|
20
|
+
autoCollectPropositionInteractions = _ref.autoCollectPropositionInteractions;
|
|
18
21
|
return function (item) {
|
|
19
22
|
var _ref2 = item.getData() || {},
|
|
20
23
|
type = _ref2.type,
|
|
@@ -32,9 +35,10 @@ var _default = exports.default = function _default(_ref) {
|
|
|
32
35
|
includeInNotification: false
|
|
33
36
|
};
|
|
34
37
|
}
|
|
38
|
+
var decorateProposition = (0, _createDecorateProposition.default)(autoCollectPropositionInteractions, type, item.getProposition().getId(), item.getId(), item.getTrackingLabel(), item.getProposition().getScopeType(), item.getProposition().getNotification(), storeInteractionMeta);
|
|
35
39
|
return {
|
|
36
40
|
render: function render() {
|
|
37
|
-
modules[type](item.getData());
|
|
41
|
+
return modules[type](item.getData(), decorateProposition);
|
|
38
42
|
},
|
|
39
43
|
setRenderAttempted: true,
|
|
40
44
|
includeInNotification: true
|
|
@@ -5,7 +5,7 @@ var _contentType = require("../../../constants/contentType.js");
|
|
|
5
5
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
11
11
|
Copyright 2023 Adobe. All rights reserved.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
|
-
function _toConsumableArray(
|
|
4
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _iterableToArray(
|
|
8
|
-
function _arrayWithoutHoles(
|
|
9
|
-
function _arrayLikeToArray(
|
|
6
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10
10
|
/*
|
|
11
11
|
Copyright 2023 Adobe. All rights reserved.
|
|
12
12
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -119,7 +119,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
119
119
|
});
|
|
120
120
|
} else if (atLeastOneWithNotification) {
|
|
121
121
|
renderers.push(function () {
|
|
122
|
-
return proposition.getNotification();
|
|
122
|
+
return Promise.resolve(proposition.getNotification());
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
if (renderedItems.length > 0) {
|
|
@@ -6,7 +6,7 @@ var _scopeType = require("../constants/scopeType.js");
|
|
|
6
6
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function _defineProperty(
|
|
9
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
10
10
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
11
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
12
12
|
Copyright 2023 Adobe. All rights reserved.
|
|
@@ -23,16 +23,24 @@ var _default = exports.default = function _default(_ref) {
|
|
|
23
23
|
var preprocess = _ref.preprocess,
|
|
24
24
|
isPageWideSurface = _ref.isPageWideSurface;
|
|
25
25
|
var createItem = function createItem(item, proposition) {
|
|
26
|
-
var
|
|
26
|
+
var id = item.id,
|
|
27
|
+
schema = item.schema,
|
|
27
28
|
data = item.data,
|
|
28
29
|
_item$characteristics = item.characteristics,
|
|
29
30
|
_item$characteristics2 = _item$characteristics === void 0 ? {} : _item$characteristics,
|
|
30
31
|
trackingLabel = _item$characteristics2.trackingLabel;
|
|
32
|
+
var schemaType = data ? data.type : undefined;
|
|
31
33
|
var processedData = preprocess(data);
|
|
32
34
|
return {
|
|
35
|
+
getId: function getId() {
|
|
36
|
+
return id;
|
|
37
|
+
},
|
|
33
38
|
getSchema: function getSchema() {
|
|
34
39
|
return schema;
|
|
35
40
|
},
|
|
41
|
+
getSchemaType: function getSchemaType() {
|
|
42
|
+
return schemaType;
|
|
43
|
+
},
|
|
36
44
|
getData: function getData() {
|
|
37
45
|
return processedData;
|
|
38
46
|
},
|
|
@@ -93,6 +101,9 @@ var _default = exports.default = function _default(_ref) {
|
|
|
93
101
|
scopeDetails: scopeDetails
|
|
94
102
|
};
|
|
95
103
|
},
|
|
104
|
+
getId: function getId() {
|
|
105
|
+
return id;
|
|
106
|
+
},
|
|
96
107
|
toJSON: function toJSON() {
|
|
97
108
|
return payload;
|
|
98
109
|
},
|
package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js
CHANGED
|
@@ -11,7 +11,7 @@ var _propositionEventType = require("../../../../constants/propositionEventType.
|
|
|
11
11
|
var _eventType = require("../../../../constants/eventType.js");
|
|
12
12
|
var _createRedirect = require("../../dom-actions/createRedirect.js");
|
|
13
13
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
-
function _defineProperty(
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
17
17
|
Copyright 2023 Adobe. All rights reserved.
|
|
@@ -14,6 +14,7 @@ var _createOnClickHandler = require("./createOnClickHandler.js");
|
|
|
14
14
|
var _createViewCacheManager = require("./createViewCacheManager.js");
|
|
15
15
|
var _createViewChangeHandler = require("./createViewChangeHandler.js");
|
|
16
16
|
var _createClickStorage2 = require("./createClickStorage.js");
|
|
17
|
+
var _createInteractionStorage = require("./createInteractionStorage.js");
|
|
17
18
|
var _createApplyPropositions = require("./createApplyPropositions.js");
|
|
18
19
|
var _createGetPageLocation = require("./createGetPageLocation.js");
|
|
19
20
|
var _createSetTargetMigration = require("./createSetTargetMigration.js");
|
|
@@ -35,8 +36,11 @@ var _initInAppMessageActionsModules = require("./in-app-message-actions/initInAp
|
|
|
35
36
|
var _createRedirect = require("./dom-actions/createRedirect.js");
|
|
36
37
|
var _createNotificationHandler = require("./createNotificationHandler.js");
|
|
37
38
|
var _createHandleConsentFlicker = require("./createHandleConsentFlicker.js");
|
|
39
|
+
var _collectInteractions = require("./dom-actions/clicks/collectInteractions.js");
|
|
40
|
+
var _propositionInteractionType = require("../../constants/propositionInteractionType.js");
|
|
41
|
+
var _decisionProvider = require("../../constants/decisionProvider.js");
|
|
38
42
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
39
|
-
function _defineProperty(
|
|
43
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
40
44
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
41
45
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
42
46
|
Copyright 2019 Adobe. Ackll rights reserved.
|
|
@@ -55,15 +59,19 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
55
59
|
eventManager = _ref.eventManager,
|
|
56
60
|
consent = _ref.consent;
|
|
57
61
|
var targetMigrationEnabled = config.targetMigrationEnabled,
|
|
58
|
-
prehidingStyle = config.prehidingStyle
|
|
62
|
+
prehidingStyle = config.prehidingStyle,
|
|
63
|
+
autoCollectPropositionInteractions = config.autoCollectPropositionInteractions;
|
|
59
64
|
var collect = (0, _createCollect.default)({
|
|
60
65
|
eventManager: eventManager,
|
|
61
66
|
mergeDecisionsMeta: _event.mergeDecisionsMeta
|
|
62
67
|
});
|
|
68
|
+
var _createInteractionSto = (0, _createInteractionStorage.default)(),
|
|
69
|
+
storeInteractionMeta = _createInteractionSto.storeInteractionMeta,
|
|
70
|
+
getInteractionMetas = _createInteractionSto.getInteractionMetas;
|
|
63
71
|
var _createClickStorage = (0, _createClickStorage2.default)(),
|
|
64
|
-
|
|
72
|
+
storeClickMeta = _createClickStorage.storeClickMeta,
|
|
65
73
|
getClickSelectors = _createClickStorage.getClickSelectors,
|
|
66
|
-
|
|
74
|
+
getClickMetas = _createClickStorage.getClickMetas;
|
|
67
75
|
var getPageLocation = (0, _createGetPageLocation.default)({
|
|
68
76
|
window: window
|
|
69
77
|
});
|
|
@@ -80,10 +88,14 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
80
88
|
var schemaProcessors = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, schema.DEFAULT_CONTENT_ITEM, _processDefaultContent.default), schema.DOM_ACTION, (0, _createProcessDomAction.default)({
|
|
81
89
|
modules: domActionsModules,
|
|
82
90
|
logger: logger,
|
|
83
|
-
|
|
91
|
+
storeInteractionMeta: storeInteractionMeta,
|
|
92
|
+
storeClickMeta: storeClickMeta,
|
|
93
|
+
autoCollectPropositionInteractions: autoCollectPropositionInteractions
|
|
84
94
|
})), schema.HTML_CONTENT_ITEM, (0, _createProcessHtmlContent.default)({
|
|
85
95
|
modules: domActionsModules,
|
|
86
|
-
logger: logger
|
|
96
|
+
logger: logger,
|
|
97
|
+
storeInteractionMeta: storeInteractionMeta,
|
|
98
|
+
autoCollectPropositionInteractions: autoCollectPropositionInteractions
|
|
87
99
|
})), schema.REDIRECT_ITEM, (0, _createProcessRedirect.default)({
|
|
88
100
|
logger: logger,
|
|
89
101
|
executeRedirect: executeRedirect,
|
|
@@ -110,9 +122,12 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
110
122
|
});
|
|
111
123
|
var onClickHandler = (0, _createOnClickHandler.default)({
|
|
112
124
|
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
125
|
+
collectInteractions: _collectInteractions.default,
|
|
113
126
|
collectClicks: _collectClicks.default,
|
|
127
|
+
getInteractionMetas: getInteractionMetas,
|
|
128
|
+
getClickMetas: getClickMetas,
|
|
114
129
|
getClickSelectors: getClickSelectors,
|
|
115
|
-
|
|
130
|
+
autoCollectPropositionInteractions: autoCollectPropositionInteractions
|
|
116
131
|
});
|
|
117
132
|
var viewChangeHandler = (0, _createViewChangeHandler.default)({
|
|
118
133
|
processPropositions: processPropositions,
|
|
@@ -155,8 +170,12 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
155
170
|
});
|
|
156
171
|
};
|
|
157
172
|
createPersonalization.namespace = "Personalization";
|
|
173
|
+
var interactionConfigOptions = _propositionInteractionType.PROPOSITION_INTERACTION_TYPES.map(function (propositionInteractionType) {
|
|
174
|
+
return (0, _index.literal)(propositionInteractionType);
|
|
175
|
+
});
|
|
158
176
|
createPersonalization.configValidators = (0, _index.objectOf)({
|
|
159
177
|
prehidingStyle: (0, _index.string)().nonEmpty(),
|
|
160
|
-
targetMigrationEnabled: (0, _index.boolean)().default(false)
|
|
178
|
+
targetMigrationEnabled: (0, _index.boolean)().default(false),
|
|
179
|
+
autoCollectPropositionInteractions: (0, _index.objectOf)(_defineProperty(_defineProperty({}, _decisionProvider.ADOBE_JOURNEY_OPTIMIZER, (0, _index.anyOf)(interactionConfigOptions).default(_propositionInteractionType.ALWAYS)), _decisionProvider.ADOBE_TARGET, (0, _index.anyOf)(interactionConfigOptions).default(_propositionInteractionType.NEVER))).default(_defineProperty(_defineProperty({}, _decisionProvider.ADOBE_JOURNEY_OPTIMIZER, _propositionInteractionType.ALWAYS), _decisionProvider.ADOBE_TARGET, _propositionInteractionType.NEVER)).noUnknownFields()
|
|
161
180
|
});
|
|
162
181
|
var _default = exports.default = createPersonalization;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.dedupeMetas = exports.cleanMetas = void 0;
|
|
4
|
+
var _excluded = ["trackingLabel", "scopeType"];
|
|
5
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
6
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
7
|
+
/*
|
|
8
|
+
Copyright 2024 Adobe. All rights reserved.
|
|
9
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
governing permissions and limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
var cleanMetas = exports.cleanMetas = function cleanMetas(metas) {
|
|
19
|
+
return metas.map(function (meta) {
|
|
20
|
+
var trackingLabel = meta.trackingLabel,
|
|
21
|
+
scopeType = meta.scopeType,
|
|
22
|
+
rest = _objectWithoutProperties(meta, _excluded);
|
|
23
|
+
return rest;
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var dedupeMetas = exports.dedupeMetas = function dedupeMetas(metas) {
|
|
27
|
+
return metas.filter(function (meta, index) {
|
|
28
|
+
var stringifiedMeta = JSON.stringify(meta);
|
|
29
|
+
return index === metas.findIndex(function (innerMeta) {
|
|
30
|
+
return JSON.stringify(innerMeta) === stringifiedMeta;
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -21,7 +21,18 @@ var _default = exports.default = function _default(_ref) {
|
|
|
21
21
|
var logger = _ref.logger,
|
|
22
22
|
options = _ref.options;
|
|
23
23
|
var applyPropositionsOptionsValidator = (0, _index.objectOf)({
|
|
24
|
-
propositions: (0, _index.arrayOf)((0, _index.objectOf)(
|
|
24
|
+
propositions: (0, _index.arrayOf)((0, _index.objectOf)({
|
|
25
|
+
id: (0, _index.string)().required(),
|
|
26
|
+
scope: (0, _index.string)().required(),
|
|
27
|
+
scopeDetails: (0, _index.objectOf)({
|
|
28
|
+
decisionProvider: (0, _index.string)().required()
|
|
29
|
+
}).required(),
|
|
30
|
+
items: (0, _index.arrayOf)((0, _index.objectOf)({
|
|
31
|
+
id: (0, _index.string)().required(),
|
|
32
|
+
schema: (0, _index.string)().required(),
|
|
33
|
+
data: (0, _index.anything)().required()
|
|
34
|
+
})).nonEmpty().required()
|
|
35
|
+
}).required()).nonEmpty().required(),
|
|
25
36
|
metadata: (0, _index.objectOf)((0, _index.anything)()),
|
|
26
37
|
viewName: (0, _index.string)()
|
|
27
38
|
}).required();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _consentPurpose = require("../../constants/consentPurpose.js");
|
|
5
5
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
|
-
function _defineProperty(
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
9
9
|
Copyright 2020 Adobe. All rights reserved.
|
|
@@ -14,8 +14,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
14
14
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
15
|
governing permissions and limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function _objectWithoutProperties(
|
|
18
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
19
19
|
var getKey = function getKey(_ref) {
|
|
20
20
|
var standard = _ref.standard,
|
|
21
21
|
version = _ref.version;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
|
-
function _slicedToArray(
|
|
4
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
6
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
8
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
-
function _arrayWithHoles(
|
|
9
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
10
|
/*
|
|
11
11
|
Copyright 2019 Adobe. All rights reserved.
|
|
12
12
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _index = require("../../utils/validation/index.js");
|
|
5
5
|
var _eventTypes = require("./constants/eventTypes.js");
|
|
6
|
-
function _toConsumableArray(
|
|
6
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
7
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
function _unsupportedIterableToArray(
|
|
9
|
-
function _iterableToArray(
|
|
10
|
-
function _arrayWithoutHoles(
|
|
11
|
-
function _arrayLikeToArray(
|
|
8
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
9
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
10
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /*
|
|
12
12
|
Copyright 2023 Adobe. All rights reserved.
|
|
13
13
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
14
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports.ADOBE_JOURNEY_OPTIMIZER = void 0;
|
|
3
|
+
exports.ADOBE_TARGET = exports.ADOBE_JOURNEY_OPTIMIZER = void 0;
|
|
4
4
|
/*
|
|
5
5
|
Copyright 2023 Adobe. All rights reserved.
|
|
6
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -12,4 +12,5 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
12
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
var ADOBE_JOURNEY_OPTIMIZER = exports.ADOBE_JOURNEY_OPTIMIZER = "AJO";
|
|
15
|
+
var ADOBE_JOURNEY_OPTIMIZER = exports.ADOBE_JOURNEY_OPTIMIZER = "AJO";
|
|
16
|
+
var ADOBE_TARGET = exports.ADOBE_TARGET = "TGT";
|
|
@@ -14,4 +14,4 @@ governing permissions and limitations under the License.
|
|
|
14
14
|
*/
|
|
15
15
|
// The __VERSION__ keyword will be replace at alloy build time with the package.json version.
|
|
16
16
|
// see babel-plugin-version
|
|
17
|
-
var _default = exports.default = "2.
|
|
17
|
+
var _default = exports.default = "2.21.0-beta.1";
|