@adobe/alloy 2.6.4 → 2.8.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.
Files changed (65) hide show
  1. package/libEs5/components/ActivityCollector/utils.js +1 -1
  2. package/libEs5/components/Audiences/index.js +6 -8
  3. package/libEs5/components/Audiences/injectProcessResponse.js +44 -0
  4. package/libEs5/components/MachineLearning/index.js +30 -0
  5. package/libEs5/components/MachineLearning/processResponse.js +22 -0
  6. package/libEs5/components/Personalization/createCollect.js +1 -1
  7. package/libEs5/components/Personalization/createOnClickHandler.js +1 -1
  8. package/libEs5/components/Personalization/createViewCollect.js +1 -1
  9. package/libEs5/components/Personalization/dom-actions/action.js +25 -25
  10. package/libEs5/components/Personalization/dom-actions/appendHtml.js +1 -1
  11. package/libEs5/components/Personalization/dom-actions/dom/index.js +26 -26
  12. package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +1 -1
  13. package/libEs5/components/Personalization/dom-actions/index.js +4 -4
  14. package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +1 -1
  15. package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +1 -1
  16. package/libEs5/components/Personalization/dom-actions/prependHtml.js +1 -1
  17. package/libEs5/components/Personalization/dom-actions/scripts.js +6 -5
  18. package/libEs5/components/Personalization/dom-actions/setStyles.js +3 -1
  19. package/libEs5/components/Personalization/event.js +2 -2
  20. package/libEs5/components/Personalization/flicker/index.js +3 -3
  21. package/libEs5/components/Personalization/groupDecisions.js +1 -1
  22. package/libEs5/components/Privacy/computeConsentHash.js +1 -1
  23. package/libEs5/components/Privacy/createConsentHashStore.js +3 -1
  24. package/libEs5/components/Privacy/parseConsentCookie.js +1 -1
  25. package/libEs5/constants/cookieNameKey.js +1 -1
  26. package/libEs5/constants/httpHeaderNames.js +1 -1
  27. package/libEs5/constants/httpStatusCode.js +1 -1
  28. package/libEs5/constants/libraryVersion.js +1 -1
  29. package/libEs5/constants/shadowSeparator.js +17 -0
  30. package/libEs5/constants/tagName.js +1 -1
  31. package/libEs5/core/componentCreators.js +3 -1
  32. package/libEs5/core/consent/createConsentStateMachine.js +1 -1
  33. package/libEs5/core/network/injectSendNetworkRequest.js +2 -2
  34. package/libEs5/utils/convertTimes.js +1 -1
  35. package/libEs5/utils/dom/awaitSelector.js +1 -1
  36. package/libEs5/utils/dom/index.js +21 -5
  37. package/libEs5/utils/dom/isShadowSelector.js +22 -0
  38. package/libEs5/utils/dom/querySelectorAll.js +22 -0
  39. package/libEs5/utils/dom/selectNodes.js +11 -2
  40. package/libEs5/utils/dom/selectNodesWithShadow.js +74 -0
  41. package/libEs5/utils/fireReferrerHideableImage.js +1 -1
  42. package/libEs5/utils/index.js +20 -20
  43. package/libEs5/utils/isObject.js +1 -1
  44. package/libEs5/utils/validation/index.js +1 -1
  45. package/libEs6/components/Audiences/index.js +5 -9
  46. package/libEs6/components/Audiences/injectProcessResponse.js +39 -0
  47. package/libEs6/components/MachineLearning/index.js +25 -0
  48. package/libEs6/components/MachineLearning/processResponse.js +17 -0
  49. package/libEs6/components/Personalization/createCollect.js +1 -1
  50. package/libEs6/components/Personalization/createOnClickHandler.js +1 -1
  51. package/libEs6/components/Personalization/createViewCollect.js +1 -1
  52. package/libEs6/components/Personalization/dom-actions/appendHtml.js +1 -1
  53. package/libEs6/components/Personalization/dom-actions/insertHtmlAfter.js +1 -1
  54. package/libEs6/components/Personalization/dom-actions/insertHtmlBefore.js +1 -1
  55. package/libEs6/components/Personalization/dom-actions/prependHtml.js +1 -1
  56. package/libEs6/components/Personalization/dom-actions/scripts.js +5 -2
  57. package/libEs6/constants/libraryVersion.js +1 -1
  58. package/libEs6/constants/shadowSeparator.js +12 -0
  59. package/libEs6/core/componentCreators.js +3 -2
  60. package/libEs6/utils/dom/index.js +3 -1
  61. package/libEs6/utils/dom/isShadowSelector.js +13 -0
  62. package/libEs6/utils/dom/querySelectorAll.js +13 -0
  63. package/libEs6/utils/dom/selectNodes.js +8 -2
  64. package/libEs6/utils/dom/selectNodesWithShadow.js +66 -0
  65. package/package.json +10 -9
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ exports.default = void 0;
4
+
5
+ /*
6
+ Copyright 2022 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 = ":shadow";
17
+ exports.default = _default;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- exports.HEAD = exports.SRC = exports.SCRIPT = exports.STYLE = exports.DIV = exports.IMG = exports.IFRAME = exports.BODY = void 0;
3
+ exports.STYLE = exports.SRC = exports.SCRIPT = exports.IMG = exports.IFRAME = exports.HEAD = exports.DIV = exports.BODY = void 0;
4
4
 
5
5
  /*
6
6
  Copyright 2019 Adobe. All rights reserved.
@@ -20,6 +20,8 @@ var _EventMerge = require("../components/EventMerge");
20
20
 
21
21
  var _LibraryInfo = require("../components/LibraryInfo");
22
22
 
23
+ var _MachineLearning = require("../components/MachineLearning");
24
+
23
25
  /*
24
26
  Copyright 2019 Adobe. All rights reserved.
25
27
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -33,5 +35,5 @@ governing permissions and limitations under the License.
33
35
  */
