@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.
- package/package.json +83 -65
- package/libEs5/baseCode/index.js +0 -62
- package/libEs5/components/ActivityCollector/attachClickActivityCollector.js +0 -54
- package/libEs5/components/ActivityCollector/configValidators.js +0 -24
- package/libEs5/components/ActivityCollector/createGetLinkDetails.js +0 -69
- package/libEs5/components/ActivityCollector/createLinkClick.js +0 -39
- package/libEs5/components/ActivityCollector/getLinkName.js +0 -140
- package/libEs5/components/ActivityCollector/getLinkRegion.js +0 -62
- package/libEs5/components/ActivityCollector/index.js +0 -79
- package/libEs5/components/ActivityCollector/utils.js +0 -114
- package/libEs5/components/Audiences/index.js +0 -50
- package/libEs5/components/Audiences/injectProcessDestinations.js +0 -65
- package/libEs5/components/Audiences/injectProcessResponse.js +0 -39
- package/libEs5/components/Context/createComponent.js +0 -40
- package/libEs5/components/Context/implementationDetails.js +0 -28
- package/libEs5/components/Context/index.js +0 -57
- package/libEs5/components/Context/injectDevice.js +0 -67
- package/libEs5/components/Context/injectEnvironment.js +0 -41
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +0 -59
- package/libEs5/components/Context/injectPlaceContext.js +0 -33
- package/libEs5/components/Context/injectTimestamp.js +0 -24
- package/libEs5/components/Context/injectWeb.js +0 -31
- package/libEs5/components/DataCollector/index.js +0 -111
- package/libEs5/components/DataCollector/validateApplyResponse.js +0 -36
- package/libEs5/components/DataCollector/validateUserEventOptions.js +0 -51
- package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +0 -32
- package/libEs5/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +0 -25
- package/libEs5/components/DecisioningEngine/constants.js +0 -31
- package/libEs5/components/DecisioningEngine/createApplyResponse.js +0 -36
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +0 -29
- package/libEs5/components/DecisioningEngine/createContextProvider.js +0 -93
- package/libEs5/components/DecisioningEngine/createDecisionHistory.js +0 -28
- package/libEs5/components/DecisioningEngine/createDecisionProvider.js +0 -51
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +0 -80
- package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +0 -49
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +0 -130
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +0 -46
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +0 -87
- package/libEs5/components/DecisioningEngine/index.js +0 -119
- package/libEs5/components/DecisioningEngine/utils.js +0 -90
- package/libEs5/components/EventMerge/createComponent.js +0 -25
- package/libEs5/components/EventMerge/createEventMergeId.js +0 -21
- package/libEs5/components/EventMerge/index.js +0 -25
- package/libEs5/components/Identity/addEcidQueryToPayload.js +0 -23
- package/libEs5/components/Identity/addEcidToPayload.js +0 -21
- package/libEs5/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +0 -26
- package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +0 -46
- package/libEs5/components/Identity/configValidators.js +0 -22
- package/libEs5/components/Identity/constants/authState.js +0 -21
- package/libEs5/components/Identity/constants/defaultIdSyncTtlMinutes.js +0 -16
- package/libEs5/components/Identity/createComponent.js +0 -98
- package/libEs5/components/Identity/createLegacyIdentity.js +0 -70
- package/libEs5/components/Identity/getEcidFromResponse.js +0 -24
- package/libEs5/components/Identity/getIdentity/createGetIdentity.js +0 -36
- package/libEs5/components/Identity/getIdentity/createIdentityRequest.js +0 -30
- package/libEs5/components/Identity/getIdentity/createIdentityRequestPayload.js +0 -30
- package/libEs5/components/Identity/getIdentity/getIdentityOptionsValidator.js +0 -28
- package/libEs5/components/Identity/index.js +0 -129
- package/libEs5/components/Identity/injectAddLegacyEcidToPayload.js +0 -32
- package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +0 -65
- package/libEs5/components/Identity/injectAwaitIdentityCookie.js +0 -57
- package/libEs5/components/Identity/injectEnsureSingleIdentity.js +0 -98
- package/libEs5/components/Identity/injectHandleResponseForIdSyncs.js +0 -21
- package/libEs5/components/Identity/injectProcessIdSyncs.js +0 -42
- package/libEs5/components/Identity/injectSetDomainForInitialIdentityPayload.js +0 -34
- package/libEs5/components/Identity/visitorService/awaitVisitorOptIn.js +0 -35
- package/libEs5/components/Identity/visitorService/getVisitor.js +0 -20
- package/libEs5/components/Identity/visitorService/injectGetEcidFromVisitor.js +0 -50
- package/libEs5/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -272
- package/libEs5/components/LegacyMediaAnalytics/createMediaHelper.js +0 -188
- package/libEs5/components/LegacyMediaAnalytics/index.js +0 -48
- package/libEs5/components/LegacyMediaAnalytics/media/constants.js +0 -154
- package/libEs5/components/LegacyMediaAnalytics/media/mediaKeysToXdmConverter.js +0 -51
- package/libEs5/components/LibraryInfo/index.js +0 -64
- package/libEs5/components/MachineLearning/index.js +0 -27
- package/libEs5/components/MachineLearning/processResponse.js +0 -20
- package/libEs5/components/MediaCollection/constants/eventTypes.js +0 -25
- package/libEs5/components/MediaCollection/createHeartbeatEngine.js +0 -63
- package/libEs5/components/MediaCollection/createMediaEventManager.js +0 -109
- package/libEs5/components/MediaCollection/createMediaRequest.js +0 -30
- package/libEs5/components/MediaCollection/createMediaSessionCacheManager.js +0 -62
- package/libEs5/components/MediaCollection/createUpdateMediaSessionState.js +0 -31
- package/libEs5/components/MediaCollection/index.js +0 -165
- package/libEs5/components/MediaCollection/validateMediaEventOptions.js +0 -35
- package/libEs5/components/MediaCollection/validateMediaSessionOptions.js +0 -36
- package/libEs5/components/Personalization/constants/loggerMessage.js +0 -18
- package/libEs5/components/Personalization/constants/scopeType.js +0 -21
- package/libEs5/components/Personalization/constants/surface.js +0 -23
- package/libEs5/components/Personalization/createActionsProvider.js +0 -72
- package/libEs5/components/Personalization/createApplyPropositions.js +0 -113
- package/libEs5/components/Personalization/createClickStorage.js +0 -62
- package/libEs5/components/Personalization/createCollect.js +0 -54
- package/libEs5/components/Personalization/createComponent.js +0 -142
- package/libEs5/components/Personalization/createFetchDataHandler.js +0 -84
- package/libEs5/components/Personalization/createGetPageLocation.js +0 -21
- package/libEs5/components/Personalization/createNotificationHandler.js +0 -33
- package/libEs5/components/Personalization/createOnClickHandler.js +0 -52
- package/libEs5/components/Personalization/createOnDecisionHandler.js +0 -44
- package/libEs5/components/Personalization/createPersonalizationDetails.js +0 -105
- package/libEs5/components/Personalization/createPreprocessors.js +0 -21
- package/libEs5/components/Personalization/createSetTargetMigration.js +0 -29
- package/libEs5/components/Personalization/createViewCacheManager.js +0 -91
- package/libEs5/components/Personalization/createViewChangeHandler.js +0 -46
- package/libEs5/components/Personalization/dom-actions/action.js +0 -121
- package/libEs5/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +0 -42
- package/libEs5/components/Personalization/dom-actions/appendHtml.js +0 -33
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +0 -109
- package/libEs5/components/Personalization/dom-actions/createPreprocess.js +0 -26
- package/libEs5/components/Personalization/dom-actions/createRedirect.js +0 -30
- package/libEs5/components/Personalization/dom-actions/dom/createFragment.js +0 -22
- package/libEs5/components/Personalization/dom-actions/dom/getAttribute.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/getChildNodes.js +0 -23
- package/libEs5/components/Personalization/dom-actions/dom/getChildren.js +0 -23
- package/libEs5/components/Personalization/dom-actions/dom/getElementById.js +0 -25
- package/libEs5/components/Personalization/dom-actions/dom/getFirstChild.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/getNextSibling.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/getNonce.js +0 -37
- package/libEs5/components/Personalization/dom-actions/dom/getParent.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/helperForEq.js +0 -26
- package/libEs5/components/Personalization/dom-actions/dom/index.js +0 -100
- package/libEs5/components/Personalization/dom-actions/dom/insertAfter.js +0 -26
- package/libEs5/components/Personalization/dom-actions/dom/insertBefore.js +0 -25
- package/libEs5/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +0 -38
- package/libEs5/components/Personalization/dom-actions/dom/removeAttribute.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +0 -107
- package/libEs5/components/Personalization/dom-actions/dom/setAttribute.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/setStyle.js +0 -24
- package/libEs5/components/Personalization/dom-actions/images.js +0 -39
- package/libEs5/components/Personalization/dom-actions/index.js +0 -9
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +0 -36
- package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +0 -32
- package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +0 -32
- package/libEs5/components/Personalization/dom-actions/prependHtml.js +0 -46
- package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +0 -33
- package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +0 -37
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +0 -55
- package/libEs5/components/Personalization/dom-actions/replaceHtml.js +0 -21
- package/libEs5/components/Personalization/dom-actions/scripts.js +0 -92
- package/libEs5/components/Personalization/dom-actions/setAttributes.js +0 -21
- package/libEs5/components/Personalization/dom-actions/setHtml.js +0 -28
- package/libEs5/components/Personalization/dom-actions/setStyles.js +0 -26
- package/libEs5/components/Personalization/dom-actions/setText.js +0 -18
- package/libEs5/components/Personalization/dom-actions/swapImage.js +0 -32
- package/libEs5/components/Personalization/event.js +0 -48
- package/libEs5/components/Personalization/flicker/index.js +0 -87
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +0 -69
- package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +0 -44
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +0 -76
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +0 -195
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +0 -46
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +0 -116
- package/libEs5/components/Personalization/handlers/processDefaultContent.js +0 -21
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +0 -288
- package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +0 -23
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +0 -53
- package/libEs5/components/Personalization/index.js +0 -153
- package/libEs5/components/Personalization/utils/addRenderAttemptedToDecisions.js +0 -25
- package/libEs5/components/Personalization/utils/createAsyncArray.js +0 -39
- package/libEs5/components/Personalization/utils/isAuthoringModeEnabled.js +0 -19
- package/libEs5/components/Personalization/utils/surfaceUtils.js +0 -102
- package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +0 -36
- package/libEs5/components/Privacy/computeConsentHash.js +0 -34
- package/libEs5/components/Privacy/createComponent.js +0 -86
- package/libEs5/components/Privacy/createConsentHashStore.js +0 -60
- package/libEs5/components/Privacy/createConsentRequest.js +0 -30
- package/libEs5/components/Privacy/createConsentRequestPayload.js +0 -34
- package/libEs5/components/Privacy/createStoredConsent.js +0 -32
- package/libEs5/components/Privacy/index.js +0 -64
- package/libEs5/components/Privacy/injectSendSetConsentRequest.js +0 -48
- package/libEs5/components/Privacy/parseConsentCookie.js +0 -38
- package/libEs5/components/Privacy/validateSetConsentOptions.js +0 -22
- package/libEs5/constants/apiVersion.js +0 -16
- package/libEs5/constants/browser.js +0 -29
- package/libEs5/constants/consentPurpose.js +0 -17
- package/libEs5/constants/consentStatus.js +0 -21
- package/libEs5/constants/contentType.js +0 -18
- package/libEs5/constants/cookieNameKey.js +0 -21
- package/libEs5/constants/cookieNamePrefix.js +0 -17
- package/libEs5/constants/coreCommands.js +0 -19
- package/libEs5/constants/debugQueryParam.js +0 -16
- package/libEs5/constants/decisionProvider.js +0 -16
- package/libEs5/constants/domain.js +0 -19
- package/libEs5/constants/ecidNamespace.js +0 -16
- package/libEs5/constants/edgeBasePath.js +0 -16
- package/libEs5/constants/elementAttribute.js +0 -17
- package/libEs5/constants/eventType.js +0 -25
- package/libEs5/constants/handle.js +0 -16
- package/libEs5/constants/highEntropyUserAgentClientHints.js +0 -16
- package/libEs5/constants/httpHeaderNames.js +0 -19
- package/libEs5/constants/httpStatusCode.js +0 -25
- package/libEs5/constants/identityMapAuthenticatedState.js +0 -20
- package/libEs5/constants/legacyCookies.js +0 -21
- package/libEs5/constants/libraryName.js +0 -16
- package/libEs5/constants/libraryVersion.js +0 -18
- package/libEs5/constants/namespace.js +0 -16
- package/libEs5/constants/pageWideScope.js +0 -16
- package/libEs5/constants/propositionEventType.js +0 -33
- package/libEs5/constants/queryStringIdentityParam.js +0 -16
- package/libEs5/constants/schema.js +0 -35
- package/libEs5/constants/shadowSeparator.js +0 -16
- package/libEs5/constants/tagName.js +0 -29
- package/libEs5/core/buildAndValidateConfig.js +0 -113
- package/libEs5/core/componentCreators.js +0 -34
- package/libEs5/core/config/createConfig.js +0 -21
- package/libEs5/core/config/createCoreConfigs.js +0 -32
- package/libEs5/core/consent/createConsent.js +0 -59
- package/libEs5/core/consent/createConsentStateMachine.js +0 -109
- package/libEs5/core/createComponentRegistry.js +0 -84
- package/libEs5/core/createCookieTransfer.js +0 -81
- package/libEs5/core/createEvent.js +0 -171
- package/libEs5/core/createEventManager.js +0 -142
- package/libEs5/core/createInstanceFunction.js +0 -28
- package/libEs5/core/createLifecycle.js +0 -75
- package/libEs5/core/createLogController.js +0 -71
- package/libEs5/core/createLogger.js +0 -104
- package/libEs5/core/edgeNetwork/handleRequestFailure.js +0 -28
- package/libEs5/core/edgeNetwork/injectApplyResponse.js +0 -67
- package/libEs5/core/edgeNetwork/injectExtractEdgeInfo.js +0 -43
- package/libEs5/core/edgeNetwork/injectGetLocationHint.js +0 -36
- package/libEs5/core/edgeNetwork/injectProcessWarningsAndErrors.js +0 -43
- package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +0 -100
- package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +0 -29
- package/libEs5/core/index.js +0 -240
- package/libEs5/core/initializeComponents.js +0 -42
- package/libEs5/core/injectCreateResponse.js +0 -78
- package/libEs5/core/injectExecuteCommand.js +0 -105
- package/libEs5/core/injectHandleError.js +0 -37
- package/libEs5/core/injectShouldTransferCookie.js +0 -29
- package/libEs5/core/network/getRequestRetryDelay.js +0 -74
- package/libEs5/core/network/injectSendNetworkRequest.js +0 -100
- package/libEs5/core/network/isRequestRetryable.js +0 -28
- package/libEs5/core/network/requestMethods/injectSendBeaconRequest.js +0 -40
- package/libEs5/core/network/requestMethods/injectSendFetchRequest.js +0 -45
- package/libEs5/core/network/requestMethods/injectSendXhrRequest.js +0 -51
- package/libEs5/core/validateCommandOptions.js +0 -35
- package/libEs5/index.js +0 -60
- package/libEs5/utils/areThirdPartyCookiesSupportedByDefault.js +0 -25
- package/libEs5/utils/assign.js +0 -17
- package/libEs5/utils/assignConcatArrayValues.js +0 -49
- package/libEs5/utils/assignIf.js +0 -22
- package/libEs5/utils/clone.js +0 -23
- package/libEs5/utils/cookieJar.js +0 -22
- package/libEs5/utils/crc32.js +0 -37
- package/libEs5/utils/createCallbackAggregator.js +0 -39
- package/libEs5/utils/createLoggingCookieJar.js +0 -31
- package/libEs5/utils/createMerger.js +0 -34
- package/libEs5/utils/createSubscription.js +0 -91
- package/libEs5/utils/createTaskQueue.js +0 -51
- package/libEs5/utils/debounce.js +0 -30
- package/libEs5/utils/deduplicateArray.js +0 -32
- package/libEs5/utils/deepAssign.js +0 -49
- package/libEs5/utils/defer.js +0 -27
- package/libEs5/utils/dom/appendNode.js +0 -18
- package/libEs5/utils/dom/awaitSelector.js +0 -111
- package/libEs5/utils/dom/createNode.js +0 -48
- package/libEs5/utils/dom/index.js +0 -58
- package/libEs5/utils/dom/isShadowSelector.js +0 -19
- package/libEs5/utils/dom/matchesSelector.js +0 -29
- package/libEs5/utils/dom/querySelectorAll.js +0 -33
- package/libEs5/utils/dom/removeNode.js +0 -22
- package/libEs5/utils/dom/selectNodes.js +0 -31
- package/libEs5/utils/dom/selectNodesWithShadow.js +0 -67
- package/libEs5/utils/endsWith.js +0 -24
- package/libEs5/utils/filterObject.js +0 -53
- package/libEs5/utils/find.js +0 -31
- package/libEs5/utils/fireImage.js +0 -39
- package/libEs5/utils/flatMap.js +0 -18
- package/libEs5/utils/flattenArray.js +0 -37
- package/libEs5/utils/flattenObject.js +0 -43
- package/libEs5/utils/getApexDomain.js +0 -46
- package/libEs5/utils/getBrowser.js +0 -34
- package/libEs5/utils/getLastArrayItems.js +0 -24
- package/libEs5/utils/getNamespacedCookieName.js +0 -20
- package/libEs5/utils/groupBy.js +0 -32
- package/libEs5/utils/includes.js +0 -24
- package/libEs5/utils/index.js +0 -408
- package/libEs5/utils/injectDoesIdentityCookieExist.js +0 -28
- package/libEs5/utils/injectFireReferrerHideableImage.js +0 -76
- package/libEs5/utils/injectStorage.js +0 -75
- package/libEs5/utils/intersection.js +0 -27
- package/libEs5/utils/isBlankString.js +0 -24
- package/libEs5/utils/isBoolean.js +0 -23
- package/libEs5/utils/isEmptyObject.js +0 -24
- package/libEs5/utils/isFunction.js +0 -23
- package/libEs5/utils/isInteger.js +0 -25
- package/libEs5/utils/isNamespacedCookieName.js +0 -27
- package/libEs5/utils/isNil.js +0 -23
- package/libEs5/utils/isNonEmptyArray.js +0 -23
- package/libEs5/utils/isNonEmptyString.js +0 -24
- package/libEs5/utils/isNumber.js +0 -24
- package/libEs5/utils/isObject.js +0 -24
- package/libEs5/utils/isString.js +0 -23
- package/libEs5/utils/isUnique.js +0 -31
- package/libEs5/utils/isValidRegExp.js +0 -27
- package/libEs5/utils/memoize.js +0 -37
- package/libEs5/utils/noop.js +0 -19
- package/libEs5/utils/padStart.js +0 -28
- package/libEs5/utils/parseUrl.js +0 -70
- package/libEs5/utils/prepareConfigOverridesForEdge.js +0 -53
- package/libEs5/utils/querystring.js +0 -17
- package/libEs5/utils/request/createAddIdentity.js +0 -23
- package/libEs5/utils/request/createDataCollectionRequest.js +0 -69
- package/libEs5/utils/request/createDataCollectionRequestPayload.js +0 -36
- package/libEs5/utils/request/createGetAssuranceValidationTokenParams.js +0 -45
- package/libEs5/utils/request/createHasIdentity.js +0 -20
- package/libEs5/utils/request/createRequest.js +0 -63
- package/libEs5/utils/request/createRequestParams.js +0 -45
- package/libEs5/utils/request/createRequestPayload.js +0 -37
- package/libEs5/utils/request/index.js +0 -58
- package/libEs5/utils/sanitizeOrgIdForCookieName.js +0 -18
- package/libEs5/utils/stackError.js +0 -35
- package/libEs5/utils/startsWith.js +0 -24
- package/libEs5/utils/stringToBoolean.js +0 -19
- package/libEs5/utils/toArray.js +0 -24
- package/libEs5/utils/toError.js +0 -24
- package/libEs5/utils/toISOStringLocal.js +0 -40
- package/libEs5/utils/toInteger.js +0 -32
- package/libEs5/utils/updateErrorMessage.js +0 -25
- package/libEs5/utils/uuid.js +0 -17
- package/libEs5/utils/validateConfigOverride.js +0 -17
- package/libEs5/utils/validateIdentityMap.js +0 -26
- package/libEs5/utils/validation/booleanValidator.js +0 -21
- package/libEs5/utils/validation/callbackValidator.js +0 -21
- package/libEs5/utils/validation/createAnyOfValidator.js +0 -33
- package/libEs5/utils/validation/createArrayOfValidator.js +0 -35
- package/libEs5/utils/validation/createDefaultValidator.js +0 -23
- package/libEs5/utils/validation/createDeprecatedValidator.js +0 -45
- package/libEs5/utils/validation/createLiteralValidator.js +0 -22
- package/libEs5/utils/validation/createMapOfValuesValidator.js +0 -41
- package/libEs5/utils/validation/createMaximumValidator.js +0 -22
- package/libEs5/utils/validation/createMinimumValidator.js +0 -22
- package/libEs5/utils/validation/createNoUnknownFieldsValidator.js +0 -30
- package/libEs5/utils/validation/createNonEmptyValidator.js +0 -28
- package/libEs5/utils/validation/createObjectOfValidator.js +0 -49
- package/libEs5/utils/validation/createUniqueItemsValidator.js +0 -22
- package/libEs5/utils/validation/createUniqueValidator.js +0 -24
- package/libEs5/utils/validation/domainValidator.js +0 -22
- package/libEs5/utils/validation/index.js +0 -247
- package/libEs5/utils/validation/integerValidator.js +0 -21
- package/libEs5/utils/validation/matchesRegexpValidator.js +0 -22
- package/libEs5/utils/validation/numberValidator.js +0 -21
- package/libEs5/utils/validation/regexpValidator.js +0 -21
- package/libEs5/utils/validation/requiredValidator.js +0 -21
- package/libEs5/utils/validation/stringValidator.js +0 -21
- package/libEs5/utils/validation/utils.js +0 -141
- package/libEs5/utils/values.js +0 -26
- package/libEs6/baseCode/index.js +0 -61
- package/libEs6/components/ActivityCollector/attachClickActivityCollector.js +0 -52
- package/libEs6/components/ActivityCollector/configValidators.js +0 -19
- package/libEs6/components/ActivityCollector/createGetLinkDetails.js +0 -70
- package/libEs6/components/ActivityCollector/createLinkClick.js +0 -37
- package/libEs6/components/ActivityCollector/getLinkName.js +0 -136
- package/libEs6/components/ActivityCollector/getLinkRegion.js +0 -58
- package/libEs6/components/ActivityCollector/index.js +0 -81
- package/libEs6/components/ActivityCollector/utils.js +0 -104
- package/libEs6/components/Audiences/index.js +0 -47
- package/libEs6/components/Audiences/injectProcessDestinations.js +0 -60
- package/libEs6/components/Audiences/injectProcessResponse.js +0 -38
- package/libEs6/components/Context/createComponent.js +0 -34
- package/libEs6/components/Context/implementationDetails.js +0 -24
- package/libEs6/components/Context/index.js +0 -52
- package/libEs6/components/Context/injectDevice.js +0 -70
- package/libEs6/components/Context/injectEnvironment.js +0 -42
- package/libEs6/components/Context/injectHighEntropyUserAgentHints.js +0 -45
- package/libEs6/components/Context/injectPlaceContext.js +0 -29
- package/libEs6/components/Context/injectTimestamp.js +0 -21
- package/libEs6/components/Context/injectWeb.js +0 -28
- package/libEs6/components/DataCollector/index.js +0 -106
- package/libEs6/components/DataCollector/validateApplyResponse.js +0 -33
- package/libEs6/components/DataCollector/validateUserEventOptions.js +0 -49
- package/libEs6/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +0 -30
- package/libEs6/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +0 -24
- package/libEs6/components/DecisioningEngine/constants.js +0 -25
- package/libEs6/components/DecisioningEngine/createApplyResponse.js +0 -31
- package/libEs6/components/DecisioningEngine/createConsequenceAdapter.js +0 -29
- package/libEs6/components/DecisioningEngine/createContextProvider.js +0 -95
- package/libEs6/components/DecisioningEngine/createDecisionHistory.js +0 -25
- package/libEs6/components/DecisioningEngine/createDecisionProvider.js +0 -41
- package/libEs6/components/DecisioningEngine/createEvaluableRulesetPayload.js +0 -79
- package/libEs6/components/DecisioningEngine/createEvaluateRulesetsCommand.js +0 -45
- package/libEs6/components/DecisioningEngine/createEventRegistry.js +0 -120
- package/libEs6/components/DecisioningEngine/createOnResponseHandler.js +0 -45
- package/libEs6/components/DecisioningEngine/createSubscribeRulesetItems.js +0 -79
- package/libEs6/components/DecisioningEngine/index.js +0 -124
- package/libEs6/components/DecisioningEngine/utils.js +0 -83
- package/libEs6/components/EventMerge/createComponent.js +0 -23
- package/libEs6/components/EventMerge/createEventMergeId.js +0 -18
- package/libEs6/components/EventMerge/index.js +0 -21
- package/libEs6/components/Identity/addEcidQueryToPayload.js +0 -20
- package/libEs6/components/Identity/addEcidToPayload.js +0 -18
- package/libEs6/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +0 -23
- package/libEs6/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +0 -31
- package/libEs6/components/Identity/configValidators.js +0 -18
- package/libEs6/components/Identity/constants/authState.js +0 -15
- package/libEs6/components/Identity/constants/defaultIdSyncTtlMinutes.js +0 -13
- package/libEs6/components/Identity/createComponent.js +0 -97
- package/libEs6/components/Identity/createLegacyIdentity.js +0 -69
- package/libEs6/components/Identity/getEcidFromResponse.js +0 -19
- package/libEs6/components/Identity/getIdentity/createGetIdentity.js +0 -34
- package/libEs6/components/Identity/getIdentity/createIdentityRequest.js +0 -28
- package/libEs6/components/Identity/getIdentity/createIdentityRequestPayload.js +0 -27
- package/libEs6/components/Identity/getIdentity/getIdentityOptionsValidator.js +0 -25
- package/libEs6/components/Identity/index.js +0 -124
- package/libEs6/components/Identity/injectAddLegacyEcidToPayload.js +0 -30
- package/libEs6/components/Identity/injectAddQueryStringIdentityToPayload.js +0 -55
- package/libEs6/components/Identity/injectAwaitIdentityCookie.js +0 -56
- package/libEs6/components/Identity/injectEnsureSingleIdentity.js +0 -97
- package/libEs6/components/Identity/injectHandleResponseForIdSyncs.js +0 -19
- package/libEs6/components/Identity/injectProcessIdSyncs.js +0 -34
- package/libEs6/components/Identity/injectSetDomainForInitialIdentityPayload.js +0 -32
- package/libEs6/components/Identity/visitorService/awaitVisitorOptIn.js +0 -33
- package/libEs6/components/Identity/visitorService/getVisitor.js +0 -17
- package/libEs6/components/Identity/visitorService/injectGetEcidFromVisitor.js +0 -48
- package/libEs6/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -276
- package/libEs6/components/LegacyMediaAnalytics/createMediaHelper.js +0 -186
- package/libEs6/components/LegacyMediaAnalytics/index.js +0 -45
- package/libEs6/components/LegacyMediaAnalytics/media/constants.js +0 -140
- package/libEs6/components/LegacyMediaAnalytics/media/mediaKeysToXdmConverter.js +0 -46
- package/libEs6/components/LibraryInfo/index.js +0 -57
- package/libEs6/components/MachineLearning/index.js +0 -23
- package/libEs6/components/MachineLearning/processResponse.js +0 -18
- package/libEs6/components/MediaCollection/constants/eventTypes.js +0 -21
- package/libEs6/components/MediaCollection/createHeartbeatEngine.js +0 -64
- package/libEs6/components/MediaCollection/createMediaEventManager.js +0 -115
- package/libEs6/components/MediaCollection/createMediaRequest.js +0 -28
- package/libEs6/components/MediaCollection/createMediaSessionCacheManager.js +0 -63
- package/libEs6/components/MediaCollection/createUpdateMediaSessionState.js +0 -30
- package/libEs6/components/MediaCollection/index.js +0 -164
- package/libEs6/components/MediaCollection/validateMediaEventOptions.js +0 -32
- package/libEs6/components/MediaCollection/validateMediaSessionOptions.js +0 -34
- package/libEs6/components/Personalization/constants/loggerMessage.js +0 -13
- package/libEs6/components/Personalization/constants/scopeType.js +0 -15
- package/libEs6/components/Personalization/constants/surface.js +0 -16
- package/libEs6/components/Personalization/createActionsProvider.js +0 -70
- package/libEs6/components/Personalization/createApplyPropositions.js +0 -103
- package/libEs6/components/Personalization/createClickStorage.js +0 -58
- package/libEs6/components/Personalization/createCollect.js +0 -48
- package/libEs6/components/Personalization/createComponent.js +0 -129
- package/libEs6/components/Personalization/createFetchDataHandler.js +0 -74
- package/libEs6/components/Personalization/createGetPageLocation.js +0 -17
- package/libEs6/components/Personalization/createNotificationHandler.js +0 -29
- package/libEs6/components/Personalization/createOnClickHandler.js +0 -52
- package/libEs6/components/Personalization/createOnDecisionHandler.js +0 -42
- package/libEs6/components/Personalization/createPersonalizationDetails.js +0 -94
- package/libEs6/components/Personalization/createPreprocessors.js +0 -19
- package/libEs6/components/Personalization/createSetTargetMigration.js +0 -27
- package/libEs6/components/Personalization/createViewCacheManager.js +0 -81
- package/libEs6/components/Personalization/createViewChangeHandler.js +0 -47
- package/libEs6/components/Personalization/dom-actions/action.js +0 -49
- package/libEs6/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +0 -36
- package/libEs6/components/Personalization/dom-actions/appendHtml.js +0 -30
- package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +0 -91
- package/libEs6/components/Personalization/dom-actions/createPreprocess.js +0 -18
- package/libEs6/components/Personalization/dom-actions/createRedirect.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/createFragment.js +0 -19
- package/libEs6/components/Personalization/dom-actions/dom/getAttribute.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/getChildNodes.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/getChildren.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/getElementById.js +0 -21
- package/libEs6/components/Personalization/dom-actions/dom/getFirstChild.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/getNextSibling.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/getNonce.js +0 -33
- package/libEs6/components/Personalization/dom-actions/dom/getParent.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/helperForEq.js +0 -19
- package/libEs6/components/Personalization/dom-actions/dom/index.js +0 -26
- package/libEs6/components/Personalization/dom-actions/dom/insertAfter.js +0 -23
- package/libEs6/components/Personalization/dom-actions/dom/insertBefore.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +0 -35
- package/libEs6/components/Personalization/dom-actions/dom/removeAttribute.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/selectNodesWithEq.js +0 -102
- package/libEs6/components/Personalization/dom-actions/dom/setAttribute.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/setStyle.js +0 -21
- package/libEs6/components/Personalization/dom-actions/images.js +0 -31
- package/libEs6/components/Personalization/dom-actions/index.js +0 -13
- package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +0 -33
- package/libEs6/components/Personalization/dom-actions/insertHtmlAfter.js +0 -29
- package/libEs6/components/Personalization/dom-actions/insertHtmlBefore.js +0 -29
- package/libEs6/components/Personalization/dom-actions/prependHtml.js +0 -45
- package/libEs6/components/Personalization/dom-actions/rearrangeChildren.js +0 -31
- package/libEs6/components/Personalization/dom-actions/remapCustomCodeOffers.js +0 -34
- package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +0 -51
- package/libEs6/components/Personalization/dom-actions/replaceHtml.js +0 -18
- package/libEs6/components/Personalization/dom-actions/scripts.js +0 -85
- package/libEs6/components/Personalization/dom-actions/setAttributes.js +0 -18
- package/libEs6/components/Personalization/dom-actions/setHtml.js +0 -24
- package/libEs6/components/Personalization/dom-actions/setStyles.js +0 -22
- package/libEs6/components/Personalization/dom-actions/setText.js +0 -15
- package/libEs6/components/Personalization/dom-actions/swapImage.js +0 -29
- package/libEs6/components/Personalization/event.js +0 -45
- package/libEs6/components/Personalization/flicker/index.js +0 -82
- package/libEs6/components/Personalization/handlers/createProcessDomAction.js +0 -61
- package/libEs6/components/Personalization/handlers/createProcessHtmlContent.js +0 -40
- package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +0 -77
- package/libEs6/components/Personalization/handlers/createProcessPropositions.js +0 -175
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +0 -42
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +0 -110
- package/libEs6/components/Personalization/handlers/processDefaultContent.js +0 -17
- package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +0 -291
- package/libEs6/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +0 -17
- package/libEs6/components/Personalization/in-app-message-actions/utils.js +0 -49
- package/libEs6/components/Personalization/index.js +0 -159
- package/libEs6/components/Personalization/utils/addRenderAttemptedToDecisions.js +0 -21
- package/libEs6/components/Personalization/utils/createAsyncArray.js +0 -35
- package/libEs6/components/Personalization/utils/isAuthoringModeEnabled.js +0 -15
- package/libEs6/components/Personalization/utils/surfaceUtils.js +0 -74
- package/libEs6/components/Personalization/validateApplyPropositionsOptions.js +0 -31
- package/libEs6/components/Privacy/computeConsentHash.js +0 -30
- package/libEs6/components/Privacy/createComponent.js +0 -85
- package/libEs6/components/Privacy/createConsentHashStore.js +0 -57
- package/libEs6/components/Privacy/createConsentRequest.js +0 -28
- package/libEs6/components/Privacy/createConsentRequestPayload.js +0 -31
- package/libEs6/components/Privacy/createStoredConsent.js +0 -30
- package/libEs6/components/Privacy/index.js +0 -63
- package/libEs6/components/Privacy/injectSendSetConsentRequest.js +0 -45
- package/libEs6/components/Privacy/parseConsentCookie.js +0 -26
- package/libEs6/components/Privacy/validateSetConsentOptions.js +0 -18
- package/libEs6/constants/apiVersion.js +0 -12
- package/libEs6/constants/browser.js +0 -19
- package/libEs6/constants/consentPurpose.js +0 -13
- package/libEs6/constants/consentStatus.js +0 -15
- package/libEs6/constants/contentType.js +0 -13
- package/libEs6/constants/cookieNameKey.js +0 -15
- package/libEs6/constants/cookieNamePrefix.js +0 -14
- package/libEs6/constants/coreCommands.js +0 -14
- package/libEs6/constants/debugQueryParam.js +0 -13
- package/libEs6/constants/decisionProvider.js +0 -12
- package/libEs6/constants/domain.js +0 -14
- package/libEs6/constants/ecidNamespace.js +0 -13
- package/libEs6/constants/edgeBasePath.js +0 -12
- package/libEs6/constants/elementAttribute.js +0 -13
- package/libEs6/constants/eventType.js +0 -17
- package/libEs6/constants/handle.js +0 -12
- package/libEs6/constants/highEntropyUserAgentClientHints.js +0 -13
- package/libEs6/constants/httpHeaderNames.js +0 -14
- package/libEs6/constants/httpStatusCode.js +0 -17
- package/libEs6/constants/identityMapAuthenticatedState.js +0 -14
- package/libEs6/constants/legacyCookies.js +0 -15
- package/libEs6/constants/libraryName.js +0 -13
- package/libEs6/constants/libraryVersion.js +0 -16
- package/libEs6/constants/namespace.js +0 -13
- package/libEs6/constants/pageWideScope.js +0 -13
- package/libEs6/constants/propositionEventType.js +0 -33
- package/libEs6/constants/queryStringIdentityParam.js +0 -13
- package/libEs6/constants/schema.js +0 -22
- package/libEs6/constants/shadowSeparator.js +0 -13
- package/libEs6/constants/tagName.js +0 -19
- package/libEs6/core/buildAndValidateConfig.js +0 -94
- package/libEs6/core/componentCreators.js +0 -31
- package/libEs6/core/config/createConfig.js +0 -17
- package/libEs6/core/config/createCoreConfigs.js +0 -27
- package/libEs6/core/consent/createConsent.js +0 -57
- package/libEs6/core/consent/createConsentStateMachine.js +0 -91
- package/libEs6/core/createComponentRegistry.js +0 -80
- package/libEs6/core/createCookieTransfer.js +0 -78
- package/libEs6/core/createEvent.js +0 -161
- package/libEs6/core/createEventManager.js +0 -135
- package/libEs6/core/createInstanceFunction.js +0 -25
- package/libEs6/core/createLifecycle.js +0 -65
- package/libEs6/core/createLogController.js +0 -68
- package/libEs6/core/createLogger.js +0 -99
- package/libEs6/core/edgeNetwork/handleRequestFailure.js +0 -24
- package/libEs6/core/edgeNetwork/injectApplyResponse.js +0 -58
- package/libEs6/core/edgeNetwork/injectExtractEdgeInfo.js +0 -39
- package/libEs6/core/edgeNetwork/injectGetLocationHint.js +0 -32
- package/libEs6/core/edgeNetwork/injectProcessWarningsAndErrors.js +0 -42
- package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +0 -100
- package/libEs6/core/edgeNetwork/mergeLifecycleResponses.js +0 -21
- package/libEs6/core/index.js +0 -236
- package/libEs6/core/initializeComponents.js +0 -40
- package/libEs6/core/injectCreateResponse.js +0 -70
- package/libEs6/core/injectExecuteCommand.js +0 -100
- package/libEs6/core/injectHandleError.js +0 -33
- package/libEs6/core/injectShouldTransferCookie.js +0 -25
- package/libEs6/core/network/getRequestRetryDelay.js +0 -72
- package/libEs6/core/network/injectSendNetworkRequest.js +0 -96
- package/libEs6/core/network/isRequestRetryable.js +0 -25
- package/libEs6/core/network/requestMethods/injectSendBeaconRequest.js +0 -38
- package/libEs6/core/network/requestMethods/injectSendFetchRequest.js +0 -41
- package/libEs6/core/network/requestMethods/injectSendXhrRequest.js +0 -49
- package/libEs6/core/validateCommandOptions.js +0 -33
- package/libEs6/index.js +0 -55
- package/libEs6/utils/areThirdPartyCookiesSupportedByDefault.js +0 -20
- package/libEs6/utils/assign.js +0 -14
- package/libEs6/utils/assignConcatArrayValues.js +0 -36
- package/libEs6/utils/assignIf.js +0 -19
- package/libEs6/utils/clone.js +0 -18
- package/libEs6/utils/cookieJar.js +0 -19
- package/libEs6/utils/crc32.js +0 -33
- package/libEs6/utils/createCallbackAggregator.js +0 -31
- package/libEs6/utils/createLoggingCookieJar.js +0 -28
- package/libEs6/utils/createMerger.js +0 -30
- package/libEs6/utils/createSubscription.js +0 -70
- package/libEs6/utils/createTaskQueue.js +0 -48
- package/libEs6/utils/debounce.js +0 -22
- package/libEs6/utils/deduplicateArray.js +0 -23
- package/libEs6/utils/deepAssign.js +0 -40
- package/libEs6/utils/defer.js +0 -24
- package/libEs6/utils/dom/appendNode.js +0 -15
- package/libEs6/utils/dom/awaitSelector.js +0 -98
- package/libEs6/utils/dom/createNode.js +0 -38
- package/libEs6/utils/dom/index.js +0 -20
- package/libEs6/utils/dom/isShadowSelector.js +0 -14
- package/libEs6/utils/dom/matchesSelector.js +0 -26
- package/libEs6/utils/dom/querySelectorAll.js +0 -29
- package/libEs6/utils/dom/removeNode.js +0 -19
- package/libEs6/utils/dom/selectNodes.js +0 -28
- package/libEs6/utils/dom/selectNodesWithShadow.js +0 -63
- package/libEs6/utils/endsWith.js +0 -19
- package/libEs6/utils/filterObject.js +0 -55
- package/libEs6/utils/find.js +0 -28
- package/libEs6/utils/fireImage.js +0 -37
- package/libEs6/utils/flatMap.js +0 -14
- package/libEs6/utils/flattenArray.js +0 -26
- package/libEs6/utils/flattenObject.js +0 -28
- package/libEs6/utils/getApexDomain.js +0 -42
- package/libEs6/utils/getBrowser.js +0 -65
- package/libEs6/utils/getLastArrayItems.js +0 -19
- package/libEs6/utils/getNamespacedCookieName.js +0 -15
- package/libEs6/utils/groupBy.js +0 -29
- package/libEs6/utils/includes.js +0 -21
- package/libEs6/utils/index.js +0 -71
- package/libEs6/utils/injectDoesIdentityCookieExist.js +0 -24
- package/libEs6/utils/injectFireReferrerHideableImage.js +0 -65
- package/libEs6/utils/injectStorage.js +0 -69
- package/libEs6/utils/intersection.js +0 -21
- package/libEs6/utils/isBlankString.js +0 -20
- package/libEs6/utils/isBoolean.js +0 -18
- package/libEs6/utils/isEmptyObject.js +0 -20
- package/libEs6/utils/isFunction.js +0 -18
- package/libEs6/utils/isInteger.js +0 -23
- package/libEs6/utils/isNamespacedCookieName.js +0 -23
- package/libEs6/utils/isNil.js +0 -18
- package/libEs6/utils/isNonEmptyArray.js +0 -18
- package/libEs6/utils/isNonEmptyString.js +0 -20
- package/libEs6/utils/isNumber.js +0 -19
- package/libEs6/utils/isObject.js +0 -20
- package/libEs6/utils/isString.js +0 -18
- package/libEs6/utils/isUnique.js +0 -27
- package/libEs6/utils/isValidRegExp.js +0 -24
- package/libEs6/utils/memoize.js +0 -34
- package/libEs6/utils/noop.js +0 -16
- package/libEs6/utils/padStart.js +0 -25
- package/libEs6/utils/parseUrl.js +0 -62
- package/libEs6/utils/prepareConfigOverridesForEdge.js +0 -50
- package/libEs6/utils/querystring.js +0 -14
- package/libEs6/utils/request/createAddIdentity.js +0 -19
- package/libEs6/utils/request/createDataCollectionRequest.js +0 -69
- package/libEs6/utils/request/createDataCollectionRequestPayload.js +0 -30
- package/libEs6/utils/request/createGetAssuranceValidationTokenParams.js +0 -42
- package/libEs6/utils/request/createHasIdentity.js +0 -15
- package/libEs6/utils/request/createRequest.js +0 -63
- package/libEs6/utils/request/createRequestParams.js +0 -40
- package/libEs6/utils/request/createRequestPayload.js +0 -35
- package/libEs6/utils/request/index.js +0 -20
- package/libEs6/utils/sanitizeOrgIdForCookieName.js +0 -13
- package/libEs6/utils/stackError.js +0 -34
- package/libEs6/utils/startsWith.js +0 -19
- package/libEs6/utils/stringToBoolean.js +0 -15
- package/libEs6/utils/toArray.js +0 -21
- package/libEs6/utils/toError.js +0 -21
- package/libEs6/utils/toISOStringLocal.js +0 -37
- package/libEs6/utils/toInteger.js +0 -30
- package/libEs6/utils/updateErrorMessage.js +0 -23
- package/libEs6/utils/uuid.js +0 -14
- package/libEs6/utils/validateConfigOverride.js +0 -14
- package/libEs6/utils/validateIdentityMap.js +0 -23
- package/libEs6/utils/validation/booleanValidator.js +0 -18
- package/libEs6/utils/validation/callbackValidator.js +0 -17
- package/libEs6/utils/validation/createAnyOfValidator.js +0 -26
- package/libEs6/utils/validation/createArrayOfValidator.js +0 -28
- package/libEs6/utils/validation/createDefaultValidator.js +0 -18
- package/libEs6/utils/validation/createDeprecatedValidator.js +0 -37
- package/libEs6/utils/validation/createLiteralValidator.js +0 -16
- package/libEs6/utils/validation/createMapOfValuesValidator.js +0 -35
- package/libEs6/utils/validation/createMaximumValidator.js +0 -16
- package/libEs6/utils/validation/createMinimumValidator.js +0 -16
- package/libEs6/utils/validation/createNoUnknownFieldsValidator.js +0 -25
- package/libEs6/utils/validation/createNonEmptyValidator.js +0 -23
- package/libEs6/utils/validation/createObjectOfValidator.js +0 -43
- package/libEs6/utils/validation/createUniqueItemsValidator.js +0 -18
- package/libEs6/utils/validation/createUniqueValidator.js +0 -21
- package/libEs6/utils/validation/domainValidator.js +0 -17
- package/libEs6/utils/validation/index.js +0 -232
- package/libEs6/utils/validation/integerValidator.js +0 -18
- package/libEs6/utils/validation/matchesRegexpValidator.js +0 -17
- package/libEs6/utils/validation/numberValidator.js +0 -18
- package/libEs6/utils/validation/regexpValidator.js +0 -18
- package/libEs6/utils/validation/requiredValidator.js +0 -18
- package/libEs6/utils/validation/stringValidator.js +0 -17
- package/libEs6/utils/validation/utils.js +0 -127
- package/libEs6/utils/values.js +0 -21
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export const WEB = "web";
|
|
14
|
-
export const WEBAPP = "webapp";
|
|
15
|
-
export const SURFACE_TYPE_DELIMITER = "://";
|
|
16
|
-
export const FRAGMENT_DELIMITER = "#";
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import createPreprocessors from "./createPreprocessors";
|
|
13
|
-
import { assign } from "../../utils";
|
|
14
|
-
export default (({
|
|
15
|
-
modules,
|
|
16
|
-
preprocessors = createPreprocessors(),
|
|
17
|
-
logger
|
|
18
|
-
}) => {
|
|
19
|
-
const logActionError = (action, error) => {
|
|
20
|
-
if (logger.enabled) {
|
|
21
|
-
const details = JSON.stringify(action);
|
|
22
|
-
const {
|
|
23
|
-
message,
|
|
24
|
-
stack
|
|
25
|
-
} = error;
|
|
26
|
-
const errorMessage = `Failed to execute action ${details}. ${message} ${stack ? `\n ${stack}` : ""}`;
|
|
27
|
-
logger.warn(errorMessage);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const logActionCompleted = action => {
|
|
31
|
-
if (logger.enabled) {
|
|
32
|
-
const details = JSON.stringify(action);
|
|
33
|
-
logger.info(`Action ${details} executed.`);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const getExecuteAction = (schema, type) => {
|
|
37
|
-
if (!modules[schema] || !modules[schema][type]) {
|
|
38
|
-
return () => Promise.reject(new Error(`Action "${type}" not found for schema "${schema}"`));
|
|
39
|
-
}
|
|
40
|
-
return modules[schema][type];
|
|
41
|
-
};
|
|
42
|
-
const applyPreprocessors = action => {
|
|
43
|
-
const {
|
|
44
|
-
schema
|
|
45
|
-
} = action;
|
|
46
|
-
const preprocessorsList = preprocessors[schema];
|
|
47
|
-
if (!schema || !(preprocessorsList instanceof Array) || preprocessorsList.length === 0) {
|
|
48
|
-
return action;
|
|
49
|
-
}
|
|
50
|
-
return preprocessorsList.reduce((processed, fn) => assign(processed, fn(processed)), action);
|
|
51
|
-
};
|
|
52
|
-
const executeAction = action => {
|
|
53
|
-
const processedAction = applyPreprocessors(action);
|
|
54
|
-
const {
|
|
55
|
-
type,
|
|
56
|
-
schema
|
|
57
|
-
} = processedAction;
|
|
58
|
-
const execute = getExecuteAction(schema, type);
|
|
59
|
-
return execute(processedAction).then(result => {
|
|
60
|
-
logActionCompleted(processedAction);
|
|
61
|
-
return result;
|
|
62
|
-
}).catch(error => {
|
|
63
|
-
logActionError(processedAction, error);
|
|
64
|
-
throw error;
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
return {
|
|
68
|
-
executeAction
|
|
69
|
-
};
|
|
70
|
-
});
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { isNonEmptyArray, isObject, defer } from "../../utils";
|
|
14
|
-
import { DOM_ACTION, HTML_CONTENT_ITEM, MESSAGE_IN_APP } from "../../constants/schema";
|
|
15
|
-
import PAGE_WIDE_SCOPE from "../../constants/pageWideScope";
|
|
16
|
-
const SUPPORTED_SCHEMAS = [DOM_ACTION, HTML_CONTENT_ITEM, MESSAGE_IN_APP];
|
|
17
|
-
export default (({
|
|
18
|
-
processPropositions,
|
|
19
|
-
createProposition,
|
|
20
|
-
renderedPropositions,
|
|
21
|
-
viewCache
|
|
22
|
-
}) => {
|
|
23
|
-
const filterItemsPredicate = item => SUPPORTED_SCHEMAS.indexOf(item.schema) > -1;
|
|
24
|
-
const updatePropositionItems = ({
|
|
25
|
-
items,
|
|
26
|
-
metadataForScope
|
|
27
|
-
}) => {
|
|
28
|
-
return items.filter(filterItemsPredicate).map(item => {
|
|
29
|
-
if (item.schema !== HTML_CONTENT_ITEM) {
|
|
30
|
-
return {
|
|
31
|
-
...item
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
if (isObject(metadataForScope)) {
|
|
35
|
-
return {
|
|
36
|
-
...item,
|
|
37
|
-
data: {
|
|
38
|
-
...item.data,
|
|
39
|
-
selector: metadataForScope.selector,
|
|
40
|
-
type: metadataForScope.actionType
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
return undefined;
|
|
45
|
-
}).filter(item => item);
|
|
46
|
-
};
|
|
47
|
-
const filterPropositionsPredicate = proposition => {
|
|
48
|
-
return !(proposition.scope === PAGE_WIDE_SCOPE && proposition.renderAttempted);
|
|
49
|
-
};
|
|
50
|
-
const preparePropositions = ({
|
|
51
|
-
propositions,
|
|
52
|
-
metadata
|
|
53
|
-
}) => {
|
|
54
|
-
return propositions.filter(filterPropositionsPredicate).map(proposition => {
|
|
55
|
-
if (isNonEmptyArray(proposition.items)) {
|
|
56
|
-
const {
|
|
57
|
-
id,
|
|
58
|
-
scope,
|
|
59
|
-
scopeDetails
|
|
60
|
-
} = proposition;
|
|
61
|
-
return {
|
|
62
|
-
id,
|
|
63
|
-
scope,
|
|
64
|
-
scopeDetails,
|
|
65
|
-
items: updatePropositionItems({
|
|
66
|
-
items: proposition.items,
|
|
67
|
-
metadataForScope: metadata[proposition.scope]
|
|
68
|
-
})
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return proposition;
|
|
72
|
-
}).filter(proposition => isNonEmptyArray(proposition.items));
|
|
73
|
-
};
|
|
74
|
-
return ({
|
|
75
|
-
propositions = [],
|
|
76
|
-
metadata = {},
|
|
77
|
-
viewName
|
|
78
|
-
}) => {
|
|
79
|
-
// We need to immediately call concat so that subsequent sendEvent
|
|
80
|
-
// calls will wait for applyPropositions to complete before executing.
|
|
81
|
-
const renderedPropositionsDeferred = defer();
|
|
82
|
-
renderedPropositions.concat(renderedPropositionsDeferred.promise);
|
|
83
|
-
const propositionsToExecute = preparePropositions({
|
|
84
|
-
propositions,
|
|
85
|
-
metadata
|
|
86
|
-
}).map(proposition => createProposition(proposition));
|
|
87
|
-
return Promise.resolve().then(() => {
|
|
88
|
-
if (viewName) {
|
|
89
|
-
return viewCache.getView(viewName);
|
|
90
|
-
}
|
|
91
|
-
return [];
|
|
92
|
-
}).then(additionalPropositions => {
|
|
93
|
-
const {
|
|
94
|
-
render,
|
|
95
|
-
returnedPropositions
|
|
96
|
-
} = processPropositions([...propositionsToExecute, ...additionalPropositions]);
|
|
97
|
-
render().then(renderedPropositionsDeferred.resolve);
|
|
98
|
-
return {
|
|
99
|
-
propositions: returnedPropositions
|
|
100
|
-
};
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
const metasToArray = metas => {
|
|
14
|
-
return Object.keys(metas).map(key => {
|
|
15
|
-
return {
|
|
16
|
-
id: key,
|
|
17
|
-
...metas[key]
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
export default (() => {
|
|
22
|
-
const clickStorage = {};
|
|
23
|
-
const storeClickMetrics = ({
|
|
24
|
-
selector,
|
|
25
|
-
meta: {
|
|
26
|
-
id,
|
|
27
|
-
scope,
|
|
28
|
-
scopeDetails,
|
|
29
|
-
trackingLabel,
|
|
30
|
-
scopeType
|
|
31
|
-
}
|
|
32
|
-
}) => {
|
|
33
|
-
if (!clickStorage[selector]) {
|
|
34
|
-
clickStorage[selector] = {};
|
|
35
|
-
}
|
|
36
|
-
clickStorage[selector][id] = {
|
|
37
|
-
scope,
|
|
38
|
-
scopeDetails,
|
|
39
|
-
trackingLabel,
|
|
40
|
-
scopeType
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
const getClickSelectors = () => {
|
|
44
|
-
return Object.keys(clickStorage);
|
|
45
|
-
};
|
|
46
|
-
const getClickMetasBySelector = selector => {
|
|
47
|
-
const metas = clickStorage[selector];
|
|
48
|
-
if (!metas) {
|
|
49
|
-
return {};
|
|
50
|
-
}
|
|
51
|
-
return metasToArray(clickStorage[selector]);
|
|
52
|
-
};
|
|
53
|
-
return {
|
|
54
|
-
storeClickMetrics,
|
|
55
|
-
getClickSelectors,
|
|
56
|
-
getClickMetasBySelector
|
|
57
|
-
};
|
|
58
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
-
import { DISPLAY } from "../../constants/eventType";
|
|
13
|
-
import { getPropositionEventType } from "../../constants/propositionEventType";
|
|
14
|
-
import { isNonEmptyArray } from "../../utils";
|
|
15
|
-
export default (({
|
|
16
|
-
eventManager,
|
|
17
|
-
mergeDecisionsMeta
|
|
18
|
-
}) => {
|
|
19
|
-
// Called when a decision is auto-rendered for the __view__ scope or a SPA view(display and empty display notification)
|
|
20
|
-
return ({
|
|
21
|
-
decisionsMeta = [],
|
|
22
|
-
propositionAction,
|
|
23
|
-
documentMayUnload = false,
|
|
24
|
-
eventType = DISPLAY,
|
|
25
|
-
propositionEventTypes = [getPropositionEventType(eventType)],
|
|
26
|
-
viewName
|
|
27
|
-
}) => {
|
|
28
|
-
const event = eventManager.createEvent();
|
|
29
|
-
const data = {
|
|
30
|
-
eventType
|
|
31
|
-
};
|
|
32
|
-
if (viewName) {
|
|
33
|
-
data.web = {
|
|
34
|
-
webPageDetails: {
|
|
35
|
-
viewName
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
if (isNonEmptyArray(decisionsMeta)) {
|
|
40
|
-
mergeDecisionsMeta(event, decisionsMeta, propositionEventTypes, propositionAction);
|
|
41
|
-
}
|
|
42
|
-
event.mergeXdm(data);
|
|
43
|
-
if (documentMayUnload) {
|
|
44
|
-
event.documentMayUnload();
|
|
45
|
-
}
|
|
46
|
-
return eventManager.sendEvent(event);
|
|
47
|
-
};
|
|
48
|
-
});
|
|
@@ -1,129 +0,0 @@
|
|
|
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
|
-
import { noop, flatMap, isNonEmptyArray } from "../../utils";
|
|
14
|
-
import createPersonalizationDetails from "./createPersonalizationDetails";
|
|
15
|
-
import { AUTHORING_ENABLED } from "./constants/loggerMessage";
|
|
16
|
-
import { PropositionEventType } from "../../constants/propositionEventType";
|
|
17
|
-
import validateApplyPropositionsOptions from "./validateApplyPropositionsOptions";
|
|
18
|
-
export default (({
|
|
19
|
-
getPageLocation,
|
|
20
|
-
logger,
|
|
21
|
-
fetchDataHandler,
|
|
22
|
-
viewChangeHandler,
|
|
23
|
-
onClickHandler,
|
|
24
|
-
isAuthoringModeEnabled,
|
|
25
|
-
mergeQuery,
|
|
26
|
-
viewCache,
|
|
27
|
-
showContainers,
|
|
28
|
-
applyPropositions,
|
|
29
|
-
setTargetMigration,
|
|
30
|
-
mergeDecisionsMeta,
|
|
31
|
-
renderedPropositions,
|
|
32
|
-
onDecisionHandler
|
|
33
|
-
}) => {
|
|
34
|
-
return {
|
|
35
|
-
lifecycle: {
|
|
36
|
-
onDecision: onDecisionHandler,
|
|
37
|
-
onBeforeRequest({
|
|
38
|
-
request
|
|
39
|
-
}) {
|
|
40
|
-
setTargetMigration(request);
|
|
41
|
-
return Promise.resolve();
|
|
42
|
-
},
|
|
43
|
-
onBeforeEvent({
|
|
44
|
-
event,
|
|
45
|
-
renderDecisions,
|
|
46
|
-
decisionScopes = [],
|
|
47
|
-
personalization = {},
|
|
48
|
-
onResponse = noop,
|
|
49
|
-
onRequestFailure = noop
|
|
50
|
-
}) {
|
|
51
|
-
// Include propositions on all responses, overridden with data as needed
|
|
52
|
-
onResponse(() => ({
|
|
53
|
-
propositions: []
|
|
54
|
-
}));
|
|
55
|
-
onRequestFailure(() => showContainers());
|
|
56
|
-
if (isAuthoringModeEnabled()) {
|
|
57
|
-
logger.warn(AUTHORING_ENABLED);
|
|
58
|
-
|
|
59
|
-
// If we are in authoring mode we disable personalization
|
|
60
|
-
mergeQuery(event, {
|
|
61
|
-
enabled: false
|
|
62
|
-
});
|
|
63
|
-
return Promise.resolve();
|
|
64
|
-
}
|
|
65
|
-
const personalizationDetails = createPersonalizationDetails({
|
|
66
|
-
getPageLocation,
|
|
67
|
-
renderDecisions,
|
|
68
|
-
decisionScopes,
|
|
69
|
-
personalization,
|
|
70
|
-
event,
|
|
71
|
-
isCacheInitialized: viewCache.isInitialized(),
|
|
72
|
-
logger
|
|
73
|
-
});
|
|
74
|
-
const decisionsMetaPromises = [];
|
|
75
|
-
if (personalizationDetails.shouldIncludeRenderedPropositions()) {
|
|
76
|
-
decisionsMetaPromises.push(renderedPropositions.clear());
|
|
77
|
-
}
|
|
78
|
-
if (personalizationDetails.shouldFetchData()) {
|
|
79
|
-
const cacheUpdate = viewCache.createCacheUpdate(personalizationDetails.getViewName());
|
|
80
|
-
onRequestFailure(() => cacheUpdate.cancel());
|
|
81
|
-
fetchDataHandler({
|
|
82
|
-
cacheUpdate,
|
|
83
|
-
personalizationDetails,
|
|
84
|
-
event,
|
|
85
|
-
onResponse
|
|
86
|
-
});
|
|
87
|
-
} else if (personalizationDetails.shouldUseCachedData()) {
|
|
88
|
-
// eslint-disable-next-line consistent-return
|
|
89
|
-
decisionsMetaPromises.push(viewChangeHandler({
|
|
90
|
-
personalizationDetails,
|
|
91
|
-
event,
|
|
92
|
-
onResponse,
|
|
93
|
-
onRequestFailure
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// This promise.all waits for both the pending display notifications to be resolved
|
|
98
|
-
// (i.e. the top of page call to finish rendering) and the view change handler to
|
|
99
|
-
// finish rendering anything for this view.
|
|
100
|
-
return Promise.all(decisionsMetaPromises).then(decisionsMetas => {
|
|
101
|
-
// We only want to call mergeDecisionsMeta once, but we can get the propositions
|
|
102
|
-
// from two places: the pending display notifications and the view change handler.
|
|
103
|
-
const decisionsMeta = flatMap(decisionsMetas, dms => dms);
|
|
104
|
-
if (isNonEmptyArray(decisionsMeta)) {
|
|
105
|
-
mergeDecisionsMeta(event, decisionsMeta, [PropositionEventType.DISPLAY]);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
onClick({
|
|
110
|
-
event,
|
|
111
|
-
clickedElement
|
|
112
|
-
}) {
|
|
113
|
-
onClickHandler({
|
|
114
|
-
event,
|
|
115
|
-
clickedElement
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
commands: {
|
|
120
|
-
applyPropositions: {
|
|
121
|
-
optionsValidator: options => validateApplyPropositionsOptions({
|
|
122
|
-
logger,
|
|
123
|
-
options
|
|
124
|
-
}),
|
|
125
|
-
run: applyPropositions
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { groupBy } from "../../utils";
|
|
13
|
-
const DECISIONS_HANDLE = "personalization:decisions";
|
|
14
|
-
export default (({
|
|
15
|
-
prehidingStyle,
|
|
16
|
-
showContainers,
|
|
17
|
-
hideContainers,
|
|
18
|
-
mergeQuery,
|
|
19
|
-
processPropositions,
|
|
20
|
-
createProposition,
|
|
21
|
-
notificationHandler
|
|
22
|
-
}) => {
|
|
23
|
-
return ({
|
|
24
|
-
cacheUpdate,
|
|
25
|
-
personalizationDetails,
|
|
26
|
-
event,
|
|
27
|
-
onResponse
|
|
28
|
-
}) => {
|
|
29
|
-
if (personalizationDetails.isRenderDecisions()) {
|
|
30
|
-
hideContainers(prehidingStyle);
|
|
31
|
-
} else {
|
|
32
|
-
showContainers();
|
|
33
|
-
}
|
|
34
|
-
mergeQuery(event, personalizationDetails.createQueryDetails());
|
|
35
|
-
const handleNotifications = notificationHandler(personalizationDetails.isSendDisplayEvent(), personalizationDetails.getViewName());
|
|
36
|
-
onResponse(({
|
|
37
|
-
response
|
|
38
|
-
}) => {
|
|
39
|
-
const handles = response.getPayloadsByType(DECISIONS_HANDLE);
|
|
40
|
-
const propositions = handles.map(handle => createProposition(handle));
|
|
41
|
-
const {
|
|
42
|
-
page: pagePropositions = [],
|
|
43
|
-
view: viewPropositions = [],
|
|
44
|
-
proposition: nonRenderedPropositions = []
|
|
45
|
-
} = groupBy(propositions, p => p.getScopeType());
|
|
46
|
-
const currentViewPropositions = cacheUpdate.update(viewPropositions);
|
|
47
|
-
let render;
|
|
48
|
-
let returnedPropositions;
|
|
49
|
-
let returnedDecisions;
|
|
50
|
-
if (personalizationDetails.isRenderDecisions()) {
|
|
51
|
-
({
|
|
52
|
-
render,
|
|
53
|
-
returnedPropositions,
|
|
54
|
-
returnedDecisions
|
|
55
|
-
} = processPropositions([...pagePropositions, ...currentViewPropositions], nonRenderedPropositions));
|
|
56
|
-
render().then(handleNotifications);
|
|
57
|
-
|
|
58
|
-
// Render could take a long time especially if one of the renders
|
|
59
|
-
// is waiting for html to appear on the page. We show the containers
|
|
60
|
-
// immediately, and whatever renders quickly will not have flicker.
|
|
61
|
-
showContainers();
|
|
62
|
-
} else {
|
|
63
|
-
({
|
|
64
|
-
returnedPropositions,
|
|
65
|
-
returnedDecisions
|
|
66
|
-
} = processPropositions([], [...pagePropositions, ...currentViewPropositions, ...nonRenderedPropositions]));
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
propositions: returnedPropositions,
|
|
70
|
-
decisions: returnedDecisions
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export default (({
|
|
14
|
-
window
|
|
15
|
-
}) => () => {
|
|
16
|
-
return window.location;
|
|
17
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { defer } from "../../utils";
|
|
13
|
-
export default ((collect, renderedPropositions) => {
|
|
14
|
-
return (sendDisplayEvent, viewName) => {
|
|
15
|
-
if (!sendDisplayEvent) {
|
|
16
|
-
const renderedPropositionsDeferred = defer();
|
|
17
|
-
renderedPropositions.concat(renderedPropositionsDeferred.promise);
|
|
18
|
-
return renderedPropositionsDeferred.resolve;
|
|
19
|
-
}
|
|
20
|
-
return decisionsMeta => {
|
|
21
|
-
if (decisionsMeta.length > 0) {
|
|
22
|
-
collect({
|
|
23
|
-
decisionsMeta,
|
|
24
|
-
viewName
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
import { isNonEmptyArray } from "../../utils";
|
|
14
|
-
import { INTERACT } from "../../constants/eventType";
|
|
15
|
-
import { PropositionEventType } from "../../constants/propositionEventType";
|
|
16
|
-
export default (({
|
|
17
|
-
mergeDecisionsMeta,
|
|
18
|
-
collectClicks,
|
|
19
|
-
getClickSelectors,
|
|
20
|
-
getClickMetasBySelector
|
|
21
|
-
}) => {
|
|
22
|
-
// Called when an element qualifying for conversion within an offer is clicked.
|
|
23
|
-
return ({
|
|
24
|
-
event,
|
|
25
|
-
clickedElement
|
|
26
|
-
}) => {
|
|
27
|
-
const selectors = getClickSelectors();
|
|
28
|
-
if (isNonEmptyArray(selectors)) {
|
|
29
|
-
const {
|
|
30
|
-
decisionsMeta,
|
|
31
|
-
eventLabel,
|
|
32
|
-
viewName
|
|
33
|
-
} = collectClicks(clickedElement, selectors, getClickMetasBySelector);
|
|
34
|
-
if (isNonEmptyArray(decisionsMeta)) {
|
|
35
|
-
const xdm = {
|
|
36
|
-
eventType: INTERACT
|
|
37
|
-
};
|
|
38
|
-
if (viewName) {
|
|
39
|
-
xdm.web = {
|
|
40
|
-
webPageDetails: {
|
|
41
|
-
viewName
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
event.mergeXdm(xdm);
|
|
46
|
-
mergeDecisionsMeta(event, decisionsMeta, [PropositionEventType.INTERACT], eventLabel ? {
|
|
47
|
-
label: eventLabel
|
|
48
|
-
} : undefined);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2023 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
|
-
processPropositions,
|
|
15
|
-
createProposition,
|
|
16
|
-
notificationHandler
|
|
17
|
-
}) => {
|
|
18
|
-
return ({
|
|
19
|
-
renderDecisions,
|
|
20
|
-
propositions,
|
|
21
|
-
event,
|
|
22
|
-
personalization = {}
|
|
23
|
-
}) => {
|
|
24
|
-
if (!renderDecisions) {
|
|
25
|
-
return Promise.resolve();
|
|
26
|
-
}
|
|
27
|
-
const {
|
|
28
|
-
sendDisplayEvent = true
|
|
29
|
-
} = personalization;
|
|
30
|
-
const viewName = event ? event.getViewName() : undefined;
|
|
31
|
-
const propositionsToExecute = propositions.map(proposition => createProposition(proposition, true));
|
|
32
|
-
const {
|
|
33
|
-
render,
|
|
34
|
-
returnedPropositions
|
|
35
|
-
} = processPropositions(propositionsToExecute);
|
|
36
|
-
const handleNotifications = notificationHandler(sendDisplayEvent, viewName);
|
|
37
|
-
render().then(handleNotifications);
|
|
38
|
-
return Promise.resolve({
|
|
39
|
-
propositions: returnedPropositions
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
});
|