@adobe/alloy 2.20.0-alpha.1 → 2.20.0-beta.2

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 (691) hide show
  1. package/package.json +83 -65
  2. package/libEs5/baseCode/index.js +0 -62
  3. package/libEs5/components/ActivityCollector/attachClickActivityCollector.js +0 -54
  4. package/libEs5/components/ActivityCollector/configValidators.js +0 -24
  5. package/libEs5/components/ActivityCollector/createGetLinkDetails.js +0 -69
  6. package/libEs5/components/ActivityCollector/createLinkClick.js +0 -39
  7. package/libEs5/components/ActivityCollector/getLinkName.js +0 -140
  8. package/libEs5/components/ActivityCollector/getLinkRegion.js +0 -62
  9. package/libEs5/components/ActivityCollector/index.js +0 -79
  10. package/libEs5/components/ActivityCollector/utils.js +0 -114
  11. package/libEs5/components/Audiences/index.js +0 -50
  12. package/libEs5/components/Audiences/injectProcessDestinations.js +0 -65
  13. package/libEs5/components/Audiences/injectProcessResponse.js +0 -39
  14. package/libEs5/components/Context/createComponent.js +0 -40
  15. package/libEs5/components/Context/implementationDetails.js +0 -28
  16. package/libEs5/components/Context/index.js +0 -57
  17. package/libEs5/components/Context/injectDevice.js +0 -67
  18. package/libEs5/components/Context/injectEnvironment.js +0 -41
  19. package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +0 -59
  20. package/libEs5/components/Context/injectPlaceContext.js +0 -33
  21. package/libEs5/components/Context/injectTimestamp.js +0 -24
  22. package/libEs5/components/Context/injectWeb.js +0 -31
  23. package/libEs5/components/DataCollector/index.js +0 -111
  24. package/libEs5/components/DataCollector/validateApplyResponse.js +0 -36
  25. package/libEs5/components/DataCollector/validateUserEventOptions.js +0 -51
  26. package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +0 -32
  27. package/libEs5/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +0 -25
  28. package/libEs5/components/DecisioningEngine/constants.js +0 -31
  29. package/libEs5/components/DecisioningEngine/createApplyResponse.js +0 -36
  30. package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +0 -29
  31. package/libEs5/components/DecisioningEngine/createContextProvider.js +0 -93
  32. package/libEs5/components/DecisioningEngine/createDecisionHistory.js +0 -28
  33. package/libEs5/components/DecisioningEngine/createDecisionProvider.js +0 -51
  34. package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +0 -80
  35. package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +0 -49
  36. package/libEs5/components/DecisioningEngine/createEventRegistry.js +0 -130
  37. package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +0 -46
  38. package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +0 -87
  39. package/libEs5/components/DecisioningEngine/index.js +0 -119
  40. package/libEs5/components/DecisioningEngine/utils.js +0 -90
  41. package/libEs5/components/EventMerge/createComponent.js +0 -25
  42. package/libEs5/components/EventMerge/createEventMergeId.js +0 -21
  43. package/libEs5/components/EventMerge/index.js +0 -25
  44. package/libEs5/components/Identity/addEcidQueryToPayload.js +0 -23
  45. package/libEs5/components/Identity/addEcidToPayload.js +0 -21
  46. package/libEs5/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +0 -26
  47. package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +0 -46
  48. package/libEs5/components/Identity/configValidators.js +0 -22
  49. package/libEs5/components/Identity/constants/authState.js +0 -21
  50. package/libEs5/components/Identity/constants/defaultIdSyncTtlMinutes.js +0 -16
  51. package/libEs5/components/Identity/createComponent.js +0 -98
  52. package/libEs5/components/Identity/createLegacyIdentity.js +0 -70
  53. package/libEs5/components/Identity/getEcidFromResponse.js +0 -24
  54. package/libEs5/components/Identity/getIdentity/createGetIdentity.js +0 -36
  55. package/libEs5/components/Identity/getIdentity/createIdentityRequest.js +0 -30
  56. package/libEs5/components/Identity/getIdentity/createIdentityRequestPayload.js +0 -30
  57. package/libEs5/components/Identity/getIdentity/getIdentityOptionsValidator.js +0 -28
  58. package/libEs5/components/Identity/index.js +0 -129
  59. package/libEs5/components/Identity/injectAddLegacyEcidToPayload.js +0 -32
  60. package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +0 -65
  61. package/libEs5/components/Identity/injectAwaitIdentityCookie.js +0 -57
  62. package/libEs5/components/Identity/injectEnsureSingleIdentity.js +0 -98
  63. package/libEs5/components/Identity/injectHandleResponseForIdSyncs.js +0 -21
  64. package/libEs5/components/Identity/injectProcessIdSyncs.js +0 -42
  65. package/libEs5/components/Identity/injectSetDomainForInitialIdentityPayload.js +0 -34
  66. package/libEs5/components/Identity/visitorService/awaitVisitorOptIn.js +0 -35
  67. package/libEs5/components/Identity/visitorService/getVisitor.js +0 -20
  68. package/libEs5/components/Identity/visitorService/injectGetEcidFromVisitor.js +0 -50
  69. package/libEs5/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -272
  70. package/libEs5/components/LegacyMediaAnalytics/createMediaHelper.js +0 -188
  71. package/libEs5/components/LegacyMediaAnalytics/index.js +0 -48
  72. package/libEs5/components/LegacyMediaAnalytics/media/constants.js +0 -154
  73. package/libEs5/components/LegacyMediaAnalytics/media/mediaKeysToXdmConverter.js +0 -51
  74. package/libEs5/components/LibraryInfo/index.js +0 -64
  75. package/libEs5/components/MachineLearning/index.js +0 -27
  76. package/libEs5/components/MachineLearning/processResponse.js +0 -20
  77. package/libEs5/components/MediaCollection/constants/eventTypes.js +0 -25
  78. package/libEs5/components/MediaCollection/createHeartbeatEngine.js +0 -63
  79. package/libEs5/components/MediaCollection/createMediaEventManager.js +0 -109
  80. package/libEs5/components/MediaCollection/createMediaRequest.js +0 -30
  81. package/libEs5/components/MediaCollection/createMediaSessionCacheManager.js +0 -62
  82. package/libEs5/components/MediaCollection/createUpdateMediaSessionState.js +0 -31
  83. package/libEs5/components/MediaCollection/index.js +0 -165
  84. package/libEs5/components/MediaCollection/validateMediaEventOptions.js +0 -35
  85. package/libEs5/components/MediaCollection/validateMediaSessionOptions.js +0 -36
  86. package/libEs5/components/Personalization/constants/loggerMessage.js +0 -18
  87. package/libEs5/components/Personalization/constants/scopeType.js +0 -21
  88. package/libEs5/components/Personalization/constants/surface.js +0 -23
  89. package/libEs5/components/Personalization/createActionsProvider.js +0 -72
  90. package/libEs5/components/Personalization/createApplyPropositions.js +0 -113
  91. package/libEs5/components/Personalization/createClickStorage.js +0 -62
  92. package/libEs5/components/Personalization/createCollect.js +0 -54
  93. package/libEs5/components/Personalization/createComponent.js +0 -142
  94. package/libEs5/components/Personalization/createFetchDataHandler.js +0 -84
  95. package/libEs5/components/Personalization/createGetPageLocation.js +0 -21
  96. package/libEs5/components/Personalization/createNotificationHandler.js +0 -33
  97. package/libEs5/components/Personalization/createOnClickHandler.js +0 -52
  98. package/libEs5/components/Personalization/createOnDecisionHandler.js +0 -44
  99. package/libEs5/components/Personalization/createPersonalizationDetails.js +0 -105
  100. package/libEs5/components/Personalization/createPreprocessors.js +0 -21
  101. package/libEs5/components/Personalization/createSetTargetMigration.js +0 -29
  102. package/libEs5/components/Personalization/createViewCacheManager.js +0 -91
  103. package/libEs5/components/Personalization/createViewChangeHandler.js +0 -46
  104. package/libEs5/components/Personalization/dom-actions/action.js +0 -121
  105. package/libEs5/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +0 -42
  106. package/libEs5/components/Personalization/dom-actions/appendHtml.js +0 -33
  107. package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +0 -109
  108. package/libEs5/components/Personalization/dom-actions/createPreprocess.js +0 -26
  109. package/libEs5/components/Personalization/dom-actions/createRedirect.js +0 -30
  110. package/libEs5/components/Personalization/dom-actions/dom/createFragment.js +0 -22
  111. package/libEs5/components/Personalization/dom-actions/dom/getAttribute.js +0 -18
  112. package/libEs5/components/Personalization/dom-actions/dom/getChildNodes.js +0 -23
  113. package/libEs5/components/Personalization/dom-actions/dom/getChildren.js +0 -23
  114. package/libEs5/components/Personalization/dom-actions/dom/getElementById.js +0 -25
  115. package/libEs5/components/Personalization/dom-actions/dom/getFirstChild.js +0 -18
  116. package/libEs5/components/Personalization/dom-actions/dom/getNextSibling.js +0 -18
  117. package/libEs5/components/Personalization/dom-actions/dom/getNonce.js +0 -37
  118. package/libEs5/components/Personalization/dom-actions/dom/getParent.js +0 -18
  119. package/libEs5/components/Personalization/dom-actions/dom/helperForEq.js +0 -26
  120. package/libEs5/components/Personalization/dom-actions/dom/index.js +0 -100
  121. package/libEs5/components/Personalization/dom-actions/dom/insertAfter.js +0 -26
  122. package/libEs5/components/Personalization/dom-actions/dom/insertBefore.js +0 -25
  123. package/libEs5/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +0 -38
  124. package/libEs5/components/Personalization/dom-actions/dom/removeAttribute.js +0 -18
  125. package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +0 -107
  126. package/libEs5/components/Personalization/dom-actions/dom/setAttribute.js +0 -18
  127. package/libEs5/components/Personalization/dom-actions/dom/setStyle.js +0 -24
  128. package/libEs5/components/Personalization/dom-actions/images.js +0 -39
  129. package/libEs5/components/Personalization/dom-actions/index.js +0 -9
  130. package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +0 -36
  131. package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +0 -32
  132. package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +0 -32
  133. package/libEs5/components/Personalization/dom-actions/prependHtml.js +0 -46
  134. package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +0 -33
  135. package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +0 -37
  136. package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +0 -55
  137. package/libEs5/components/Personalization/dom-actions/replaceHtml.js +0 -21
  138. package/libEs5/components/Personalization/dom-actions/scripts.js +0 -92
  139. package/libEs5/components/Personalization/dom-actions/setAttributes.js +0 -21
  140. package/libEs5/components/Personalization/dom-actions/setHtml.js +0 -28
  141. package/libEs5/components/Personalization/dom-actions/setStyles.js +0 -26
  142. package/libEs5/components/Personalization/dom-actions/setText.js +0 -18
  143. package/libEs5/components/Personalization/dom-actions/swapImage.js +0 -32
  144. package/libEs5/components/Personalization/event.js +0 -48
  145. package/libEs5/components/Personalization/flicker/index.js +0 -87
  146. package/libEs5/components/Personalization/handlers/createProcessDomAction.js +0 -69
  147. package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +0 -44
  148. package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +0 -76
  149. package/libEs5/components/Personalization/handlers/createProcessPropositions.js +0 -195
  150. package/libEs5/components/Personalization/handlers/createProcessRedirect.js +0 -46
  151. package/libEs5/components/Personalization/handlers/injectCreateProposition.js +0 -116
  152. package/libEs5/components/Personalization/handlers/processDefaultContent.js +0 -21
  153. package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +0 -288
  154. package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +0 -23
  155. package/libEs5/components/Personalization/in-app-message-actions/utils.js +0 -53
  156. package/libEs5/components/Personalization/index.js +0 -153
  157. package/libEs5/components/Personalization/utils/addRenderAttemptedToDecisions.js +0 -25
  158. package/libEs5/components/Personalization/utils/createAsyncArray.js +0 -39
  159. package/libEs5/components/Personalization/utils/isAuthoringModeEnabled.js +0 -19
  160. package/libEs5/components/Personalization/utils/surfaceUtils.js +0 -102
  161. package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +0 -36
  162. package/libEs5/components/Privacy/computeConsentHash.js +0 -34
  163. package/libEs5/components/Privacy/createComponent.js +0 -86
  164. package/libEs5/components/Privacy/createConsentHashStore.js +0 -60
  165. package/libEs5/components/Privacy/createConsentRequest.js +0 -30
  166. package/libEs5/components/Privacy/createConsentRequestPayload.js +0 -34
  167. package/libEs5/components/Privacy/createStoredConsent.js +0 -32
  168. package/libEs5/components/Privacy/index.js +0 -64
  169. package/libEs5/components/Privacy/injectSendSetConsentRequest.js +0 -48
  170. package/libEs5/components/Privacy/parseConsentCookie.js +0 -38
  171. package/libEs5/components/Privacy/validateSetConsentOptions.js +0 -22
  172. package/libEs5/constants/apiVersion.js +0 -16
  173. package/libEs5/constants/browser.js +0 -29
  174. package/libEs5/constants/consentPurpose.js +0 -17
  175. package/libEs5/constants/consentStatus.js +0 -21
  176. package/libEs5/constants/contentType.js +0 -18
  177. package/libEs5/constants/cookieNameKey.js +0 -21
  178. package/libEs5/constants/cookieNamePrefix.js +0 -17
  179. package/libEs5/constants/coreCommands.js +0 -19
  180. package/libEs5/constants/debugQueryParam.js +0 -16
  181. package/libEs5/constants/decisionProvider.js +0 -16
  182. package/libEs5/constants/domain.js +0 -19
  183. package/libEs5/constants/ecidNamespace.js +0 -16
  184. package/libEs5/constants/edgeBasePath.js +0 -16
  185. package/libEs5/constants/elementAttribute.js +0 -17
  186. package/libEs5/constants/eventType.js +0 -25
  187. package/libEs5/constants/handle.js +0 -16
  188. package/libEs5/constants/highEntropyUserAgentClientHints.js +0 -16
  189. package/libEs5/constants/httpHeaderNames.js +0 -19
  190. package/libEs5/constants/httpStatusCode.js +0 -25
  191. package/libEs5/constants/identityMapAuthenticatedState.js +0 -20
  192. package/libEs5/constants/legacyCookies.js +0 -21
  193. package/libEs5/constants/libraryName.js +0 -16
  194. package/libEs5/constants/libraryVersion.js +0 -18
  195. package/libEs5/constants/namespace.js +0 -16
  196. package/libEs5/constants/pageWideScope.js +0 -16
  197. package/libEs5/constants/propositionEventType.js +0 -33
  198. package/libEs5/constants/queryStringIdentityParam.js +0 -16
  199. package/libEs5/constants/schema.js +0 -35
  200. package/libEs5/constants/shadowSeparator.js +0 -16
  201. package/libEs5/constants/tagName.js +0 -29
  202. package/libEs5/core/buildAndValidateConfig.js +0 -113
  203. package/libEs5/core/componentCreators.js +0 -34
  204. package/libEs5/core/config/createConfig.js +0 -21
  205. package/libEs5/core/config/createCoreConfigs.js +0 -32
  206. package/libEs5/core/consent/createConsent.js +0 -59
  207. package/libEs5/core/consent/createConsentStateMachine.js +0 -109
  208. package/libEs5/core/createComponentRegistry.js +0 -84
  209. package/libEs5/core/createCookieTransfer.js +0 -81
  210. package/libEs5/core/createEvent.js +0 -171
  211. package/libEs5/core/createEventManager.js +0 -142
  212. package/libEs5/core/createInstanceFunction.js +0 -28
  213. package/libEs5/core/createLifecycle.js +0 -75
  214. package/libEs5/core/createLogController.js +0 -71
  215. package/libEs5/core/createLogger.js +0 -104
  216. package/libEs5/core/edgeNetwork/handleRequestFailure.js +0 -28
  217. package/libEs5/core/edgeNetwork/injectApplyResponse.js +0 -67
  218. package/libEs5/core/edgeNetwork/injectExtractEdgeInfo.js +0 -43
  219. package/libEs5/core/edgeNetwork/injectGetLocationHint.js +0 -36
  220. package/libEs5/core/edgeNetwork/injectProcessWarningsAndErrors.js +0 -43
  221. package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +0 -100
  222. package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +0 -29
  223. package/libEs5/core/index.js +0 -240
  224. package/libEs5/core/initializeComponents.js +0 -42
  225. package/libEs5/core/injectCreateResponse.js +0 -78
  226. package/libEs5/core/injectExecuteCommand.js +0 -105
  227. package/libEs5/core/injectHandleError.js +0 -37
  228. package/libEs5/core/injectShouldTransferCookie.js +0 -29
  229. package/libEs5/core/network/getRequestRetryDelay.js +0 -74
  230. package/libEs5/core/network/injectSendNetworkRequest.js +0 -100
  231. package/libEs5/core/network/isRequestRetryable.js +0 -28
  232. package/libEs5/core/network/requestMethods/injectSendBeaconRequest.js +0 -40
  233. package/libEs5/core/network/requestMethods/injectSendFetchRequest.js +0 -45
  234. package/libEs5/core/network/requestMethods/injectSendXhrRequest.js +0 -51
  235. package/libEs5/core/validateCommandOptions.js +0 -35
  236. package/libEs5/index.js +0 -60
  237. package/libEs5/utils/areThirdPartyCookiesSupportedByDefault.js +0 -25
  238. package/libEs5/utils/assign.js +0 -17
  239. package/libEs5/utils/assignConcatArrayValues.js +0 -49
  240. package/libEs5/utils/assignIf.js +0 -22
  241. package/libEs5/utils/clone.js +0 -23
  242. package/libEs5/utils/cookieJar.js +0 -22
  243. package/libEs5/utils/crc32.js +0 -37
  244. package/libEs5/utils/createCallbackAggregator.js +0 -39
  245. package/libEs5/utils/createLoggingCookieJar.js +0 -31
  246. package/libEs5/utils/createMerger.js +0 -34
  247. package/libEs5/utils/createSubscription.js +0 -91
  248. package/libEs5/utils/createTaskQueue.js +0 -51
  249. package/libEs5/utils/debounce.js +0 -30
  250. package/libEs5/utils/deduplicateArray.js +0 -32
  251. package/libEs5/utils/deepAssign.js +0 -49
  252. package/libEs5/utils/defer.js +0 -27
  253. package/libEs5/utils/dom/appendNode.js +0 -18
  254. package/libEs5/utils/dom/awaitSelector.js +0 -111
  255. package/libEs5/utils/dom/createNode.js +0 -48
  256. package/libEs5/utils/dom/index.js +0 -58
  257. package/libEs5/utils/dom/isShadowSelector.js +0 -19
  258. package/libEs5/utils/dom/matchesSelector.js +0 -29
  259. package/libEs5/utils/dom/querySelectorAll.js +0 -33
  260. package/libEs5/utils/dom/removeNode.js +0 -22
  261. package/libEs5/utils/dom/selectNodes.js +0 -31
  262. package/libEs5/utils/dom/selectNodesWithShadow.js +0 -67
  263. package/libEs5/utils/endsWith.js +0 -24
  264. package/libEs5/utils/filterObject.js +0 -53
  265. package/libEs5/utils/find.js +0 -31
  266. package/libEs5/utils/fireImage.js +0 -39
  267. package/libEs5/utils/flatMap.js +0 -18
  268. package/libEs5/utils/flattenArray.js +0 -37
  269. package/libEs5/utils/flattenObject.js +0 -43
  270. package/libEs5/utils/getApexDomain.js +0 -46
  271. package/libEs5/utils/getBrowser.js +0 -34
  272. package/libEs5/utils/getLastArrayItems.js +0 -24
  273. package/libEs5/utils/getNamespacedCookieName.js +0 -20
  274. package/libEs5/utils/groupBy.js +0 -32
  275. package/libEs5/utils/includes.js +0 -24
  276. package/libEs5/utils/index.js +0 -408
  277. package/libEs5/utils/injectDoesIdentityCookieExist.js +0 -28
  278. package/libEs5/utils/injectFireReferrerHideableImage.js +0 -76
  279. package/libEs5/utils/injectStorage.js +0 -75
  280. package/libEs5/utils/intersection.js +0 -27
  281. package/libEs5/utils/isBlankString.js +0 -24
  282. package/libEs5/utils/isBoolean.js +0 -23
  283. package/libEs5/utils/isEmptyObject.js +0 -24
  284. package/libEs5/utils/isFunction.js +0 -23
  285. package/libEs5/utils/isInteger.js +0 -25
  286. package/libEs5/utils/isNamespacedCookieName.js +0 -27
  287. package/libEs5/utils/isNil.js +0 -23
  288. package/libEs5/utils/isNonEmptyArray.js +0 -23
  289. package/libEs5/utils/isNonEmptyString.js +0 -24
  290. package/libEs5/utils/isNumber.js +0 -24
  291. package/libEs5/utils/isObject.js +0 -24
  292. package/libEs5/utils/isString.js +0 -23
  293. package/libEs5/utils/isUnique.js +0 -31
  294. package/libEs5/utils/isValidRegExp.js +0 -27
  295. package/libEs5/utils/memoize.js +0 -37
  296. package/libEs5/utils/noop.js +0 -19
  297. package/libEs5/utils/padStart.js +0 -28
  298. package/libEs5/utils/parseUrl.js +0 -70
  299. package/libEs5/utils/prepareConfigOverridesForEdge.js +0 -53
  300. package/libEs5/utils/querystring.js +0 -17
  301. package/libEs5/utils/request/createAddIdentity.js +0 -23
  302. package/libEs5/utils/request/createDataCollectionRequest.js +0 -69
  303. package/libEs5/utils/request/createDataCollectionRequestPayload.js +0 -36
  304. package/libEs5/utils/request/createGetAssuranceValidationTokenParams.js +0 -45
  305. package/libEs5/utils/request/createHasIdentity.js +0 -20
  306. package/libEs5/utils/request/createRequest.js +0 -63
  307. package/libEs5/utils/request/createRequestParams.js +0 -45
  308. package/libEs5/utils/request/createRequestPayload.js +0 -37
  309. package/libEs5/utils/request/index.js +0 -58
  310. package/libEs5/utils/sanitizeOrgIdForCookieName.js +0 -18
  311. package/libEs5/utils/stackError.js +0 -35
  312. package/libEs5/utils/startsWith.js +0 -24
  313. package/libEs5/utils/stringToBoolean.js +0 -19
  314. package/libEs5/utils/toArray.js +0 -24
  315. package/libEs5/utils/toError.js +0 -24
  316. package/libEs5/utils/toISOStringLocal.js +0 -40
  317. package/libEs5/utils/toInteger.js +0 -32
  318. package/libEs5/utils/updateErrorMessage.js +0 -25
  319. package/libEs5/utils/uuid.js +0 -17
  320. package/libEs5/utils/validateConfigOverride.js +0 -17
  321. package/libEs5/utils/validateIdentityMap.js +0 -26
  322. package/libEs5/utils/validation/booleanValidator.js +0 -21
  323. package/libEs5/utils/validation/callbackValidator.js +0 -21
  324. package/libEs5/utils/validation/createAnyOfValidator.js +0 -33
  325. package/libEs5/utils/validation/createArrayOfValidator.js +0 -35
  326. package/libEs5/utils/validation/createDefaultValidator.js +0 -23
  327. package/libEs5/utils/validation/createDeprecatedValidator.js +0 -45
  328. package/libEs5/utils/validation/createLiteralValidator.js +0 -22
  329. package/libEs5/utils/validation/createMapOfValuesValidator.js +0 -41
  330. package/libEs5/utils/validation/createMaximumValidator.js +0 -22
  331. package/libEs5/utils/validation/createMinimumValidator.js +0 -22
  332. package/libEs5/utils/validation/createNoUnknownFieldsValidator.js +0 -30
  333. package/libEs5/utils/validation/createNonEmptyValidator.js +0 -28
  334. package/libEs5/utils/validation/createObjectOfValidator.js +0 -49
  335. package/libEs5/utils/validation/createUniqueItemsValidator.js +0 -22
  336. package/libEs5/utils/validation/createUniqueValidator.js +0 -24
  337. package/libEs5/utils/validation/domainValidator.js +0 -22
  338. package/libEs5/utils/validation/index.js +0 -247
  339. package/libEs5/utils/validation/integerValidator.js +0 -21
  340. package/libEs5/utils/validation/matchesRegexpValidator.js +0 -22
  341. package/libEs5/utils/validation/numberValidator.js +0 -21
  342. package/libEs5/utils/validation/regexpValidator.js +0 -21
  343. package/libEs5/utils/validation/requiredValidator.js +0 -21
  344. package/libEs5/utils/validation/stringValidator.js +0 -21
  345. package/libEs5/utils/validation/utils.js +0 -141
  346. package/libEs5/utils/values.js +0 -26
  347. package/libEs6/baseCode/index.js +0 -61
  348. package/libEs6/components/ActivityCollector/attachClickActivityCollector.js +0 -52
  349. package/libEs6/components/ActivityCollector/configValidators.js +0 -19
  350. package/libEs6/components/ActivityCollector/createGetLinkDetails.js +0 -70
  351. package/libEs6/components/ActivityCollector/createLinkClick.js +0 -37
  352. package/libEs6/components/ActivityCollector/getLinkName.js +0 -136
  353. package/libEs6/components/ActivityCollector/getLinkRegion.js +0 -58
  354. package/libEs6/components/ActivityCollector/index.js +0 -81
  355. package/libEs6/components/ActivityCollector/utils.js +0 -104
  356. package/libEs6/components/Audiences/index.js +0 -47
  357. package/libEs6/components/Audiences/injectProcessDestinations.js +0 -60
  358. package/libEs6/components/Audiences/injectProcessResponse.js +0 -38
  359. package/libEs6/components/Context/createComponent.js +0 -34
  360. package/libEs6/components/Context/implementationDetails.js +0 -24
  361. package/libEs6/components/Context/index.js +0 -52
  362. package/libEs6/components/Context/injectDevice.js +0 -70
  363. package/libEs6/components/Context/injectEnvironment.js +0 -42
  364. package/libEs6/components/Context/injectHighEntropyUserAgentHints.js +0 -45
  365. package/libEs6/components/Context/injectPlaceContext.js +0 -29
  366. package/libEs6/components/Context/injectTimestamp.js +0 -21
  367. package/libEs6/components/Context/injectWeb.js +0 -28
  368. package/libEs6/components/DataCollector/index.js +0 -106
  369. package/libEs6/components/DataCollector/validateApplyResponse.js +0 -33
  370. package/libEs6/components/DataCollector/validateUserEventOptions.js +0 -49
  371. package/libEs6/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +0 -30
  372. package/libEs6/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +0 -24
  373. package/libEs6/components/DecisioningEngine/constants.js +0 -25
  374. package/libEs6/components/DecisioningEngine/createApplyResponse.js +0 -31
  375. package/libEs6/components/DecisioningEngine/createConsequenceAdapter.js +0 -29
  376. package/libEs6/components/DecisioningEngine/createContextProvider.js +0 -95
  377. package/libEs6/components/DecisioningEngine/createDecisionHistory.js +0 -25
  378. package/libEs6/components/DecisioningEngine/createDecisionProvider.js +0 -41
  379. package/libEs6/components/DecisioningEngine/createEvaluableRulesetPayload.js +0 -79
  380. package/libEs6/components/DecisioningEngine/createEvaluateRulesetsCommand.js +0 -45
  381. package/libEs6/components/DecisioningEngine/createEventRegistry.js +0 -120
  382. package/libEs6/components/DecisioningEngine/createOnResponseHandler.js +0 -45
  383. package/libEs6/components/DecisioningEngine/createSubscribeRulesetItems.js +0 -79
  384. package/libEs6/components/DecisioningEngine/index.js +0 -124
  385. package/libEs6/components/DecisioningEngine/utils.js +0 -83
  386. package/libEs6/components/EventMerge/createComponent.js +0 -23
  387. package/libEs6/components/EventMerge/createEventMergeId.js +0 -18
  388. package/libEs6/components/EventMerge/index.js +0 -21
  389. package/libEs6/components/Identity/addEcidQueryToPayload.js +0 -20
  390. package/libEs6/components/Identity/addEcidToPayload.js +0 -18
  391. package/libEs6/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +0 -23
  392. package/libEs6/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +0 -31
  393. package/libEs6/components/Identity/configValidators.js +0 -18
  394. package/libEs6/components/Identity/constants/authState.js +0 -15
  395. package/libEs6/components/Identity/constants/defaultIdSyncTtlMinutes.js +0 -13
  396. package/libEs6/components/Identity/createComponent.js +0 -97
  397. package/libEs6/components/Identity/createLegacyIdentity.js +0 -69
  398. package/libEs6/components/Identity/getEcidFromResponse.js +0 -19
  399. package/libEs6/components/Identity/getIdentity/createGetIdentity.js +0 -34
  400. package/libEs6/components/Identity/getIdentity/createIdentityRequest.js +0 -28
  401. package/libEs6/components/Identity/getIdentity/createIdentityRequestPayload.js +0 -27
  402. package/libEs6/components/Identity/getIdentity/getIdentityOptionsValidator.js +0 -25
  403. package/libEs6/components/Identity/index.js +0 -124
  404. package/libEs6/components/Identity/injectAddLegacyEcidToPayload.js +0 -30
  405. package/libEs6/components/Identity/injectAddQueryStringIdentityToPayload.js +0 -55
  406. package/libEs6/components/Identity/injectAwaitIdentityCookie.js +0 -56
  407. package/libEs6/components/Identity/injectEnsureSingleIdentity.js +0 -97
  408. package/libEs6/components/Identity/injectHandleResponseForIdSyncs.js +0 -19
  409. package/libEs6/components/Identity/injectProcessIdSyncs.js +0 -34
  410. package/libEs6/components/Identity/injectSetDomainForInitialIdentityPayload.js +0 -32
  411. package/libEs6/components/Identity/visitorService/awaitVisitorOptIn.js +0 -33
  412. package/libEs6/components/Identity/visitorService/getVisitor.js +0 -17
  413. package/libEs6/components/Identity/visitorService/injectGetEcidFromVisitor.js +0 -48
  414. package/libEs6/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -276
  415. package/libEs6/components/LegacyMediaAnalytics/createMediaHelper.js +0 -186
  416. package/libEs6/components/LegacyMediaAnalytics/index.js +0 -45
  417. package/libEs6/components/LegacyMediaAnalytics/media/constants.js +0 -140
  418. package/libEs6/components/LegacyMediaAnalytics/media/mediaKeysToXdmConverter.js +0 -46
  419. package/libEs6/components/LibraryInfo/index.js +0 -57
  420. package/libEs6/components/MachineLearning/index.js +0 -23
  421. package/libEs6/components/MachineLearning/processResponse.js +0 -18
  422. package/libEs6/components/MediaCollection/constants/eventTypes.js +0 -21
  423. package/libEs6/components/MediaCollection/createHeartbeatEngine.js +0 -64
  424. package/libEs6/components/MediaCollection/createMediaEventManager.js +0 -115
  425. package/libEs6/components/MediaCollection/createMediaRequest.js +0 -28
  426. package/libEs6/components/MediaCollection/createMediaSessionCacheManager.js +0 -63
  427. package/libEs6/components/MediaCollection/createUpdateMediaSessionState.js +0 -30
  428. package/libEs6/components/MediaCollection/index.js +0 -164
  429. package/libEs6/components/MediaCollection/validateMediaEventOptions.js +0 -32
  430. package/libEs6/components/MediaCollection/validateMediaSessionOptions.js +0 -34
  431. package/libEs6/components/Personalization/constants/loggerMessage.js +0 -13
  432. package/libEs6/components/Personalization/constants/scopeType.js +0 -15
  433. package/libEs6/components/Personalization/constants/surface.js +0 -16
  434. package/libEs6/components/Personalization/createActionsProvider.js +0 -70
  435. package/libEs6/components/Personalization/createApplyPropositions.js +0 -103
  436. package/libEs6/components/Personalization/createClickStorage.js +0 -58
  437. package/libEs6/components/Personalization/createCollect.js +0 -48
  438. package/libEs6/components/Personalization/createComponent.js +0 -129
  439. package/libEs6/components/Personalization/createFetchDataHandler.js +0 -74
  440. package/libEs6/components/Personalization/createGetPageLocation.js +0 -17
  441. package/libEs6/components/Personalization/createNotificationHandler.js +0 -29
  442. package/libEs6/components/Personalization/createOnClickHandler.js +0 -52
  443. package/libEs6/components/Personalization/createOnDecisionHandler.js +0 -42
  444. package/libEs6/components/Personalization/createPersonalizationDetails.js +0 -94
  445. package/libEs6/components/Personalization/createPreprocessors.js +0 -19
  446. package/libEs6/components/Personalization/createSetTargetMigration.js +0 -27
  447. package/libEs6/components/Personalization/createViewCacheManager.js +0 -81
  448. package/libEs6/components/Personalization/createViewChangeHandler.js +0 -47
  449. package/libEs6/components/Personalization/dom-actions/action.js +0 -49
  450. package/libEs6/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +0 -36
  451. package/libEs6/components/Personalization/dom-actions/appendHtml.js +0 -30
  452. package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +0 -91
  453. package/libEs6/components/Personalization/dom-actions/createPreprocess.js +0 -18
  454. package/libEs6/components/Personalization/dom-actions/createRedirect.js +0 -22
  455. package/libEs6/components/Personalization/dom-actions/dom/createFragment.js +0 -19
  456. package/libEs6/components/Personalization/dom-actions/dom/getAttribute.js +0 -15
  457. package/libEs6/components/Personalization/dom-actions/dom/getChildNodes.js +0 -22
  458. package/libEs6/components/Personalization/dom-actions/dom/getChildren.js +0 -22
  459. package/libEs6/components/Personalization/dom-actions/dom/getElementById.js +0 -21
  460. package/libEs6/components/Personalization/dom-actions/dom/getFirstChild.js +0 -15
  461. package/libEs6/components/Personalization/dom-actions/dom/getNextSibling.js +0 -15
  462. package/libEs6/components/Personalization/dom-actions/dom/getNonce.js +0 -33
  463. package/libEs6/components/Personalization/dom-actions/dom/getParent.js +0 -15
  464. package/libEs6/components/Personalization/dom-actions/dom/helperForEq.js +0 -19
  465. package/libEs6/components/Personalization/dom-actions/dom/index.js +0 -26
  466. package/libEs6/components/Personalization/dom-actions/dom/insertAfter.js +0 -23
  467. package/libEs6/components/Personalization/dom-actions/dom/insertBefore.js +0 -22
  468. package/libEs6/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +0 -35
  469. package/libEs6/components/Personalization/dom-actions/dom/removeAttribute.js +0 -15
  470. package/libEs6/components/Personalization/dom-actions/dom/selectNodesWithEq.js +0 -102
  471. package/libEs6/components/Personalization/dom-actions/dom/setAttribute.js +0 -15
  472. package/libEs6/components/Personalization/dom-actions/dom/setStyle.js +0 -21
  473. package/libEs6/components/Personalization/dom-actions/images.js +0 -31
  474. package/libEs6/components/Personalization/dom-actions/index.js +0 -13
  475. package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +0 -33
  476. package/libEs6/components/Personalization/dom-actions/insertHtmlAfter.js +0 -29
  477. package/libEs6/components/Personalization/dom-actions/insertHtmlBefore.js +0 -29
  478. package/libEs6/components/Personalization/dom-actions/prependHtml.js +0 -45
  479. package/libEs6/components/Personalization/dom-actions/rearrangeChildren.js +0 -31
  480. package/libEs6/components/Personalization/dom-actions/remapCustomCodeOffers.js +0 -34
  481. package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +0 -51
  482. package/libEs6/components/Personalization/dom-actions/replaceHtml.js +0 -18
  483. package/libEs6/components/Personalization/dom-actions/scripts.js +0 -85
  484. package/libEs6/components/Personalization/dom-actions/setAttributes.js +0 -18
  485. package/libEs6/components/Personalization/dom-actions/setHtml.js +0 -24
  486. package/libEs6/components/Personalization/dom-actions/setStyles.js +0 -22
  487. package/libEs6/components/Personalization/dom-actions/setText.js +0 -15
  488. package/libEs6/components/Personalization/dom-actions/swapImage.js +0 -29
  489. package/libEs6/components/Personalization/event.js +0 -45
  490. package/libEs6/components/Personalization/flicker/index.js +0 -82
  491. package/libEs6/components/Personalization/handlers/createProcessDomAction.js +0 -61
  492. package/libEs6/components/Personalization/handlers/createProcessHtmlContent.js +0 -40
  493. package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +0 -77
  494. package/libEs6/components/Personalization/handlers/createProcessPropositions.js +0 -175
  495. package/libEs6/components/Personalization/handlers/createProcessRedirect.js +0 -42
  496. package/libEs6/components/Personalization/handlers/injectCreateProposition.js +0 -110
  497. package/libEs6/components/Personalization/handlers/processDefaultContent.js +0 -17
  498. package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +0 -291
  499. package/libEs6/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +0 -17
  500. package/libEs6/components/Personalization/in-app-message-actions/utils.js +0 -49
  501. package/libEs6/components/Personalization/index.js +0 -159
  502. package/libEs6/components/Personalization/utils/addRenderAttemptedToDecisions.js +0 -21
  503. package/libEs6/components/Personalization/utils/createAsyncArray.js +0 -35
  504. package/libEs6/components/Personalization/utils/isAuthoringModeEnabled.js +0 -15
  505. package/libEs6/components/Personalization/utils/surfaceUtils.js +0 -74
  506. package/libEs6/components/Personalization/validateApplyPropositionsOptions.js +0 -31
  507. package/libEs6/components/Privacy/computeConsentHash.js +0 -30
  508. package/libEs6/components/Privacy/createComponent.js +0 -85
  509. package/libEs6/components/Privacy/createConsentHashStore.js +0 -57
  510. package/libEs6/components/Privacy/createConsentRequest.js +0 -28
  511. package/libEs6/components/Privacy/createConsentRequestPayload.js +0 -31
  512. package/libEs6/components/Privacy/createStoredConsent.js +0 -30
  513. package/libEs6/components/Privacy/index.js +0 -63
  514. package/libEs6/components/Privacy/injectSendSetConsentRequest.js +0 -45
  515. package/libEs6/components/Privacy/parseConsentCookie.js +0 -26
  516. package/libEs6/components/Privacy/validateSetConsentOptions.js +0 -18
  517. package/libEs6/constants/apiVersion.js +0 -12
  518. package/libEs6/constants/browser.js +0 -19
  519. package/libEs6/constants/consentPurpose.js +0 -13
  520. package/libEs6/constants/consentStatus.js +0 -15
  521. package/libEs6/constants/contentType.js +0 -13
  522. package/libEs6/constants/cookieNameKey.js +0 -15
  523. package/libEs6/constants/cookieNamePrefix.js +0 -14
  524. package/libEs6/constants/coreCommands.js +0 -14
  525. package/libEs6/constants/debugQueryParam.js +0 -13
  526. package/libEs6/constants/decisionProvider.js +0 -12
  527. package/libEs6/constants/domain.js +0 -14
  528. package/libEs6/constants/ecidNamespace.js +0 -13
  529. package/libEs6/constants/edgeBasePath.js +0 -12
  530. package/libEs6/constants/elementAttribute.js +0 -13
  531. package/libEs6/constants/eventType.js +0 -17
  532. package/libEs6/constants/handle.js +0 -12
  533. package/libEs6/constants/highEntropyUserAgentClientHints.js +0 -13
  534. package/libEs6/constants/httpHeaderNames.js +0 -14
  535. package/libEs6/constants/httpStatusCode.js +0 -17
  536. package/libEs6/constants/identityMapAuthenticatedState.js +0 -14
  537. package/libEs6/constants/legacyCookies.js +0 -15
  538. package/libEs6/constants/libraryName.js +0 -13
  539. package/libEs6/constants/libraryVersion.js +0 -16
  540. package/libEs6/constants/namespace.js +0 -13
  541. package/libEs6/constants/pageWideScope.js +0 -13
  542. package/libEs6/constants/propositionEventType.js +0 -33
  543. package/libEs6/constants/queryStringIdentityParam.js +0 -13
  544. package/libEs6/constants/schema.js +0 -22
  545. package/libEs6/constants/shadowSeparator.js +0 -13
  546. package/libEs6/constants/tagName.js +0 -19
  547. package/libEs6/core/buildAndValidateConfig.js +0 -94
  548. package/libEs6/core/componentCreators.js +0 -31
  549. package/libEs6/core/config/createConfig.js +0 -17
  550. package/libEs6/core/config/createCoreConfigs.js +0 -27
  551. package/libEs6/core/consent/createConsent.js +0 -57
  552. package/libEs6/core/consent/createConsentStateMachine.js +0 -91
  553. package/libEs6/core/createComponentRegistry.js +0 -80
  554. package/libEs6/core/createCookieTransfer.js +0 -78
  555. package/libEs6/core/createEvent.js +0 -161
  556. package/libEs6/core/createEventManager.js +0 -135
  557. package/libEs6/core/createInstanceFunction.js +0 -25
  558. package/libEs6/core/createLifecycle.js +0 -65
  559. package/libEs6/core/createLogController.js +0 -68
  560. package/libEs6/core/createLogger.js +0 -99
  561. package/libEs6/core/edgeNetwork/handleRequestFailure.js +0 -24
  562. package/libEs6/core/edgeNetwork/injectApplyResponse.js +0 -58
  563. package/libEs6/core/edgeNetwork/injectExtractEdgeInfo.js +0 -39
  564. package/libEs6/core/edgeNetwork/injectGetLocationHint.js +0 -32
  565. package/libEs6/core/edgeNetwork/injectProcessWarningsAndErrors.js +0 -42
  566. package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +0 -100
  567. package/libEs6/core/edgeNetwork/mergeLifecycleResponses.js +0 -21
  568. package/libEs6/core/index.js +0 -236
  569. package/libEs6/core/initializeComponents.js +0 -40
  570. package/libEs6/core/injectCreateResponse.js +0 -70
  571. package/libEs6/core/injectExecuteCommand.js +0 -100
  572. package/libEs6/core/injectHandleError.js +0 -33
  573. package/libEs6/core/injectShouldTransferCookie.js +0 -25
  574. package/libEs6/core/network/getRequestRetryDelay.js +0 -72
  575. package/libEs6/core/network/injectSendNetworkRequest.js +0 -96
  576. package/libEs6/core/network/isRequestRetryable.js +0 -25
  577. package/libEs6/core/network/requestMethods/injectSendBeaconRequest.js +0 -38
  578. package/libEs6/core/network/requestMethods/injectSendFetchRequest.js +0 -41
  579. package/libEs6/core/network/requestMethods/injectSendXhrRequest.js +0 -49
  580. package/libEs6/core/validateCommandOptions.js +0 -33
  581. package/libEs6/index.js +0 -55
  582. package/libEs6/utils/areThirdPartyCookiesSupportedByDefault.js +0 -20
  583. package/libEs6/utils/assign.js +0 -14
  584. package/libEs6/utils/assignConcatArrayValues.js +0 -36
  585. package/libEs6/utils/assignIf.js +0 -19
  586. package/libEs6/utils/clone.js +0 -18
  587. package/libEs6/utils/cookieJar.js +0 -19
  588. package/libEs6/utils/crc32.js +0 -33
  589. package/libEs6/utils/createCallbackAggregator.js +0 -31
  590. package/libEs6/utils/createLoggingCookieJar.js +0 -28
  591. package/libEs6/utils/createMerger.js +0 -30
  592. package/libEs6/utils/createSubscription.js +0 -70
  593. package/libEs6/utils/createTaskQueue.js +0 -48
  594. package/libEs6/utils/debounce.js +0 -22
  595. package/libEs6/utils/deduplicateArray.js +0 -23
  596. package/libEs6/utils/deepAssign.js +0 -40
  597. package/libEs6/utils/defer.js +0 -24
  598. package/libEs6/utils/dom/appendNode.js +0 -15
  599. package/libEs6/utils/dom/awaitSelector.js +0 -98
  600. package/libEs6/utils/dom/createNode.js +0 -38
  601. package/libEs6/utils/dom/index.js +0 -20
  602. package/libEs6/utils/dom/isShadowSelector.js +0 -14
  603. package/libEs6/utils/dom/matchesSelector.js +0 -26
  604. package/libEs6/utils/dom/querySelectorAll.js +0 -29
  605. package/libEs6/utils/dom/removeNode.js +0 -19
  606. package/libEs6/utils/dom/selectNodes.js +0 -28
  607. package/libEs6/utils/dom/selectNodesWithShadow.js +0 -63
  608. package/libEs6/utils/endsWith.js +0 -19
  609. package/libEs6/utils/filterObject.js +0 -55
  610. package/libEs6/utils/find.js +0 -28
  611. package/libEs6/utils/fireImage.js +0 -37
  612. package/libEs6/utils/flatMap.js +0 -14
  613. package/libEs6/utils/flattenArray.js +0 -26
  614. package/libEs6/utils/flattenObject.js +0 -28
  615. package/libEs6/utils/getApexDomain.js +0 -42
  616. package/libEs6/utils/getBrowser.js +0 -65
  617. package/libEs6/utils/getLastArrayItems.js +0 -19
  618. package/libEs6/utils/getNamespacedCookieName.js +0 -15
  619. package/libEs6/utils/groupBy.js +0 -29
  620. package/libEs6/utils/includes.js +0 -21
  621. package/libEs6/utils/index.js +0 -71
  622. package/libEs6/utils/injectDoesIdentityCookieExist.js +0 -24
  623. package/libEs6/utils/injectFireReferrerHideableImage.js +0 -65
  624. package/libEs6/utils/injectStorage.js +0 -69
  625. package/libEs6/utils/intersection.js +0 -21
  626. package/libEs6/utils/isBlankString.js +0 -20
  627. package/libEs6/utils/isBoolean.js +0 -18
  628. package/libEs6/utils/isEmptyObject.js +0 -20
  629. package/libEs6/utils/isFunction.js +0 -18
  630. package/libEs6/utils/isInteger.js +0 -23
  631. package/libEs6/utils/isNamespacedCookieName.js +0 -23
  632. package/libEs6/utils/isNil.js +0 -18
  633. package/libEs6/utils/isNonEmptyArray.js +0 -18
  634. package/libEs6/utils/isNonEmptyString.js +0 -20
  635. package/libEs6/utils/isNumber.js +0 -19
  636. package/libEs6/utils/isObject.js +0 -20
  637. package/libEs6/utils/isString.js +0 -18
  638. package/libEs6/utils/isUnique.js +0 -27
  639. package/libEs6/utils/isValidRegExp.js +0 -24
  640. package/libEs6/utils/memoize.js +0 -34
  641. package/libEs6/utils/noop.js +0 -16
  642. package/libEs6/utils/padStart.js +0 -25
  643. package/libEs6/utils/parseUrl.js +0 -62
  644. package/libEs6/utils/prepareConfigOverridesForEdge.js +0 -50
  645. package/libEs6/utils/querystring.js +0 -14
  646. package/libEs6/utils/request/createAddIdentity.js +0 -19
  647. package/libEs6/utils/request/createDataCollectionRequest.js +0 -69
  648. package/libEs6/utils/request/createDataCollectionRequestPayload.js +0 -30
  649. package/libEs6/utils/request/createGetAssuranceValidationTokenParams.js +0 -42
  650. package/libEs6/utils/request/createHasIdentity.js +0 -15
  651. package/libEs6/utils/request/createRequest.js +0 -63
  652. package/libEs6/utils/request/createRequestParams.js +0 -40
  653. package/libEs6/utils/request/createRequestPayload.js +0 -35
  654. package/libEs6/utils/request/index.js +0 -20
  655. package/libEs6/utils/sanitizeOrgIdForCookieName.js +0 -13
  656. package/libEs6/utils/stackError.js +0 -34
  657. package/libEs6/utils/startsWith.js +0 -19
  658. package/libEs6/utils/stringToBoolean.js +0 -15
  659. package/libEs6/utils/toArray.js +0 -21
  660. package/libEs6/utils/toError.js +0 -21
  661. package/libEs6/utils/toISOStringLocal.js +0 -37
  662. package/libEs6/utils/toInteger.js +0 -30
  663. package/libEs6/utils/updateErrorMessage.js +0 -23
  664. package/libEs6/utils/uuid.js +0 -14
  665. package/libEs6/utils/validateConfigOverride.js +0 -14
  666. package/libEs6/utils/validateIdentityMap.js +0 -23
  667. package/libEs6/utils/validation/booleanValidator.js +0 -18
  668. package/libEs6/utils/validation/callbackValidator.js +0 -17
  669. package/libEs6/utils/validation/createAnyOfValidator.js +0 -26
  670. package/libEs6/utils/validation/createArrayOfValidator.js +0 -28
  671. package/libEs6/utils/validation/createDefaultValidator.js +0 -18
  672. package/libEs6/utils/validation/createDeprecatedValidator.js +0 -37
  673. package/libEs6/utils/validation/createLiteralValidator.js +0 -16
  674. package/libEs6/utils/validation/createMapOfValuesValidator.js +0 -35
  675. package/libEs6/utils/validation/createMaximumValidator.js +0 -16
  676. package/libEs6/utils/validation/createMinimumValidator.js +0 -16
  677. package/libEs6/utils/validation/createNoUnknownFieldsValidator.js +0 -25
  678. package/libEs6/utils/validation/createNonEmptyValidator.js +0 -23
  679. package/libEs6/utils/validation/createObjectOfValidator.js +0 -43
  680. package/libEs6/utils/validation/createUniqueItemsValidator.js +0 -18
  681. package/libEs6/utils/validation/createUniqueValidator.js +0 -21
  682. package/libEs6/utils/validation/domainValidator.js +0 -17
  683. package/libEs6/utils/validation/index.js +0 -232
  684. package/libEs6/utils/validation/integerValidator.js +0 -18
  685. package/libEs6/utils/validation/matchesRegexpValidator.js +0 -17
  686. package/libEs6/utils/validation/numberValidator.js +0 -18
  687. package/libEs6/utils/validation/regexpValidator.js +0 -18
  688. package/libEs6/utils/validation/requiredValidator.js +0 -18
  689. package/libEs6/utils/validation/stringValidator.js +0 -17
  690. package/libEs6/utils/validation/utils.js +0 -127
  691. package/libEs6/utils/values.js +0 -21