34
36
  // TODO: Register the Components here statically for now. They might be registered differently.
35
37
  // TODO: Figure out how sub-components will be made available/registered
36
- var _default = [_DataCollector.default, _ActivityCollector.default, _Identity.default, _Audiences.default, _Personalization.default, _Context.default, _Privacy.default, _EventMerge.default, _LibraryInfo.default];
38
+ var _default = [_DataCollector.default, _ActivityCollector.default, _Identity.default, _Audiences.default, _Personalization.default, _Context.default, _Privacy.default, _EventMerge.default, _LibraryInfo.default, _MachineLearning.default];
37
39
  exports.default = _default;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- exports.default = exports.CONSENT_SOURCE_NEW = exports.CONSENT_SOURCE_INITIAL = exports.CONSENT_SOURCE_DEFAULT = exports.DECLINED_CONSENT_ERROR_CODE = exports.DECLINED_CONSENT = void 0;
3
+ exports.default = exports.DECLINED_CONSENT_ERROR_CODE = exports.DECLINED_CONSENT = exports.CONSENT_SOURCE_NEW = exports.CONSENT_SOURCE_INITIAL = exports.CONSENT_SOURCE_DEFAULT = void 0;
4
4
 
5
5
  var _utils = require("../../utils");
6
6
 
@@ -4,9 +4,9 @@ exports.default = void 0;
4
4
 
5
5
  var _utils = require("../../utils");
6
6
 
7
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
7
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
8
 
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
10
 
11
11
  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; }
12
12
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- exports.default = exports.YEAR = exports.MONTH = exports.WEEK = exports.DAY = exports.HOUR = exports.MINUTE = exports.SECOND = exports.MILLISECOND = void 0;
3
+ exports.default = exports.YEAR = exports.WEEK = exports.SECOND = exports.MONTH = exports.MINUTE = exports.MILLISECOND = exports.HOUR = exports.DAY = void 0;
4
4
 
