@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
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.20.0-
|
|
3
|
+
"version": "2.20.0-beta.2",
|
|
4
4
|
"description": "Adobe Experience Platform Web SDK",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "libEs5/index.js",
|
|
6
7
|
"module": "libEs6/index.js",
|
|
7
8
|
"files": [
|
|
@@ -13,25 +14,29 @@
|
|
|
13
14
|
"lint": "eslint --cache --fix \"*.js\" \"{src,test,scripts}/**/*.js\"",
|
|
14
15
|
"format": "prettier --write \"*.{html,js}\" \"{sandbox,src,test,scripts}/**/*.{html,js}\"",
|
|
15
16
|
"test": "npm run test:unit && npm run test:scripts && npm run test:functional",
|
|
16
|
-
"test:unit": "karma start --single-run",
|
|
17
|
+
"test:unit": "karma start karma.conf.cjs --single-run",
|
|
17
18
|
"test:unit:debug": "karma start --browsers=Chrome --single-run=false --debug",
|
|
18
19
|
"test:unit:watch": "karma start",
|
|
19
|
-
"test:unit:saucelabs:local": "karma start karma.saucelabs.conf.
|
|
20
|
+
"test:unit:saucelabs:local": "karma start karma.saucelabs.conf.cjs --single-run",
|
|
20
21
|
"test:unit:coverage": "karma start --single-run --reporters spec,coverage",
|
|
21
22
|
"test:functional": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" testcafe chrome",
|
|
22
|
-
"test:functional:
|
|
23
|
+
"test:functional:custom": "node scripts/helpers/runFunctionalTests.js",
|
|
24
|
+
"test:functional:saucelabs:dev": "NPM_PACKAGE_VERSION=$(npm pkg get version | tr -d '\"') EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" saucectl run --config ./.sauce/dev.yml",
|
|
23
25
|
"test:functional:watch": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" ./scripts/watchFunctionalTests.js --browsers chrome",
|
|
24
|
-
"test:functional:debug": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" testcafe --inspect-brk chrome",
|
|
26
|
+
"test:functional:debug": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" testcafe --esm --inspect-brk chrome",
|
|
25
27
|
"test:functional:build:int": "rollup -c --environment BASE_CODE_MIN,STANDALONE,NPM_PACKAGE_LOCAL",
|
|
26
28
|
"test:functional:build:prod": "rollup -c --environment BASE_CODE_MIN,NPM_PACKAGE_PROD",
|
|
27
29
|
"test:scripts": "jasmine --config=scripts/specs/jasmine.json",
|
|
28
30
|
"sandbox:build": "rollup -c --environment SANDBOX && cd sandbox && npm run build",
|
|
31
|
+
"sandbox:build:custom": "SANDBOX=true npm run build:custom -- --exclude personalization && cd sandbox && npm run build && npm run start",
|
|
29
32
|
"dev": "concurrently --names build,sandbox \"rollup -c -w --environment SANDBOX\" \"cd sandbox && export REACT_APP_NONCE=321 && npm start\"",
|
|
30
33
|
"build": "npm run format && npm run lint && npm run clean && rollup -c --environment BASE_CODE_MIN,STANDALONE,STANDALONE_MIN && echo \"Base Code:\" && cat distTest/baseCode.min.js",
|
|
31
|
-
"
|
|
34
|
+
"build:custom": "npm run clean && rollup -c --environment BASE_CODE_MIN,NPM_PACKAGE_LOCAL && node scripts/helpers/customBuild.js",
|
|
35
|
+
"prepare": "husky && cd sandbox && npm install",
|
|
32
36
|
"prepublishOnly": "rimraf libEs5 libEs6 && babel src -d libEs5 --env-name npmEs5 && babel src -d libEs6 --env-name npmEs6",
|
|
33
37
|
"checkthattestfilesexist": "./scripts/checkThatTestFilesExist.js",
|
|
34
|
-
"add-license": "./scripts/add-license.js"
|
|
38
|
+
"add-license": "./scripts/add-license.js",
|
|
39
|
+
"preinstall": "npx force-resolutions"
|
|
35
40
|
},
|
|
36
41
|
"lint-staged": {
|
|
37
42
|
"./*.js": [
|
|
@@ -60,79 +65,92 @@
|
|
|
60
65
|
],
|
|
61
66
|
"dependencies": {
|
|
62
67
|
"@adobe/aep-rules-engine": "^2.0.2",
|
|
63
|
-
"@adobe/reactor-cookie": "^1.
|
|
68
|
+
"@adobe/reactor-cookie": "^1.1.0",
|
|
64
69
|
"@adobe/reactor-load-script": "^1.1.1",
|
|
65
70
|
"@adobe/reactor-object-assign": "^1.0.0",
|
|
66
71
|
"@adobe/reactor-query-string": "^1.0.0",
|
|
67
72
|
"css.escape": "^1.5.1",
|
|
68
|
-
"js-cookie": "
|
|
69
|
-
"parse-uri": "^1.0.
|
|
70
|
-
"uuid": "^
|
|
73
|
+
"js-cookie": "3.0.5",
|
|
74
|
+
"parse-uri": "^1.0.9",
|
|
75
|
+
"uuid": "^9.0.1"
|
|
71
76
|
},
|
|
72
77
|
"devDependencies": {
|
|
73
|
-
"@adobe/alloy": "^2.20.0-
|
|
74
|
-
"@babel/cli": "^7.
|
|
75
|
-
"@babel/core": "^7.
|
|
78
|
+
"@adobe/alloy": "^2.20.0-beta.0",
|
|
79
|
+
"@babel/cli": "^7.24.5",
|
|
80
|
+
"@babel/core": "^7.24.5",
|
|
81
|
+
"@babel/eslint-parser": "^7.24.5",
|
|
76
82
|
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
|
|
77
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
78
|
-
"@babel/plugin-transform-template-literals": "^7.
|
|
79
|
-
"@babel/preset-env": "^7.
|
|
80
|
-
"@
|
|
83
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
84
|
+
"@babel/plugin-transform-template-literals": "^7.24.1",
|
|
85
|
+
"@babel/preset-env": "^7.24.5",
|
|
86
|
+
"@babel/types": "^7.24.5",
|
|
87
|
+
"@eslint/js": "^9.2.0",
|
|
88
|
+
"@octokit/rest": "^20.1.1",
|
|
89
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
90
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
91
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
92
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
81
93
|
"babel-plugin-version": "^0.2.3",
|
|
82
|
-
"bundlesize": "^0.18.
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"eslint
|
|
89
|
-
"eslint-config-
|
|
90
|
-
"eslint-
|
|
91
|
-
"eslint-plugin-
|
|
92
|
-
"eslint-plugin-
|
|
94
|
+
"bundlesize": "^0.18.2",
|
|
95
|
+
"chai": "^5.1.1",
|
|
96
|
+
"chalk": "^5.3.0",
|
|
97
|
+
"concurrently": "^8.2.2",
|
|
98
|
+
"date-fns": "^3.6.0",
|
|
99
|
+
"dotenv": "^16.4.5",
|
|
100
|
+
"eslint": "^8.57.0",
|
|
101
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
102
|
+
"eslint-config-prettier": "^9.1.0",
|
|
103
|
+
"eslint-plugin-ban": "^1.6.0",
|
|
104
|
+
"eslint-plugin-import": "^2.29.1",
|
|
105
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
93
106
|
"eslint-plugin-testcafe": "^0.2.1",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"karma
|
|
102
|
-
"karma-
|
|
103
|
-
"karma-
|
|
104
|
-
"karma-
|
|
105
|
-
"karma-jasmine
|
|
107
|
+
"force-resolutions": "^1.0.11",
|
|
108
|
+
"glob": "^10.3.15",
|
|
109
|
+
"globals": "^15.2.0",
|
|
110
|
+
"handlebars": "^4.7.8",
|
|
111
|
+
"husky": "^9.0.11",
|
|
112
|
+
"jasmine": "^5.1.0",
|
|
113
|
+
"jasmine-core": "^5.1.2",
|
|
114
|
+
"karma": "^6.4.3",
|
|
115
|
+
"karma-chrome-launcher": "^3.2.0",
|
|
116
|
+
"karma-coverage": "^2.2.1",
|
|
117
|
+
"karma-firefox-launcher": "^2.1.3",
|
|
118
|
+
"karma-jasmine": "^5.1.0",
|
|
119
|
+
"karma-jasmine-html-reporter": "^2.1.0",
|
|
120
|
+
"karma-jasmine-matchers": "^5.0.0",
|
|
106
121
|
"karma-junit-reporter": "^2.0.1",
|
|
107
|
-
"karma-rollup-preprocessor": "^7.0.
|
|
122
|
+
"karma-rollup-preprocessor": "^7.0.8",
|
|
108
123
|
"karma-safari-launcher": "^1.0.0",
|
|
109
124
|
"karma-sauce-launcher": "^4.3.6",
|
|
110
|
-
"karma-spec-reporter": "0.0.
|
|
111
|
-
"lint-staged": "^
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"promise-polyfill": "^8.1.0",
|
|
125
|
+
"karma-spec-reporter": "0.0.36",
|
|
126
|
+
"lint-staged": "^15.2.2",
|
|
127
|
+
"prettier": "^3.2.5",
|
|
128
|
+
"promise-polyfill": "^8.3.0",
|
|
115
129
|
"read-cache": "^1.0.0",
|
|
116
|
-
"recursive-readdir": "^2.2.
|
|
130
|
+
"recursive-readdir": "^2.2.3",
|
|
117
131
|
"request": "^2.88.0",
|
|
118
|
-
"rimraf": "^
|
|
119
|
-
"rollup": "^
|
|
120
|
-
"rollup-plugin-
|
|
121
|
-
"rollup-plugin-
|
|
122
|
-
"rollup-plugin-
|
|
123
|
-
"
|
|
124
|
-
"rollup-plugin-license": "^2.2.0",
|
|
125
|
-
"rollup-plugin-node-resolve": "^5.2.0",
|
|
126
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
127
|
-
"semver": "^7.3.7",
|
|
132
|
+
"rimraf": "^5.0.7",
|
|
133
|
+
"rollup": "^4.17.2",
|
|
134
|
+
"rollup-plugin-glob-import": "^0.5.0",
|
|
135
|
+
"rollup-plugin-istanbul": "^5.0.0",
|
|
136
|
+
"rollup-plugin-license": "^3.4.0",
|
|
137
|
+
"semver": "^7.6.2",
|
|
128
138
|
"staged-git-files": "^1.3.0",
|
|
129
|
-
"start-server-and-test": "^
|
|
130
|
-
"testcafe": "^
|
|
131
|
-
"testcafe-browser-provider-saucelabs": "^
|
|
139
|
+
"start-server-and-test": "^2.0.3",
|
|
140
|
+
"testcafe": "^3.6.0",
|
|
141
|
+
"testcafe-browser-provider-saucelabs": "^3.0.0",
|
|
132
142
|
"testcafe-reporter-junit": "^3.0.2",
|
|
133
|
-
"testcafe-reporter-saucelabs": "^1.0
|
|
134
|
-
"url-exists-nodejs": "^0.
|
|
135
|
-
"url-parse": "^1.
|
|
136
|
-
"yargs": "^
|
|
143
|
+
"testcafe-reporter-saucelabs": "^3.1.0",
|
|
144
|
+
"url-exists-nodejs": "^0.2.4",
|
|
145
|
+
"url-parse": "^1.5.10",
|
|
146
|
+
"yargs": "^17.7.2"
|
|
147
|
+
},
|
|
148
|
+
"overrides": {
|
|
149
|
+
"karma-sauce-launcher": {
|
|
150
|
+
"webdriverio": "^8.35.1"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"optionalDependencies": {
|
|
154
|
+
"@rollup/rollup-linux-x64-gnu": "^4.17.2"
|
|
137
155
|
}
|
|
138
156
|
}
|
package/libEs5/baseCode/index.js
DELETED
|
@@ -1,62 +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
|
-
/* eslint no-param-reassign: 0 */
|
|
16
|
-
/* eslint no-underscore-dangle: 0 */
|
|
17
|
-
/* eslint prefer-rest-params: 0 */
|
|
18
|
-
/* eslint no-var: 0 */
|
|
19
|
-
/* eslint-disable func-names */
|
|
20
|
-
/**
|
|
21
|
-
* This is the code, once minified, that an Alloy consumer copies and pastes
|
|
22
|
-
* into their website's HTML. It sets up any global functions the consumer will
|
|
23
|
-
* use to interact with Alloy. It also provides a queuing mechanism whereby
|
|
24
|
-
* any function calls made by the consumer before the Alloy library file
|
|
25
|
-
* loads will be enqueued and later processed by Alloy once the Alloy library
|
|
26
|
-
* file has loaded. Because each call may be asynchronously processed, a promise
|
|
27
|
-
* will always be returned to the consumer any time the consumer attempts to
|
|
28
|
-
* execute a command.
|
|
29
|
-
*
|
|
30
|
-
* Along with this base code, a script tag (not shown here) will also be added
|
|
31
|
-
* to the consumer website's HTML that will load the Alloy library file.
|
|
32
|
-
*
|
|
33
|
-
* Take particular care to write well-minifiable code, as consumers are
|
|
34
|
-
* particularly sensitive to base code size.
|
|
35
|
-
*/
|
|
36
|
-
var _default = function _default(window, instanceNames) {
|
|
37
|
-
instanceNames.forEach(function (instanceName) {
|
|
38
|
-
if (!window[instanceName]) {
|
|
39
|
-
// __alloyNS stores a name of each "instance", or in other words, each
|
|
40
|
-
// global function created that the consumer will use. This array is
|
|
41
|
-
// what the Alloy library will consult once it is loaded to determine
|
|
42
|
-
// which global functions have been set up so that is can connect them to
|
|
43
|
-
// the library's command processing pipeline.
|
|
44
|
-
(window.__alloyNS = window.__alloyNS || []).push(instanceName);
|
|
45
|
-
window[instanceName] = function () {
|
|
46
|
-
var userProvidedArgs = arguments;
|
|
47
|
-
// Always return a promise, because the command may be executed
|
|
48
|
-
// asynchronously, especially if the Alloy library has not yet loaded.
|
|
49
|
-
return new Promise(function (resolve, reject) {
|
|
50
|
-
// Push required call information into the queue. Once the Alloy
|
|
51
|
-
// library is loaded, it will process this queue and resolve/reject
|
|
52
|
-
// the promise we just returned to the consumer. If the Alloy
|
|
53
|
-
// library has already loaded, then it will have already overridden
|
|
54
|
-
// q.push and will therefore process the call immediately.
|
|
55
|
-
window[instanceName].q.push([resolve, reject, userProvidedArgs]);
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
window[instanceName].q = [];
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
exports.default = _default;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _utils = require("../../utils");
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
var createClickHandler = function createClickHandler(_ref) {
|
|
18
|
-
var eventManager = _ref.eventManager,
|
|
19
|
-
lifecycle = _ref.lifecycle,
|
|
20
|
-
handleError = _ref.handleError;
|
|
21
|
-
return function (clickEvent) {
|
|
22
|
-
// TODO: Consider safeguarding from the same object being clicked multiple times in rapid succession?
|
|
23
|
-
var clickedElement = clickEvent.target;
|
|
24
|
-
var event = eventManager.createEvent();
|
|
25
|
-
// this is to make sure a exit link personalization metric use send beacon
|
|
26
|
-
event.documentMayUnload();
|
|
27
|
-
return lifecycle.onClick({
|
|
28
|
-
event: event,
|
|
29
|
-
clickedElement: clickedElement
|
|
30
|
-
}).then(function () {
|
|
31
|
-
if (event.isEmpty()) {
|
|
32
|
-
return Promise.resolve();
|
|
33
|
-
}
|
|
34
|
-
return eventManager.sendEvent(event);
|
|
35
|
-
})
|
|
36
|
-
// eventManager.sendEvent() will return a promise resolved to an
|
|
37
|
-
// object and we want to avoid returning any value to the customer
|
|
38
|
-
.then(_utils.noop).catch(function (error) {
|
|
39
|
-
handleError(error, "click collection");
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
var _default = function _default(_ref2) {
|
|
44
|
-
var eventManager = _ref2.eventManager,
|
|
45
|
-
lifecycle = _ref2.lifecycle,
|
|
46
|
-
handleError = _ref2.handleError;
|
|
47
|
-
var clickHandler = createClickHandler({
|
|
48
|
-
eventManager: eventManager,
|
|
49
|
-
lifecycle: lifecycle,
|
|
50
|
-
handleError: handleError
|
|
51
|
-
});
|
|
52
|
-
document.addEventListener("click", clickHandler, true);
|
|
53
|
-
};
|
|
54
|
-
exports.default = _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.downloadLinkQualifier = exports.default = void 0;
|
|
4
|
-
var _validation = require("../../utils/validation");
|
|
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 downloadLinkQualifier = (0, _validation.string)().regexp().default("\\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$");
|
|
18
|
-
exports.downloadLinkQualifier = downloadLinkQualifier;
|
|
19
|
-
var _default = (0, _validation.objectOf)({
|
|
20
|
-
clickCollectionEnabled: (0, _validation.boolean)().default(true),
|
|
21
|
-
onBeforeLinkClickSend: (0, _validation.callback)(),
|
|
22
|
-
downloadLinkQualifier: downloadLinkQualifier
|
|
23
|
-
});
|
|
24
|
-
exports.default = _default;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
/*
|
|
5
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
6
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
var _default = function _default(_ref) {
|
|
16
|
-
var window = _ref.window,
|
|
17
|
-
getLinkName = _ref.getLinkName,
|
|
18
|
-
getLinkRegion = _ref.getLinkRegion,
|
|
19
|
-
getAbsoluteUrlFromAnchorElement = _ref.getAbsoluteUrlFromAnchorElement,
|
|
20
|
-
findSupportedAnchorElement = _ref.findSupportedAnchorElement,
|
|
21
|
-
determineLinkType = _ref.determineLinkType;
|
|
22
|
-
return function (_ref2) {
|
|
23
|
-
var targetElement = _ref2.targetElement,
|
|
24
|
-
config = _ref2.config,
|
|
25
|
-
logger = _ref2.logger;
|
|
26
|
-
var anchorElement = findSupportedAnchorElement(targetElement);
|
|
27
|
-
if (!anchorElement) {
|
|
28
|
-
logger.info("This link click event is not triggered because the HTML element is not an anchor.");
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
var linkUrl = getAbsoluteUrlFromAnchorElement(window, anchorElement);
|
|
32
|
-
if (!linkUrl) {
|
|
33
|
-
logger.info("This link click event is not triggered because the HTML element doesn't have an URL.");
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
var linkType = determineLinkType(window, config, linkUrl, anchorElement);
|
|
37
|
-
var linkRegion = getLinkRegion(anchorElement);
|
|
38
|
-
var linkName = getLinkName(anchorElement);
|
|
39
|
-
var onBeforeLinkClickSend = config.onBeforeLinkClickSend;
|
|
40
|
-
var options = {
|
|
41
|
-
xdm: {
|
|
42
|
-
eventType: "web.webinteraction.linkClicks",
|
|
43
|
-
web: {
|
|
44
|
-
webInteraction: {
|
|
45
|
-
name: linkName,
|
|
46
|
-
region: linkRegion,
|
|
47
|
-
type: linkType,
|
|
48
|
-
URL: linkUrl,
|
|
49
|
-
linkClicks: {
|
|
50
|
-
value: 1
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
data: {},
|
|
56
|
-
clickedElement: targetElement
|
|
57
|
-
};
|
|
58
|
-
if (!onBeforeLinkClickSend) {
|
|
59
|
-
return options;
|
|
60
|
-
}
|
|
61
|
-
var shouldEventBeTracked = onBeforeLinkClickSend(options);
|
|
62
|
-
if (shouldEventBeTracked !== false) {
|
|
63
|
-
return options;
|
|
64
|
-
}
|
|
65
|
-
logger.info("This link click event is not triggered because it was canceled in onBeforeLinkClickSend.");
|
|
66
|
-
return undefined;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
exports.default = _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
/*
|
|
5
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
6
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
var _default = function _default(_ref) {
|
|
16
|
-
var getLinkDetails = _ref.getLinkDetails,
|
|
17
|
-
config = _ref.config,
|
|
18
|
-
logger = _ref.logger;
|
|
19
|
-
var clickCollectionEnabled = config.clickCollectionEnabled;
|
|
20
|
-
if (!clickCollectionEnabled) {
|
|
21
|
-
return function () {
|
|
22
|
-
return undefined;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return function (_ref2) {
|
|
26
|
-
var targetElement = _ref2.targetElement,
|
|
27
|
-
event = _ref2.event;
|
|
28
|
-
var linkDetails = getLinkDetails({
|
|
29
|
-
targetElement: targetElement,
|
|
30
|
-
config: config,
|
|
31
|
-
logger: logger
|
|
32
|
-
});
|
|
33
|
-
if (linkDetails) {
|
|
34
|
-
event.mergeXdm(linkDetails.xdm);
|
|
35
|
-
event.setUserData(linkDetails.data);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
exports.default = _default;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _utils = require("./utils");
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
var unsupportedNodeNames = /^(SCRIPT|STYLE|LINK|CANVAS|NOSCRIPT|#COMMENT)$/i;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Determines if a node qualifies as a supported link text node.
|
|
21
|
-
* @param {*} node Node to determine support for.
|
|
22
|
-
* @returns {boolean}
|
|
23
|
-
*/
|
|
24
|
-
var isSupportedTextNode = function isSupportedTextNode(node) {
|
|
25
|
-
if (node && node.nodeName) {
|
|
26
|
-
if (node.nodeName.match(unsupportedNodeNames)) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Orders and returns specified node and its child nodes in arrays of supported
|
|
35
|
-
* and unsupported nodes.
|
|
36
|
-
* @param {*} node The node to extract supported and unsupported nodes from.
|
|
37
|
-
* @returns {{supportedNodes: Array, includesUnsupportedNodes: boolean}} Node support object.
|
|
38
|
-
*/
|
|
39
|
-
var extractSupportedNodes = function extractSupportedNodes(node) {
|
|
40
|
-
var supportedNodes = [];
|
|
41
|
-
var includesUnsupportedNodes = false;
|
|
42
|
-
if (isSupportedTextNode(node)) {
|
|
43
|
-
supportedNodes.push(node);
|
|
44
|
-
if (node.childNodes) {
|
|
45
|
-
var childNodes = Array.prototype.slice.call(node.childNodes);
|
|
46
|
-
childNodes.forEach(function (childNode) {
|
|
47
|
-
var nodes = extractSupportedNodes(childNode);
|
|
48
|
-
supportedNodes = supportedNodes.concat(nodes.supportedNodes);
|
|
49
|
-
includesUnsupportedNodes = includesUnsupportedNodes || nodes.includesUnsupportedNodes;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
includesUnsupportedNodes = true;
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
supportedNodes: supportedNodes,
|
|
57
|
-
includesUnsupportedNodes: includesUnsupportedNodes
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Returns the value of a node attribute.
|
|
63
|
-
* @param {*} node The node holding the attribute.
|
|
64
|
-
* @param {string} attributeName The name of the attribute.
|
|
65
|
-
* @param {string} nodeName Optional node name constraint.
|
|
66
|
-
* @returns {string} Attribute value or undefined.
|
|
67
|
-
*/
|
|
68
|
-
var getNodeAttributeValue = function getNodeAttributeValue(node, attributeName, nodeName) {
|
|
69
|
-
var attributeValue;
|
|
70
|
-
if (!nodeName || nodeName === node.nodeName.toUpperCase()) {
|
|
71
|
-
attributeValue = node.getAttribute(attributeName);
|
|
72
|
-
}
|
|
73
|
-
return attributeValue;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Extracts the children supported nodes attributes map
|
|
78
|
-
* @param {*} nodes The nodes array holding the children nodes.
|
|
79
|
-
* The returned map contains the supported not empty children attributes values.
|
|
80
|
-
* */
|
|
81
|
-
var getChildrenAttributes = function getChildrenAttributes(nodes) {
|
|
82
|
-
var attributes = {
|
|
83
|
-
texts: []
|
|
84
|
-
};
|
|
85
|
-
nodes.supportedNodes.forEach(function (supportedNode) {
|
|
86
|
-
if (supportedNode.getAttribute) {
|
|
87
|
-
if (!attributes.alt) {
|
|
88
|
-
attributes.alt = (0, _utils.truncateWhiteSpace)(supportedNode.getAttribute("alt"));
|
|
89
|
-
}
|
|
90
|
-
if (!attributes.title) {
|
|
91
|
-
attributes.title = (0, _utils.truncateWhiteSpace)(supportedNode.getAttribute("title"));
|
|
92
|
-
}
|
|
93
|
-
if (!attributes.inputValue) {
|
|
94
|
-
attributes.inputValue = (0, _utils.truncateWhiteSpace)(getNodeAttributeValue(supportedNode, "value", "INPUT"));
|
|
95
|
-
}
|
|
96
|
-
if (!attributes.imgSrc) {
|
|
97
|
-
attributes.imgSrc = (0, _utils.truncateWhiteSpace)(getNodeAttributeValue(supportedNode, "src", "IMG"));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (supportedNode.nodeValue) {
|
|
101
|
-
attributes.texts.push(supportedNode.nodeValue);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
return attributes;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Extracts a link-name from a given node.
|
|
109
|
-
*
|
|
110
|
-
* The returned link-name is set to one of the following (in order of priority):
|
|
111
|
-
*
|
|
112
|
-
* 1. Clicked node innerText
|
|
113
|
-
* 2. Clicked node textContent
|
|
114
|
-
* 3. Clicked node and its child nodes nodeValue appended together.
|
|
115
|
-
* 4. Clicked node alt attribute or node descendant alt attribute.
|
|
116
|
-
* Whichever is found first.
|
|
117
|
-
* 5. Clicked node text attribute or node descendant text attribute.
|
|
118
|
-
* Whichever is found first.
|
|
119
|
-
* 6. Clicked node INPUT descendant value attribute.
|
|
120
|
-
* Whichever is found first.
|
|
121
|
-
* 7. Clicked node IMG descendant src attribute.
|
|
122
|
-
* Whichever is found first.
|
|
123
|
-
*
|
|
124
|
-
* @param {*} node The node to find link text for.
|
|
125
|
-
* @returns {string} link-name or an empty string if not link-name is found.
|
|
126
|
-
*/
|
|
127
|
-
var _default = function _default(node) {
|
|
128
|
-
var nodeText = (0, _utils.truncateWhiteSpace)(node.innerText || node.textContent);
|
|
129
|
-
var nodes = extractSupportedNodes(node);
|
|
130
|
-
// if contains unsupported nodes we want children node attributes
|
|
131
|
-
if (!nodeText || nodes.includesUnsupportedNodes) {
|
|
132
|
-
var attributesMap = getChildrenAttributes(nodes);
|
|
133
|
-
nodeText = (0, _utils.truncateWhiteSpace)(attributesMap.texts.join(""));
|
|
134
|
-
if (!nodeText) {
|
|
135
|
-
nodeText = attributesMap.alt || attributesMap.title || attributesMap.inputValue || attributesMap.imgSrc;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return nodeText || "";
|
|
139
|
-
};
|
|
140
|
-
exports.default = _default;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _utils = require("./utils");
|
|
5
|
-
var _utils2 = require("../../utils");
|
|
6
|
-
/*
|
|
7
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
8
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
governing permissions and limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var semanticElements = /^(HEADER|MAIN|FOOTER|NAV)$/i;
|
|
19
|
-
var getAriaRegionLabel = function getAriaRegionLabel(node) {
|
|
20
|
-
var regionLabel;
|
|
21
|
-
if (node.role === "region" && (0, _utils2.isNonEmptyString)(node["aria-label"])) {
|
|
22
|
-
regionLabel = node["aria-label"];
|
|
23
|
-
}
|
|
24
|
-
return regionLabel;
|
|
25
|
-
};
|
|
26
|
-
var getSectionNodeName = function getSectionNodeName(node) {
|
|
27
|
-
var nodeName;
|
|
28
|
-
if (node && node.nodeName) {
|
|
29
|
-
if (node.nodeName.match(semanticElements)) {
|
|
30
|
-
nodeName = node.nodeName;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return nodeName;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Extracts a node link-region.
|
|
38
|
-
*
|
|
39
|
-
* The link-region is determined by traversing up the DOM
|
|
40
|
-
* looking for a region that is determined in order of priority:
|
|
41
|
-
*
|
|
42
|
-
* 1. element.id
|
|
43
|
-
* 2. Aria region label
|
|
44
|
-
* 3. Semantic element name
|
|
45
|
-
* 4. BODY (if no other link-region is found).
|
|
46
|
-
*
|
|
47
|
-
* @param {*} node The node to find link region for.
|
|
48
|
-
* @returns {string} link-region.
|
|
49
|
-
*/
|
|
50
|
-
var _default = function _default(node) {
|
|
51
|
-
var linkParentNode = node.parentNode;
|
|
52
|
-
var regionName;
|
|
53
|
-
while (linkParentNode) {
|
|
54
|
-
regionName = (0, _utils.truncateWhiteSpace)(linkParentNode.id || getAriaRegionLabel(linkParentNode) || getSectionNodeName(linkParentNode));
|
|
55
|
-
if (regionName) {
|
|
56
|
-
return regionName;
|
|
57
|
-
}
|
|
58
|
-
linkParentNode = linkParentNode.parentNode;
|
|
59
|
-
}
|
|
60
|
-
return "BODY";
|
|
61
|
-
};
|
|
62
|
-
exports.default = _default;
|