@@ -1,84 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- var _utils = require("../utils");
5
- /*
6
- Copyright 2019 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
-
17
- var wrapForErrorHandling = function wrapForErrorHandling(fn, stackMessage) {
18
- return function () {
19
- var result;
20
- try {
21
- result = fn.apply(void 0, arguments);
22
- } catch (error) {
23
- throw (0, _utils.stackError)({
24
- error: error,
25
- message: stackMessage
26
- });
27
- }
28
- if (result instanceof Promise) {
29
- result = result.catch(function (error) {
30
- throw (0, _utils.stackError)({
31
- error: error,
32
- message: stackMessage
33
- });
34
- });
35
- }
36
- return result;
37
- };
38
- };
39
-
40
- // TO-DOCUMENT: All public commands and their signatures.
41
- var _default = function _default() {
42
- var componentsByNamespace = {};
43
- var commandsByName = {};
44
- var lifecycleCallbacksByName = {};
45
- var registerComponentCommands = function registerComponentCommands(namespace) {
46
- var componentCommandsByName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47
- var conflictingCommandNames = (0, _utils.intersection)(Object.keys(commandsByName), Object.keys(componentCommandsByName));
48
- if (conflictingCommandNames.length) {
49
- throw new Error("[ComponentRegistry] Could not register " + namespace + " " + ("because it has existing command(s): " + conflictingCommandNames.join(",")));
50
- }
51
- Object.keys(componentCommandsByName).forEach(function (commandName) {
52
- var command = componentCommandsByName[commandName];
53
- command.commandName = commandName;
54
- command.run = wrapForErrorHandling(command.run, "[" + namespace + "] An error occurred while executing the " + commandName + " command.");
55
- commandsByName[commandName] = command;
56
- });
57
- };
58
- var registerLifecycleCallbacks = function registerLifecycleCallbacks(namespace) {
59
- var componentLifecycleCallbacksByName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
60
- Object.keys(componentLifecycleCallbacksByName).forEach(function (hookName) {
61
- lifecycleCallbacksByName[hookName] = lifecycleCallbacksByName[hookName] || [];
62
- lifecycleCallbacksByName[hookName].push(wrapForErrorHandling(componentLifecycleCallbacksByName[hookName], "[" + namespace + "] An error occurred while executing the " + hookName + " lifecycle hook."));
63
- });
64
- };
65
- return {
66
- register: function register(namespace, component) {
67
- var commands = component.commands,
68
- lifecycle = component.lifecycle;
69
- registerComponentCommands(namespace, commands);
70
- registerLifecycleCallbacks(namespace, lifecycle);
71
- componentsByNamespace[namespace] = component;
72
- },
73
- getCommand: function getCommand(commandName) {
74
- return commandsByName[commandName];
75
- },
76
- getCommandNames: function getCommandNames() {
77
- return Object.keys(commandsByName);
78
- },
79
- getLifecycleCallbacks: function getLifecycleCallbacks(hookName) {
80
- return lifecycleCallbacksByName[hookName] || [];
81
- }
82
- };
83
- };
84
- exports.default = _default;
@@ -1,81 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- var _utils = require("../utils");
5
- /*
6
- Copyright 2019 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
-
17
- var STATE_STORE_HANDLE_TYPE = "state:store";
18
- var _default = function _default(_ref) {
19
- var cookieJar = _ref.cookieJar,
20
- shouldTransferCookie = _ref.shouldTransferCookie,
21
- apexDomain = _ref.apexDomain,
22
- dateProvider = _ref.dateProvider;
23
- return {
24
- /**
25
- * When sending to a third-party endpoint, the endpoint won't be able to
26
- * access first-party cookies, therefore we transfer cookies into
27
- * the request body so they can be read by the server.
28
- */
29
- cookiesToPayload: function cookiesToPayload(payload, endpointDomain) {
30
- var isEndpointFirstParty = (0, _utils.endsWith)(endpointDomain, apexDomain);
31
- var state = {
32
- domain: apexDomain,
33
- cookiesEnabled: true
34
- };
35
-
36
- // If the endpoint is first-party, there's no need to transfer cookies
37
- // to the payload since they'll be automatically passed through cookie
38
- // headers.
39
- if (!isEndpointFirstParty) {
40
- var cookies = cookieJar.get();
41
- var entries = Object.keys(cookies).filter(shouldTransferCookie).map(function (qualifyingCookieName) {
42
- return {
43
- key: qualifyingCookieName,
44
- value: cookies[qualifyingCookieName]
45
- };
46
- });
47
- if (entries.length) {
48
- state.entries = entries;
49
- }
50
- }
51
- payload.mergeState(state);
52
- },
53
- /**
54
- * When receiving from a third-party endpoint, the endpoint won't be able to
55
- * write first-party cookies, therefore we write first-party cookies
56
- * as directed in the response body.
57
- */
58
- responseToCookies: function responseToCookies(response) {
59
- response.getPayloadsByType(STATE_STORE_HANDLE_TYPE).forEach(function (stateItem) {
60
- var options = {
61
- domain: apexDomain
62
- };
63
- var sameSite = stateItem.attrs && stateItem.attrs.SameSite && stateItem.attrs.SameSite.toLowerCase();
64
- if (stateItem.maxAge !== undefined) {
65
- // cookieJar expects "expires" as a date object
66
- options.expires = new Date(dateProvider().getTime() + stateItem.maxAge * 1000);
67
- }
68
- if (sameSite !== undefined) {
69
- options.sameSite = sameSite;
70
- }
71
- // When sameSite is set to none, the secure flag must be set.
72
- // Experience edge will not set the secure flag in these cases.
73
- if (sameSite === "none") {
74
- options.secure = true;
75
- }
76
- cookieJar.set(stateItem.key, stateItem.value, options);
77
- });
78
- }
79
- };
80
- };
81
- exports.default = _default;
@@ -1,171 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- var _utils = require("../utils");
5
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
- 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; } /*
11
- Copyright 2019 Adobe. All rights reserved.
12
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
13
- you may not use this file except in compliance with the License. You may obtain a copy
14
- of the License at http://www.apache.org/licenses/LICENSE-2.0
15
-
16
- Unless required by applicable law or agreed to in writing, software distributed under
17
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
18
- OF ANY KIND, either express or implied. See the License for the specific language
19
- governing permissions and limitations under the License.
20
- */
21
- var getXdmPropositions = function getXdmPropositions(xdm) {
22
- return xdm &&
23
- // eslint-disable-next-line no-underscore-dangle
24
- xdm._experience &&
25
- // eslint-disable-next-line no-underscore-dangle
26
- xdm._experience.decisioning &&
27
- // eslint-disable-next-line no-underscore-dangle
28
- (0, _utils.isNonEmptyArray)(xdm._experience.decisioning.propositions) ?
29
- // eslint-disable-next-line no-underscore-dangle
30
- xdm._experience.decisioning.propositions : [];
31
- };
32
- var _default = function _default() {
33
- var content = {};
34
- var userXdm;
35
- var userData;
36
- var _documentMayUnload = false;
37
- var isFinalized = false;
38
- var shouldSendEvent = true;
39
- var throwIfEventFinalized = function throwIfEventFinalized(methodName) {
40
- if (isFinalized) {
41
- throw new Error(methodName + " cannot be called after event is finalized.");
42
- }
43
- };
44
- var event = {
45
- hasQuery: function hasQuery() {
46
- return Object.prototype.hasOwnProperty.call(this.getContent(), "query");
47
- },
48
- getContent: function getContent() {
49
- var currentContent = JSON.parse(JSON.stringify(content));
50
- if (userXdm) {
51
- (0, _utils.deepAssign)(currentContent, {
52
- xdm: userXdm
53
- });
54
- }
55
- if (userData) {
56
- (0, _utils.deepAssign)(currentContent, {
57
- data: userData
58
- });
59
- }
60
- return currentContent;
61
- },
62
- setUserXdm: function setUserXdm(value) {
63
- throwIfEventFinalized("setUserXdm");
64
- userXdm = value;
65
- },
66
- setUserData: function setUserData(value) {
67
- throwIfEventFinalized("setUserData");
68
- userData = value;
69
- },
70
- mergeXdm: function mergeXdm(xdm) {
71
- throwIfEventFinalized("mergeXdm");
72
- if (xdm) {
73
- (0, _utils.deepAssign)(content, {
74
- xdm: xdm
75
- });
76
- }
77
- },
78
- mergeData: function mergeData(data) {
79
- throwIfEventFinalized("mergeData");
80
- if (data) {
81
- (0, _utils.deepAssign)(content, {
82
- data: data
83
- });
84
- }
85
- },
86
- mergeMeta: function mergeMeta(meta) {
87
- throwIfEventFinalized("mergeMeta");
88
- if (meta) {
89
- (0, _utils.deepAssign)(content, {
90
- meta: meta
91
- });
92
- }
93
- },
94
- mergeQuery: function mergeQuery(query) {
95
- throwIfEventFinalized("mergeQuery");
96
- if (query) {
97
- (0, _utils.deepAssign)(content, {
98
- query: query
99
- });
100
- }
101
- },
102
- documentMayUnload: function documentMayUnload() {
103
- _documentMayUnload = true;
104
- },
105
- finalize: function finalize(onBeforeEventSend) {
106
- if (isFinalized) {
107
- return;
108
- }
109
- var newPropositions = (0, _utils.deduplicateArray)([].concat(_toConsumableArray(getXdmPropositions(userXdm)), _toConsumableArray(getXdmPropositions(content.xdm))), function (a, b) {
110
- return a === b || a.id && b.id && a.id === b.id && a.scope && b.scope && a.scope === b.scope;
111
- });
112
- if (userXdm) {
113
- this.mergeXdm(userXdm);
114
- }
115
- if (newPropositions.length > 0) {
116
- // eslint-disable-next-line no-underscore-dangle
117
- content.xdm._experience.decisioning.propositions = newPropositions;
118
- }
119
- if (userData) {
120
- event.mergeData(userData);
121
- }
122
-
123
- // the event should already be considered finalized in case onBeforeEventSend throws an error
124
- isFinalized = true;
125
- if (onBeforeEventSend) {
126
- // assume that the onBeforeEventSend callback will fail (in-case of an error)
127
- shouldSendEvent = false;
128
-
129
- // this allows the user to replace the xdm and data properties
130
- // on the object passed to the callback
131
- var tempContent = {
132
- xdm: content.xdm || {},
133
- data: content.data || {}
134
- };
135
- var result = onBeforeEventSend(tempContent);
136
- shouldSendEvent = result !== false;
137
- content.xdm = tempContent.xdm || {};
138
- content.data = tempContent.data || {};
139
- if ((0, _utils.isEmptyObject)(content.xdm)) {
140
- delete content.xdm;
141
- }
142
- if ((0, _utils.isEmptyObject)(content.data)) {
143
- delete content.data;
144
- }
145
- }
146
- },
147
- getDocumentMayUnload: function getDocumentMayUnload() {
148
- return _documentMayUnload;
149
- },
150
- isEmpty: function isEmpty() {
151
- return (0, _utils.isEmptyObject)(content) && (!userXdm || (0, _utils.isEmptyObject)(userXdm)) && (!userData || (0, _utils.isEmptyObject)(userData));
152
- },
153
- shouldSend: function shouldSend() {
154
- return shouldSendEvent;
155
- },
156
- getViewName: function getViewName() {
157
- if (!userXdm || !userXdm.web || !userXdm.web.webPageDetails) {
158
- return undefined;
159
- }
160
- return userXdm.web.webPageDetails.viewName;
161
- },
162
- toJSON: function toJSON() {
163
- if (!isFinalized) {
164
- throw new Error("toJSON called before finalize");
165
- }
166
- return content;
167
- }
168
- };
169
- return event;
170
- };
171
- exports.default = _default;
@@ -1,142 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- var _pageWideScope = require("../constants/pageWideScope");
5
- var _utils = require("../utils");
6
- var _request = require("../utils/request");
7
- var _excluded = ["edgeConfigOverrides"];
8
- /*
9
- Copyright 2019 Adobe. All rights reserved.
10
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
11
- you may not use this file except in compliance with the License. You may obtain a copy
12
- of the License at http://www.apache.org/licenses/LICENSE-2.0
13
-
14
- Unless required by applicable law or agreed to in writing, software distributed under
15
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
16
- OF ANY KIND, either express or implied. See the License for the specific language
17
- governing permissions and limitations under the License.
18
- */
19
- 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; }
20
- 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; }
21
- 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; }
22
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
24
- var EVENT_CANCELLATION_MESSAGE = "Event was canceled because the onBeforeEventSend callback returned false.";
25
- var _default = function _default(_ref) {
26
- var config = _ref.config,
27
- logger = _ref.logger,
28
- lifecycle = _ref.lifecycle,
29
- consent = _ref.consent,
30
- createEvent = _ref.createEvent,
31
- createDataCollectionRequestPayload = _ref.createDataCollectionRequestPayload,
32
- createDataCollectionRequest = _ref.createDataCollectionRequest,
33
- sendEdgeNetworkRequest = _ref.sendEdgeNetworkRequest,
34
- _applyResponse = _ref.applyResponse;
35
- var onBeforeEventSend = config.onBeforeEventSend,
36
- globalConfigOverrides = config.edgeConfigOverrides;
37
- return {
38
- createEvent: createEvent,
39
- /**
40
- * Sends an event. This includes running the event and payload through the
41
- * appropriate lifecycle hooks, sending the request to the server, and
42
- * handling the response.
43
- * @param {Object} event This will be JSON stringified and used inside the
44
- * request payload.
45
- * @param {Object} [options] Options to pass on to the onBeforeEvent
46
- * lifecycle method
47
- * @param {Object} [options.edgeConfigOverrides] Settings that take
48
- * precedence over the global datastream configuration, including which
49
- * datastream to use.
50
- * @returns {*}
51
- */
52
- sendEvent: function sendEvent(event) {
53
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
54
- var localConfigOverrides = options.edgeConfigOverrides,
55
- otherOptions = _objectWithoutProperties(options, _excluded);
56
- var requestParams = (0, _request.createRequestParams)({
57
- payload: createDataCollectionRequestPayload(),
58
- localConfigOverrides: localConfigOverrides,
59
- globalConfigOverrides: globalConfigOverrides
60
- });
61
- var request = createDataCollectionRequest(requestParams);
62
- var onResponseCallbackAggregator = (0, _utils.createCallbackAggregator)();
63
- var onRequestFailureCallbackAggregator = (0, _utils.createCallbackAggregator)();
64
- return lifecycle.onBeforeEvent(_objectSpread(_objectSpread({}, otherOptions), {}, {
65
- event: event,
66
- onResponse: onResponseCallbackAggregator.add,
67
- onRequestFailure: onRequestFailureCallbackAggregator.add
68
- })).then(function () {
69
- requestParams.payload.addEvent(event);
70
- return consent.awaitConsent();
71
- }).then(function () {
72
- try {
73
- // NOTE: this calls onBeforeEventSend callback (if configured)
74
- event.finalize(onBeforeEventSend);
75
- } catch (error) {
76
- var throwError = function throwError() {
77
- throw error;
78
- };
79
- onRequestFailureCallbackAggregator.add(lifecycle.onRequestFailure);
80
- return onRequestFailureCallbackAggregator.call({
81
- error: error
82
- }).then(throwError, throwError);
83
- }
84
-
85
- // if the callback returns false, the event should not be sent
86
- if (!event.shouldSend()) {
87
- onRequestFailureCallbackAggregator.add(lifecycle.onRequestFailure);
88
- logger.info(EVENT_CANCELLATION_MESSAGE);
89
- var error = new Error(EVENT_CANCELLATION_MESSAGE);
90
- return onRequestFailureCallbackAggregator.call({
91
- error: error
92
- }).then(function () {
93
- // Ensure the promise gets resolved with undefined instead
94
- // of an array of return values from the callbacks.
95
- });
96
- }
97
- return sendEdgeNetworkRequest({
98
- request: request,
99
- runOnResponseCallbacks: onResponseCallbackAggregator.call,
100
- runOnRequestFailureCallbacks: onRequestFailureCallbackAggregator.call
101
- });
102
- });
103
- },
104
- applyResponse: function applyResponse(event) {
105
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
106
- var _options$renderDecisi = options.renderDecisions,
107
- renderDecisions = _options$renderDecisi === void 0 ? false : _options$renderDecisi,
108
- _options$decisionCont = options.decisionContext,
109
- decisionContext = _options$decisionCont === void 0 ? {} : _options$decisionCont,
110
- _options$responseHead = options.responseHeaders,
111
- responseHeaders = _options$responseHead === void 0 ? {} : _options$responseHead,
112
- _options$responseBody = options.responseBody,
113
- responseBody = _options$responseBody === void 0 ? {
114
- handle: []
115
- } : _options$responseBody,
116
- personalization = options.personalization;
117
- var payload = createDataCollectionRequestPayload();
118
- var request = createDataCollectionRequest({
119
- payload: payload
120
- });
121
- var onResponseCallbackAggregator = (0, _utils.createCallbackAggregator)();
122
- return lifecycle.onBeforeEvent({
123
- event: event,
124
- renderDecisions: renderDecisions,
125
- decisionContext: decisionContext,
126
- decisionScopes: [_pageWideScope.default],
127
- personalization: personalization,
128
- onResponse: onResponseCallbackAggregator.add,
129
- onRequestFailure: _utils.noop
130
- }).then(function () {
131
- payload.addEvent(event);
132
- return _applyResponse({
133
- request: request,
134
- responseHeaders: responseHeaders,
135
- responseBody: responseBody,
136
- runOnResponseCallbacks: onResponseCallbackAggregator.call
137
- });
138
- });
139
- }
140
- };
141
- };
142
- exports.default = _default;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- /*
5
- Copyright 2019 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 _default = function _default(executeCommand) {
16
- return function (args) {
17
- // Would use destructuring, but destructuring doesn't work on IE
18
- // without polyfilling Symbol.
19
- // https://github.com/babel/babel/issues/7597
20
- var resolve = args[0];
21
- var reject = args[1];
22
- var userProvidedArgs = args[2];
23
- var commandName = userProvidedArgs[0];
24
- var options = userProvidedArgs[1];
25
- executeCommand(commandName, options).then(resolve, reject);
26
- };
27
- };
28
- exports.default = _default;
@@ -1,75 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- /*
5
- Copyright 2019 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
- // TO-DOCUMENT: Lifecycle hooks and their params.
17
- var hookNames = [
18
- // Called after all components have been registered.
19
- "onComponentsRegistered",
20
- // Called before an event is sent on a data collection request
21
- "onBeforeEvent",
22
- // Called before each request is made to the edge.
23
- "onBeforeRequest",
24
- // Called after each response is returned from the edge with a successful
25
- // status code
26
- "onResponse",
27
- // Called after a network request to the edge fails. Either the request
28
- // didn't make it to the edge, didn't make it to Konductor, or Konductor
29
- // failed to return a regularly-structured response. (In this case { error }
30
- // is passed as the parameter)
31
- // Also called when the respone returns a 400 or 500 error. (In this case
32
- // { response } is passed as the parameter)
33
- "onRequestFailure",
34
- // A user clicked on an element.
35
- "onClick",
36
- // Called by DecisioningEngine when a ruleset is satisfied with a list of
37
- // propositions
38
- "onDecision"];
39
- var createHook = function createHook(componentRegistry, hookName) {
40
- return function () {
41
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
42
- args[_key] = arguments[_key];
43
- }
44
- return Promise.all(componentRegistry.getLifecycleCallbacks(hookName).map(function (callback) {
45
- return new Promise(function (resolve) {
46
- resolve(callback.apply(void 0, args));
47
- });
48
- }));
49
- };
50
- };
51
-
52
- /**
53
- * This ensures that if a component's lifecycle method X
54
- * attempts to execute lifecycle method Y, that all X methods on all components
55
- * will have been called before any of their Y methods are called. It does
56
- * this by kicking the call to the Y method to the next JavaScript tick.
57
- * @returns {function}
58
- */
59
- var guardHook = function guardHook(fn) {
60
- return function () {
61
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
62
- args[_key2] = arguments[_key2];
63
- }
64
- return Promise.resolve().then(function () {
65
- return fn.apply(void 0, args);
66
- });
67
- };
68
- };
69
- var _default = function _default(componentRegistry) {
70
- return hookNames.reduce(function (memo, hookName) {
71
- memo[hookName] = guardHook(createHook(componentRegistry, hookName));
72
- return memo;
73
- }, {});
74
- };
75
- exports.default = _default;
@@ -1,71 +0,0 @@
1
- "use strict";
2
-
3
- exports.default = void 0;
4
- var _utils = require("../utils");
5
- var _debugQueryParam = require("../constants/debugQueryParam");
6
- /*
7
- Copyright 2019 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 _default = function _default(_ref) {
18
- var console = _ref.console,
19
- locationSearch = _ref.locationSearch,
20
- createLogger = _ref.createLogger,
21
- instanceName = _ref.instanceName,
22
- createNamespacedStorage = _ref.createNamespacedStorage,
23
- getMonitors = _ref.getMonitors;
24
- var parsedQueryString = _utils.queryString.parse(locationSearch);
25
- var storage = createNamespacedStorage("instance." + instanceName + ".");
26
- var debugSessionValue = storage.session.getItem("debug");
27
- var debugEnabled = debugSessionValue === "true";
28
- var debugEnabledWritableFromConfig = debugSessionValue === null;
29
- var getDebugEnabled = function getDebugEnabled() {
30
- return debugEnabled;
31
- };
32
- var setDebugEnabled = function setDebugEnabled(value, _ref2) {
33
- var fromConfig = _ref2.fromConfig;
34
- if (!fromConfig || debugEnabledWritableFromConfig) {
35
- debugEnabled = value;
36
- }
37
- if (!fromConfig) {
38
- // Web storage only allows strings, so we explicitly convert to string.
39
- storage.session.setItem("debug", value.toString());
40
- debugEnabledWritableFromConfig = false;
41
- }
42
- };
43
- if (parsedQueryString[_debugQueryParam.default] !== undefined) {
44
- setDebugEnabled((0, _utils.stringToBoolean)(parsedQueryString[_debugQueryParam.default]), {
45
- fromConfig: false
46
- });
47
- }
48
- return {
49
- setDebugEnabled: setDebugEnabled,
50
- logger: createLogger({
51
- getDebugEnabled: getDebugEnabled,
52
- context: {
53
- instanceName: instanceName
54
- },
55
- getMonitors: getMonitors,
56
- console: console
57
- }),
58
- createComponentLogger: function createComponentLogger(componentName) {
59
- return createLogger({
60
- getDebugEnabled: getDebugEnabled,
61
- context: {
62
- instanceName: instanceName,
63
- componentName: componentName
64
- },
65
- getMonitors: getMonitors,
66
- console: console
67
- });
68
- }
69
- };
70
- };
71
- exports.default = _default;