5
5
  /*
6
6
  Copyright 2019 Adobe. All rights reserved.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- exports.default = exports.awaitUsingTimer = exports.awaitUsingRequestAnimation = exports.canUseRequestAnimationFrame = exports.awaitUsingMutationObserver = exports.canUseMutationObserver = void 0;
3
+ exports.default = exports.canUseRequestAnimationFrame = exports.canUseMutationObserver = exports.awaitUsingTimer = exports.awaitUsingRequestAnimation = exports.awaitUsingMutationObserver = void 0;
4
4
 
5
5
  var _isFunction = require("../isFunction");
6
6
 
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "awaitSelector", {
3
+ Object.defineProperty(exports, "appendNode", {
4
4
  enumerable: true,
5
5
  get: function get() {
6
- return _awaitSelector.default;
6
+ return _appendNode.default;
7
7
  }
8
8
  });
9
- Object.defineProperty(exports, "appendNode", {
9
+ Object.defineProperty(exports, "awaitSelector", {
10
10
  enumerable: true,
11
11
  get: function get() {
12
- return _appendNode.default;
12
+ return _awaitSelector.default;
13
13
  }
14
14
  });
15
15
  Object.defineProperty(exports, "createNode", {
@@ -24,6 +24,12 @@ Object.defineProperty(exports, "matchesSelector", {
24
24
  return _matchesSelector.default;
25
25
  }
26
26
  });
27
+ Object.defineProperty(exports, "querySelectorAll", {
28
+ enumerable: true,
29
+ get: function get() {
30
+ return _querySelectorAll.default;
31
+ }
32
+ });
27
33
  Object.defineProperty(exports, "removeNode", {
28
34
  enumerable: true,
29
35
  get: function get() {
@@ -36,6 +42,12 @@ Object.defineProperty(exports, "selectNodes", {
36
42
  return _selectNodes.default;
37
43
  }
38
44
  });
45
+ Object.defineProperty(exports, "selectNodesWithShadow", {
46
+ enumerable: true,
47
+ get: function get() {
48
+ return _selectNodesWithShadow.default;
49
+ }
50
+ });
39
51
 
40
52
  var _awaitSelector = require("./awaitSelector");
41
53
 
@@ -45,6 +57,10 @@ var _createNode = require("./createNode");
45
57
 
46
58
  var _matchesSelector = require("./matchesSelector");
47
59
 
60
+ var _querySelectorAll = require("./querySelectorAll");
61
+
48
62
  var _removeNode = require("./removeNode");
49
63
 
50
- var _selectNodes = require("./selectNodes");
64
+ var _selectNodes = require("./selectNodes");
65
+
66
+ var _selectNodesWithShadow = require("./selectNodesWithShadow");
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ exports.default = void 0;
4
+
5
+ var _shadowSeparator = require("../../constants/shadowSeparator");
6
+
7
+ /*
8
+ Copyright 2022 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 _default = function _default(str) {
19
+ return str.indexOf(_shadowSeparator.default) !== -1;
20
+ };
21
+
22
+ exports.default = _default;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ exports.default = void 0;
4
+
5
+ var _toArray = require("../toArray");
6
+
7
+ /*
8
+ Copyright 2021 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 _default = function _default(context, selector) {
19
+ return (0, _toArray.default)(context.querySelectorAll(selector));
20
+ };
21
+
22
+ exports.default = _default;
@@ -2,7 +2,11 @@
2
2
 
3
3
  exports.default = void 0;
4
4
 
5
- var _toArray = require("../toArray");
5
+ var _querySelectorAll = require("./querySelectorAll");
6
+
7
+ var _selectNodesWithShadow = require("./selectNodesWithShadow");
8
+
9
+ var _isShadowSelector = require("./isShadowSelector");
6
10
 
7
11
  /*
8
12
  Copyright 2019 Adobe. All rights reserved.
@@ -24,7 +28,12 @@ governing permissions and limitations under the License.
24
28
  */
25
29
  var _default = function _default(selector) {
26
30
  var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
27
- return (0, _toArray.default)(context.querySelectorAll(selector));
31
+
32
+ if (!(0, _isShadowSelector.default)(selector)) {
33
+ return (0, _querySelectorAll.default)(context, selector);
34
+ }
35
+
36
+ return (0, _selectNodesWithShadow.default)(context, selector);
28
37
  };
29
38
 
30
39
  exports.default = _default;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ exports.default = void 0;
