@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.getPropositionEventType = exports.getEventType = exports.PropositionEventType = void 0;
|
|
4
4
|
var _eventType = require("./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
|
-
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 2022 Adobe. All rights reserved.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.PROPOSITION_INTERACTION_TYPES = exports.NEVER = exports.DECORATED_ELEMENTS_ONLY = exports.ALWAYS = void 0;
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2024 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 ALWAYS = exports.ALWAYS = "always";
|
|
16
|
+
var NEVER = exports.NEVER = "never";
|
|
17
|
+
var DECORATED_ELEMENTS_ONLY = exports.DECORATED_ELEMENTS_ONLY = "decoratedElementsOnly";
|
|
18
|
+
var PROPOSITION_INTERACTION_TYPES = exports.PROPOSITION_INTERACTION_TYPES = [ALWAYS, NEVER, DECORATED_ELEMENTS_ONLY];
|
|
@@ -5,15 +5,15 @@ exports.default = void 0;
|
|
|
5
5
|
var _index = require("../utils/index.js");
|
|
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
|
-
function _toConsumableArray(
|
|
11
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
12
12
|
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."); }
|
|
13
|
-
function _unsupportedIterableToArray(
|
|
14
|
-
function _iterableToArray(
|
|
15
|
-
function _arrayWithoutHoles(
|
|
16
|
-
function _arrayLikeToArray(
|
|
13
|
+
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; } }
|
|
14
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
15
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
16
|
+
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; } /*
|
|
17
17
|
Copyright 2019 Adobe. All rights reserved.
|
|
18
18
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
19
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _index = require("../utils/index.js");
|
|
5
|
-
function _toConsumableArray(
|
|
5
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
6
|
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."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _iterableToArray(
|
|
9
|
-
function _arrayWithoutHoles(
|
|
10
|
-
function _arrayLikeToArray(
|
|
7
|
+
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; } }
|
|
8
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
9
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
10
|
+
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; } /*
|
|
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");
|
|
13
13
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -19,11 +19,11 @@ governing permissions and limitations under the License.
|
|
|
19
19
|
*/
|
|
20
20
|
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; }
|
|
21
21
|
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; }
|
|
22
|
-
function _defineProperty(
|
|
22
|
+
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; }
|
|
23
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
24
|
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); }
|
|
25
|
-
function _objectWithoutProperties(
|
|
26
|
-
function _objectWithoutPropertiesLoose(
|
|
25
|
+
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; }
|
|
26
|
+
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; }
|
|
27
27
|
var EVENT_CANCELLATION_MESSAGE = "Event was canceled because the onBeforeEventSend callback returned false.";
|
|
28
28
|
var _default = exports.default = function _default(_ref) {
|
|
29
29
|
var config = _ref.config,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _index = require("../../utils/index.js");
|
|
5
|
-
function _toConsumableArray(
|
|
5
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
6
|
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."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _iterableToArray(
|
|
9
|
-
function _arrayWithoutHoles(
|
|
10
|
-
function _arrayLikeToArray(
|
|
7
|
+
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; } }
|
|
8
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
9
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
10
|
+
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; } /*
|
|
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");
|
|
13
13
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -5,7 +5,7 @@ var _index = require("../../utils/index.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.
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _assign = require("./assign.js");
|
|
5
5
|
var _isObject = require("./isObject.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
|
|
@@ -4,7 +4,7 @@ exports.default = void 0;
|
|
|
4
4
|
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
5
|
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
6
|
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(
|
|
7
|
+
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
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
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
10
|
/*
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _index = require("./index.js");
|
|
5
|
-
function _toConsumableArray(
|
|
5
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
6
|
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."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _iterableToArray(
|
|
9
|
-
function _arrayWithoutHoles(
|
|
10
|
-
function _arrayLikeToArray(
|
|
7
|
+
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; } }
|
|
8
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
9
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
10
|
+
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; } /*
|
|
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");
|
|
13
13
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -37,14 +37,18 @@ var canUseMutationObserver = exports.canUseMutationObserver = function canUseMut
|
|
|
37
37
|
};
|
|
38
38
|
var awaitUsingMutationObserver = exports.awaitUsingMutationObserver = function awaitUsingMutationObserver(win, doc, selector, timeout, selectFunc) {
|
|
39
39
|
return createPromise(function (resolve, reject) {
|
|
40
|
+
var timer;
|
|
40
41
|
var mutationObserver = new win[MUTATION_OBSERVER](function () {
|
|
41
42
|
var nodes = selectFunc(selector);
|
|
42
43
|
if ((0, _isNonEmptyArray.default)(nodes)) {
|
|
43
44
|
mutationObserver.disconnect();
|
|
45
|
+
if (timer) {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
}
|
|
44
48
|
resolve(nodes);
|
|
45
49
|
}
|
|
46
50
|
});
|
|
47
|
-
setTimeout(function () {
|
|
51
|
+
timer = setTimeout(function () {
|
|
48
52
|
mutationObserver.disconnect();
|
|
49
53
|
reject(createError(selector));
|
|
50
54
|
}, timeout);
|
|
@@ -7,7 +7,7 @@ var _isObject = require("./isObject.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 2022 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");
|
|
@@ -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
|
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); }
|
|
11
11
|
/*
|
|
12
12
|
Copyright 2023 Adobe. All rights reserved.
|
|
@@ -4,7 +4,7 @@ exports.default = void 0;
|
|
|
4
4
|
var _memoize = require("./memoize.js");
|
|
5
5
|
var _browser = require("../constants/browser.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
|
-
function _defineProperty(
|
|
7
|
+
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
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
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
10
|
Copyright 2019 Adobe. All rights reserved.
|
|
@@ -4,12 +4,12 @@ exports.default = void 0;
|
|
|
4
4
|
var _fireImage = require("./fireImage.js");
|
|
5
5
|
var _index = require("./dom/index.js");
|
|
6
6
|
var _tagName = require("../constants/tagName.js");
|
|
7
|
-
function _slicedToArray(
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
8
|
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."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
9
|
+
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; } }
|
|
10
|
+
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; }
|
|
11
11
|
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; } }
|
|
12
|
-
function _arrayWithHoles(
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /*
|
|
13
13
|
Copyright 2019 Adobe. All rights reserved.
|
|
14
14
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
15
|
you may not use this file except in compliance with the License. You may obtain a copy
|
package/libEs5/utils/parseUrl.js
CHANGED
|
@@ -6,7 +6,7 @@ var _isString = require("./isString.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.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _excluded = ["datastreamId"];
|
|
5
|
-
function _objectWithoutProperties(
|
|
6
|
-
function _objectWithoutPropertiesLoose(
|
|
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
7
|
/*
|
|
8
8
|
Copyright 2023 Adobe. All rights reserved.
|
|
9
9
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -6,9 +6,9 @@ var _utils = require("./utils.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(
|
|
10
|
-
function _objectWithoutProperties(
|
|
11
|
-
function _objectWithoutPropertiesLoose(
|
|
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
|
+
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; }
|
|
11
|
+
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; }
|
|
12
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
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); } /*
|
|
14
14
|
Copyright 2023 Adobe. All rights reserved.
|
|
@@ -27,7 +27,7 @@ var _matchesRegexpValidator = require("./matchesRegexpValidator.js");
|
|
|
27
27
|
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); }
|
|
28
28
|
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; }
|
|
29
29
|
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; }
|
|
30
|
-
function _defineProperty(
|
|
30
|
+
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; }
|
|
31
31
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
32
32
|
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); } /*
|
|
33
33
|
Copyright 2020 Adobe. All rights reserved.
|
|
@@ -10,34 +10,49 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import { DOM_ACTION, HTML_CONTENT_ITEM, MESSAGE_IN_APP } from "../../constants/schema.js";
|
|
13
|
+
import { defer, isEmptyObject, isNonEmptyArray } from "../../utils/index.js";
|
|
14
|
+
import { DOM_ACTION, HTML_CONTENT_ITEM, JSON_CONTENT_ITEM, MESSAGE_IN_APP } from "../../constants/schema.js";
|
|
15
15
|
import PAGE_WIDE_SCOPE from "../../constants/pageWideScope.js";
|
|
16
|
-
|
|
16
|
+
import { DOM_ACTION_COLLECT_INTERACTIONS } from "./dom-actions/initDomActionsModules.js";
|
|
17
|
+
const isInteractionTrackingItem = (schema, actionType) => schema === JSON_CONTENT_ITEM && actionType === DOM_ACTION_COLLECT_INTERACTIONS;
|
|
18
|
+
const SUPPORTED_SCHEMAS = {
|
|
19
|
+
[DOM_ACTION]: () => true,
|
|
20
|
+
[HTML_CONTENT_ITEM]: () => true,
|
|
21
|
+
[JSON_CONTENT_ITEM]: isInteractionTrackingItem,
|
|
22
|
+
[MESSAGE_IN_APP]: () => true
|
|
23
|
+
};
|
|
24
|
+
const filterItemsPredicate = (schema, actionType) => typeof SUPPORTED_SCHEMAS[schema] === "function" && SUPPORTED_SCHEMAS[schema](schema, actionType);
|
|
17
25
|
export default (({
|
|
18
26
|
processPropositions,
|
|
19
27
|
createProposition,
|
|
20
28
|
renderedPropositions,
|
|
21
29
|
viewCache
|
|
22
30
|
}) => {
|
|
23
|
-
const filterItemsPredicate = item => SUPPORTED_SCHEMAS.indexOf(item.schema) > -1;
|
|
24
31
|
const updatePropositionItems = ({
|
|
25
32
|
items,
|
|
26
|
-
metadataForScope
|
|
33
|
+
metadataForScope = {}
|
|
27
34
|
}) => {
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
const {
|
|
36
|
+
actionType,
|
|
37
|
+
selector
|
|
38
|
+
} = metadataForScope;
|
|
39
|
+
return items.filter(item => filterItemsPredicate(item.schema, actionType)).map(item => {
|
|
40
|
+
const {
|
|
41
|
+
schema
|
|
42
|
+
} = item;
|
|
43
|
+
if (schema !== HTML_CONTENT_ITEM && !isInteractionTrackingItem(schema, actionType)) {
|
|
30
44
|
return {
|
|
31
45
|
...item
|
|
32
46
|
};
|
|
33
47
|
}
|
|
34
|
-
if (
|
|
48
|
+
if (!isEmptyObject(metadataForScope)) {
|
|
35
49
|
return {
|
|
36
50
|
...item,
|
|
51
|
+
schema: isInteractionTrackingItem(schema, actionType) ? DOM_ACTION : schema,
|
|
37
52
|
data: {
|
|
38
53
|
...item.data,
|
|
39
|
-
selector
|
|
40
|
-
type:
|
|
54
|
+
selector,
|
|
55
|
+
type: actionType
|
|
41
56
|
}
|
|
42
57
|
};
|
|
43
58
|
}
|
|
@@ -20,7 +20,7 @@ const metasToArray = metas => {
|
|
|
20
20
|
};
|
|
21
21
|
export default (() => {
|
|
22
22
|
const clickStorage = {};
|
|
23
|
-
const
|
|
23
|
+
const storeClickMeta = ({
|
|
24
24
|
selector,
|
|
25
25
|
meta: {
|
|
26
26
|
id,
|
|
@@ -43,7 +43,7 @@ export default (() => {
|
|
|
43
43
|
const getClickSelectors = () => {
|
|
44
44
|
return Object.keys(clickStorage);
|
|
45
45
|
};
|
|
46
|
-
const
|
|
46
|
+
const getClickMetas = selector => {
|
|
47
47
|
const metas = clickStorage[selector];
|
|
48
48
|
if (!metas) {
|
|
49
49
|
return {};
|
|
@@ -51,8 +51,8 @@ export default (() => {
|
|
|
51
51
|
return metasToArray(clickStorage[selector]);
|
|
52
52
|
};
|
|
53
53
|
return {
|
|
54
|
-
|
|
54
|
+
storeClickMeta,
|
|
55
55
|
getClickSelectors,
|
|
56
|
-
|
|
56
|
+
getClickMetas
|
|
57
57
|
};
|
|
58
58
|
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export default (() => {
|
|
14
|
+
const clickMetaStorage = {};
|
|
15
|
+
/*
|
|
16
|
+
clickMetaStorage example.
|
|
17
|
+
`abc' and 'def' are proposition IDs. 1 is an interact id. The object with an id, scope and scopeDetails
|
|
18
|
+
is the notification.
|
|
19
|
+
{
|
|
20
|
+
1: {
|
|
21
|
+
"abc": { "id": "abc", "scope": "proposition", "scopeDetails": {} },
|
|
22
|
+
"def": { "id": "def", "scope": "proposition", "scopeDetails": {} }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
const clickItemStorage = {};
|
|
28
|
+
/*
|
|
29
|
+
clickItemStorage example.
|
|
30
|
+
`abc' and 'def' are proposition IDs. 1 is an interact id. The sets contain proposition-item IDs which
|
|
31
|
+
are used in notifications that are sent.
|
|
32
|
+
{
|
|
33
|
+
1: {
|
|
34
|
+
abc: new Set(["itemAAA", "itemCCC"]),
|
|
35
|
+
def: new Set(["itemEEE", "itemFFF"]),
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
const storeInteractionMeta = (propositionId, itemId, scopeType, notification, interactId) => {
|
|
41
|
+
// eslint-disable-next-line no-param-reassign
|
|
42
|
+
interactId = parseInt(interactId, 10);
|
|
43
|
+
if (!clickMetaStorage[interactId]) {
|
|
44
|
+
clickMetaStorage[interactId] = {};
|
|
45
|
+
clickItemStorage[interactId] = {};
|
|
46
|
+
}
|
|
47
|
+
if (!clickItemStorage[interactId][propositionId]) {
|
|
48
|
+
clickItemStorage[interactId][propositionId] = new Set();
|
|
49
|
+
}
|
|
50
|
+
clickItemStorage[interactId][propositionId].add(itemId);
|
|
51
|
+
clickMetaStorage[interactId][propositionId] = {
|
|
52
|
+
...notification,
|
|
53
|
+
scopeType
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const getInteractionMetas = interactIds => {
|
|
57
|
+
if (!Array.isArray(interactIds) || interactIds.length === 0) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
return Object.values(interactIds.map(value => parseInt(value, 10)).reduce((metaMap, interactId) => {
|
|
61
|
+
Object.keys(clickMetaStorage[interactId] || {}).forEach(propositionId => {
|
|
62
|
+
if (!metaMap[propositionId]) {
|
|
63
|
+
metaMap[propositionId] = {
|
|
64
|
+
proposition: clickMetaStorage[interactId][propositionId],
|
|
65
|
+
items: new Set()
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
metaMap[propositionId].items = new Set([...metaMap[propositionId].items, ...clickItemStorage[interactId][propositionId]]);
|
|
69
|
+
});
|
|
70
|
+
return metaMap;
|
|
71
|
+
}, {})).map(({
|
|
72
|
+
proposition,
|
|
73
|
+
items
|
|
74
|
+
}) => ({
|
|
75
|
+
...proposition,
|
|
76
|
+
items: Array.from(items).map(id => ({
|
|
77
|
+
id
|
|
78
|
+
}))
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
storeInteractionMeta,
|
|
83
|
+
getInteractionMetas
|
|
84
|
+
};
|
|
85
|
+
});
|