@adobe/alloy 2.19.0-beta.8 → 2.19.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.
- package/libEs5/components/DataCollector/index.js +3 -0
- package/libEs5/components/DataCollector/validateApplyResponse.js +2 -1
- package/libEs5/components/DataCollector/validateUserEventOptions.js +2 -1
- package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +32 -0
- package/libEs5/components/{Personalization/utils/isPageWideScope.js → DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js} +10 -5
- package/libEs5/components/DecisioningEngine/constants.js +31 -0
- package/libEs5/components/DecisioningEngine/createApplyResponse.js +36 -0
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +29 -0
- package/libEs5/components/DecisioningEngine/createContextProvider.js +93 -0
- package/libEs5/components/DecisioningEngine/createDecisionHistory.js +28 -0
- package/libEs5/components/DecisioningEngine/createDecisionProvider.js +51 -0
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +80 -0
- package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +49 -0
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +130 -0
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +46 -0
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +87 -0
- package/libEs5/components/DecisioningEngine/index.js +119 -0
- package/libEs5/components/DecisioningEngine/utils.js +90 -0
- package/libEs5/components/Personalization/constants/scopeType.js +6 -2
- package/libEs5/components/Personalization/createActionsProvider.js +72 -0
- package/libEs5/components/Personalization/createApplyPropositions.js +2 -2
- package/libEs5/components/Personalization/createClickStorage.js +21 -13
- package/libEs5/components/Personalization/createCollect.js +9 -4
- package/libEs5/components/Personalization/createComponent.js +5 -3
- package/libEs5/components/Personalization/createFetchDataHandler.js +2 -17
- package/libEs5/components/Personalization/createNotificationHandler.js +33 -0
- package/libEs5/components/Personalization/createOnClickHandler.js +9 -8
- package/libEs5/components/Personalization/createOnDecisionHandler.js +44 -0
- package/libEs5/components/Personalization/createPersonalizationDetails.js +8 -5
- package/libEs5/components/Personalization/createPreprocessors.js +21 -0
- package/libEs5/components/Personalization/createViewCacheManager.js +11 -3
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +43 -23
- package/libEs5/components/Personalization/dom-actions/createRedirect.js +11 -1
- package/libEs5/components/Personalization/event.js +25 -22
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +7 -1
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +76 -0
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +6 -3
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +13 -15
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +288 -0
- package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +23 -0
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +53 -0
- package/libEs5/components/Personalization/index.js +20 -7
- package/libEs5/constants/contentType.js +18 -0
- package/libEs5/{components/Personalization/constants/propositionEventType.js → constants/decisionProvider.js} +4 -8
- package/libEs5/constants/eventType.js +25 -0
- package/libEs5/{components/Personalization/constants/eventType.js → constants/handle.js} +4 -7
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/constants/propositionEventType.js +33 -0
- package/libEs5/{components/Personalization/constants → constants}/schema.js +9 -1
- package/libEs5/core/componentCreators.js +2 -1
- package/libEs5/core/createEvent.js +26 -1
- package/libEs5/core/createEventManager.js +3 -0
- package/libEs5/core/createLifecycle.js +4 -1
- package/libEs5/utils/createSubscription.js +91 -0
- package/libEs5/utils/debounce.js +30 -0
- package/libEs5/utils/dom/selectNodesWithShadow.js +10 -3
- package/libEs5/utils/flattenArray.js +37 -0
- package/libEs5/utils/flattenObject.js +43 -0
- package/libEs5/utils/index.js +7 -0
- package/libEs5/utils/parseUrl.js +70 -0
- package/libEs6/components/DataCollector/index.js +2 -0
- package/libEs6/components/DataCollector/validateApplyResponse.js +2 -1
- package/libEs6/components/DataCollector/validateUserEventOptions.js +2 -1
- package/libEs6/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +30 -0
- package/libEs6/components/{Personalization/utils/isPageWideScope.js → DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js} +13 -4
- package/libEs6/components/DecisioningEngine/constants.js +25 -0
- package/libEs6/components/DecisioningEngine/createApplyResponse.js +31 -0
- package/libEs6/components/DecisioningEngine/createConsequenceAdapter.js +29 -0
- package/libEs6/components/DecisioningEngine/createContextProvider.js +95 -0
- package/libEs6/components/DecisioningEngine/createDecisionHistory.js +25 -0
- package/libEs6/components/DecisioningEngine/createDecisionProvider.js +41 -0
- package/libEs6/components/DecisioningEngine/createEvaluableRulesetPayload.js +79 -0
- package/libEs6/components/DecisioningEngine/createEvaluateRulesetsCommand.js +45 -0
- package/libEs6/components/DecisioningEngine/createEventRegistry.js +120 -0
- package/libEs6/components/DecisioningEngine/createOnResponseHandler.js +45 -0
- package/libEs6/components/DecisioningEngine/createSubscribeRulesetItems.js +79 -0
- package/libEs6/components/DecisioningEngine/index.js +124 -0
- package/libEs6/components/DecisioningEngine/utils.js +83 -0
- package/libEs6/components/Personalization/constants/scopeType.js +3 -1
- package/libEs6/components/Personalization/createActionsProvider.js +70 -0
- package/libEs6/components/Personalization/createApplyPropositions.js +2 -2
- package/libEs6/components/Personalization/createClickStorage.js +18 -10
- package/libEs6/components/Personalization/createCollect.js +7 -4
- package/libEs6/components/Personalization/createComponent.js +5 -3
- package/libEs6/components/Personalization/createFetchDataHandler.js +3 -18
- package/libEs6/components/Personalization/createNotificationHandler.js +29 -0
- package/libEs6/components/Personalization/createOnClickHandler.js +10 -9
- package/libEs6/components/Personalization/createOnDecisionHandler.js +42 -0
- package/libEs6/components/Personalization/createPersonalizationDetails.js +8 -5
- package/libEs6/components/Personalization/createPreprocessors.js +19 -0
- package/libEs6/components/Personalization/createViewCacheManager.js +14 -4
- package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +28 -12
- package/libEs6/components/Personalization/dom-actions/createRedirect.js +10 -1
- package/libEs6/components/Personalization/event.js +14 -9
- package/libEs6/components/Personalization/handlers/createProcessDomAction.js +5 -1
- package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +77 -0
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +6 -3
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +12 -15
- package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +291 -0
- package/libEs6/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +17 -0
- package/libEs6/components/Personalization/in-app-message-actions/utils.js +49 -0
- package/libEs6/components/Personalization/index.js +22 -8
- package/libEs6/{components/Personalization/constants/eventType.js → constants/contentType.js} +3 -4
- package/libEs6/{components/Personalization/constants/propositionEventType.js → constants/decisionProvider.js} +2 -6
- package/libEs6/constants/eventType.js +17 -0
- package/libEs6/constants/handle.js +12 -0
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/constants/propositionEventType.js +33 -0
- package/libEs6/{components/Personalization/constants → constants}/schema.js +4 -0
- package/libEs6/core/componentCreators.js +2 -1
- package/libEs6/core/createEvent.js +26 -1
- package/libEs6/core/createEventManager.js +2 -0
- package/libEs6/core/createLifecycle.js +4 -1
- package/libEs6/utils/createSubscription.js +70 -0
- package/libEs6/utils/debounce.js +22 -0
- package/libEs6/utils/dom/selectNodesWithShadow.js +10 -3
- package/libEs6/utils/flattenArray.js +26 -0
- package/libEs6/utils/flattenObject.js +28 -0
- package/libEs6/utils/index.js +1 -0
- package/libEs6/utils/parseUrl.js +62 -0
- package/package.json +6 -2
package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.mobileOverlay = exports.displayHTMLContentInIframe = exports.default = exports.createIframeClickHandler = exports.createIframe = exports.buildStyleFromMobileParameters = void 0;
|
|
4
|
+
var _dom = require("../../dom-actions/dom");
|
|
5
|
+
var _utils = require("../utils");
|
|
6
|
+
var _contentType = require("../../../../constants/contentType");
|
|
7
|
+
var _utils2 = require("../../../../utils");
|
|
8
|
+
var _dom2 = require("../../../../utils/dom");
|
|
9
|
+
var _validation = require("../../../../utils/validation");
|
|
10
|
+
var _propositionEventType = require("../../../../constants/propositionEventType");
|
|
11
|
+
var _eventType = require("../../../../constants/eventType");
|
|
12
|
+
var _createRedirect = require("../../dom-actions/createRedirect");
|
|
13
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*
|
|
14
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
15
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
|
|
19
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
var MESSAGING_CONTAINER_ID = "alloy-messaging-container";
|
|
25
|
+
var OVERLAY_CONTAINER_ID = "alloy-overlay-container";
|
|
26
|
+
var IFRAME_ID = "alloy-content-iframe";
|
|
27
|
+
var dismissMessage = function dismissMessage() {
|
|
28
|
+
return [MESSAGING_CONTAINER_ID, OVERLAY_CONTAINER_ID].forEach(_utils.removeElementById);
|
|
29
|
+
};
|
|
30
|
+
var createIframeClickHandler = function createIframeClickHandler(interact) {
|
|
31
|
+
var navigateToUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _createRedirect.default)(window);
|
|
32
|
+
return function (event) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
event.stopImmediatePropagation();
|
|
35
|
+
var target = event.target;
|
|
36
|
+
var anchor = target.tagName.toLowerCase() === "a" ? target : target.closest("a");
|
|
37
|
+
if (!anchor) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
var _parseAnchor = (0, _utils.parseAnchor)(anchor),
|
|
41
|
+
action = _parseAnchor.action,
|
|
42
|
+
interaction = _parseAnchor.interaction,
|
|
43
|
+
link = _parseAnchor.link,
|
|
44
|
+
label = _parseAnchor.label,
|
|
45
|
+
uuid = _parseAnchor.uuid;
|
|
46
|
+
interact(action, {
|
|
47
|
+
label: label,
|
|
48
|
+
id: interaction,
|
|
49
|
+
uuid: uuid,
|
|
50
|
+
link: link
|
|
51
|
+
});
|
|
52
|
+
if (action === "dismiss") {
|
|
53
|
+
dismissMessage();
|
|
54
|
+
}
|
|
55
|
+
if ((0, _utils2.isNonEmptyString)(link) && link.length > 0) {
|
|
56
|
+
navigateToUrl(link, true);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
exports.createIframeClickHandler = createIframeClickHandler;
|
|
61
|
+
var createIframe = function createIframe(htmlContent, clickHandler) {
|
|
62
|
+
var parser = new DOMParser();
|
|
63
|
+
var htmlDocument = parser.parseFromString(htmlContent, _contentType.TEXT_HTML);
|
|
64
|
+
var scriptTag = htmlDocument.querySelector("script");
|
|
65
|
+
if (scriptTag) {
|
|
66
|
+
scriptTag.setAttribute("nonce", (0, _dom.getNonce)());
|
|
67
|
+
}
|
|
68
|
+
var element = (0, _dom2.createNode)("iframe", {
|
|
69
|
+
src: URL.createObjectURL(new Blob([htmlDocument.documentElement.outerHTML], {
|
|
70
|
+
type: "text/html"
|
|
71
|
+
})),
|
|
72
|
+
id: IFRAME_ID
|
|
73
|
+
});
|
|
74
|
+
element.addEventListener("load", function () {
|
|
75
|
+
var _ref = element.contentDocument || element.contentWindow.document,
|
|
76
|
+
addEventListener = _ref.addEventListener;
|
|
77
|
+
addEventListener("click", clickHandler);
|
|
78
|
+
});
|
|
79
|
+
return element;
|
|
80
|
+
};
|
|
81
|
+
exports.createIframe = createIframe;
|
|
82
|
+
var renderMessage = function renderMessage(iframe, webParameters, container, overlay) {
|
|
83
|
+
[{
|
|
84
|
+
id: OVERLAY_CONTAINER_ID,
|
|
85
|
+
element: overlay
|
|
86
|
+
}, {
|
|
87
|
+
id: MESSAGING_CONTAINER_ID,
|
|
88
|
+
element: container
|
|
89
|
+
}, {
|
|
90
|
+
id: IFRAME_ID,
|
|
91
|
+
element: iframe
|
|
92
|
+
}].forEach(function (_ref2) {
|
|
93
|
+
var id = _ref2.id,
|
|
94
|
+
element = _ref2.element;
|
|
95
|
+
var _webParameters$id = webParameters[id],
|
|
96
|
+
_webParameters$id$sty = _webParameters$id.style,
|
|
97
|
+
style = _webParameters$id$sty === void 0 ? {} : _webParameters$id$sty,
|
|
98
|
+
_webParameters$id$par = _webParameters$id.params,
|
|
99
|
+
params = _webParameters$id$par === void 0 ? {} : _webParameters$id$par;
|
|
100
|
+
(0, _utils2.assign)(element.style, style);
|
|
101
|
+
var _params$parentElement = params.parentElement,
|
|
102
|
+
parentElement = _params$parentElement === void 0 ? "body" : _params$parentElement,
|
|
103
|
+
_params$insertionMeth = params.insertionMethod,
|
|
104
|
+
insertionMethod = _params$insertionMeth === void 0 ? "appendChild" : _params$insertionMeth,
|
|
105
|
+
_params$enabled = params.enabled,
|
|
106
|
+
enabled = _params$enabled === void 0 ? true : _params$enabled;
|
|
107
|
+
var parent = document.querySelector(parentElement);
|
|
108
|
+
if (enabled && parent && typeof parent[insertionMethod] === "function") {
|
|
109
|
+
parent[insertionMethod](element);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
var buildStyleFromMobileParameters = function buildStyleFromMobileParameters(mobileParameters) {
|
|
114
|
+
var verticalAlign = mobileParameters.verticalAlign,
|
|
115
|
+
width = mobileParameters.width,
|
|
116
|
+
horizontalAlign = mobileParameters.horizontalAlign,
|
|
117
|
+
backdropColor = mobileParameters.backdropColor,
|
|
118
|
+
height = mobileParameters.height,
|
|
119
|
+
cornerRadius = mobileParameters.cornerRadius,
|
|
120
|
+
horizontalInset = mobileParameters.horizontalInset,
|
|
121
|
+
verticalInset = mobileParameters.verticalInset,
|
|
122
|
+
_mobileParameters$uiT = mobileParameters.uiTakeover,
|
|
123
|
+
uiTakeover = _mobileParameters$uiT === void 0 ? false : _mobileParameters$uiT;
|
|
124
|
+
var style = {
|
|
125
|
+
width: width ? width + "%" : "100%",
|
|
126
|
+
backgroundColor: backdropColor || "rgba(0, 0, 0, 0.5)",
|
|
127
|
+
borderRadius: cornerRadius ? cornerRadius + "px" : "0px",
|
|
128
|
+
border: "none",
|
|
129
|
+
position: uiTakeover ? "fixed" : "relative",
|
|
130
|
+
overflow: "hidden"
|
|
131
|
+
};
|
|
132
|
+
if (horizontalAlign === "left") {
|
|
133
|
+
style.left = horizontalInset ? horizontalInset + "%" : "0";
|
|
134
|
+
} else if (horizontalAlign === "right") {
|
|
135
|
+
style.right = horizontalInset ? horizontalInset + "%" : "0";
|
|
136
|
+
} else if (horizontalAlign === "center") {
|
|
137
|
+
style.left = "50%";
|
|
138
|
+
style.transform = "translateX(-50%)";
|
|
139
|
+
}
|
|
140
|
+
if (verticalAlign === "top") {
|
|
141
|
+
style.top = verticalInset ? verticalInset + "%" : "0";
|
|
142
|
+
} else if (verticalAlign === "bottom") {
|
|
143
|
+
style.position = "fixed";
|
|
144
|
+
style.bottom = verticalInset ? verticalInset + "%" : "0";
|
|
145
|
+
} else if (verticalAlign === "center") {
|
|
146
|
+
style.top = "50%";
|
|
147
|
+
style.transform = (horizontalAlign === "center" ? style.transform + " " : "") + "translateY(-50%)";
|
|
148
|
+
style.display = "flex";
|
|
149
|
+
style.alignItems = "center";
|
|
150
|
+
style.justifyContent = "center";
|
|
151
|
+
}
|
|
152
|
+
if (height) {
|
|
153
|
+
style.height = height + "vh";
|
|
154
|
+
} else {
|
|
155
|
+
style.height = "100%";
|
|
156
|
+
}
|
|
157
|
+
return style;
|
|
158
|
+
};
|
|
159
|
+
exports.buildStyleFromMobileParameters = buildStyleFromMobileParameters;
|
|
160
|
+
var mobileOverlay = function mobileOverlay(mobileParameters) {
|
|
161
|
+
var backdropOpacity = mobileParameters.backdropOpacity,
|
|
162
|
+
backdropColor = mobileParameters.backdropColor;
|
|
163
|
+
var opacity = backdropOpacity || 0.5;
|
|
164
|
+
var color = backdropColor || "#FFFFFF";
|
|
165
|
+
var style = {
|
|
166
|
+
position: "fixed",
|
|
167
|
+
top: "0",
|
|
168
|
+
left: "0",
|
|
169
|
+
width: "100%",
|
|
170
|
+
height: "100%",
|
|
171
|
+
background: "transparent",
|
|
172
|
+
opacity: opacity,
|
|
173
|
+
backgroundColor: color
|
|
174
|
+
};
|
|
175
|
+
return style;
|
|
176
|
+
};
|
|
177
|
+
exports.mobileOverlay = mobileOverlay;
|
|
178
|
+
var REQUIRED_PARAMS = ["enabled", "parentElement", "insertionMethod"];
|
|
179
|
+
var isValidWebParameters = function isValidWebParameters(webParameters) {
|
|
180
|
+
if (!webParameters) {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
var ids = Object.keys(webParameters);
|
|
184
|
+
if (!(0, _utils2.includes)(ids, MESSAGING_CONTAINER_ID)) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
if (!(0, _utils2.includes)(ids, OVERLAY_CONTAINER_ID)) {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
var valuesArray = (0, _utils2.values)(webParameters);
|
|
191
|
+
for (var i = 0; i < valuesArray.length; i += 1) {
|
|
192
|
+
if (!(0, _validation.objectOf)(valuesArray[i], "style")) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
if (!(0, _validation.objectOf)(valuesArray[i], "params")) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
for (var j = 0; j < REQUIRED_PARAMS.length; j += 1) {
|
|
199
|
+
if (!(0, _validation.objectOf)(valuesArray[i].params, REQUIRED_PARAMS[j])) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return true;
|
|
205
|
+
};
|
|
206
|
+
var generateWebParameters = function generateWebParameters(mobileParameters) {
|
|
207
|
+
var _ref3;
|
|
208
|
+
if (!mobileParameters) {
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
+
var _mobileParameters$uiT2 = mobileParameters.uiTakeover,
|
|
212
|
+
uiTakeover = _mobileParameters$uiT2 === void 0 ? false : _mobileParameters$uiT2;
|
|
213
|
+
return _ref3 = {}, _defineProperty(_ref3, IFRAME_ID, {
|
|
214
|
+
style: {
|
|
215
|
+
border: "none",
|
|
216
|
+
width: "100%",
|
|
217
|
+
height: "100%"
|
|
218
|
+
},
|
|
219
|
+
params: {
|
|
220
|
+
enabled: true,
|
|
221
|
+
parentElement: "#alloy-messaging-container",
|
|
222
|
+
insertionMethod: "appendChild"
|
|
223
|
+
}
|
|
224
|
+
}), _defineProperty(_ref3, MESSAGING_CONTAINER_ID, {
|
|
225
|
+
style: buildStyleFromMobileParameters(mobileParameters),
|
|
226
|
+
params: {
|
|
227
|
+
enabled: true,
|
|
228
|
+
parentElement: "body",
|
|
229
|
+
insertionMethod: "appendChild"
|
|
230
|
+
}
|
|
231
|
+
}), _defineProperty(_ref3, OVERLAY_CONTAINER_ID, {
|
|
232
|
+
style: mobileOverlay(mobileParameters),
|
|
233
|
+
params: {
|
|
234
|
+
enabled: uiTakeover === true,
|
|
235
|
+
parentElement: "body",
|
|
236
|
+
insertionMethod: "appendChild"
|
|
237
|
+
}
|
|
238
|
+
}), _ref3;
|
|
239
|
+
};
|
|
240
|
+
var displayHTMLContentInIframe = function displayHTMLContentInIframe() {
|
|
241
|
+
var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
242
|
+
var interact = arguments.length > 1 ? arguments[1] : undefined;
|
|
243
|
+
dismissMessage();
|
|
244
|
+
var content = settings.content,
|
|
245
|
+
contentType = settings.contentType,
|
|
246
|
+
mobileParameters = settings.mobileParameters;
|
|
247
|
+
var webParameters = settings.webParameters;
|
|
248
|
+
if (contentType !== _contentType.TEXT_HTML) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
var container = (0, _dom2.createNode)("div", {
|
|
252
|
+
id: MESSAGING_CONTAINER_ID
|
|
253
|
+
});
|
|
254
|
+
var iframe = createIframe(content, createIframeClickHandler(interact));
|
|
255
|
+
var overlay = (0, _dom2.createNode)("div", {
|
|
256
|
+
id: OVERLAY_CONTAINER_ID
|
|
257
|
+
});
|
|
258
|
+
if (!isValidWebParameters(webParameters)) {
|
|
259
|
+
webParameters = generateWebParameters(mobileParameters);
|
|
260
|
+
}
|
|
261
|
+
if (!webParameters) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
renderMessage(iframe, webParameters, container, overlay);
|
|
265
|
+
};
|
|
266
|
+
exports.displayHTMLContentInIframe = displayHTMLContentInIframe;
|
|
267
|
+
var _default = function _default(settings, collect) {
|
|
268
|
+
return new Promise(function (resolve) {
|
|
269
|
+
var meta = settings.meta;
|
|
270
|
+
displayHTMLContentInIframe(settings, function (action, propositionAction) {
|
|
271
|
+
var propositionEventTypes = {};
|
|
272
|
+
propositionEventTypes[_propositionEventType.PropositionEventType.INTERACT] = _eventType.EVENT_TYPE_TRUE;
|
|
273
|
+
if (Object.values(_propositionEventType.PropositionEventType).indexOf(action) !== -1) {
|
|
274
|
+
propositionEventTypes[action] = _eventType.EVENT_TYPE_TRUE;
|
|
275
|
+
}
|
|
276
|
+
collect({
|
|
277
|
+
decisionsMeta: [meta],
|
|
278
|
+
propositionAction: propositionAction,
|
|
279
|
+
eventType: _eventType.INTERACT,
|
|
280
|
+
propositionEventTypes: Object.keys(propositionEventTypes)
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
resolve({
|
|
284
|
+
meta: meta
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
exports.default = _default;
|
package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var _displayIframeContent = require("./actions/displayIframeContent");
|
|
5
|
+
/*
|
|
6
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
7
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
+
governing permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
var _default = function _default(collect) {
|
|
17
|
+
return {
|
|
18
|
+
defaultContent: function defaultContent(settings) {
|
|
19
|
+
return (0, _displayIframeContent.default)(settings, collect);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.removeElementById = exports.parseAnchor = void 0;
|
|
4
|
+
var _utils = require("../../../utils");
|
|
5
|
+
var _dom = require("../../../utils/dom");
|
|
6
|
+
/*
|
|
7
|
+
Copyright 2023 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
|
+
|
|
18
|
+
var removeElementById = function removeElementById(id) {
|
|
19
|
+
var element = (0, _dom.selectNodes)("#" + id, document);
|
|
20
|
+
if (element && element.length > 0) {
|
|
21
|
+
(0, _dom.removeNode)(element[0]);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.removeElementById = removeElementById;
|
|
25
|
+
var parseAnchor = function parseAnchor(anchor) {
|
|
26
|
+
var nothing = {};
|
|
27
|
+
if (!anchor || anchor.tagName.toLowerCase() !== "a") {
|
|
28
|
+
return nothing;
|
|
29
|
+
}
|
|
30
|
+
var href = anchor.href;
|
|
31
|
+
if (!href || !(0, _utils.startsWith)(href, "adbinapp://")) {
|
|
32
|
+
return nothing;
|
|
33
|
+
}
|
|
34
|
+
var hrefParts = href.split("?");
|
|
35
|
+
var action = hrefParts[0].split("://")[1];
|
|
36
|
+
var label = anchor.innerText;
|
|
37
|
+
var uuid = anchor.getAttribute("data-uuid") || "";
|
|
38
|
+
var interaction;
|
|
39
|
+
var link;
|
|
40
|
+
if ((0, _utils.isNonEmptyArray)(hrefParts)) {
|
|
41
|
+
var queryParams = _utils.queryString.parse(hrefParts[1]);
|
|
42
|
+
interaction = queryParams.interaction || "";
|
|
43
|
+
link = decodeURIComponent(queryParams.link || "");
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
action: action,
|
|
47
|
+
interaction: interaction,
|
|
48
|
+
link: link,
|
|
49
|
+
label: label,
|
|
50
|
+
uuid: uuid
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
exports.parseAnchor = parseAnchor;
|
|
@@ -22,14 +22,18 @@ var _remapHeadOffers = require("./dom-actions/remapHeadOffers");
|
|
|
22
22
|
var _createPreprocess = require("./dom-actions/createPreprocess");
|
|
23
23
|
var _injectCreateProposition = require("./handlers/injectCreateProposition");
|
|
24
24
|
var _createAsyncArray = require("./utils/createAsyncArray");
|
|
25
|
-
var schema = require("
|
|
25
|
+
var schema = require("../../constants/schema");
|
|
26
26
|
var _processDefaultContent = require("./handlers/processDefaultContent");
|
|
27
27
|
var _surfaceUtils = require("./utils/surfaceUtils");
|
|
28
28
|
var _createProcessDomAction = require("./handlers/createProcessDomAction");
|
|
29
29
|
var _createProcessHtmlContent = require("./handlers/createProcessHtmlContent");
|
|
30
30
|
var _createProcessRedirect = require("./handlers/createProcessRedirect");
|
|
31
31
|
var _createProcessPropositions = require("./handlers/createProcessPropositions");
|
|
32
|
+
var _createOnDecisionHandler = require("./createOnDecisionHandler");
|
|
33
|
+
var _createProcessInAppMessage = require("./handlers/createProcessInAppMessage");
|
|
34
|
+
var _initInAppMessageActionsModules = require("./in-app-message-actions/initInAppMessageActionsModules");
|
|
32
35
|
var _createRedirect = require("./dom-actions/createRedirect");
|
|
36
|
+
var _createNotificationHandler = require("./createNotificationHandler");
|
|
33
37
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*
|
|
34
38
|
Copyright 2019 Adobe. All rights reserved.
|
|
35
39
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -59,7 +63,7 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
59
63
|
var getPageLocation = (0, _createGetPageLocation.default)({
|
|
60
64
|
window: window
|
|
61
65
|
});
|
|
62
|
-
var
|
|
66
|
+
var domActionsModules = (0, _domActions.initDomActionsModules)();
|
|
63
67
|
var preprocess = (0, _createPreprocess.default)([_remapHeadOffers.default, _remapCustomCodeOffers.default]);
|
|
64
68
|
var createProposition = (0, _injectCreateProposition.default)({
|
|
65
69
|
preprocess: preprocess,
|
|
@@ -70,31 +74,34 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
70
74
|
});
|
|
71
75
|
var executeRedirect = (0, _createRedirect.default)(window);
|
|
72
76
|
var schemaProcessors = (_schemaProcessors = {}, _defineProperty(_schemaProcessors, schema.DEFAULT_CONTENT_ITEM, _processDefaultContent.default), _defineProperty(_schemaProcessors, schema.DOM_ACTION, (0, _createProcessDomAction.default)({
|
|
73
|
-
modules:
|
|
77
|
+
modules: domActionsModules,
|
|
74
78
|
logger: logger,
|
|
75
79
|
storeClickMetrics: storeClickMetrics
|
|
76
80
|
})), _defineProperty(_schemaProcessors, schema.HTML_CONTENT_ITEM, (0, _createProcessHtmlContent.default)({
|
|
77
|
-
modules:
|
|
81
|
+
modules: domActionsModules,
|
|
78
82
|
logger: logger
|
|
79
83
|
})), _defineProperty(_schemaProcessors, schema.REDIRECT_ITEM, (0, _createProcessRedirect.default)({
|
|
80
84
|
logger: logger,
|
|
81
85
|
executeRedirect: executeRedirect,
|
|
82
86
|
collect: collect
|
|
87
|
+
})), _defineProperty(_schemaProcessors, schema.MESSAGE_IN_APP, (0, _createProcessInAppMessage.default)({
|
|
88
|
+
modules: (0, _initInAppMessageActionsModules.default)(collect),
|
|
89
|
+
logger: logger
|
|
83
90
|
})), _schemaProcessors);
|
|
84
91
|
var processPropositions = (0, _createProcessPropositions.default)({
|
|
85
92
|
schemaProcessors: schemaProcessors,
|
|
86
93
|
logger: logger
|
|
87
94
|
});
|
|
88
95
|
var renderedPropositions = (0, _createAsyncArray.default)();
|
|
96
|
+
var notificationHandler = (0, _createNotificationHandler.default)(collect, renderedPropositions);
|
|
89
97
|
var fetchDataHandler = (0, _createFetchDataHandler.default)({
|
|
90
98
|
prehidingStyle: prehidingStyle,
|
|
91
99
|
showContainers: _flicker.showContainers,
|
|
92
100
|
hideContainers: _flicker.hideContainers,
|
|
93
101
|
mergeQuery: _event.mergeQuery,
|
|
94
|
-
collect: collect,
|
|
95
102
|
processPropositions: processPropositions,
|
|
96
103
|
createProposition: createProposition,
|
|
97
|
-
|
|
104
|
+
notificationHandler: notificationHandler
|
|
98
105
|
});
|
|
99
106
|
var onClickHandler = (0, _createOnClickHandler.default)({
|
|
100
107
|
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
@@ -115,6 +122,11 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
115
122
|
var setTargetMigration = (0, _createSetTargetMigration.default)({
|
|
116
123
|
targetMigrationEnabled: targetMigrationEnabled
|
|
117
124
|
});
|
|
125
|
+
var onDecisionHandler = (0, _createOnDecisionHandler.default)({
|
|
126
|
+
processPropositions: processPropositions,
|
|
127
|
+
createProposition: createProposition,
|
|
128
|
+
notificationHandler: notificationHandler
|
|
129
|
+
});
|
|
118
130
|
return (0, _createComponent.default)({
|
|
119
131
|
getPageLocation: getPageLocation,
|
|
120
132
|
logger: logger,
|
|
@@ -128,7 +140,8 @@ var createPersonalization = function createPersonalization(_ref) {
|
|
|
128
140
|
applyPropositions: applyPropositions,
|
|
129
141
|
setTargetMigration: setTargetMigration,
|
|
130
142
|
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
131
|
-
renderedPropositions: renderedPropositions
|
|
143
|
+
renderedPropositions: renderedPropositions,
|
|
144
|
+
onDecisionHandler: onDecisionHandler
|
|
132
145
|
});
|
|
133
146
|
};
|
|
134
147
|
createPersonalization.namespace = "Personalization";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.TEXT_HTML = exports.APPLICATION_JSON = void 0;
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
6
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
+
governing permissions and limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
var TEXT_HTML = "text/html";
|
|
16
|
+
exports.TEXT_HTML = TEXT_HTML;
|
|
17
|
+
var APPLICATION_JSON = "application/json";
|
|
18
|
+
exports.APPLICATION_JSON = APPLICATION_JSON;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports.
|
|
3
|
+
exports.ADOBE_JOURNEY_OPTIMIZER = void 0;
|
|
4
4
|
/*
|
|
5
|
-
Copyright
|
|
5
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
6
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
8
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -12,9 +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
|
-
|
|
16
|
-
|
|
17
|
-
DISPLAY: "display",
|
|
18
|
-
INTERACT: "interact"
|
|
19
|
-
};
|
|
20
|
-
exports.PropositionEventType = PropositionEventType;
|
|
15
|
+
var ADOBE_JOURNEY_OPTIMIZER = "AJO";
|
|
16
|
+
exports.ADOBE_JOURNEY_OPTIMIZER = ADOBE_JOURNEY_OPTIMIZER;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.TRIGGER = exports.INTERACT = exports.EVENT_TYPE_TRUE = exports.DISPLAY = exports.DISMISS = void 0;
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2022 Adobe. All rights reserved.
|
|
6
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
+
governing permissions and limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
var DISPLAY = "decisioning.propositionDisplay";
|
|
17
|
+
exports.DISPLAY = DISPLAY;
|
|
18
|
+
var INTERACT = "decisioning.propositionInteract";
|
|
19
|
+
exports.INTERACT = INTERACT;
|
|
20
|
+
var TRIGGER = "decisioning.propositionTrigger";
|
|
21
|
+
exports.TRIGGER = TRIGGER;
|
|
22
|
+
var DISMISS = "decisioning.propositionDismiss";
|
|
23
|
+
exports.DISMISS = DISMISS;
|
|
24
|
+
var EVENT_TYPE_TRUE = 1;
|
|
25
|
+
exports.EVENT_TYPE_TRUE = EVENT_TYPE_TRUE;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports.
|
|
3
|
+
exports.PERSONALIZATION_DECISIONS_HANDLE = void 0;
|
|
4
4
|
/*
|
|
5
|
-
Copyright
|
|
5
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
6
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
8
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -12,8 +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
|
-
|
|
16
|
-
|
|
17
|
-
exports.DISPLAY = DISPLAY;
|
|
18
|
-
var INTERACT = "decisioning.propositionInteract";
|
|
19
|
-
exports.INTERACT = INTERACT;
|
|
15
|
+
var PERSONALIZATION_DECISIONS_HANDLE = "personalization:decisions";
|
|
16
|
+
exports.PERSONALIZATION_DECISIONS_HANDLE = PERSONALIZATION_DECISIONS_HANDLE;
|
|
@@ -14,5 +14,5 @@ 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 = "2.19.0
|
|
17
|
+
var _default = "2.19.0";
|
|
18
18
|
exports.default = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.getPropositionEventType = exports.getEventType = exports.PropositionEventType = void 0;
|
|
4
|
+
var _eventType = require("./eventType");
|
|
5
|
+
var _eventTypeToPropositi, _propositionEventType;
|
|
6
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*
|
|
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 PropositionEventType = {
|
|
18
|
+
DISPLAY: "display",
|
|
19
|
+
INTERACT: "interact",
|
|
20
|
+
TRIGGER: "trigger",
|
|
21
|
+
DISMISS: "dismiss"
|
|
22
|
+
};
|
|
23
|
+
exports.PropositionEventType = PropositionEventType;
|
|
24
|
+
var eventTypeToPropositionEventTypeMapping = (_eventTypeToPropositi = {}, _defineProperty(_eventTypeToPropositi, _eventType.DISPLAY, PropositionEventType.DISPLAY), _defineProperty(_eventTypeToPropositi, _eventType.INTERACT, PropositionEventType.INTERACT), _defineProperty(_eventTypeToPropositi, _eventType.TRIGGER, PropositionEventType.TRIGGER), _defineProperty(_eventTypeToPropositi, _eventType.DISMISS, PropositionEventType.DISMISS), _eventTypeToPropositi);
|
|
25
|
+
var propositionEventTypeToEventTypeMapping = (_propositionEventType = {}, _defineProperty(_propositionEventType, PropositionEventType.DISPLAY, _eventType.DISPLAY), _defineProperty(_propositionEventType, PropositionEventType.INTERACT, _eventType.INTERACT), _defineProperty(_propositionEventType, PropositionEventType.TRIGGER, _eventType.TRIGGER), _defineProperty(_propositionEventType, PropositionEventType.DISMISS, _eventType.DISMISS), _propositionEventType);
|
|
26
|
+
var getPropositionEventType = function getPropositionEventType(eventType) {
|
|
27
|
+
return eventTypeToPropositionEventTypeMapping[eventType];
|
|
28
|
+
};
|
|
29
|
+
exports.getPropositionEventType = getPropositionEventType;
|
|
30
|
+
var getEventType = function getEventType(propositionEventType) {
|
|
31
|
+
return propositionEventTypeToEventTypeMapping[propositionEventType];
|
|
32
|
+
};
|
|
33
|
+
exports.getEventType = getEventType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports.REDIRECT_ITEM = exports.MEASUREMENT_SCHEMA = exports.JSON_CONTENT_ITEM = exports.HTML_CONTENT_ITEM = exports.DOM_ACTION = exports.DEFAULT_CONTENT_ITEM = void 0;
|
|
3
|
+
exports.RULESET_ITEM = exports.REDIRECT_ITEM = exports.MESSAGE_NATIVE_ALERT = exports.MESSAGE_IN_APP = exports.MESSAGE_FEED_ITEM = exports.MEASUREMENT_SCHEMA = exports.JSON_CONTENT_ITEM = exports.HTML_CONTENT_ITEM = exports.DOM_ACTION = exports.DEFAULT_CONTENT_ITEM = void 0;
|
|
4
4
|
/*
|
|
5
5
|
Copyright 2019 Adobe. All rights reserved.
|
|
6
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -21,7 +21,15 @@ var HTML_CONTENT_ITEM = "https://ns.adobe.com/personalization/html-content-item"
|
|
|
21
21
|
exports.HTML_CONTENT_ITEM = HTML_CONTENT_ITEM;
|
|
22
22
|
var JSON_CONTENT_ITEM = "https://ns.adobe.com/personalization/json-content-item";
|
|
23
23
|
exports.JSON_CONTENT_ITEM = JSON_CONTENT_ITEM;
|
|
24
|
+
var RULESET_ITEM = "https://ns.adobe.com/personalization/ruleset-item";
|
|
25
|
+
exports.RULESET_ITEM = RULESET_ITEM;
|
|
24
26
|
var REDIRECT_ITEM = "https://ns.adobe.com/personalization/redirect-item";
|
|
25
27
|
exports.REDIRECT_ITEM = REDIRECT_ITEM;
|
|
28
|
+
var MESSAGE_IN_APP = "https://ns.adobe.com/personalization/message/in-app";
|
|
29
|
+
exports.MESSAGE_IN_APP = MESSAGE_IN_APP;
|
|
30
|
+
var MESSAGE_FEED_ITEM = "https://ns.adobe.com/personalization/message/feed-item";
|
|
31
|
+
exports.MESSAGE_FEED_ITEM = MESSAGE_FEED_ITEM;
|
|
32
|
+
var MESSAGE_NATIVE_ALERT = "https://ns.adobe.com/personalization/message/native-alert";
|
|
33
|
+
exports.MESSAGE_NATIVE_ALERT = MESSAGE_NATIVE_ALERT;
|
|
26
34
|
var MEASUREMENT_SCHEMA = "https://ns.adobe.com/personalization/measurement";
|
|
27
35
|
exports.MEASUREMENT_SCHEMA = MEASUREMENT_SCHEMA;
|
|
@@ -10,6 +10,7 @@ var _Context = require("../components/Context");
|
|
|
10
10
|
var _Privacy = require("../components/Privacy");
|
|
11
11
|
var _EventMerge = require("../components/EventMerge");
|
|
12
12
|
var _LibraryInfo = require("../components/LibraryInfo");
|
|
13
|
+
var _DecisioningEngine = require("../components/DecisioningEngine");
|
|
13
14
|
var _MachineLearning = require("../components/MachineLearning");
|
|
14
15
|
/*
|
|
15
16
|
Copyright 2019 Adobe. All rights reserved.
|
|
@@ -27,5 +28,5 @@ governing permissions and limitations under the License.
|
|
|
27
28
|
/* eslint-disable import/no-restricted-paths */
|
|
28
29
|
// TODO: Register the Components here statically for now. They might be registered differently.
|
|
29
30
|
// TODO: Figure out how sub-components will be made available/registered
|
|
30
|
-
var _default = [_DataCollector.default, _ActivityCollector.default, _Identity.default, _Audiences.default, _Personalization.default, _Context.default, _Privacy.default, _EventMerge.default, _LibraryInfo.default, _MachineLearning.default];
|
|
31
|
+
var _default = [_DataCollector.default, _ActivityCollector.default, _Identity.default, _Audiences.default, _Personalization.default, _Context.default, _Privacy.default, _EventMerge.default, _LibraryInfo.default, _MachineLearning.default, _DecisioningEngine.default];
|
|
31
32
|
exports.default = _default;
|