4
+
5
+ var _querySelectorAll = require("./querySelectorAll");
6
+
7
+ var _startsWith = require("../startsWith");
8
+
9
+ var _shadowSeparator = require("../../constants/shadowSeparator");
10
+
11
+ /*
12
+ Copyright 2021 Adobe. All rights reserved.
13
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
+ you may not use this file except in compliance with the License. You may obtain a copy
15
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
16
+
17
+ Unless required by applicable law or agreed to in writing, software distributed under
18
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
+ OF ANY KIND, either express or implied. See the License for the specific language
20
+ governing permissions and limitations under the License.
21
+ */
22
+ var splitWithShadow = function splitWithShadow(selector) {
23
+ return selector.split(_shadowSeparator.default);
24
+ };
25
+
26
+ var transformPrefix = function transformPrefix(parent, selector) {
27
+ var result = selector.trim();
28
+ var hasChildCombinatorPrefix = (0, _startsWith.default)(result, ">");
29
+
30
+ if (!hasChildCombinatorPrefix) {
31
+ return result;
32
+ } // IE doesn't support :scope
33
+
34
+
35
+ if (window.document.documentMode) {
36
+ return result.substring(1).trim();
37
+ }
38
+
39
+ var prefix = parent instanceof Element || parent instanceof HTMLDocument ? ":scope" : ":host"; // see https://bugs.webkit.org/show_bug.cgi?id=233380
40
+
41
+ return prefix + " " + result;
42
+ };
43
+
44
+ var _default = function _default(context, selector) {
45
+ // Shadow DOM should be supported
46
+ if (!window.document.documentElement.attachShadow) {
47
+ return (0, _querySelectorAll.default)(context, selector.replace(_shadowSeparator.default, ""));
48
+ }
49
+
50
+ var parts = splitWithShadow(selector);
51
+
52
+ if (parts.length < 2) {
53
+ return (0, _querySelectorAll.default)(context, selector);
54
+ } // split the selector into parts separated by :shadow pseudo-selectors
55
+ // find each subselector element based on the previously selected node's shadowRoot
56
+
57
+
58
+ var parent = context;
59
+
60
+ for (var i = 0; i < parts.length; i += 1) {
61
+ var part = transformPrefix(parent, parts[i]);
62
+ var partNode = (0, _querySelectorAll.default)(parent, part);
63
+
64
+ if (partNode.length === 0 || !partNode[0] || !partNode[0].shadowRoot) {
65
+ return partNode;
66
+ }
67
+
68
+ parent = partNode[0].shadowRoot;
69
+ }
70
+
71
+ return undefined;
72
+ };
73
+
74
+ exports.default = _default;
@@ -16,7 +16,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
16
16
 
17
17
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18
18
 
19
- function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
19
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
20
20
 
21
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
22
 
@@ -36,10 +36,10 @@ Object.defineProperty(exports, "cookieJar", {
36
36
  return _cookieJar.default;
37
37
  }
38
38
  });
