@adobe/alloy 2.20.0-beta.2 → 2.20.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libEs5/baseCode/index.js +61 -0
- package/libEs5/components/ActivityCollector/attachClickActivityCollector.js +53 -0
- package/libEs5/components/ActivityCollector/configValidators.js +22 -0
- package/libEs5/components/ActivityCollector/createGetLinkDetails.js +68 -0
- package/libEs5/components/ActivityCollector/createLinkClick.js +38 -0
- package/libEs5/components/ActivityCollector/getLinkName.js +139 -0
- package/libEs5/components/ActivityCollector/getLinkRegion.js +61 -0
- package/libEs5/components/ActivityCollector/index.js +78 -0
- package/libEs5/components/ActivityCollector/utils.js +104 -0
- package/libEs5/components/Audiences/index.js +49 -0
- package/libEs5/components/Audiences/injectProcessDestinations.js +67 -0
- package/libEs5/components/Audiences/injectProcessResponse.js +38 -0
- package/libEs5/components/Context/createComponent.js +39 -0
- package/libEs5/components/Context/implementationDetails.js +27 -0
- package/libEs5/components/Context/index.js +59 -0
- package/libEs5/components/Context/injectDevice.js +66 -0
- package/libEs5/components/Context/injectEnvironment.js +40 -0
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +58 -0
- package/libEs5/components/Context/injectPlaceContext.js +32 -0
- package/libEs5/components/Context/injectTimestamp.js +23 -0
- package/libEs5/components/Context/injectWeb.js +30 -0
- package/libEs5/components/DataCollector/index.js +110 -0
- package/libEs5/components/DataCollector/validateApplyResponse.js +35 -0
- package/libEs5/components/DataCollector/validateUserEventOptions.js +50 -0
- package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +31 -0
- package/libEs5/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +24 -0
- package/libEs5/components/DecisioningEngine/constants.js +28 -0
- package/libEs5/components/DecisioningEngine/createApplyResponse.js +35 -0
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +30 -0
- package/libEs5/components/DecisioningEngine/createContextProvider.js +95 -0
- package/libEs5/components/DecisioningEngine/createDecisionHistory.js +27 -0
- package/libEs5/components/DecisioningEngine/createDecisionProvider.js +50 -0
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +82 -0
- package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +48 -0
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +130 -0
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +48 -0
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +89 -0
- package/libEs5/components/DecisioningEngine/index.js +119 -0
- package/libEs5/components/DecisioningEngine/utils.js +82 -0
- package/libEs5/components/EventMerge/createComponent.js +24 -0
- package/libEs5/components/EventMerge/createEventMergeId.js +20 -0
- package/libEs5/components/EventMerge/index.js +24 -0
- package/libEs5/components/Identity/addEcidQueryToPayload.js +22 -0
- package/libEs5/components/Identity/addEcidToPayload.js +20 -0
- package/libEs5/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +25 -0
- package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +45 -0
- package/libEs5/components/Identity/configValidators.js +21 -0
- package/libEs5/components/Identity/constants/authState.js +18 -0
- package/libEs5/components/Identity/constants/defaultIdSyncTtlMinutes.js +15 -0
- package/libEs5/components/Identity/createComponent.js +97 -0
- package/libEs5/components/Identity/createLegacyIdentity.js +72 -0
- package/libEs5/components/Identity/getEcidFromResponse.js +23 -0
- package/libEs5/components/Identity/getIdentity/createGetIdentity.js +35 -0
- package/libEs5/components/Identity/getIdentity/createIdentityRequest.js +29 -0
- package/libEs5/components/Identity/getIdentity/createIdentityRequestPayload.js +29 -0
- package/libEs5/components/Identity/getIdentity/getIdentityOptionsValidator.js +27 -0
- package/libEs5/components/Identity/index.js +129 -0
- package/libEs5/components/Identity/injectAddLegacyEcidToPayload.js +31 -0
- package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +68 -0
- package/libEs5/components/Identity/injectAwaitIdentityCookie.js +52 -0
- package/libEs5/components/Identity/injectEnsureSingleIdentity.js +100 -0
- package/libEs5/components/Identity/injectHandleResponseForIdSyncs.js +20 -0
- package/libEs5/components/Identity/injectProcessIdSyncs.js +41 -0
- package/libEs5/components/Identity/injectSetDomainForInitialIdentityPayload.js +33 -0
- package/libEs5/components/Identity/visitorService/awaitVisitorOptIn.js +34 -0
- package/libEs5/components/Identity/visitorService/getVisitor.js +19 -0
- package/libEs5/components/Identity/visitorService/injectGetEcidFromVisitor.js +49 -0
- package/libEs5/components/LegacyMediaAnalytics/constants/constants.js +144 -0
- package/libEs5/components/LegacyMediaAnalytics/constants/mediaKeysToXdmConverter.js +49 -0
- package/libEs5/components/LegacyMediaAnalytics/createGetInstance.js +245 -0
- package/libEs5/components/LegacyMediaAnalytics/createLegacyMediaComponent.js +87 -0
- package/libEs5/components/LegacyMediaAnalytics/createMediaHelper.js +181 -0
- package/libEs5/components/LegacyMediaAnalytics/index.js +71 -0
- package/libEs5/components/LibraryInfo/index.js +68 -0
- package/libEs5/components/MachineLearning/index.js +26 -0
- package/libEs5/components/MachineLearning/processResponse.js +19 -0
- package/libEs5/components/Personalization/constants/loggerMessage.js +16 -0
- package/libEs5/components/Personalization/constants/scopeType.js +18 -0
- package/libEs5/components/Personalization/constants/surface.js +19 -0
- package/libEs5/components/Personalization/createActionsProvider.js +71 -0
- package/libEs5/components/Personalization/createApplyPropositions.js +115 -0
- package/libEs5/components/Personalization/createClickStorage.js +64 -0
- package/libEs5/components/Personalization/createCollect.js +53 -0
- package/libEs5/components/Personalization/createComponent.js +145 -0
- package/libEs5/components/Personalization/createFetchDataHandler.js +92 -0
- package/libEs5/components/Personalization/createGetPageLocation.js +20 -0
- package/libEs5/components/Personalization/createHandleConsentFlicker.js +29 -0
- package/libEs5/components/Personalization/createNotificationHandler.js +38 -0
- package/libEs5/components/Personalization/createOnClickHandler.js +51 -0
- package/libEs5/components/Personalization/createOnDecisionHandler.js +43 -0
- package/libEs5/components/Personalization/createPersonalizationDetails.js +104 -0
- package/libEs5/components/Personalization/createPreprocessors.js +23 -0
- package/libEs5/components/Personalization/createSetTargetMigration.js +28 -0
- package/libEs5/components/Personalization/createViewCacheManager.js +90 -0
- package/libEs5/components/Personalization/createViewChangeHandler.js +45 -0
- package/libEs5/components/Personalization/dom-actions/action.js +120 -0
- package/libEs5/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +41 -0
- package/libEs5/components/Personalization/dom-actions/appendHtml.js +32 -0
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +108 -0
- package/libEs5/components/Personalization/dom-actions/createPreprocess.js +25 -0
- package/libEs5/components/Personalization/dom-actions/createRedirect.js +27 -0
- package/libEs5/components/Personalization/dom-actions/dom/createFragment.js +21 -0
- package/libEs5/components/Personalization/dom-actions/dom/getAttribute.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/getChildNodes.js +22 -0
- package/libEs5/components/Personalization/dom-actions/dom/getChildren.js +22 -0
- package/libEs5/components/Personalization/dom-actions/dom/getElementById.js +24 -0
- package/libEs5/components/Personalization/dom-actions/dom/getFirstChild.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/getNextSibling.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/getNonce.js +35 -0
- package/libEs5/components/Personalization/dom-actions/dom/getParent.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/helperForEq.js +24 -0
- package/libEs5/components/Personalization/dom-actions/dom/index.js +100 -0
- package/libEs5/components/Personalization/dom-actions/dom/insertAfter.js +25 -0
- package/libEs5/components/Personalization/dom-actions/dom/insertBefore.js +24 -0
- package/libEs5/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +37 -0
- package/libEs5/components/Personalization/dom-actions/dom/removeAttribute.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +104 -0
- package/libEs5/components/Personalization/dom-actions/dom/setAttribute.js +17 -0
- package/libEs5/components/Personalization/dom-actions/dom/setStyle.js +23 -0
- package/libEs5/components/Personalization/dom-actions/images.js +36 -0
- package/libEs5/components/Personalization/dom-actions/index.js +9 -0
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +35 -0
- package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +31 -0
- package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +31 -0
- package/libEs5/components/Personalization/dom-actions/prependHtml.js +45 -0
- package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +32 -0
- package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +36 -0
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +54 -0
- package/libEs5/components/Personalization/dom-actions/replaceHtml.js +20 -0
- package/libEs5/components/Personalization/dom-actions/scripts.js +90 -0
- package/libEs5/components/Personalization/dom-actions/setAttributes.js +20 -0
- package/libEs5/components/Personalization/dom-actions/setHtml.js +27 -0
- package/libEs5/components/Personalization/dom-actions/setStyles.js +25 -0
- package/libEs5/components/Personalization/dom-actions/setText.js +17 -0
- package/libEs5/components/Personalization/dom-actions/swapImage.js +31 -0
- package/libEs5/components/Personalization/event.js +49 -0
- package/libEs5/components/Personalization/flicker/index.js +86 -0
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +71 -0
- package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +43 -0
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +78 -0
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +194 -0
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +44 -0
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +118 -0
- package/libEs5/components/Personalization/handlers/processDefaultContent.js +20 -0
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +286 -0
- package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +22 -0
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +51 -0
- package/libEs5/components/Personalization/index.js +162 -0
- package/libEs5/components/Personalization/utils/addRenderAttemptedToDecisions.js +24 -0
- package/libEs5/components/Personalization/utils/createAsyncArray.js +38 -0
- package/libEs5/components/Personalization/utils/isAuthoringModeEnabled.js +18 -0
- package/libEs5/components/Personalization/utils/surfaceUtils.js +101 -0
- package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +34 -0
- package/libEs5/components/Privacy/computeConsentHash.js +33 -0
- package/libEs5/components/Privacy/createComponent.js +88 -0
- package/libEs5/components/Privacy/createConsentHashStore.js +59 -0
- package/libEs5/components/Privacy/createConsentRequest.js +29 -0
- package/libEs5/components/Privacy/createConsentRequestPayload.js +33 -0
- package/libEs5/components/Privacy/createStoredConsent.js +31 -0
- package/libEs5/components/Privacy/index.js +63 -0
- package/libEs5/components/Privacy/injectSendSetConsentRequest.js +47 -0
- package/libEs5/components/Privacy/parseConsentCookie.js +37 -0
- package/libEs5/components/Privacy/validateSetConsentOptions.js +21 -0
- package/libEs5/components/StreamingMedia/configValidators.js +24 -0
- package/libEs5/components/StreamingMedia/constants/eventTypes.js +34 -0
- package/libEs5/components/StreamingMedia/constants/playbackState.js +19 -0
- package/libEs5/components/StreamingMedia/createMediaEventManager.js +112 -0
- package/libEs5/components/StreamingMedia/createMediaRequest.js +29 -0
- package/libEs5/components/StreamingMedia/createMediaResponseHandler.js +57 -0
- package/libEs5/components/StreamingMedia/createMediaSessionCacheManager.js +58 -0
- package/libEs5/components/StreamingMedia/createStreamingMediaComponent.js +72 -0
- package/libEs5/components/StreamingMedia/createTrackMediaEvent.js +90 -0
- package/libEs5/components/StreamingMedia/createTrackMediaSession.js +52 -0
- package/libEs5/components/StreamingMedia/index.js +69 -0
- package/libEs5/components/StreamingMedia/validateMediaEventOptions.js +40 -0
- package/libEs5/components/StreamingMedia/validateMediaSessionOptions.js +35 -0
- package/libEs5/constants/apiVersion.js +15 -0
- package/libEs5/constants/browser.js +22 -0
- package/libEs5/constants/consentPurpose.js +16 -0
- package/libEs5/constants/consentStatus.js +18 -0
- package/libEs5/constants/contentType.js +16 -0
- package/libEs5/constants/cookieNameKey.js +18 -0
- package/libEs5/constants/cookieNamePrefix.js +16 -0
- package/libEs5/constants/coreCommands.js +17 -0
- package/libEs5/constants/debugQueryParam.js +15 -0
- package/libEs5/constants/decisionProvider.js +15 -0
- package/libEs5/constants/domain.js +17 -0
- package/libEs5/constants/ecidNamespace.js +15 -0
- package/libEs5/constants/edgeBasePath.js +15 -0
- package/libEs5/constants/elementAttribute.js +16 -0
- package/libEs5/constants/eventType.js +20 -0
- package/libEs5/constants/handle.js +15 -0
- package/libEs5/constants/highEntropyUserAgentClientHints.js +15 -0
- package/libEs5/constants/httpHeaderNames.js +17 -0
- package/libEs5/constants/httpStatusCode.js +20 -0
- package/libEs5/constants/identityMapAuthenticatedState.js +17 -0
- package/libEs5/constants/legacyCookies.js +18 -0
- package/libEs5/constants/libraryName.js +15 -0
- package/libEs5/constants/libraryVersion.js +17 -0
- package/libEs5/constants/namespace.js +15 -0
- package/libEs5/constants/pageWideScope.js +15 -0
- package/libEs5/constants/propositionEventType.js +32 -0
- package/libEs5/constants/queryStringIdentityParam.js +15 -0
- package/libEs5/constants/schema.js +25 -0
- package/libEs5/constants/shadowSeparator.js +15 -0
- package/libEs5/constants/tagName.js +22 -0
- package/libEs5/core/buildAndValidateConfig.js +115 -0
- package/libEs5/core/componentCreators.js +39 -0
- package/libEs5/core/config/createConfig.js +20 -0
- package/libEs5/core/config/createCoreConfigs.js +31 -0
- package/libEs5/core/consent/createConsent.js +61 -0
- package/libEs5/core/consent/createConsentStateMachine.js +137 -0
- package/libEs5/core/createComponentRegistry.js +86 -0
- package/libEs5/core/createCookieTransfer.js +80 -0
- package/libEs5/core/createEvent.js +170 -0
- package/libEs5/core/createEventManager.js +144 -0
- package/libEs5/core/createInstanceFunction.js +27 -0
- package/libEs5/core/createLifecycle.js +74 -0
- package/libEs5/core/createLogController.js +70 -0
- package/libEs5/core/createLogger.js +103 -0
- package/libEs5/core/edgeNetwork/handleRequestFailure.js +27 -0
- package/libEs5/core/edgeNetwork/injectApplyResponse.js +66 -0
- package/libEs5/core/edgeNetwork/injectExtractEdgeInfo.js +42 -0
- package/libEs5/core/edgeNetwork/injectGetLocationHint.js +35 -0
- package/libEs5/core/edgeNetwork/injectProcessWarningsAndErrors.js +42 -0
- package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +99 -0
- package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +28 -0
- package/libEs5/core/index.js +238 -0
- package/libEs5/core/initializeComponents.js +41 -0
- package/libEs5/core/injectCreateResponse.js +77 -0
- package/libEs5/core/injectExecuteCommand.js +104 -0
- package/libEs5/core/injectHandleError.js +36 -0
- package/libEs5/core/injectShouldTransferCookie.js +28 -0
- package/libEs5/core/network/getRequestRetryDelay.js +73 -0
- package/libEs5/core/network/injectSendNetworkRequest.js +102 -0
- package/libEs5/core/network/isRequestRetryable.js +27 -0
- package/libEs5/core/network/requestMethods/injectSendBeaconRequest.js +39 -0
- package/libEs5/core/network/requestMethods/injectSendFetchRequest.js +44 -0
- package/libEs5/core/network/requestMethods/injectSendXhrRequest.js +50 -0
- package/libEs5/core/validateCommandOptions.js +34 -0
- package/libEs5/index.js +59 -0
- package/libEs5/utils/areThirdPartyCookiesSupportedByDefault.js +24 -0
- package/libEs5/utils/assign.js +16 -0
- package/libEs5/utils/assignConcatArrayValues.js +48 -0
- package/libEs5/utils/assignIf.js +21 -0
- package/libEs5/utils/clone.js +22 -0
- package/libEs5/utils/cookieJar.js +21 -0
- package/libEs5/utils/crc32.js +36 -0
- package/libEs5/utils/createCallbackAggregator.js +38 -0
- package/libEs5/utils/createLoggingCookieJar.js +33 -0
- package/libEs5/utils/createMerger.js +33 -0
- package/libEs5/utils/createSubscription.js +90 -0
- package/libEs5/utils/createTaskQueue.js +50 -0
- package/libEs5/utils/deduplicateArray.js +31 -0
- package/libEs5/utils/deepAssign.js +48 -0
- package/libEs5/utils/defer.js +26 -0
- package/libEs5/utils/dom/appendNode.js +17 -0
- package/libEs5/utils/dom/awaitSelector.js +105 -0
- package/libEs5/utils/dom/createNode.js +47 -0
- package/libEs5/utils/dom/index.js +58 -0
- package/libEs5/utils/dom/isShadowSelector.js +18 -0
- package/libEs5/utils/dom/matchesSelector.js +28 -0
- package/libEs5/utils/dom/querySelectorAll.js +32 -0
- package/libEs5/utils/dom/removeNode.js +21 -0
- package/libEs5/utils/dom/selectNodes.js +30 -0
- package/libEs5/utils/dom/selectNodesWithShadow.js +66 -0
- package/libEs5/utils/endsWith.js +23 -0
- package/libEs5/utils/filterObject.js +55 -0
- package/libEs5/utils/find.js +30 -0
- package/libEs5/utils/fireImage.js +38 -0
- package/libEs5/utils/flatMap.js +17 -0
- package/libEs5/utils/flattenArray.js +36 -0
- package/libEs5/utils/flattenObject.js +42 -0
- package/libEs5/utils/getApexDomain.js +45 -0
- package/libEs5/utils/getBrowser.js +35 -0
- package/libEs5/utils/getLastArrayItems.js +23 -0
- package/libEs5/utils/getNamespacedCookieName.js +19 -0
- package/libEs5/utils/groupBy.js +31 -0
- package/libEs5/utils/includes.js +23 -0
- package/libEs5/utils/index.js +408 -0
- package/libEs5/utils/injectDoesIdentityCookieExist.js +27 -0
- package/libEs5/utils/injectFireReferrerHideableImage.js +75 -0
- package/libEs5/utils/injectStorage.js +74 -0
- package/libEs5/utils/intersection.js +26 -0
- package/libEs5/utils/isBlankString.js +23 -0
- package/libEs5/utils/isBoolean.js +22 -0
- package/libEs5/utils/isEmptyObject.js +23 -0
- package/libEs5/utils/isFunction.js +22 -0
- package/libEs5/utils/isInteger.js +24 -0
- package/libEs5/utils/isNamespacedCookieName.js +26 -0
- package/libEs5/utils/isNil.js +22 -0
- package/libEs5/utils/isNonEmptyArray.js +22 -0
- package/libEs5/utils/isNonEmptyString.js +23 -0
- package/libEs5/utils/isNumber.js +23 -0
- package/libEs5/utils/isObject.js +23 -0
- package/libEs5/utils/isString.js +22 -0
- package/libEs5/utils/isUnique.js +30 -0
- package/libEs5/utils/isValidRegExp.js +26 -0
- package/libEs5/utils/memoize.js +36 -0
- package/libEs5/utils/noop.js +18 -0
- package/libEs5/utils/padStart.js +27 -0
- package/libEs5/utils/parseUrl.js +72 -0
- package/libEs5/utils/prepareConfigOverridesForEdge.js +52 -0
- package/libEs5/utils/querystring.js +16 -0
- package/libEs5/utils/request/createAddIdentity.js +22 -0
- package/libEs5/utils/request/createDataCollectionRequest.js +68 -0
- package/libEs5/utils/request/createDataCollectionRequestPayload.js +35 -0
- package/libEs5/utils/request/createGetAssuranceValidationTokenParams.js +44 -0
- package/libEs5/utils/request/createHasIdentity.js +19 -0
- package/libEs5/utils/request/createRequest.js +62 -0
- package/libEs5/utils/request/createRequestParams.js +44 -0
- package/libEs5/utils/request/createRequestPayload.js +36 -0
- package/libEs5/utils/request/index.js +58 -0
- package/libEs5/utils/sanitizeOrgIdForCookieName.js +17 -0
- package/libEs5/utils/stackError.js +34 -0
- package/libEs5/utils/startsWith.js +23 -0
- package/libEs5/utils/stringToBoolean.js +18 -0
- package/libEs5/utils/toArray.js +23 -0
- package/libEs5/utils/toError.js +23 -0
- package/libEs5/utils/toISOStringLocal.js +39 -0
- package/libEs5/utils/toInteger.js +31 -0
- package/libEs5/utils/updateErrorMessage.js +24 -0
- package/libEs5/utils/uuid.js +16 -0
- package/libEs5/utils/validateConfigOverride.js +16 -0
- package/libEs5/utils/validateIdentityMap.js +25 -0
- package/libEs5/utils/validation/booleanValidator.js +20 -0
- package/libEs5/utils/validation/callbackValidator.js +20 -0
- package/libEs5/utils/validation/createAnyOfValidator.js +32 -0
- package/libEs5/utils/validation/createArrayOfValidator.js +34 -0
- package/libEs5/utils/validation/createDefaultValidator.js +22 -0
- package/libEs5/utils/validation/createDeprecatedValidator.js +44 -0
- package/libEs5/utils/validation/createLiteralValidator.js +21 -0
- package/libEs5/utils/validation/createMapOfValuesValidator.js +40 -0
- package/libEs5/utils/validation/createMaximumValidator.js +21 -0
- package/libEs5/utils/validation/createMinimumValidator.js +21 -0
- package/libEs5/utils/validation/createNoUnknownFieldsValidator.js +29 -0
- package/libEs5/utils/validation/createNonEmptyValidator.js +27 -0
- package/libEs5/utils/validation/createObjectOfValidator.js +48 -0
- package/libEs5/utils/validation/createUniqueItemsValidator.js +21 -0
- package/libEs5/utils/validation/createUniqueValidator.js +23 -0
- package/libEs5/utils/validation/domainValidator.js +21 -0
- package/libEs5/utils/validation/index.js +239 -0
- package/libEs5/utils/validation/integerValidator.js +20 -0
- package/libEs5/utils/validation/matchesRegexpValidator.js +21 -0
- package/libEs5/utils/validation/numberValidator.js +20 -0
- package/libEs5/utils/validation/regexpValidator.js +20 -0
- package/libEs5/utils/validation/requiredValidator.js +20 -0
- package/libEs5/utils/validation/stringValidator.js +20 -0
- package/libEs5/utils/validation/utils.js +137 -0
- package/libEs5/utils/values.js +25 -0
- package/libEs6/baseCode/index.js +61 -0
- package/libEs6/components/ActivityCollector/attachClickActivityCollector.js +52 -0
- package/libEs6/components/ActivityCollector/configValidators.js +19 -0
- package/libEs6/components/ActivityCollector/createGetLinkDetails.js +70 -0
- package/libEs6/components/ActivityCollector/createLinkClick.js +37 -0
- package/libEs6/components/ActivityCollector/getLinkName.js +136 -0
- package/libEs6/components/ActivityCollector/getLinkRegion.js +58 -0
- package/libEs6/components/ActivityCollector/index.js +80 -0
- package/libEs6/components/ActivityCollector/utils.js +104 -0
- package/libEs6/components/Audiences/index.js +47 -0
- package/libEs6/components/Audiences/injectProcessDestinations.js +60 -0
- package/libEs6/components/Audiences/injectProcessResponse.js +38 -0
- package/libEs6/components/Context/createComponent.js +34 -0
- package/libEs6/components/Context/implementationDetails.js +24 -0
- package/libEs6/components/Context/index.js +52 -0
- package/libEs6/components/Context/injectDevice.js +70 -0
- package/libEs6/components/Context/injectEnvironment.js +42 -0
- package/libEs6/components/Context/injectHighEntropyUserAgentHints.js +45 -0
- package/libEs6/components/Context/injectPlaceContext.js +29 -0
- package/libEs6/components/Context/injectTimestamp.js +21 -0
- package/libEs6/components/Context/injectWeb.js +28 -0
- package/libEs6/components/DataCollector/index.js +106 -0
- package/libEs6/components/DataCollector/validateApplyResponse.js +33 -0
- package/libEs6/components/DataCollector/validateUserEventOptions.js +49 -0
- package/libEs6/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +30 -0
- package/libEs6/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +24 -0
- package/libEs6/components/DecisioningEngine/constants.js +25 -0
- package/libEs6/components/DecisioningEngine/createApplyResponse.js +31 -0
- package/libEs6/components/DecisioningEngine/createConsequenceAdapter.js +29 -0
- package/libEs6/components/DecisioningEngine/createContextProvider.js +95 -0
- package/libEs6/components/DecisioningEngine/createDecisionHistory.js +25 -0
- package/libEs6/components/DecisioningEngine/createDecisionProvider.js +41 -0
- package/libEs6/components/DecisioningEngine/createEvaluableRulesetPayload.js +79 -0
- package/libEs6/components/DecisioningEngine/createEvaluateRulesetsCommand.js +45 -0
- package/libEs6/components/DecisioningEngine/createEventRegistry.js +120 -0
- package/libEs6/components/DecisioningEngine/createOnResponseHandler.js +45 -0
- package/libEs6/components/DecisioningEngine/createSubscribeRulesetItems.js +79 -0
- package/libEs6/components/DecisioningEngine/index.js +124 -0
- package/libEs6/components/DecisioningEngine/utils.js +83 -0
- package/libEs6/components/EventMerge/createComponent.js +23 -0
- package/libEs6/components/EventMerge/createEventMergeId.js +18 -0
- package/libEs6/components/EventMerge/index.js +21 -0
- package/libEs6/components/Identity/addEcidQueryToPayload.js +20 -0
- package/libEs6/components/Identity/addEcidToPayload.js +18 -0
- package/libEs6/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +23 -0
- package/libEs6/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +31 -0
- package/libEs6/components/Identity/configValidators.js +18 -0
- package/libEs6/components/Identity/constants/authState.js +15 -0
- package/libEs6/components/Identity/constants/defaultIdSyncTtlMinutes.js +13 -0
- package/libEs6/components/Identity/createComponent.js +97 -0
- package/libEs6/components/Identity/createLegacyIdentity.js +69 -0
- package/libEs6/components/Identity/getEcidFromResponse.js +19 -0
- package/libEs6/components/Identity/getIdentity/createGetIdentity.js +34 -0
- package/libEs6/components/Identity/getIdentity/createIdentityRequest.js +28 -0
- package/libEs6/components/Identity/getIdentity/createIdentityRequestPayload.js +27 -0
- package/libEs6/components/Identity/getIdentity/getIdentityOptionsValidator.js +25 -0
- package/libEs6/components/Identity/index.js +125 -0
- package/libEs6/components/Identity/injectAddLegacyEcidToPayload.js +30 -0
- package/libEs6/components/Identity/injectAddQueryStringIdentityToPayload.js +59 -0
- package/libEs6/components/Identity/injectAwaitIdentityCookie.js +52 -0
- package/libEs6/components/Identity/injectEnsureSingleIdentity.js +98 -0
- package/libEs6/components/Identity/injectHandleResponseForIdSyncs.js +19 -0
- package/libEs6/components/Identity/injectProcessIdSyncs.js +34 -0
- package/libEs6/components/Identity/injectSetDomainForInitialIdentityPayload.js +32 -0
- package/libEs6/components/Identity/visitorService/awaitVisitorOptIn.js +33 -0
- package/libEs6/components/Identity/visitorService/getVisitor.js +17 -0
- package/libEs6/components/Identity/visitorService/injectGetEcidFromVisitor.js +48 -0
- package/libEs6/components/LegacyMediaAnalytics/constants/constants.js +141 -0
- package/libEs6/components/LegacyMediaAnalytics/constants/mediaKeysToXdmConverter.js +46 -0
- package/libEs6/components/LegacyMediaAnalytics/createGetInstance.js +239 -0
- package/libEs6/components/LegacyMediaAnalytics/createLegacyMediaComponent.js +85 -0
- package/libEs6/components/LegacyMediaAnalytics/createMediaHelper.js +180 -0
- package/libEs6/components/LegacyMediaAnalytics/index.js +67 -0
- package/libEs6/components/LibraryInfo/index.js +59 -0
- package/libEs6/components/MachineLearning/index.js +23 -0
- package/libEs6/components/MachineLearning/processResponse.js +18 -0
- package/libEs6/components/Personalization/constants/loggerMessage.js +13 -0
- package/libEs6/components/Personalization/constants/scopeType.js +15 -0
- package/libEs6/components/Personalization/constants/surface.js +16 -0
- package/libEs6/components/Personalization/createActionsProvider.js +70 -0
- package/libEs6/components/Personalization/createApplyPropositions.js +103 -0
- package/libEs6/components/Personalization/createClickStorage.js +58 -0
- package/libEs6/components/Personalization/createCollect.js +48 -0
- package/libEs6/components/Personalization/createComponent.js +133 -0
- package/libEs6/components/Personalization/createFetchDataHandler.js +84 -0
- package/libEs6/components/Personalization/createGetPageLocation.js +17 -0
- package/libEs6/components/Personalization/createHandleConsentFlicker.js +26 -0
- package/libEs6/components/Personalization/createNotificationHandler.js +33 -0
- package/libEs6/components/Personalization/createOnClickHandler.js +52 -0
- package/libEs6/components/Personalization/createOnDecisionHandler.js +42 -0
- package/libEs6/components/Personalization/createPersonalizationDetails.js +94 -0
- package/libEs6/components/Personalization/createPreprocessors.js +19 -0
- package/libEs6/components/Personalization/createSetTargetMigration.js +27 -0
- package/libEs6/components/Personalization/createViewCacheManager.js +81 -0
- package/libEs6/components/Personalization/createViewChangeHandler.js +47 -0
- package/libEs6/components/Personalization/dom-actions/action.js +49 -0
- package/libEs6/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +36 -0
- package/libEs6/components/Personalization/dom-actions/appendHtml.js +30 -0
- package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +91 -0
- package/libEs6/components/Personalization/dom-actions/createPreprocess.js +18 -0
- package/libEs6/components/Personalization/dom-actions/createRedirect.js +22 -0
- package/libEs6/components/Personalization/dom-actions/dom/createFragment.js +19 -0
- package/libEs6/components/Personalization/dom-actions/dom/getAttribute.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/getChildNodes.js +22 -0
- package/libEs6/components/Personalization/dom-actions/dom/getChildren.js +22 -0
- package/libEs6/components/Personalization/dom-actions/dom/getElementById.js +21 -0
- package/libEs6/components/Personalization/dom-actions/dom/getFirstChild.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/getNextSibling.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/getNonce.js +33 -0
- package/libEs6/components/Personalization/dom-actions/dom/getParent.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/helperForEq.js +19 -0
- package/libEs6/components/Personalization/dom-actions/dom/index.js +26 -0
- package/libEs6/components/Personalization/dom-actions/dom/insertAfter.js +23 -0
- package/libEs6/components/Personalization/dom-actions/dom/insertBefore.js +22 -0
- package/libEs6/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +35 -0
- package/libEs6/components/Personalization/dom-actions/dom/removeAttribute.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/selectNodesWithEq.js +102 -0
- package/libEs6/components/Personalization/dom-actions/dom/setAttribute.js +15 -0
- package/libEs6/components/Personalization/dom-actions/dom/setStyle.js +21 -0
- package/libEs6/components/Personalization/dom-actions/images.js +31 -0
- package/libEs6/components/Personalization/dom-actions/index.js +13 -0
- package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +33 -0
- package/libEs6/components/Personalization/dom-actions/insertHtmlAfter.js +29 -0
- package/libEs6/components/Personalization/dom-actions/insertHtmlBefore.js +29 -0
- package/libEs6/components/Personalization/dom-actions/prependHtml.js +45 -0
- package/libEs6/components/Personalization/dom-actions/rearrangeChildren.js +31 -0
- package/libEs6/components/Personalization/dom-actions/remapCustomCodeOffers.js +34 -0
- package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +51 -0
- package/libEs6/components/Personalization/dom-actions/replaceHtml.js +18 -0
- package/libEs6/components/Personalization/dom-actions/scripts.js +85 -0
- package/libEs6/components/Personalization/dom-actions/setAttributes.js +18 -0
- package/libEs6/components/Personalization/dom-actions/setHtml.js +24 -0
- package/libEs6/components/Personalization/dom-actions/setStyles.js +22 -0
- package/libEs6/components/Personalization/dom-actions/setText.js +15 -0
- package/libEs6/components/Personalization/dom-actions/swapImage.js +29 -0
- package/libEs6/components/Personalization/event.js +45 -0
- package/libEs6/components/Personalization/flicker/index.js +82 -0
- package/libEs6/components/Personalization/handlers/createProcessDomAction.js +61 -0
- package/libEs6/components/Personalization/handlers/createProcessHtmlContent.js +40 -0
- package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +77 -0
- package/libEs6/components/Personalization/handlers/createProcessPropositions.js +175 -0
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +41 -0
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +110 -0
- package/libEs6/components/Personalization/handlers/processDefaultContent.js +17 -0
- package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +293 -0
- package/libEs6/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +17 -0
- package/libEs6/components/Personalization/in-app-message-actions/utils.js +49 -0
- package/libEs6/components/Personalization/index.js +167 -0
- package/libEs6/components/Personalization/utils/addRenderAttemptedToDecisions.js +21 -0
- package/libEs6/components/Personalization/utils/createAsyncArray.js +35 -0
- package/libEs6/components/Personalization/utils/isAuthoringModeEnabled.js +15 -0
- package/libEs6/components/Personalization/utils/surfaceUtils.js +76 -0
- package/libEs6/components/Personalization/validateApplyPropositionsOptions.js +31 -0
- package/libEs6/components/Privacy/computeConsentHash.js +30 -0
- package/libEs6/components/Privacy/createComponent.js +85 -0
- package/libEs6/components/Privacy/createConsentHashStore.js +57 -0
- package/libEs6/components/Privacy/createConsentRequest.js +28 -0
- package/libEs6/components/Privacy/createConsentRequestPayload.js +31 -0
- package/libEs6/components/Privacy/createStoredConsent.js +30 -0
- package/libEs6/components/Privacy/index.js +63 -0
- package/libEs6/components/Privacy/injectSendSetConsentRequest.js +45 -0
- package/libEs6/components/Privacy/parseConsentCookie.js +26 -0
- package/libEs6/components/Privacy/validateSetConsentOptions.js +18 -0
- package/libEs6/components/StreamingMedia/configValidators.js +22 -0
- package/libEs6/components/StreamingMedia/constants/eventTypes.js +31 -0
- package/libEs6/components/StreamingMedia/constants/playbackState.js +16 -0
- package/libEs6/components/StreamingMedia/createMediaEventManager.js +122 -0
- package/libEs6/components/StreamingMedia/createMediaRequest.js +28 -0
- package/libEs6/components/StreamingMedia/createMediaResponseHandler.js +58 -0
- package/libEs6/components/StreamingMedia/createMediaSessionCacheManager.js +59 -0
- package/libEs6/components/StreamingMedia/createStreamingMediaComponent.js +69 -0
- package/libEs6/components/StreamingMedia/createTrackMediaEvent.js +88 -0
- package/libEs6/components/StreamingMedia/createTrackMediaSession.js +51 -0
- package/libEs6/components/StreamingMedia/index.js +64 -0
- package/libEs6/components/StreamingMedia/validateMediaEventOptions.js +33 -0
- package/libEs6/components/StreamingMedia/validateMediaSessionOptions.js +34 -0
- package/libEs6/constants/apiVersion.js +12 -0
- package/libEs6/constants/browser.js +19 -0
- package/libEs6/constants/consentPurpose.js +13 -0
- package/libEs6/constants/consentStatus.js +15 -0
- package/libEs6/constants/contentType.js +13 -0
- package/libEs6/constants/cookieNameKey.js +15 -0
- package/libEs6/constants/cookieNamePrefix.js +14 -0
- package/libEs6/constants/coreCommands.js +14 -0
- package/libEs6/constants/debugQueryParam.js +13 -0
- package/libEs6/constants/decisionProvider.js +12 -0
- package/libEs6/constants/domain.js +14 -0
- package/libEs6/constants/ecidNamespace.js +13 -0
- package/libEs6/constants/edgeBasePath.js +12 -0
- package/libEs6/constants/elementAttribute.js +13 -0
- package/libEs6/constants/eventType.js +17 -0
- package/libEs6/constants/handle.js +12 -0
- package/libEs6/constants/highEntropyUserAgentClientHints.js +13 -0
- package/libEs6/constants/httpHeaderNames.js +14 -0
- package/libEs6/constants/httpStatusCode.js +17 -0
- package/libEs6/constants/identityMapAuthenticatedState.js +14 -0
- package/libEs6/constants/legacyCookies.js +15 -0
- package/libEs6/constants/libraryName.js +13 -0
- package/libEs6/constants/libraryVersion.js +16 -0
- package/libEs6/constants/namespace.js +13 -0
- package/libEs6/constants/pageWideScope.js +13 -0
- package/libEs6/constants/propositionEventType.js +33 -0
- package/libEs6/constants/queryStringIdentityParam.js +13 -0
- package/libEs6/constants/schema.js +22 -0
- package/libEs6/constants/shadowSeparator.js +13 -0
- package/libEs6/constants/tagName.js +19 -0
- package/libEs6/core/buildAndValidateConfig.js +94 -0
- package/libEs6/core/componentCreators.js +47 -0
- package/libEs6/core/config/createConfig.js +17 -0
- package/libEs6/core/config/createCoreConfigs.js +27 -0
- package/libEs6/core/consent/createConsent.js +60 -0
- package/libEs6/core/consent/createConsentStateMachine.js +125 -0
- package/libEs6/core/createComponentRegistry.js +83 -0
- package/libEs6/core/createCookieTransfer.js +78 -0
- package/libEs6/core/createEvent.js +161 -0
- package/libEs6/core/createEventManager.js +135 -0
- package/libEs6/core/createInstanceFunction.js +25 -0
- package/libEs6/core/createLifecycle.js +65 -0
- package/libEs6/core/createLogController.js +68 -0
- package/libEs6/core/createLogger.js +99 -0
- package/libEs6/core/edgeNetwork/handleRequestFailure.js +24 -0
- package/libEs6/core/edgeNetwork/injectApplyResponse.js +58 -0
- package/libEs6/core/edgeNetwork/injectExtractEdgeInfo.js +39 -0
- package/libEs6/core/edgeNetwork/injectGetLocationHint.js +32 -0
- package/libEs6/core/edgeNetwork/injectProcessWarningsAndErrors.js +42 -0
- package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +100 -0
- package/libEs6/core/edgeNetwork/mergeLifecycleResponses.js +21 -0
- package/libEs6/core/index.js +236 -0
- package/libEs6/core/initializeComponents.js +40 -0
- package/libEs6/core/injectCreateResponse.js +70 -0
- package/libEs6/core/injectExecuteCommand.js +100 -0
- package/libEs6/core/injectHandleError.js +33 -0
- package/libEs6/core/injectShouldTransferCookie.js +25 -0
- package/libEs6/core/network/getRequestRetryDelay.js +72 -0
- package/libEs6/core/network/injectSendNetworkRequest.js +96 -0
- package/libEs6/core/network/isRequestRetryable.js +25 -0
- package/libEs6/core/network/requestMethods/injectSendBeaconRequest.js +38 -0
- package/libEs6/core/network/requestMethods/injectSendFetchRequest.js +41 -0
- package/libEs6/core/network/requestMethods/injectSendXhrRequest.js +49 -0
- package/libEs6/core/validateCommandOptions.js +33 -0
- package/libEs6/index.js +55 -0
- package/libEs6/utils/areThirdPartyCookiesSupportedByDefault.js +20 -0
- package/libEs6/utils/assign.js +14 -0
- package/libEs6/utils/assignConcatArrayValues.js +36 -0
- package/libEs6/utils/assignIf.js +19 -0
- package/libEs6/utils/clone.js +18 -0
- package/libEs6/utils/cookieJar.js +19 -0
- package/libEs6/utils/crc32.js +33 -0
- package/libEs6/utils/createCallbackAggregator.js +31 -0
- package/libEs6/utils/createLoggingCookieJar.js +28 -0
- package/libEs6/utils/createMerger.js +30 -0
- package/libEs6/utils/createSubscription.js +70 -0
- package/libEs6/utils/createTaskQueue.js +48 -0
- package/libEs6/utils/deduplicateArray.js +23 -0
- package/libEs6/utils/deepAssign.js +40 -0
- package/libEs6/utils/defer.js +24 -0
- package/libEs6/utils/dom/appendNode.js +15 -0
- package/libEs6/utils/dom/awaitSelector.js +98 -0
- package/libEs6/utils/dom/createNode.js +38 -0
- package/libEs6/utils/dom/index.js +20 -0
- package/libEs6/utils/dom/isShadowSelector.js +14 -0
- package/libEs6/utils/dom/matchesSelector.js +26 -0
- package/libEs6/utils/dom/querySelectorAll.js +29 -0
- package/libEs6/utils/dom/removeNode.js +19 -0
- package/libEs6/utils/dom/selectNodes.js +28 -0
- package/libEs6/utils/dom/selectNodesWithShadow.js +63 -0
- package/libEs6/utils/endsWith.js +19 -0
- package/libEs6/utils/filterObject.js +55 -0
- package/libEs6/utils/find.js +28 -0
- package/libEs6/utils/fireImage.js +37 -0
- package/libEs6/utils/flatMap.js +14 -0
- package/libEs6/utils/flattenArray.js +26 -0
- package/libEs6/utils/flattenObject.js +28 -0
- package/libEs6/utils/getApexDomain.js +42 -0
- package/libEs6/utils/getBrowser.js +65 -0
- package/libEs6/utils/getLastArrayItems.js +19 -0
- package/libEs6/utils/getNamespacedCookieName.js +15 -0
- package/libEs6/utils/groupBy.js +29 -0
- package/libEs6/utils/includes.js +21 -0
- package/libEs6/utils/index.js +71 -0
- package/libEs6/utils/injectDoesIdentityCookieExist.js +24 -0
- package/libEs6/utils/injectFireReferrerHideableImage.js +65 -0
- package/libEs6/utils/injectStorage.js +69 -0
- package/libEs6/utils/intersection.js +21 -0
- package/libEs6/utils/isBlankString.js +20 -0
- package/libEs6/utils/isBoolean.js +18 -0
- package/libEs6/utils/isEmptyObject.js +20 -0
- package/libEs6/utils/isFunction.js +18 -0
- package/libEs6/utils/isInteger.js +23 -0
- package/libEs6/utils/isNamespacedCookieName.js +23 -0
- package/libEs6/utils/isNil.js +18 -0
- package/libEs6/utils/isNonEmptyArray.js +18 -0
- package/libEs6/utils/isNonEmptyString.js +20 -0
- package/libEs6/utils/isNumber.js +19 -0
- package/libEs6/utils/isObject.js +20 -0
- package/libEs6/utils/isString.js +18 -0
- package/libEs6/utils/isUnique.js +27 -0
- package/libEs6/utils/isValidRegExp.js +24 -0
- package/libEs6/utils/memoize.js +34 -0
- package/libEs6/utils/noop.js +16 -0
- package/libEs6/utils/padStart.js +25 -0
- package/libEs6/utils/parseUrl.js +62 -0
- package/libEs6/utils/prepareConfigOverridesForEdge.js +50 -0
- package/libEs6/utils/querystring.js +14 -0
- package/libEs6/utils/request/createAddIdentity.js +19 -0
- package/libEs6/utils/request/createDataCollectionRequest.js +69 -0
- package/libEs6/utils/request/createDataCollectionRequestPayload.js +30 -0
- package/libEs6/utils/request/createGetAssuranceValidationTokenParams.js +42 -0
- package/libEs6/utils/request/createHasIdentity.js +15 -0
- package/libEs6/utils/request/createRequest.js +63 -0
- package/libEs6/utils/request/createRequestParams.js +40 -0
- package/libEs6/utils/request/createRequestPayload.js +35 -0
- package/libEs6/utils/request/index.js +20 -0
- package/libEs6/utils/sanitizeOrgIdForCookieName.js +13 -0
- package/libEs6/utils/stackError.js +34 -0
- package/libEs6/utils/startsWith.js +19 -0
- package/libEs6/utils/stringToBoolean.js +15 -0
- package/libEs6/utils/toArray.js +21 -0
- package/libEs6/utils/toError.js +21 -0
- package/libEs6/utils/toISOStringLocal.js +37 -0
- package/libEs6/utils/toInteger.js +30 -0
- package/libEs6/utils/updateErrorMessage.js +23 -0
- package/libEs6/utils/uuid.js +14 -0
- package/libEs6/utils/validateConfigOverride.js +14 -0
- package/libEs6/utils/validateIdentityMap.js +23 -0
- package/libEs6/utils/validation/booleanValidator.js +18 -0
- package/libEs6/utils/validation/callbackValidator.js +17 -0
- package/libEs6/utils/validation/createAnyOfValidator.js +26 -0
- package/libEs6/utils/validation/createArrayOfValidator.js +28 -0
- package/libEs6/utils/validation/createDefaultValidator.js +18 -0
- package/libEs6/utils/validation/createDeprecatedValidator.js +37 -0
- package/libEs6/utils/validation/createLiteralValidator.js +16 -0
- package/libEs6/utils/validation/createMapOfValuesValidator.js +35 -0
- package/libEs6/utils/validation/createMaximumValidator.js +16 -0
- package/libEs6/utils/validation/createMinimumValidator.js +16 -0
- package/libEs6/utils/validation/createNoUnknownFieldsValidator.js +25 -0
- package/libEs6/utils/validation/createNonEmptyValidator.js +23 -0
- package/libEs6/utils/validation/createObjectOfValidator.js +43 -0
- package/libEs6/utils/validation/createUniqueItemsValidator.js +18 -0
- package/libEs6/utils/validation/createUniqueValidator.js +21 -0
- package/libEs6/utils/validation/domainValidator.js +17 -0
- package/libEs6/utils/validation/index.js +232 -0
- package/libEs6/utils/validation/integerValidator.js +18 -0
- package/libEs6/utils/validation/matchesRegexpValidator.js +17 -0
- package/libEs6/utils/validation/numberValidator.js +18 -0
- package/libEs6/utils/validation/regexpValidator.js +18 -0
- package/libEs6/utils/validation/requiredValidator.js +18 -0
- package/libEs6/utils/validation/stringValidator.js +17 -0
- package/libEs6/utils/validation/utils.js +127 -0
- package/libEs6/utils/values.js +21 -0
- package/package.json +2 -2
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var _pageWideScope = require("../../../constants/pageWideScope.js");
|
|
5
|
+
var _scopeType = require("../constants/scopeType.js");
|
|
6
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
12
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
13
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
|
|
17
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
var _default = exports.default = function _default(_ref) {
|
|
23
|
+
var preprocess = _ref.preprocess,
|
|
24
|
+
isPageWideSurface = _ref.isPageWideSurface;
|
|
25
|
+
var createItem = function createItem(item, proposition) {
|
|
26
|
+
var schema = item.schema,
|
|
27
|
+
data = item.data,
|
|
28
|
+
_item$characteristics = item.characteristics,
|
|
29
|
+
_item$characteristics2 = _item$characteristics === void 0 ? {} : _item$characteristics,
|
|
30
|
+
trackingLabel = _item$characteristics2.trackingLabel;
|
|
31
|
+
var processedData = preprocess(data);
|
|
32
|
+
return {
|
|
33
|
+
getSchema: function getSchema() {
|
|
34
|
+
return schema;
|
|
35
|
+
},
|
|
36
|
+
getData: function getData() {
|
|
37
|
+
return processedData;
|
|
38
|
+
},
|
|
39
|
+
getProposition: function getProposition() {
|
|
40
|
+
return proposition;
|
|
41
|
+
},
|
|
42
|
+
getTrackingLabel: function getTrackingLabel() {
|
|
43
|
+
return trackingLabel;
|
|
44
|
+
},
|
|
45
|
+
getOriginalItem: function getOriginalItem() {
|
|
46
|
+
return item;
|
|
47
|
+
},
|
|
48
|
+
toString: function toString() {
|
|
49
|
+
return JSON.stringify(item);
|
|
50
|
+
},
|
|
51
|
+
toJSON: function toJSON() {
|
|
52
|
+
return item;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
return function (payload) {
|
|
57
|
+
var visibleInReturnedItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
58
|
+
var id = payload.id,
|
|
59
|
+
scope = payload.scope,
|
|
60
|
+
scopeDetails = payload.scopeDetails,
|
|
61
|
+
_payload$items = payload.items,
|
|
62
|
+
items = _payload$items === void 0 ? [] : _payload$items;
|
|
63
|
+
var _ref2 = scopeDetails || {},
|
|
64
|
+
_ref2$characteristics = _ref2.characteristics,
|
|
65
|
+
_ref2$characteristics2 = _ref2$characteristics === void 0 ? {} : _ref2$characteristics,
|
|
66
|
+
scopeType = _ref2$characteristics2.scopeType;
|
|
67
|
+
return {
|
|
68
|
+
getScope: function getScope() {
|
|
69
|
+
if (!scope) {
|
|
70
|
+
return scope;
|
|
71
|
+
}
|
|
72
|
+
return scope;
|
|
73
|
+
},
|
|
74
|
+
getScopeType: function getScopeType() {
|
|
75
|
+
if (scope === _pageWideScope.default || isPageWideSurface(scope)) {
|
|
76
|
+
return _scopeType.PAGE_SCOPE_TYPE;
|
|
77
|
+
}
|
|
78
|
+
if (scopeType === _scopeType.VIEW_SCOPE_TYPE) {
|
|
79
|
+
return _scopeType.VIEW_SCOPE_TYPE;
|
|
80
|
+
}
|
|
81
|
+
return _scopeType.PROPOSITION_SCOPE_TYPE;
|
|
82
|
+
},
|
|
83
|
+
getItems: function getItems() {
|
|
84
|
+
var _this = this;
|
|
85
|
+
return items.map(function (item) {
|
|
86
|
+
return createItem(item, _this);
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
getNotification: function getNotification() {
|
|
90
|
+
return {
|
|
91
|
+
id: id,
|
|
92
|
+
scope: scope,
|
|
93
|
+
scopeDetails: scopeDetails
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
toJSON: function toJSON() {
|
|
97
|
+
return payload;
|
|
98
|
+
},
|
|
99
|
+
addToReturnValues: function addToReturnValues(propositions, decisions, includedItems, renderAttempted) {
|
|
100
|
+
if (visibleInReturnedItems) {
|
|
101
|
+
propositions.push(_objectSpread(_objectSpread({}, payload), {}, {
|
|
102
|
+
items: includedItems.map(function (i) {
|
|
103
|
+
return i.getOriginalItem();
|
|
104
|
+
}),
|
|
105
|
+
renderAttempted: renderAttempted
|
|
106
|
+
}));
|
|
107
|
+
if (!renderAttempted) {
|
|
108
|
+
decisions.push(_objectSpread(_objectSpread({}, payload), {}, {
|
|
109
|
+
items: includedItems.map(function (i) {
|
|
110
|
+
return i.getOriginalItem();
|
|
111
|
+
})
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2023 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 = exports.default = function _default() {
|
|
16
|
+
return {
|
|
17
|
+
setRenderAttempted: true,
|
|
18
|
+
includeInNotification: true
|
|
19
|
+
};
|
|
20
|
+
};
|
package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.mobileOverlay = exports.displayHTMLContentInIframe = exports.default = exports.createIframeClickHandler = exports.createIframe = exports.buildStyleFromMobileParameters = void 0;
|
|
4
|
+
var _index = require("../../dom-actions/dom/index.js");
|
|
5
|
+
var _utils = require("../utils.js");
|
|
6
|
+
var _contentType = require("../../../../constants/contentType.js");
|
|
7
|
+
var _index2 = require("../../../../utils/index.js");
|
|
8
|
+
var _index3 = require("../../../../utils/dom/index.js");
|
|
9
|
+
var _index4 = require("../../../../utils/validation/index.js");
|
|
10
|
+
var _propositionEventType = require("../../../../constants/propositionEventType.js");
|
|
11
|
+
var _eventType = require("../../../../constants/eventType.js");
|
|
12
|
+
var _createRedirect = require("../../dom-actions/createRedirect.js");
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
17
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
18
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
+
|
|
22
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
+
governing permissions and limitations under the License.
|
|
26
|
+
*/
|
|
27
|
+
var MESSAGING_CONTAINER_ID = "alloy-messaging-container";
|
|
28
|
+
var OVERLAY_CONTAINER_ID = "alloy-overlay-container";
|
|
29
|
+
var IFRAME_ID = "alloy-content-iframe";
|
|
30
|
+
var dismissMessage = function dismissMessage() {
|
|
31
|
+
return [MESSAGING_CONTAINER_ID, OVERLAY_CONTAINER_ID].forEach(_utils.removeElementById);
|
|
32
|
+
};
|
|
33
|
+
var createIframeClickHandler = exports.createIframeClickHandler = function createIframeClickHandler(interact) {
|
|
34
|
+
var navigateToUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _createRedirect.default)(window);
|
|
35
|
+
return function (event) {
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
event.stopImmediatePropagation();
|
|
38
|
+
var target = event.target;
|
|
39
|
+
var anchor = target.tagName.toLowerCase() === "a" ? target : target.closest("a");
|
|
40
|
+
if (!anchor) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
var _parseAnchor = (0, _utils.parseAnchor)(anchor),
|
|
44
|
+
action = _parseAnchor.action,
|
|
45
|
+
interaction = _parseAnchor.interaction,
|
|
46
|
+
link = _parseAnchor.link,
|
|
47
|
+
label = _parseAnchor.label,
|
|
48
|
+
uuid = _parseAnchor.uuid;
|
|
49
|
+
interact(action, {
|
|
50
|
+
label: label,
|
|
51
|
+
id: interaction,
|
|
52
|
+
uuid: uuid,
|
|
53
|
+
link: link
|
|
54
|
+
});
|
|
55
|
+
if (action === "dismiss") {
|
|
56
|
+
dismissMessage();
|
|
57
|
+
}
|
|
58
|
+
if ((0, _index2.isNonEmptyString)(link) && link.length > 0) {
|
|
59
|
+
navigateToUrl(link, true);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
var createIframe = exports.createIframe = function createIframe(htmlContent, clickHandler) {
|
|
64
|
+
var parser = new DOMParser();
|
|
65
|
+
var htmlDocument = parser.parseFromString(htmlContent, _contentType.TEXT_HTML);
|
|
66
|
+
var scriptTag = htmlDocument.querySelector("script");
|
|
67
|
+
if (scriptTag) {
|
|
68
|
+
scriptTag.setAttribute("nonce", (0, _index.getNonce)());
|
|
69
|
+
}
|
|
70
|
+
var element = (0, _index3.createNode)("iframe", {
|
|
71
|
+
src: URL.createObjectURL(new Blob([htmlDocument.documentElement.outerHTML], {
|
|
72
|
+
type: "text/html"
|
|
73
|
+
})),
|
|
74
|
+
id: IFRAME_ID
|
|
75
|
+
});
|
|
76
|
+
element.addEventListener("load", function () {
|
|
77
|
+
var _ref = element.contentDocument || element.contentWindow.document,
|
|
78
|
+
addEventListener = _ref.addEventListener;
|
|
79
|
+
addEventListener("click", clickHandler);
|
|
80
|
+
});
|
|
81
|
+
return element;
|
|
82
|
+
};
|
|
83
|
+
var renderMessage = function renderMessage(iframe, webParameters, container, overlay) {
|
|
84
|
+
[{
|
|
85
|
+
id: OVERLAY_CONTAINER_ID,
|
|
86
|
+
element: overlay
|
|
87
|
+
}, {
|
|
88
|
+
id: MESSAGING_CONTAINER_ID,
|
|
89
|
+
element: container
|
|
90
|
+
}, {
|
|
91
|
+
id: IFRAME_ID,
|
|
92
|
+
element: iframe
|
|
93
|
+
}].forEach(function (_ref2) {
|
|
94
|
+
var id = _ref2.id,
|
|
95
|
+
element = _ref2.element;
|
|
96
|
+
var _webParameters$id = webParameters[id],
|
|
97
|
+
_webParameters$id$sty = _webParameters$id.style,
|
|
98
|
+
style = _webParameters$id$sty === void 0 ? {} : _webParameters$id$sty,
|
|
99
|
+
_webParameters$id$par = _webParameters$id.params,
|
|
100
|
+
params = _webParameters$id$par === void 0 ? {} : _webParameters$id$par;
|
|
101
|
+
(0, _index2.assign)(element.style, style);
|
|
102
|
+
var _params$parentElement = params.parentElement,
|
|
103
|
+
parentElement = _params$parentElement === void 0 ? "body" : _params$parentElement,
|
|
104
|
+
_params$insertionMeth = params.insertionMethod,
|
|
105
|
+
insertionMethod = _params$insertionMeth === void 0 ? "appendChild" : _params$insertionMeth,
|
|
106
|
+
_params$enabled = params.enabled,
|
|
107
|
+
enabled = _params$enabled === void 0 ? true : _params$enabled;
|
|
108
|
+
var parent = document.querySelector(parentElement);
|
|
109
|
+
if (enabled && parent && typeof parent[insertionMethod] === "function") {
|
|
110
|
+
parent[insertionMethod](element);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
var buildStyleFromMobileParameters = exports.buildStyleFromMobileParameters = function buildStyleFromMobileParameters(mobileParameters) {
|
|
115
|
+
var verticalAlign = mobileParameters.verticalAlign,
|
|
116
|
+
width = mobileParameters.width,
|
|
117
|
+
horizontalAlign = mobileParameters.horizontalAlign,
|
|
118
|
+
backdropColor = mobileParameters.backdropColor,
|
|
119
|
+
height = mobileParameters.height,
|
|
120
|
+
cornerRadius = mobileParameters.cornerRadius,
|
|
121
|
+
horizontalInset = mobileParameters.horizontalInset,
|
|
122
|
+
verticalInset = mobileParameters.verticalInset,
|
|
123
|
+
_mobileParameters$uiT = mobileParameters.uiTakeover,
|
|
124
|
+
uiTakeover = _mobileParameters$uiT === void 0 ? false : _mobileParameters$uiT;
|
|
125
|
+
var style = {
|
|
126
|
+
width: width ? width + "%" : "100%",
|
|
127
|
+
backgroundColor: backdropColor || "rgba(0, 0, 0, 0.5)",
|
|
128
|
+
borderRadius: cornerRadius ? cornerRadius + "px" : "0px",
|
|
129
|
+
border: "none",
|
|
130
|
+
position: uiTakeover ? "fixed" : "relative",
|
|
131
|
+
overflow: "hidden"
|
|
132
|
+
};
|
|
133
|
+
if (horizontalAlign === "left") {
|
|
134
|
+
style.left = horizontalInset ? horizontalInset + "%" : "0";
|
|
135
|
+
} else if (horizontalAlign === "right") {
|
|
136
|
+
style.right = horizontalInset ? horizontalInset + "%" : "0";
|
|
137
|
+
} else if (horizontalAlign === "center") {
|
|
138
|
+
style.left = "50%";
|
|
139
|
+
style.transform = "translateX(-50%)";
|
|
140
|
+
}
|
|
141
|
+
if (verticalAlign === "top") {
|
|
142
|
+
style.top = verticalInset ? verticalInset + "%" : "0";
|
|
143
|
+
} else if (verticalAlign === "bottom") {
|
|
144
|
+
style.position = "fixed";
|
|
145
|
+
style.bottom = verticalInset ? verticalInset + "%" : "0";
|
|
146
|
+
} else if (verticalAlign === "center") {
|
|
147
|
+
style.top = "50%";
|
|
148
|
+
style.transform = (horizontalAlign === "center" ? style.transform + " " : "") + "translateY(-50%)";
|
|
149
|
+
style.display = "flex";
|
|
150
|
+
style.alignItems = "center";
|
|
151
|
+
style.justifyContent = "center";
|
|
152
|
+
}
|
|
153
|
+
if (height) {
|
|
154
|
+
style.height = height + "vh";
|
|
155
|
+
} else {
|
|
156
|
+
style.height = "100%";
|
|
157
|
+
}
|
|
158
|
+
return style;
|
|
159
|
+
};
|
|
160
|
+
var mobileOverlay = exports.mobileOverlay = function mobileOverlay(mobileParameters) {
|
|
161
|
+
var backdropOpacity = mobileParameters.backdropOpacity,
|
|
162
|
+
backdropColor = mobileParameters.backdropColor;
|
|
163
|
+
var opacity = backdropOpacity || 0.5;
|
|
164
|
+
var color = backdropColor || "#FFFFFF";
|
|
165
|
+
var style = {
|
|
166
|
+
position: "fixed",
|
|
167
|
+
top: "0",
|
|
168
|
+
left: "0",
|
|
169
|
+
width: "100%",
|
|
170
|
+
height: "100%",
|
|
171
|
+
background: "transparent",
|
|
172
|
+
opacity: opacity,
|
|
173
|
+
backgroundColor: color
|
|
174
|
+
};
|
|
175
|
+
return style;
|
|
176
|
+
};
|
|
177
|
+
var REQUIRED_PARAMS = ["enabled", "parentElement", "insertionMethod"];
|
|
178
|
+
var isValidWebParameters = function isValidWebParameters(webParameters) {
|
|
179
|
+
if (!webParameters) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
var ids = Object.keys(webParameters);
|
|
183
|
+
if (!(0, _index2.includes)(ids, MESSAGING_CONTAINER_ID)) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
if (!(0, _index2.includes)(ids, OVERLAY_CONTAINER_ID)) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
var valuesArray = (0, _index2.values)(webParameters);
|
|
190
|
+
for (var i = 0; i < valuesArray.length; i += 1) {
|
|
191
|
+
if (!(0, _index4.objectOf)(valuesArray[i], "style")) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
if (!(0, _index4.objectOf)(valuesArray[i], "params")) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
for (var j = 0; j < REQUIRED_PARAMS.length; j += 1) {
|
|
198
|
+
if (!(0, _index4.objectOf)(valuesArray[i].params, REQUIRED_PARAMS[j])) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return true;
|
|
204
|
+
};
|
|
205
|
+
var generateWebParameters = function generateWebParameters(mobileParameters) {
|
|
206
|
+
if (!mobileParameters) {
|
|
207
|
+
return undefined;
|
|
208
|
+
}
|
|
209
|
+
var _mobileParameters$uiT2 = mobileParameters.uiTakeover,
|
|
210
|
+
uiTakeover = _mobileParameters$uiT2 === void 0 ? false : _mobileParameters$uiT2;
|
|
211
|
+
return _defineProperty(_defineProperty(_defineProperty({}, 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
|
+
}), MESSAGING_CONTAINER_ID, {
|
|
223
|
+
style: buildStyleFromMobileParameters(mobileParameters),
|
|
224
|
+
params: {
|
|
225
|
+
enabled: true,
|
|
226
|
+
parentElement: "body",
|
|
227
|
+
insertionMethod: "appendChild"
|
|
228
|
+
}
|
|
229
|
+
}), OVERLAY_CONTAINER_ID, {
|
|
230
|
+
style: mobileOverlay(mobileParameters),
|
|
231
|
+
params: {
|
|
232
|
+
enabled: uiTakeover === true,
|
|
233
|
+
parentElement: "body",
|
|
234
|
+
insertionMethod: "appendChild"
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
// eslint-disable-next-line default-param-last
|
|
240
|
+
var displayHTMLContentInIframe = exports.displayHTMLContentInIframe = function displayHTMLContentInIframe() {
|
|
241
|
+
var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
242
|
+
var interact = arguments.length > 1 ? arguments[1] : undefined;
|
|
243
|
+
dismissMessage();
|
|
244
|
+
var content = settings.content,
|
|
245
|
+
contentType = settings.contentType,
|
|
246
|
+
mobileParameters = settings.mobileParameters;
|
|
247
|
+
var webParameters = settings.webParameters;
|
|
248
|
+
if (contentType !== _contentType.TEXT_HTML) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
var container = (0, _index3.createNode)("div", {
|
|
252
|
+
id: MESSAGING_CONTAINER_ID
|
|
253
|
+
});
|
|
254
|
+
var iframe = createIframe(content, createIframeClickHandler(interact));
|
|
255
|
+
var overlay = (0, _index3.createNode)("div", {
|
|
256
|
+
id: OVERLAY_CONTAINER_ID
|
|
257
|
+
});
|
|
258
|
+
if (!isValidWebParameters(webParameters)) {
|
|
259
|
+
webParameters = generateWebParameters(mobileParameters);
|
|
260
|
+
}
|
|
261
|
+
if (!webParameters) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
renderMessage(iframe, webParameters, container, overlay);
|
|
265
|
+
};
|
|
266
|
+
var _default = exports.default = function _default(settings, collect) {
|
|
267
|
+
return new Promise(function (resolve) {
|
|
268
|
+
var meta = settings.meta;
|
|
269
|
+
displayHTMLContentInIframe(settings, function (action, propositionAction) {
|
|
270
|
+
var propositionEventTypes = {};
|
|
271
|
+
propositionEventTypes[_propositionEventType.PropositionEventType.INTERACT] = _eventType.EVENT_TYPE_TRUE;
|
|
272
|
+
if (Object.values(_propositionEventType.PropositionEventType).indexOf(action) !== -1) {
|
|
273
|
+
propositionEventTypes[action] = _eventType.EVENT_TYPE_TRUE;
|
|
274
|
+
}
|
|
275
|
+
collect({
|
|
276
|
+
decisionsMeta: [meta],
|
|
277
|
+
propositionAction: propositionAction,
|
|
278
|
+
eventType: _eventType.INTERACT,
|
|
279
|
+
propositionEventTypes: Object.keys(propositionEventTypes)
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
resolve({
|
|
283
|
+
meta: meta
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
};
|
package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var _displayIframeContent = require("./actions/displayIframeContent.js");
|
|
5
|
+
/*
|
|
6
|
+
Copyright 2023 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
|
+
var _default = exports.default = function _default(collect) {
|
|
17
|
+
return {
|
|
18
|
+
defaultContent: function defaultContent(settings) {
|
|
19
|
+
return (0, _displayIframeContent.default)(settings, collect);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.removeElementById = exports.parseAnchor = void 0;
|
|
4
|
+
var _index = require("../../../utils/index.js");
|
|
5
|
+
var _index2 = require("../../../utils/dom/index.js");
|
|
6
|
+
/*
|
|
7
|
+
Copyright 2023 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 removeElementById = exports.removeElementById = function removeElementById(id) {
|
|
19
|
+
var element = (0, _index2.selectNodes)("#" + id, document);
|
|
20
|
+
if (element && element.length > 0) {
|
|
21
|
+
(0, _index2.removeNode)(element[0]);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var parseAnchor = exports.parseAnchor = function parseAnchor(anchor) {
|
|
25
|
+
var nothing = {};
|
|
26
|
+
if (!anchor || anchor.tagName.toLowerCase() !== "a") {
|
|
27
|
+
return nothing;
|
|
28
|
+
}
|
|
29
|
+
var href = anchor.href;
|
|
30
|
+
if (!href || !(0, _index.startsWith)(href, "adbinapp://")) {
|
|
31
|
+
return nothing;
|
|
32
|
+
}
|
|
33
|
+
var hrefParts = href.split("?");
|
|
34
|
+
var action = hrefParts[0].split("://")[1];
|
|
35
|
+
var label = anchor.innerText;
|
|
36
|
+
var uuid = anchor.getAttribute("data-uuid") || "";
|
|
37
|
+
var interaction;
|
|
38
|
+
var link;
|
|
39
|
+
if ((0, _index.isNonEmptyArray)(hrefParts)) {
|
|
40
|
+
var queryParams = _index.queryString.parse(hrefParts[1]);
|
|
41
|
+
interaction = queryParams.interaction || "";
|
|
42
|
+
link = decodeURIComponent(queryParams.link || "");
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
action: action,
|
|
46
|
+
interaction: interaction,
|
|
47
|
+
link: link,
|
|
48
|
+
label: label,
|
|
49
|
+
uuid: uuid
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var _index = require("../../utils/validation/index.js");
|
|
5
|
+
var _createComponent = require("./createComponent.js");
|
|
6
|
+
var _index2 = require("./dom-actions/index.js");
|
|
7
|
+
var _createCollect = require("./createCollect.js");
|
|
8
|
+
var _index3 = require("./flicker/index.js");
|
|
9
|
+
var _createFetchDataHandler = require("./createFetchDataHandler.js");
|
|
10
|
+
var _collectClicks = require("./dom-actions/clicks/collectClicks.js");
|
|
11
|
+
var _isAuthoringModeEnabled = require("./utils/isAuthoringModeEnabled.js");
|
|
12
|
+
var _event = require("./event.js");
|
|
13
|
+
var _createOnClickHandler = require("./createOnClickHandler.js");
|
|
14
|
+
var _createViewCacheManager = require("./createViewCacheManager.js");
|
|
15
|
+
var _createViewChangeHandler = require("./createViewChangeHandler.js");
|
|
16
|
+
var _createClickStorage2 = require("./createClickStorage.js");
|
|
17
|
+
var _createApplyPropositions = require("./createApplyPropositions.js");
|
|
18
|
+
var _createGetPageLocation = require("./createGetPageLocation.js");
|
|
19
|
+
var _createSetTargetMigration = require("./createSetTargetMigration.js");
|
|
20
|
+
var _remapCustomCodeOffers = require("./dom-actions/remapCustomCodeOffers.js");
|
|
21
|
+
var _remapHeadOffers = require("./dom-actions/remapHeadOffers.js");
|
|
22
|
+
var _createPreprocess = require("./dom-actions/createPreprocess.js");
|
|
23
|
+
var _injectCreateProposition = require("./handlers/injectCreateProposition.js");
|
|
24
|
+
var _createAsyncArray = require("./utils/createAsyncArray.js");
|
|
25
|
+
var schema = require("../../constants/schema.js");
|
|
26
|
+
var _processDefaultContent = require("./handlers/processDefaultContent.js");
|
|
27
|
+
var _surfaceUtils = require("./utils/surfaceUtils.js");
|
|
28
|
+
var _createProcessDomAction = require("./handlers/createProcessDomAction.js");
|
|
29
|
+
var _createProcessHtmlContent = require("./handlers/createProcessHtmlContent.js");
|
|
30
|
+
var _createProcessRedirect = require("./handlers/createProcessRedirect.js");
|
|
31
|
+
var _createProcessPropositions = require("./handlers/createProcessPropositions.js");
|
|
32
|
+
var _createOnDecisionHandler = require("./createOnDecisionHandler.js");
|
|
33
|
+
var _createProcessInAppMessage = require("./handlers/createProcessInAppMessage.js");
|
|
34
|
+
var _initInAppMessageActionsModules = require("./in-app-message-actions/initInAppMessageActionsModules.js");
|
|
35
|
+
var _createRedirect = require("./dom-actions/createRedirect.js");
|
|
36
|
+
var _createNotificationHandler = require("./createNotificationHandler.js");
|
|
37
|
+
var _createHandleConsentFlicker = require("./createHandleConsentFlicker.js");
|
|
38
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
39
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
41
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
42
|
+
Copyright 2019 Adobe. Ackll rights reserved.
|
|
43
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
44
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
45
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
+
|
|
47
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
48
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
49
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
50
|
+
governing permissions and limitations under the License.
|
|
51
|
+
*/
|
|
52
|
+
var createPersonalization = function createPersonalization(_ref) {
|
|
53
|
+
var config = _ref.config,
|
|
54
|
+
logger = _ref.logger,
|
|
55
|
+
eventManager = _ref.eventManager,
|
|
56
|
+
consent = _ref.consent;
|
|
57
|
+
var targetMigrationEnabled = config.targetMigrationEnabled,
|
|
58
|
+
prehidingStyle = config.prehidingStyle;
|
|
59
|
+
var collect = (0, _createCollect.default)({
|
|
60
|
+
eventManager: eventManager,
|
|
61
|
+
mergeDecisionsMeta: _event.mergeDecisionsMeta
|
|
62
|
+
});
|
|
63
|
+
var _createClickStorage = (0, _createClickStorage2.default)(),
|
|
64
|
+
getClickMetasBySelector = _createClickStorage.getClickMetasBySelector,
|
|
65
|
+
getClickSelectors = _createClickStorage.getClickSelectors,
|
|
66
|
+
storeClickMetrics = _createClickStorage.storeClickMetrics;
|
|
67
|
+
var getPageLocation = (0, _createGetPageLocation.default)({
|
|
68
|
+
window: window
|
|
69
|
+
});
|
|
70
|
+
var domActionsModules = (0, _index2.initDomActionsModules)();
|
|
71
|
+
var preprocess = (0, _createPreprocess.default)([_remapHeadOffers.default, _remapCustomCodeOffers.default]);
|
|
72
|
+
var createProposition = (0, _injectCreateProposition.default)({
|
|
73
|
+
preprocess: preprocess,
|
|
74
|
+
isPageWideSurface: _surfaceUtils.isPageWideSurface
|
|
75
|
+
});
|
|
76
|
+
var viewCache = (0, _createViewCacheManager.default)({
|
|
77
|
+
createProposition: createProposition
|
|
78
|
+
});
|
|
79
|
+
var executeRedirect = (0, _createRedirect.default)(window);
|
|
80
|
+
var schemaProcessors = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, schema.DEFAULT_CONTENT_ITEM, _processDefaultContent.default), schema.DOM_ACTION, (0, _createProcessDomAction.default)({
|
|
81
|
+
modules: domActionsModules,
|
|
82
|
+
logger: logger,
|
|
83
|
+
storeClickMetrics: storeClickMetrics
|
|
84
|
+
})), schema.HTML_CONTENT_ITEM, (0, _createProcessHtmlContent.default)({
|
|
85
|
+
modules: domActionsModules,
|
|
86
|
+
logger: logger
|
|
87
|
+
})), schema.REDIRECT_ITEM, (0, _createProcessRedirect.default)({
|
|
88
|
+
logger: logger,
|
|
89
|
+
executeRedirect: executeRedirect,
|
|
90
|
+
collect: collect
|
|
91
|
+
})), schema.MESSAGE_IN_APP, (0, _createProcessInAppMessage.default)({
|
|
92
|
+
modules: (0, _initInAppMessageActionsModules.default)(collect),
|
|
93
|
+
logger: logger
|
|
94
|
+
}));
|
|
95
|
+
var processPropositions = (0, _createProcessPropositions.default)({
|
|
96
|
+
schemaProcessors: schemaProcessors,
|
|
97
|
+
logger: logger
|
|
98
|
+
});
|
|
99
|
+
var renderedPropositions = (0, _createAsyncArray.default)();
|
|
100
|
+
var notificationHandler = (0, _createNotificationHandler.default)(collect, renderedPropositions);
|
|
101
|
+
var fetchDataHandler = (0, _createFetchDataHandler.default)({
|
|
102
|
+
prehidingStyle: prehidingStyle,
|
|
103
|
+
showContainers: _index3.showContainers,
|
|
104
|
+
hideContainers: _index3.hideContainers,
|
|
105
|
+
mergeQuery: _event.mergeQuery,
|
|
106
|
+
processPropositions: processPropositions,
|
|
107
|
+
createProposition: createProposition,
|
|
108
|
+
notificationHandler: notificationHandler,
|
|
109
|
+
consent: consent
|
|
110
|
+
});
|
|
111
|
+
var onClickHandler = (0, _createOnClickHandler.default)({
|
|
112
|
+
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
113
|
+
collectClicks: _collectClicks.default,
|
|
114
|
+
getClickSelectors: getClickSelectors,
|
|
115
|
+
getClickMetasBySelector: getClickMetasBySelector
|
|
116
|
+
});
|
|
117
|
+
var viewChangeHandler = (0, _createViewChangeHandler.default)({
|
|
118
|
+
processPropositions: processPropositions,
|
|
119
|
+
viewCache: viewCache
|
|
120
|
+
});
|
|
121
|
+
var applyPropositions = (0, _createApplyPropositions.default)({
|
|
122
|
+
processPropositions: processPropositions,
|
|
123
|
+
createProposition: createProposition,
|
|
124
|
+
renderedPropositions: renderedPropositions,
|
|
125
|
+
viewCache: viewCache
|
|
126
|
+
});
|
|
127
|
+
var setTargetMigration = (0, _createSetTargetMigration.default)({
|
|
128
|
+
targetMigrationEnabled: targetMigrationEnabled
|
|
129
|
+
});
|
|
130
|
+
var onDecisionHandler = (0, _createOnDecisionHandler.default)({
|
|
131
|
+
processPropositions: processPropositions,
|
|
132
|
+
createProposition: createProposition,
|
|
133
|
+
notificationHandler: notificationHandler
|
|
134
|
+
});
|
|
135
|
+
var handleConsentFlicker = (0, _createHandleConsentFlicker.default)({
|
|
136
|
+
showContainers: _index3.showContainers,
|
|
137
|
+
consent: consent
|
|
138
|
+
});
|
|
139
|
+
return (0, _createComponent.default)({
|
|
140
|
+
getPageLocation: getPageLocation,
|
|
141
|
+
logger: logger,
|
|
142
|
+
fetchDataHandler: fetchDataHandler,
|
|
143
|
+
viewChangeHandler: viewChangeHandler,
|
|
144
|
+
onClickHandler: onClickHandler,
|
|
145
|
+
isAuthoringModeEnabled: _isAuthoringModeEnabled.default,
|
|
146
|
+
mergeQuery: _event.mergeQuery,
|
|
147
|
+
viewCache: viewCache,
|
|
148
|
+
showContainers: _index3.showContainers,
|
|
149
|
+
applyPropositions: applyPropositions,
|
|
150
|
+
setTargetMigration: setTargetMigration,
|
|
151
|
+
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
152
|
+
renderedPropositions: renderedPropositions,
|
|
153
|
+
onDecisionHandler: onDecisionHandler,
|
|
154
|
+
handleConsentFlicker: handleConsentFlicker
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
createPersonalization.namespace = "Personalization";
|
|
158
|
+
createPersonalization.configValidators = (0, _index.objectOf)({
|
|
159
|
+
prehidingStyle: (0, _index.string)().nonEmpty(),
|
|
160
|
+
targetMigrationEnabled: (0, _index.boolean)().default(false)
|
|
161
|
+
});
|
|
162
|
+
var _default = exports.default = createPersonalization;
|