@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,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
|
-
export default (({
|
|
13
|
-
logger,
|
|
14
|
-
executeRedirect,
|
|
15
|
-
collect
|
|
16
|
-
}) => item => {
|
|
17
|
-
const {
|
|
18
|
-
content
|
|
19
|
-
} = item.getData() || {};
|
|
20
|
-
if (!content) {
|
|
21
|
-
logger.warn("Invalid Redirect data", item.getData());
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
const render = () => {
|
|
25
|
-
return collect({
|
|
26
|
-
decisionsMeta: [item.getProposition().getNotification()],
|
|
27
|
-
documentMayUnload: true
|
|
28
|
-
}).then(() => {
|
|
29
|
-
return executeRedirect(content);
|
|
30
|
-
// Execute redirect will never resolve. If there are bottom of page events that are waiting
|
|
31
|
-
// for display notifications from this request, they will never run because this promise will
|
|
32
|
-
// not resolve. This is intentional because we don't want to run bottom of page events if
|
|
33
|
-
// there is a redirect.
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return {
|
|
38
|
-
render,
|
|
39
|
-
setRenderAttempted: true,
|
|
40
|
-
onlyRenderThis: true
|
|
41
|
-
};
|
|
42
|
-
});
|
|
@@ -1,110 +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
|
-
import PAGE_WIDE_SCOPE from "../../../constants/pageWideScope";
|
|
14
|
-
import { VIEW_SCOPE_TYPE, PAGE_SCOPE_TYPE, PROPOSITION_SCOPE_TYPE } from "../constants/scopeType";
|
|
15
|
-
export default (({
|
|
16
|
-
preprocess,
|
|
17
|
-
isPageWideSurface
|
|
18
|
-
}) => {
|
|
19
|
-
const createItem = (item, proposition) => {
|
|
20
|
-
const {
|
|
21
|
-
schema,
|
|
22
|
-
data,
|
|
23
|
-
characteristics: {
|
|
24
|
-
trackingLabel
|
|
25
|
-
} = {}
|
|
26
|
-
} = item;
|
|
27
|
-
const processedData = preprocess(data);
|
|
28
|
-
return {
|
|
29
|
-
getSchema() {
|
|
30
|
-
return schema;
|
|
31
|
-
},
|
|
32
|
-
getData() {
|
|
33
|
-
return processedData;
|
|
34
|
-
},
|
|
35
|
-
getProposition() {
|
|
36
|
-
return proposition;
|
|
37
|
-
},
|
|
38
|
-
getTrackingLabel() {
|
|
39
|
-
return trackingLabel;
|
|
40
|
-
},
|
|
41
|
-
getOriginalItem() {
|
|
42
|
-
return item;
|
|
43
|
-
},
|
|
44
|
-
toString() {
|
|
45
|
-
return JSON.stringify(item);
|
|
46
|
-
},
|
|
47
|
-
toJSON() {
|
|
48
|
-
return item;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
return (payload, visibleInReturnedItems = true) => {
|
|
53
|
-
const {
|
|
54
|
-
id,
|
|
55
|
-
scope,
|
|
56
|
-
scopeDetails,
|
|
57
|
-
items = []
|
|
58
|
-
} = payload;
|
|
59
|
-
const {
|
|
60
|
-
characteristics: {
|
|
61
|
-
scopeType
|
|
62
|
-
} = {}
|
|
63
|
-
} = scopeDetails || {};
|
|
64
|
-
return {
|
|
65
|
-
getScope() {
|
|
66
|
-
if (!scope) {
|
|
67
|
-
return scope;
|
|
68
|
-
}
|
|
69
|
-
return scope;
|
|
70
|
-
},
|
|
71
|
-
getScopeType() {
|
|
72
|
-
if (scope === PAGE_WIDE_SCOPE || isPageWideSurface(scope)) {
|
|
73
|
-
return PAGE_SCOPE_TYPE;
|
|
74
|
-
}
|
|
75
|
-
if (scopeType === VIEW_SCOPE_TYPE) {
|
|
76
|
-
return VIEW_SCOPE_TYPE;
|
|
77
|
-
}
|
|
78
|
-
return PROPOSITION_SCOPE_TYPE;
|
|
79
|
-
},
|
|
80
|
-
getItems() {
|
|
81
|
-
return items.map(item => createItem(item, this));
|
|
82
|
-
},
|
|
83
|
-
getNotification() {
|
|
84
|
-
return {
|
|
85
|
-
id,
|
|
86
|
-
scope,
|
|
87
|
-
scopeDetails
|
|
88
|
-
};
|
|
89
|
-
},
|
|
90
|
-
toJSON() {
|
|
91
|
-
return payload;
|
|
92
|
-
},
|
|
93
|
-
addToReturnValues(propositions, decisions, includedItems, renderAttempted) {
|
|
94
|
-
if (visibleInReturnedItems) {
|
|
95
|
-
propositions.push({
|
|
96
|
-
...payload,
|
|
97
|
-
items: includedItems.map(i => i.getOriginalItem()),
|
|
98
|
-
renderAttempted
|
|
99
|
-
});
|
|
100
|
-
if (!renderAttempted) {
|
|
101
|
-
decisions.push({
|
|
102
|
-
...payload,
|
|
103
|
-
items: includedItems.map(i => i.getOriginalItem())
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
});
|
|
@@ -1,17 +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
|
-
export default (() => {
|
|
13
|
-
return {
|
|
14
|
-
setRenderAttempted: true,
|
|
15
|
-
includeInNotification: true
|
|
16
|
-
};
|
|
17
|
-
});
|
package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js
DELETED
|
@@ -1,291 +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
|
-
import { getNonce } from "../../dom-actions/dom";
|
|
14
|
-
import { parseAnchor, removeElementById } from "../utils";
|
|
15
|
-
import { TEXT_HTML } from "../../../../constants/contentType";
|
|
16
|
-
import { assign, includes, isNonEmptyString, values } from "../../../../utils";
|
|
17
|
-
import { createNode } from "../../../../utils/dom";
|
|
18
|
-
import { objectOf } from "../../../../utils/validation";
|
|
19
|
-
import { PropositionEventType } from "../../../../constants/propositionEventType";
|
|
20
|
-
import { EVENT_TYPE_TRUE, INTERACT } from "../../../../constants/eventType";
|
|
21
|
-
import createRedirect from "../../dom-actions/createRedirect";
|
|
22
|
-
const MESSAGING_CONTAINER_ID = "alloy-messaging-container";
|
|
23
|
-
const OVERLAY_CONTAINER_ID = "alloy-overlay-container";
|
|
24
|
-
const IFRAME_ID = "alloy-content-iframe";
|
|
25
|
-
const dismissMessage = () => [MESSAGING_CONTAINER_ID, OVERLAY_CONTAINER_ID].forEach(removeElementById);
|
|
26
|
-
export const createIframeClickHandler = (interact, navigateToUrl = createRedirect(window)) => {
|
|
27
|
-
return event => {
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
event.stopImmediatePropagation();
|
|
30
|
-
const {
|
|
31
|
-
target
|
|
32
|
-
} = event;
|
|
33
|
-
const anchor = target.tagName.toLowerCase() === "a" ? target : target.closest("a");
|
|
34
|
-
if (!anchor) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const {
|
|
38
|
-
action,
|
|
39
|
-
interaction,
|
|
40
|
-
link,
|
|
41
|
-
label,
|
|
42
|
-
uuid
|
|
43
|
-
} = parseAnchor(anchor);
|
|
44
|
-
interact(action, {
|
|
45
|
-
label,
|
|
46
|
-
id: interaction,
|
|
47
|
-
uuid,
|
|
48
|
-
link
|
|
49
|
-
});
|
|
50
|
-
if (action === "dismiss") {
|
|
51
|
-
dismissMessage();
|
|
52
|
-
}
|
|
53
|
-
if (isNonEmptyString(link) && link.length > 0) {
|
|
54
|
-
navigateToUrl(link, true);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export const createIframe = (htmlContent, clickHandler) => {
|
|
59
|
-
const parser = new DOMParser();
|
|
60
|
-
const htmlDocument = parser.parseFromString(htmlContent, TEXT_HTML);
|
|
61
|
-
const scriptTag = htmlDocument.querySelector("script");
|
|
62
|
-
if (scriptTag) {
|
|
63
|
-
scriptTag.setAttribute("nonce", getNonce());
|
|
64
|
-
}
|
|
65
|
-
const element = createNode("iframe", {
|
|
66
|
-
src: URL.createObjectURL(new Blob([htmlDocument.documentElement.outerHTML], {
|
|
67
|
-
type: "text/html"
|
|
68
|
-
})),
|
|
69
|
-
id: IFRAME_ID
|
|
70
|
-
});
|
|
71
|
-
element.addEventListener("load", () => {
|
|
72
|
-
const {
|
|
73
|
-
addEventListener
|
|
74
|
-
} = element.contentDocument || element.contentWindow.document;
|
|
75
|
-
addEventListener("click", clickHandler);
|
|
76
|
-
});
|
|
77
|
-
return element;
|
|
78
|
-
};
|
|
79
|
-
const renderMessage = (iframe, webParameters, container, overlay) => {
|
|
80
|
-
[{
|
|
81
|
-
id: OVERLAY_CONTAINER_ID,
|
|
82
|
-
element: overlay
|
|
83
|
-
}, {
|
|
84
|
-
id: MESSAGING_CONTAINER_ID,
|
|
85
|
-
element: container
|
|
86
|
-
}, {
|
|
87
|
-
id: IFRAME_ID,
|
|
88
|
-
element: iframe
|
|
89
|
-
}].forEach(({
|
|
90
|
-
id,
|
|
91
|
-
element
|
|
92
|
-
}) => {
|
|
93
|
-
const {
|
|
94
|
-
style = {},
|
|
95
|
-
params = {}
|
|
96
|
-
} = webParameters[id];
|
|
97
|
-
assign(element.style, style);
|
|
98
|
-
const {
|
|
99
|
-
parentElement = "body",
|
|
100
|
-
insertionMethod = "appendChild",
|
|
101
|
-
enabled = true
|
|
102
|
-
} = params;
|
|
103
|
-
const parent = document.querySelector(parentElement);
|
|
104
|
-
if (enabled && parent && typeof parent[insertionMethod] === "function") {
|
|
105
|
-
parent[insertionMethod](element);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
export const buildStyleFromMobileParameters = mobileParameters => {
|
|
110
|
-
const {
|
|
111
|
-
verticalAlign,
|
|
112
|
-
width,
|
|
113
|
-
horizontalAlign,
|
|
114
|
-
backdropColor,
|
|
115
|
-
height,
|
|
116
|
-
cornerRadius,
|
|
117
|
-
horizontalInset,
|
|
118
|
-
verticalInset,
|
|
119
|
-
uiTakeover = false
|
|
120
|
-
} = mobileParameters;
|
|
121
|
-
const style = {
|
|
122
|
-
width: width ? `${width}%` : "100%",
|
|
123
|
-
backgroundColor: backdropColor || "rgba(0, 0, 0, 0.5)",
|
|
124
|
-
borderRadius: cornerRadius ? `${cornerRadius}px` : "0px",
|
|
125
|
-
border: "none",
|
|
126
|
-
position: uiTakeover ? "fixed" : "relative",
|
|
127
|
-
overflow: "hidden"
|
|
128
|
-
};
|
|
129
|
-
if (horizontalAlign === "left") {
|
|
130
|
-
style.left = horizontalInset ? `${horizontalInset}%` : "0";
|
|
131
|
-
} else if (horizontalAlign === "right") {
|
|
132
|
-
style.right = horizontalInset ? `${horizontalInset}%` : "0";
|
|
133
|
-
} else if (horizontalAlign === "center") {
|
|
134
|
-
style.left = "50%";
|
|
135
|
-
style.transform = "translateX(-50%)";
|
|
136
|
-
}
|
|
137
|
-
if (verticalAlign === "top") {
|
|
138
|
-
style.top = verticalInset ? `${verticalInset}%` : "0";
|
|
139
|
-
} else if (verticalAlign === "bottom") {
|
|
140
|
-
style.position = "fixed";
|
|
141
|
-
style.bottom = verticalInset ? `${verticalInset}%` : "0";
|
|
142
|
-
} else if (verticalAlign === "center") {
|
|
143
|
-
style.top = "50%";
|
|
144
|
-
style.transform = `${horizontalAlign === "center" ? `${style.transform} ` : ""}translateY(-50%)`;
|
|
145
|
-
style.display = "flex";
|
|
146
|
-
style.alignItems = "center";
|
|
147
|
-
style.justifyContent = "center";
|
|
148
|
-
}
|
|
149
|
-
if (height) {
|
|
150
|
-
style.height = `${height}vh`;
|
|
151
|
-
} else {
|
|
152
|
-
style.height = "100%";
|
|
153
|
-
}
|
|
154
|
-
return style;
|
|
155
|
-
};
|
|
156
|
-
export const mobileOverlay = mobileParameters => {
|
|
157
|
-
const {
|
|
158
|
-
backdropOpacity,
|
|
159
|
-
backdropColor
|
|
160
|
-
} = mobileParameters;
|
|
161
|
-
const opacity = backdropOpacity || 0.5;
|
|
162
|
-
const color = backdropColor || "#FFFFFF";
|
|
163
|
-
const style = {
|
|
164
|
-
position: "fixed",
|
|
165
|
-
top: "0",
|
|
166
|
-
left: "0",
|
|
167
|
-
width: "100%",
|
|
168
|
-
height: "100%",
|
|
169
|
-
background: "transparent",
|
|
170
|
-
opacity,
|
|
171
|
-
backgroundColor: color
|
|
172
|
-
};
|
|
173
|
-
return style;
|
|
174
|
-
};
|
|
175
|
-
const REQUIRED_PARAMS = ["enabled", "parentElement", "insertionMethod"];
|
|
176
|
-
const isValidWebParameters = webParameters => {
|
|
177
|
-
if (!webParameters) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
const ids = Object.keys(webParameters);
|
|
181
|
-
if (!includes(ids, MESSAGING_CONTAINER_ID)) {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
if (!includes(ids, OVERLAY_CONTAINER_ID)) {
|
|
185
|
-
return false;
|
|
186
|
-
}
|
|
187
|
-
const valuesArray = values(webParameters);
|
|
188
|
-
for (let i = 0; i < valuesArray.length; i += 1) {
|
|
189
|
-
if (!objectOf(valuesArray[i], "style")) {
|
|
190
|
-
return false;
|
|
191
|
-
}
|
|
192
|
-
if (!objectOf(valuesArray[i], "params")) {
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
for (let j = 0; j < REQUIRED_PARAMS.length; j += 1) {
|
|
196
|
-
if (!objectOf(valuesArray[i].params, REQUIRED_PARAMS[j])) {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return true;
|
|
202
|
-
};
|
|
203
|
-
const generateWebParameters = mobileParameters => {
|
|
204
|
-
if (!mobileParameters) {
|
|
205
|
-
return undefined;
|
|
206
|
-
}
|
|
207
|
-
const {
|
|
208
|
-
uiTakeover = false
|
|
209
|
-
} = mobileParameters;
|
|
210
|
-
return {
|
|
211
|
-
[IFRAME_ID]: {
|
|
212
|
-
style: {
|
|
213
|
-
border: "none",
|
|
214
|
-
width: "100%",
|
|
215
|
-
height: "100%"
|
|
216
|
-
},
|
|
217
|
-
params: {
|
|
218
|
-
enabled: true,
|
|
219
|
-
parentElement: "#alloy-messaging-container",
|
|
220
|
-
insertionMethod: "appendChild"
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
[MESSAGING_CONTAINER_ID]: {
|
|
224
|
-
style: buildStyleFromMobileParameters(mobileParameters),
|
|
225
|
-
params: {
|
|
226
|
-
enabled: true,
|
|
227
|
-
parentElement: "body",
|
|
228
|
-
insertionMethod: "appendChild"
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
[OVERLAY_CONTAINER_ID]: {
|
|
232
|
-
style: mobileOverlay(mobileParameters),
|
|
233
|
-
params: {
|
|
234
|
-
enabled: uiTakeover === true,
|
|
235
|
-
parentElement: "body",
|
|
236
|
-
insertionMethod: "appendChild"
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
export const displayHTMLContentInIframe = (settings = {}, interact) => {
|
|
242
|
-
dismissMessage();
|
|
243
|
-
const {
|
|
244
|
-
content,
|
|
245
|
-
contentType,
|
|
246
|
-
mobileParameters
|
|
247
|
-
} = settings;
|
|
248
|
-
let {
|
|
249
|
-
webParameters
|
|
250
|
-
} = settings;
|
|
251
|
-
if (contentType !== TEXT_HTML) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
const container = createNode("div", {
|
|
255
|
-
id: MESSAGING_CONTAINER_ID
|
|
256
|
-
});
|
|
257
|
-
const iframe = createIframe(content, createIframeClickHandler(interact));
|
|
258
|
-
const overlay = createNode("div", {
|
|
259
|
-
id: OVERLAY_CONTAINER_ID
|
|
260
|
-
});
|
|
261
|
-
if (!isValidWebParameters(webParameters)) {
|
|
262
|
-
webParameters = generateWebParameters(mobileParameters);
|
|
263
|
-
}
|
|
264
|
-
if (!webParameters) {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
renderMessage(iframe, webParameters, container, overlay);
|
|
268
|
-
};
|
|
269
|
-
export default ((settings, collect) => {
|
|
270
|
-
return new Promise(resolve => {
|
|
271
|
-
const {
|
|
272
|
-
meta
|
|
273
|
-
} = settings;
|
|
274
|
-
displayHTMLContentInIframe(settings, (action, propositionAction) => {
|
|
275
|
-
const propositionEventTypes = {};
|
|
276
|
-
propositionEventTypes[PropositionEventType.INTERACT] = EVENT_TYPE_TRUE;
|
|
277
|
-
if (Object.values(PropositionEventType).indexOf(action) !== -1) {
|
|
278
|
-
propositionEventTypes[action] = EVENT_TYPE_TRUE;
|
|
279
|
-
}
|
|
280
|
-
collect({
|
|
281
|
-
decisionsMeta: [meta],
|
|
282
|
-
propositionAction,
|
|
283
|
-
eventType: INTERACT,
|
|
284
|
-
propositionEventTypes: Object.keys(propositionEventTypes)
|
|
285
|
-
});
|
|
286
|
-
});
|
|
287
|
-
resolve({
|
|
288
|
-
meta
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
});
|
package/libEs6/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js
DELETED
|
@@ -1,17 +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 displayIframeContent from "./actions/displayIframeContent";
|
|
13
|
-
export default (collect => {
|
|
14
|
-
return {
|
|
15
|
-
defaultContent: settings => displayIframeContent(settings, collect)
|
|
16
|
-
};
|
|
17
|
-
});
|
|
@@ -1,49 +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 { isNonEmptyArray, queryString, startsWith } from "../../../utils";
|
|
13
|
-
import { removeNode, selectNodes } from "../../../utils/dom";
|
|
14
|
-
export const removeElementById = id => {
|
|
15
|
-
const element = selectNodes(`#${id}`, document);
|
|
16
|
-
if (element && element.length > 0) {
|
|
17
|
-
removeNode(element[0]);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export const parseAnchor = anchor => {
|
|
21
|
-
const nothing = {};
|
|
22
|
-
if (!anchor || anchor.tagName.toLowerCase() !== "a") {
|
|
23
|
-
return nothing;
|
|
24
|
-
}
|
|
25
|
-
const {
|
|
26
|
-
href
|
|
27
|
-
} = anchor;
|
|
28
|
-
if (!href || !startsWith(href, "adbinapp://")) {
|
|
29
|
-
return nothing;
|
|
30
|
-
}
|
|
31
|
-
const hrefParts = href.split("?");
|
|
32
|
-
const action = hrefParts[0].split("://")[1];
|
|
33
|
-
const label = anchor.innerText;
|
|
34
|
-
const uuid = anchor.getAttribute("data-uuid") || "";
|
|
35
|
-
let interaction;
|
|
36
|
-
let link;
|
|
37
|
-
if (isNonEmptyArray(hrefParts)) {
|
|
38
|
-
const queryParams = queryString.parse(hrefParts[1]);
|
|
39
|
-
interaction = queryParams.interaction || "";
|
|
40
|
-
link = decodeURIComponent(queryParams.link || "");
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
action,
|
|
44
|
-
interaction,
|
|
45
|
-
link,
|
|
46
|
-
label,
|
|
47
|
-
uuid
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2019 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 { boolean, objectOf, string } from "../../utils/validation";
|
|
14
|
-
import createComponent from "./createComponent";
|
|
15
|
-
import { initDomActionsModules } from "./dom-actions";
|
|
16
|
-
import createCollect from "./createCollect";
|
|
17
|
-
import { hideContainers, showContainers } from "./flicker";
|
|
18
|
-
import createFetchDataHandler from "./createFetchDataHandler";
|
|
19
|
-
import collectClicks from "./dom-actions/clicks/collectClicks";
|
|
20
|
-
import isAuthoringModeEnabled from "./utils/isAuthoringModeEnabled";
|
|
21
|
-
import { mergeDecisionsMeta, mergeQuery } from "./event";
|
|
22
|
-
import createOnClickHandler from "./createOnClickHandler";
|
|
23
|
-
import createViewCacheManager from "./createViewCacheManager";
|
|
24
|
-
import createViewChangeHandler from "./createViewChangeHandler";
|
|
25
|
-
import createClickStorage from "./createClickStorage";
|
|
26
|
-
import createApplyPropositions from "./createApplyPropositions";
|
|
27
|
-
import createGetPageLocation from "./createGetPageLocation";
|
|
28
|
-
import createSetTargetMigration from "./createSetTargetMigration";
|
|
29
|
-
import remapCustomCodeOffers from "./dom-actions/remapCustomCodeOffers";
|
|
30
|
-
import remapHeadOffers from "./dom-actions/remapHeadOffers";
|
|
31
|
-
import createPreprocess from "./dom-actions/createPreprocess";
|
|
32
|
-
import injectCreateProposition from "./handlers/injectCreateProposition";
|
|
33
|
-
import createAsyncArray from "./utils/createAsyncArray";
|
|
34
|
-
import * as schema from "../../constants/schema";
|
|
35
|
-
import processDefaultContent from "./handlers/processDefaultContent";
|
|
36
|
-
import { isPageWideSurface } from "./utils/surfaceUtils";
|
|
37
|
-
import createProcessDomAction from "./handlers/createProcessDomAction";
|
|
38
|
-
import createProcessHtmlContent from "./handlers/createProcessHtmlContent";
|
|
39
|
-
import createProcessRedirect from "./handlers/createProcessRedirect";
|
|
40
|
-
import createProcessPropositions from "./handlers/createProcessPropositions";
|
|
41
|
-
import createOnDecisionHandler from "./createOnDecisionHandler";
|
|
42
|
-
import createProcessInAppMessage from "./handlers/createProcessInAppMessage";
|
|
43
|
-
import initInAppMessageActionsModules from "./in-app-message-actions/initInAppMessageActionsModules";
|
|
44
|
-
import createRedirect from "./dom-actions/createRedirect";
|
|
45
|
-
import createNotificationHandler from "./createNotificationHandler";
|
|
46
|
-
const createPersonalization = ({
|
|
47
|
-
config,
|
|
48
|
-
logger,
|
|
49
|
-
eventManager
|
|
50
|
-
}) => {
|
|
51
|
-
const {
|
|
52
|
-
targetMigrationEnabled,
|
|
53
|
-
prehidingStyle
|
|
54
|
-
} = config;
|
|
55
|
-
const collect = createCollect({
|
|
56
|
-
eventManager,
|
|
57
|
-
mergeDecisionsMeta
|
|
58
|
-
});
|
|
59
|
-
const {
|
|
60
|
-
getClickMetasBySelector,
|
|
61
|
-
getClickSelectors,
|
|
62
|
-
storeClickMetrics
|
|
63
|
-
} = createClickStorage();
|
|
64
|
-
const getPageLocation = createGetPageLocation({
|
|
65
|
-
window
|
|
66
|
-
});
|
|
67
|
-
const domActionsModules = initDomActionsModules();
|
|
68
|
-
const preprocess = createPreprocess([remapHeadOffers, remapCustomCodeOffers]);
|
|
69
|
-
const createProposition = injectCreateProposition({
|
|
70
|
-
preprocess,
|
|
71
|
-
isPageWideSurface
|
|
72
|
-
});
|
|
73
|
-
const viewCache = createViewCacheManager({
|
|
74
|
-
createProposition
|
|
75
|
-
});
|
|
76
|
-
const executeRedirect = createRedirect(window);
|
|
77
|
-
const schemaProcessors = {
|
|
78
|
-
[schema.DEFAULT_CONTENT_ITEM]: processDefaultContent,
|
|
79
|
-
[schema.DOM_ACTION]: createProcessDomAction({
|
|
80
|
-
modules: domActionsModules,
|
|
81
|
-
logger,
|
|
82
|
-
storeClickMetrics
|
|
83
|
-
}),
|
|
84
|
-
[schema.HTML_CONTENT_ITEM]: createProcessHtmlContent({
|
|
85
|
-
modules: domActionsModules,
|
|
86
|
-
logger
|
|
87
|
-
}),
|
|
88
|
-
[schema.REDIRECT_ITEM]: createProcessRedirect({
|
|
89
|
-
logger,
|
|
90
|
-
executeRedirect,
|
|
91
|
-
collect
|
|
92
|
-
}),
|
|
93
|
-
[schema.MESSAGE_IN_APP]: createProcessInAppMessage({
|
|
94
|
-
modules: initInAppMessageActionsModules(collect),
|
|
95
|
-
logger
|
|
96
|
-
})
|
|
97
|
-
};
|
|
98
|
-
const processPropositions = createProcessPropositions({
|
|
99
|
-
schemaProcessors,
|
|
100
|
-
logger
|
|
101
|
-
});
|
|
102
|
-
const renderedPropositions = createAsyncArray();
|
|
103
|
-
const notificationHandler = createNotificationHandler(collect, renderedPropositions);
|
|
104
|
-
const fetchDataHandler = createFetchDataHandler({
|
|
105
|
-
prehidingStyle,
|
|
106
|
-
showContainers,
|
|
107
|
-
hideContainers,
|
|
108
|
-
mergeQuery,
|
|
109
|
-
processPropositions,
|
|
110
|
-
createProposition,
|
|
111
|
-
notificationHandler
|
|
112
|
-
});
|
|
113
|
-
const onClickHandler = createOnClickHandler({
|
|
114
|
-
mergeDecisionsMeta,
|
|
115
|
-
collectClicks,
|
|
116
|
-
getClickSelectors,
|
|
117
|
-
getClickMetasBySelector
|
|
118
|
-
});
|
|
119
|
-
const viewChangeHandler = createViewChangeHandler({
|
|
120
|
-
processPropositions,
|
|
121
|
-
viewCache
|
|
122
|
-
});
|
|
123
|
-
const applyPropositions = createApplyPropositions({
|
|
124
|
-
processPropositions,
|
|
125
|
-
createProposition,
|
|
126
|
-
renderedPropositions,
|
|
127
|
-
viewCache
|
|
128
|
-
});
|
|
129
|
-
const setTargetMigration = createSetTargetMigration({
|
|
130
|
-
targetMigrationEnabled
|
|
131
|
-
});
|
|
132
|
-
const onDecisionHandler = createOnDecisionHandler({
|
|
133
|
-
processPropositions,
|
|
134
|
-
createProposition,
|
|
135
|
-
notificationHandler
|
|
136
|
-
});
|
|
137
|
-
return createComponent({
|
|
138
|
-
getPageLocation,
|
|
139
|
-
logger,
|
|
140
|
-
fetchDataHandler,
|
|
141
|
-
viewChangeHandler,
|
|
142
|
-
onClickHandler,
|
|
143
|
-
isAuthoringModeEnabled,
|
|
144
|
-
mergeQuery,
|
|
145
|
-
viewCache,
|
|
146
|
-
showContainers,
|
|
147
|
-
applyPropositions,
|
|
148
|
-
setTargetMigration,
|
|
149
|
-
mergeDecisionsMeta,
|
|
150
|
-
renderedPropositions,
|
|
151
|
-
onDecisionHandler
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
createPersonalization.namespace = "Personalization";
|
|
155
|
-
createPersonalization.configValidators = objectOf({
|
|
156
|
-
prehidingStyle: string().nonEmpty(),
|
|
157
|
-
targetMigrationEnabled: boolean().default(false)
|
|
158
|
-
});
|
|
159
|
-
export default createPersonalization;
|