39
- Object.defineProperty(exports, "createMerger", {
39
+ Object.defineProperty(exports, "crc32", {
40
40
  enumerable: true,
41
41
  get: function get() {
42
- return _createMerger.default;
42
+ return _crc.default;
43
43
  }
44
44
  });
45
45
  Object.defineProperty(exports, "createCallbackAggregator", {
@@ -48,28 +48,28 @@ Object.defineProperty(exports, "createCallbackAggregator", {
48
48
  return _createCallbackAggregator.default;
49
49
  }
50
50
  });
51
- Object.defineProperty(exports, "createTaskQueue", {
51
+ Object.defineProperty(exports, "createMerger", {
52
52
  enumerable: true,
53
53
  get: function get() {
54
- return _createTaskQueue.default;
54
+ return _createMerger.default;
55
55
  }
56
56
  });
57
- Object.defineProperty(exports, "crc32", {
57
+ Object.defineProperty(exports, "createTaskQueue", {
58
58
  enumerable: true,
59
59
  get: function get() {
60
- return _crc.default;
60
+ return _createTaskQueue.default;
61
61
  }
62
62
  });
63
- Object.defineProperty(exports, "defer", {
63
+ Object.defineProperty(exports, "deepAssign", {
64
64
  enumerable: true,
65
65
  get: function get() {
66
- return _defer.default;
66
+ return _deepAssign.default;
67
67
  }
68
68
  });
69
- Object.defineProperty(exports, "deepAssign", {
69
+ Object.defineProperty(exports, "defer", {
70
70
  enumerable: true,
71
71
  get: function get() {
72
- return _deepAssign.default;
72
+ return _defer.default;
73
73
  }
74
74
  });
75
75
  Object.defineProperty(exports, "endsWith", {
@@ -180,22 +180,22 @@ Object.defineProperty(exports, "isNamespacedCookieName", {
180
180
  return _isNamespacedCookieName.default;
181
181
  }
182
182
  });
183
- Object.defineProperty(exports, "isNonEmptyArray", {
183
+ Object.defineProperty(exports, "isNil", {
184
184
  enumerable: true,
185
185
  get: function get() {
186
- return _isNonEmptyArray.default;
186
+ return _isNil.default;
187
187
  }
188
188
  });
189
- Object.defineProperty(exports, "isNonEmptyString", {
189
+ Object.defineProperty(exports, "isNonEmptyArray", {
190
190
  enumerable: true,
191
191
  get: function get() {
192
- return _isNonEmptyString.default;
192
+ return _isNonEmptyArray.default;
193
193
  }
194
194
  });
195
- Object.defineProperty(exports, "isNil", {
195
+ Object.defineProperty(exports, "isNonEmptyString", {
196
196
  enumerable: true,
197
197
  get: function get() {
198
- return _isNil.default;
198
+ return _isNonEmptyString.default;
199
199
  }
200
200
  });
201
201
  Object.defineProperty(exports, "isNumber", {
@@ -282,16 +282,16 @@ Object.defineProperty(exports, "toISOStringLocal", {
282
282
  return _toISOStringLocal.default;
283
283
  }
284
284
  });
285
- Object.defineProperty(exports, "uuid", {
285
+ Object.defineProperty(exports, "updateErrorMessage", {
286
286
  enumerable: true,
287
287
  get: function get() {
288
- return _uuid.default;
288
+ return _updateErrorMessage.default;
289
289
  }
290
290
  });
291
- Object.defineProperty(exports, "updateErrorMessage", {
291
+ Object.defineProperty(exports, "uuid", {
292
292
  enumerable: true,
293
293
  get: function get() {
294
- return _updateErrorMessage.default;
294
+ return _uuid.default;
295
295
  }
296
296
  });
297
297
  Object.defineProperty(exports, "validateIdentityMap", {
@@ -4,7 +4,7 @@ exports.default = void 0;
4
4
 
5
5
  var _isNil = require("./isNil");
6
6
 
7
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
7
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
8
 
9
9
  /**
10
10
  * Returns whether the value is an object.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- exports.enumOf = exports.string = exports.objectOf = exports.mapOfValues = exports.number = exports.literal = exports.callback = exports.boolean = exports.arrayOf = exports.anything = exports.anyOf = void 0;
3
+ exports.string = exports.objectOf = exports.number = exports.mapOfValues = exports.literal = exports.enumOf = exports.callback = exports.boolean = exports.arrayOf = exports.anything = exports.anyOf = void 0;
4
4
 
5
5
  var _chain = require("./chain");
6
6
 
@@ -11,6 +11,7 @@ governing permissions and limitations under the License.
11
11
  */
12
12
  import { fireReferrerHideableImage } from "../../utils";
13
13
  import injectProcessDestinations from "./injectProcessDestinations";
14
+ import injectProcessResponse from "./injectProcessResponse";
14
15
 
15
16
  const createAudiences = ({
16
17
  logger
@@ -19,17 +20,12 @@ const createAudiences = ({
19
20
  fireReferrerHideableImage,
20
21
  logger
21
22
  });
22
-
23
- const processDestinationsFromResponse = ({
24
- response
25
- }) => {
26
- const destinations = response.getPayloadsByType("activation:push");
27
- return processDestinations(destinations);
28
- };
29
-
23
+ const processResponse = injectProcessResponse({
24
+ processDestinations
25
+ });
30
26
  return {
31
27
  lifecycle: {
32
- onResponse: processDestinationsFromResponse
28
+ onResponse: processResponse
33
29
  },
34
30
  commands: {}
35
31
  };
@@ -0,0 +1,39 @@
1
+ /*
2
+ Copyright 2021 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ export default (({
13
+ processDestinations
14
+ }) => {
15
+ const processPushDestinations = ({
16
+ response
17
+ }) => {
18
+ const destinations = response.getPayloadsByType("activation:push");
19
+ return processDestinations(destinations);
20
+ };
21
+
22
+ const retrievePullDestinations = ({
23
+ response
24
+ }) => {
25
+ return {
26
+ destinations: response.getPayloadsByType("activation:pull")
27
+ };
28
+ };
29
+
30
+ return ({
31
+ response
32
+ }) => {
33
+ return processPushDestinations({
34
+ response
35
+ }).then(() => retrievePullDestinations({
36
+ response
37
+ }));
38
+ };
39
+ });
@@ -0,0 +1,25 @@
1
+ /*
2
+ Copyright 2021 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import processResponse from "./processResponse";
13
+
14
+ const createMachineLearning = () => {
15
+ return {
16
+ lifecycle: {
17
+ onResponse: processResponse
18
+ },
19
+ commands: {}
20
+ };
21
+ };
22
+
23
+ createMachineLearning.namespace = "MachineLearning";
24
+ createMachineLearning.configValidators = {};
25
+ export default createMachineLearning;
@@ -0,0 +1,17 @@
1
+ /*
2
+ Copyright 2021 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ Unless required by applicable law or agreed to in writing, software distributed under
7
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
8
+ OF ANY KIND, either express or implied. See the License for the specific language
9
+ governing permissions and limitations under the License.
10
+ */
11
+ export default (({
12
+ response
13
+ }) => {
14
+ return {
15
+ inferences: response.getPayloadsByType("rtml:inferences")
16
+ };
17
+ });
@@ -20,7 +20,7 @@ export default (({
20
20
  }) => {
21
21
  const event = eventManager.createEvent();
22
22
  event.mergeXdm({
23
- eventType: "display"
23
+ eventType: "decisioning.propositionDisplay"
24
24
  });
25
25
  mergeDecisionsMeta(event, decisionsMeta);
26
26
 
@@ -28,7 +28,7 @@ export default (({
28
28
 
29
29
  if (isNonEmptyArray(decisionsMeta)) {
30
30
  event.mergeXdm({
31
- eventType: "click"
31
+ eventType: "decisioning.propositionInteract"
32
32
  });
33
33
  mergeDecisionsMeta(event, decisionsMeta);
34
34
  }
@@ -20,7 +20,7 @@ export default (({
20
20
  xdm
21
21
  }) => {
22
22
  const data = {
23
- eventType: "display"
23
+ eventType: "decisioning.propositionDisplay"
24
24
  };
25
25
  const event = eventManager.createEvent();
26
26
 
@@ -24,6 +24,6 @@ export default ((container, html) => {
24
24
  elements.forEach(element => {
25
25
  appendNode(container, element);
26
26
  });
27
- executeInlineScripts(container, scripts, appendNode);
27
+ executeInlineScripts(container, scripts);
28
28
  return executeRemoteScripts(scriptsUrls);
29
29
  });
@@ -23,6 +23,6 @@ export default ((container, html) => {
23
23
  elements.forEach(element => {
24
24
  insertAfter(container, element);
25
25
  });
26
- executeInlineScripts(container, scripts, insertAfter);
26
+ executeInlineScripts(container, scripts);
27
27
  return executeRemoteScripts(scriptsUrls);
28
28
  });
@@ -23,6 +23,6 @@ export default ((container, html) => {
23
23
  elements.forEach(element => {
24
24
  insertBefore(container, element);
25
25
  });
26
- executeInlineScripts(container, scripts, insertBefore);
26
+ executeInlineScripts(container, scripts);
27
27
  return executeRemoteScripts(scriptsUrls);
28
28
  });
@@ -40,6 +40,6 @@ export default ((container, html) => {
40
40
  i -= 1;
41
41
  }
42
42
 
43
- executeInlineScripts(container, scripts, appendNode);
43
+ executeInlineScripts(container, scripts);
44
44
  return executeRemoteScripts(scriptsUrls);
45
45
  });
@@ -84,8 +84,11 @@ export const getRemoteScriptsUrls = fragment => {
84
84
 
85
85
  return result;
86
86
  };
87
- export const executeInlineScripts = (container, scripts, func) => {
88
- scripts.forEach(script => func(container, script));
87
+ export const executeInlineScripts = (parent, scripts) => {
88
+ scripts.forEach(script => {
89
+ parent.appendChild(script);
90
+ parent.removeChild(script);
91
+ });
89
92
  };
90
93
  export const executeRemoteScripts = urls => {
91
94
  return Promise.all(urls.map(loadScript));
@@ -11,4 +11,4 @@ governing permissions and limitations under the License.
11
11
  */
12
12
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
13
13
  // see babel-plugin-version
14
- export default "2.6.4";
14
+ export default "2.8.0-beta.1";
@@ -0,0 +1,12 @@
1
+ /*
2
+ Copyright 2022 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ export default ":shadow";