@adobe/alloy 2.21.1 → 2.22.0-alpha.1
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/babel.config.cjs +0 -1
- package/libEs5/baseCode/index.js +3 -2
- package/libEs5/components/ActivityCollector/attachClickActivityCollector.js +23 -20
- package/libEs5/components/ActivityCollector/configValidators.js +2 -2
- package/libEs5/components/ActivityCollector/createClickActivityStorage.js +11 -9
- package/libEs5/components/ActivityCollector/createClickedElementProperties.js +39 -32
- package/libEs5/components/ActivityCollector/createGetClickedElementProperties.js +28 -20
- package/libEs5/components/ActivityCollector/createInjectClickedElementProperties.js +24 -21
- package/libEs5/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js +10 -8
- package/libEs5/components/ActivityCollector/createStorePageViewProperties.js +6 -4
- package/libEs5/components/ActivityCollector/getLinkName.js +19 -18
- package/libEs5/components/ActivityCollector/getLinkRegion.js +10 -9
- package/libEs5/components/ActivityCollector/index.js +61 -45
- package/libEs5/components/ActivityCollector/utils/activityMapExtensionEnabled.js +3 -5
- package/libEs5/components/ActivityCollector/utils/createTransientStorage.js +7 -6
- package/libEs5/components/ActivityCollector/utils/determineLinkType.js +4 -3
- package/libEs5/components/ActivityCollector/utils/dom/elementHasClickHandler.js +3 -2
- package/libEs5/components/ActivityCollector/utils/dom/extractDomain.js +5 -4
- package/libEs5/components/ActivityCollector/utils/dom/findClickableElement.js +4 -3
- package/libEs5/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.js +11 -8
- package/libEs5/components/ActivityCollector/utils/dom/isButtonSubmitElement.js +3 -2
- package/libEs5/components/ActivityCollector/utils/dom/isDownloadLink.js +6 -5
- package/libEs5/components/ActivityCollector/utils/dom/isExitLink.js +6 -5
- package/libEs5/components/ActivityCollector/utils/dom/isInputSubmitElement.js +4 -3
- package/libEs5/components/ActivityCollector/utils/dom/isSupportedAnchorElement.js +3 -2
- package/libEs5/components/ActivityCollector/utils/dom/isSupportedTextNode.js +4 -3
- package/libEs5/components/ActivityCollector/utils/hasPageName.js +4 -3
- package/libEs5/components/ActivityCollector/utils/isDifferentDomains.js +5 -4
- package/libEs5/components/ActivityCollector/utils/trimQueryFromUrl.js +5 -4
- package/libEs5/components/ActivityCollector/utils/truncateWhiteSpace.js +3 -2
- package/libEs5/components/ActivityCollector/utils/urlStartsWithScheme.js +3 -2
- package/libEs5/components/Audiences/index.js +13 -12
- package/libEs5/components/Audiences/injectProcessDestinations.js +32 -35
- package/libEs5/components/Audiences/injectProcessResponse.js +19 -16
- package/libEs5/components/Context/createComponent.js +10 -13
- package/libEs5/components/Context/implementationDetails.js +5 -4
- package/libEs5/components/Context/index.js +24 -28
- package/libEs5/components/Context/injectDevice.js +23 -15
- package/libEs5/components/Context/injectEnvironment.js +17 -12
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +12 -21
- package/libEs5/components/Context/injectPlaceContext.js +8 -7
- package/libEs5/components/Context/injectTimestamp.js +6 -5
- package/libEs5/components/Context/injectWeb.js +6 -5
- package/libEs5/components/DataCollector/index.js +37 -38
- package/libEs5/components/DataCollector/validateApplyResponse.js +6 -4
- package/libEs5/components/DataCollector/validateUserEventOptions.js +6 -4
- package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +11 -8
- package/libEs5/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +10 -7
- package/libEs5/components/DecisioningEngine/constants.js +3 -3
- package/libEs5/components/DecisioningEngine/createApplyResponse.js +15 -15
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +17 -13
- package/libEs5/components/DecisioningEngine/createContextProvider.js +48 -44
- package/libEs5/components/DecisioningEngine/createDecisionHistory.js +7 -5
- package/libEs5/components/DecisioningEngine/createDecisionProvider.js +16 -21
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +39 -37
- package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +21 -19
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +63 -67
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +23 -22
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +100 -55
- package/libEs5/components/DecisioningEngine/index.js +83 -54
- package/libEs5/components/DecisioningEngine/utils.js +43 -38
- package/libEs5/components/EventMerge/createComponent.js +5 -3
- package/libEs5/components/EventMerge/createEventMergeId.js +3 -2
- package/libEs5/components/EventMerge/index.js +1 -1
- package/libEs5/components/Identity/addEcidQueryToPayload.js +3 -2
- package/libEs5/components/Identity/addEcidToPayload.js +3 -2
- package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +13 -23
- package/libEs5/components/Identity/configValidators.js +1 -1
- package/libEs5/components/Identity/constants/authState.js +3 -3
- package/libEs5/components/Identity/createComponent.js +39 -33
- package/libEs5/components/Identity/createLegacyIdentity.js +29 -29
- package/libEs5/components/Identity/getEcidFromResponse.js +5 -7
- package/libEs5/components/Identity/getIdentity/createGetIdentity.js +17 -15
- package/libEs5/components/Identity/getIdentity/createIdentityRequest.js +10 -8
- package/libEs5/components/Identity/getIdentity/createIdentityRequestPayload.js +5 -4
- package/libEs5/components/Identity/index.js +61 -62
- package/libEs5/components/Identity/injectAddLegacyEcidToPayload.js +8 -6
- package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +46 -52
- package/libEs5/components/Identity/injectAwaitIdentityCookie.js +14 -11
- package/libEs5/components/Identity/injectEnsureSingleIdentity.js +25 -24
- package/libEs5/components/Identity/injectHandleResponseForIdSyncs.js +6 -4
- package/libEs5/components/Identity/injectProcessIdSyncs.js +20 -22
- package/libEs5/components/Identity/injectSetDomainForInitialIdentityPayload.js +7 -5
- package/libEs5/components/Identity/visitorService/awaitVisitorOptIn.js +8 -6
- package/libEs5/components/Identity/visitorService/getVisitor.js +4 -3
- package/libEs5/components/Identity/visitorService/injectGetEcidFromVisitor.js +15 -13
- package/libEs5/components/LegacyMediaAnalytics/constants/constants.js +9 -9
- package/libEs5/components/LegacyMediaAnalytics/constants/mediaKeysToXdmConverter.js +2 -2
- package/libEs5/components/LegacyMediaAnalytics/createGetInstance.js +61 -63
- package/libEs5/components/LegacyMediaAnalytics/createLegacyMediaComponent.js +38 -37
- package/libEs5/components/LegacyMediaAnalytics/createMediaHelper.js +54 -52
- package/libEs5/components/LegacyMediaAnalytics/index.js +32 -33
- package/libEs5/components/LibraryInfo/index.js +23 -30
- package/libEs5/components/MachineLearning/index.js +1 -1
- package/libEs5/components/MachineLearning/processResponse.js +5 -3
- package/libEs5/components/Personalization/constants/loggerMessage.js +2 -2
- package/libEs5/components/Personalization/constants/scopeType.js +3 -3
- package/libEs5/components/Personalization/constants/surface.js +4 -4
- package/libEs5/components/Personalization/createActionsProvider.js +37 -32
- package/libEs5/components/Personalization/createApplyPropositions.js +71 -81
- package/libEs5/components/Personalization/createClickStorage.js +30 -32
- package/libEs5/components/Personalization/createComponent.js +65 -74
- package/libEs5/components/Personalization/createFetchDataHandler.js +83 -52
- package/libEs5/components/Personalization/createGetPageLocation.js +6 -6
- package/libEs5/components/Personalization/createHandleConsentFlicker.js +15 -14
- package/libEs5/components/Personalization/createInteractionStorage.js +25 -39
- package/libEs5/components/Personalization/createNotificationHandler.js +9 -10
- package/libEs5/components/Personalization/createOnClickHandler.js +29 -25
- package/libEs5/components/Personalization/createOnDecisionHandler.js +23 -21
- package/libEs5/components/Personalization/createPersonalizationDetails.js +39 -45
- package/libEs5/components/Personalization/createPreprocessors.js +7 -7
- package/libEs5/components/Personalization/createSetTargetMigration.js +6 -4
- package/libEs5/components/Personalization/createViewCacheManager.js +29 -32
- package/libEs5/components/Personalization/createViewChangeHandler.js +35 -20
- package/libEs5/components/Personalization/dom-actions/action.js +24 -25
- package/libEs5/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +12 -13
- package/libEs5/components/Personalization/dom-actions/appendHtml.js +8 -7
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +28 -33
- package/libEs5/components/Personalization/dom-actions/clicks/collectInteractions.js +37 -40
- package/libEs5/components/Personalization/dom-actions/collectInteractions.js +3 -2
- package/libEs5/components/Personalization/dom-actions/createPreprocess.js +10 -11
- package/libEs5/components/Personalization/dom-actions/createRedirect.js +11 -13
- package/libEs5/components/Personalization/dom-actions/dom/createFragment.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/getAttribute.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/getChildNodes.js +6 -3
- package/libEs5/components/Personalization/dom-actions/dom/getChildren.js +6 -3
- package/libEs5/components/Personalization/dom-actions/dom/getElementById.js +3 -3
- package/libEs5/components/Personalization/dom-actions/dom/getFirstChild.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/getNextSibling.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/getNonce.js +7 -6
- package/libEs5/components/Personalization/dom-actions/dom/getParent.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/helperForEq.js +7 -7
- package/libEs5/components/Personalization/dom-actions/dom/index.js +14 -14
- package/libEs5/components/Personalization/dom-actions/dom/insertAfter.js +4 -3
- package/libEs5/components/Personalization/dom-actions/dom/insertBefore.js +4 -3
- package/libEs5/components/Personalization/dom-actions/dom/isDomElement.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +6 -5
- package/libEs5/components/Personalization/dom-actions/dom/removeAttribute.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +39 -38
- package/libEs5/components/Personalization/dom-actions/dom/setAttribute.js +3 -2
- package/libEs5/components/Personalization/dom-actions/dom/setStyle.js +4 -3
- package/libEs5/components/Personalization/dom-actions/images.js +10 -9
- package/libEs5/components/Personalization/dom-actions/index.js +1 -1
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +40 -25
- package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +9 -8
- package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +8 -7
- package/libEs5/components/Personalization/dom-actions/prependHtml.js +13 -10
- package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +9 -7
- package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +14 -9
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +16 -14
- package/libEs5/components/Personalization/dom-actions/replaceHtml.js +4 -3
- package/libEs5/components/Personalization/dom-actions/scripts.js +58 -38
- package/libEs5/components/Personalization/dom-actions/setAttributes.js +4 -3
- package/libEs5/components/Personalization/dom-actions/setHtml.js +5 -4
- package/libEs5/components/Personalization/dom-actions/setStyles.js +8 -8
- package/libEs5/components/Personalization/dom-actions/setText.js +3 -2
- package/libEs5/components/Personalization/dom-actions/swapImage.js +3 -2
- package/libEs5/components/Personalization/flicker/index.js +66 -49
- package/libEs5/components/Personalization/handlers/createDecorateProposition.js +16 -13
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +45 -50
- package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +30 -29
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +35 -31
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +109 -105
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +38 -28
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +59 -67
- package/libEs5/components/Personalization/handlers/processDefaultContent.js +3 -2
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +140 -121
- package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +4 -5
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +23 -19
- package/libEs5/components/Personalization/index.js +120 -103
- package/libEs5/components/Personalization/utils/addRenderAttemptedToDecisions.js +10 -10
- package/libEs5/components/Personalization/utils/createAsyncArray.js +10 -9
- package/libEs5/components/Personalization/utils/isAuthoringModeEnabled.js +3 -3
- package/libEs5/components/Personalization/utils/metaUtils.js +14 -19
- package/libEs5/components/Personalization/utils/surfaceUtils.js +27 -46
- package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +8 -6
- package/libEs5/components/Privacy/computeConsentHash.js +9 -9
- package/libEs5/components/Privacy/createComponent.js +32 -32
- package/libEs5/components/Privacy/createConsentHashStore.js +27 -24
- package/libEs5/components/Privacy/createConsentRequest.js +10 -8
- package/libEs5/components/Privacy/createConsentRequestPayload.js +9 -8
- package/libEs5/components/Privacy/createStoredConsent.js +11 -9
- package/libEs5/components/Privacy/index.js +26 -23
- package/libEs5/components/Privacy/injectSendSetConsentRequest.js +30 -29
- package/libEs5/components/Privacy/parseConsentCookie.js +6 -14
- package/libEs5/components/StreamingMedia/createMediaEventManager.js +59 -45
- package/libEs5/components/StreamingMedia/createMediaRequest.js +8 -6
- package/libEs5/components/StreamingMedia/createMediaResponseHandler.js +22 -17
- package/libEs5/components/StreamingMedia/createMediaSessionCacheManager.js +22 -18
- package/libEs5/components/StreamingMedia/createStreamingMediaComponent.js +30 -29
- package/libEs5/components/StreamingMedia/createTrackMediaEvent.js +41 -36
- package/libEs5/components/StreamingMedia/createTrackMediaSession.js +25 -22
- package/libEs5/components/StreamingMedia/index.js +33 -34
- package/libEs5/components/StreamingMedia/validateMediaEventOptions.js +9 -12
- package/libEs5/components/StreamingMedia/validateMediaSessionOptions.js +6 -4
- package/libEs5/constants/browser.js +7 -7
- package/libEs5/constants/consentPurpose.js +1 -1
- package/libEs5/constants/consentStatus.js +3 -3
- package/libEs5/constants/contentType.js +2 -2
- package/libEs5/constants/cookieNameKey.js +3 -3
- package/libEs5/constants/coreCommands.js +2 -2
- package/libEs5/constants/decisionProvider.js +4 -3
- package/libEs5/constants/domain.js +2 -2
- package/libEs5/constants/elementAttribute.js +1 -1
- package/libEs5/constants/eventType.js +5 -5
- package/libEs5/constants/handle.js +1 -1
- package/libEs5/constants/httpHeaderNames.js +2 -2
- package/libEs5/constants/httpStatusCode.js +5 -5
- package/libEs5/constants/identityMapAuthenticatedState.js +3 -3
- package/libEs5/constants/legacyCookies.js +3 -3
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/constants/propositionEventType.js +18 -12
- package/libEs5/constants/propositionInteractionType.js +4 -4
- package/libEs5/constants/schema.js +11 -11
- package/libEs5/constants/sessionDataKeys.js +1 -1
- package/libEs5/constants/tagName.js +7 -7
- package/libEs5/core/buildAndValidateConfig.js +55 -69
- package/libEs5/core/componentCreators.js +70 -41
- package/libEs5/core/config/createConfig.js +4 -3
- package/libEs5/core/config/createCoreConfigs.js +11 -12
- package/libEs5/core/consent/createConsent.js +16 -14
- package/libEs5/core/consent/createConsentStateMachine.js +27 -35
- package/libEs5/core/createComponentRegistry.js +28 -27
- package/libEs5/core/createCookieTransfer.js +18 -18
- package/libEs5/core/createEvent.js +39 -44
- package/libEs5/core/createEventManager.js +64 -69
- package/libEs5/core/createInstanceFunction.js +4 -11
- package/libEs5/core/createLifecycle.js +14 -19
- package/libEs5/core/createLogController.js +30 -29
- package/libEs5/core/createLogger.js +41 -27
- package/libEs5/core/edgeNetwork/handleRequestFailure.js +6 -5
- package/libEs5/core/edgeNetwork/injectApplyResponse.js +29 -32
- package/libEs5/core/edgeNetwork/injectExtractEdgeInfo.js +19 -25
- package/libEs5/core/edgeNetwork/injectGetLocationHint.js +11 -11
- package/libEs5/core/edgeNetwork/injectProcessWarningsAndErrors.js +20 -16
- package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +42 -38
- package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +8 -12
- package/libEs5/core/index.js +137 -133
- package/libEs5/core/initializeComponents.js +17 -15
- package/libEs5/core/injectCreateResponse.js +47 -53
- package/libEs5/core/injectExecuteCommand.js +39 -40
- package/libEs5/core/injectHandleError.js +19 -19
- package/libEs5/core/injectShouldTransferCookie.js +12 -12
- package/libEs5/core/network/getRequestRetryDelay.js +20 -18
- package/libEs5/core/network/injectSendNetworkRequest.js +46 -49
- package/libEs5/core/network/isRequestRetryable.js +9 -8
- package/libEs5/core/network/requestMethods/injectSendBeaconRequest.js +10 -8
- package/libEs5/core/network/requestMethods/injectSendFetchRequest.js +18 -19
- package/libEs5/core/requiredComponentCreators.js +23 -0
- package/libEs5/core/validateCommandOptions.js +14 -11
- package/libEs5/index.js +43 -22
- package/libEs5/standalone.js +6 -1
- package/libEs5/utils/areThirdPartyCookiesSupportedByDefault.js +3 -5
- package/libEs5/utils/assignConcatArrayValues.js +9 -18
- package/libEs5/utils/clone.js +2 -3
- package/libEs5/utils/cookieJar.js +4 -4
- package/libEs5/utils/crc32.js +8 -8
- package/libEs5/utils/createCallbackAggregator.js +7 -11
- package/libEs5/utils/createCollect.js +52 -0
- package/libEs5/utils/createLoggingCookieJar.js +14 -16
- package/libEs5/utils/createMerger.js +9 -10
- package/libEs5/utils/createSubscription.js +48 -48
- package/libEs5/utils/createTaskQueue.js +8 -7
- package/libEs5/utils/deduplicateArray.js +7 -11
- package/libEs5/utils/deepAssign.js +7 -11
- package/libEs5/utils/defer.js +5 -4
- package/libEs5/utils/dom/appendNode.js +3 -2
- package/libEs5/utils/dom/awaitSelector.js +36 -34
- package/libEs5/utils/dom/createNode.js +10 -15
- package/libEs5/utils/dom/index.js +8 -8
- package/libEs5/utils/dom/isShadowSelector.js +2 -3
- package/libEs5/utils/dom/matchesSelector.js +3 -2
- package/libEs5/utils/dom/querySelectorAll.js +5 -13
- package/libEs5/utils/dom/removeNode.js +4 -3
- package/libEs5/utils/dom/selectNodes.js +3 -3
- package/libEs5/utils/dom/selectNodesWithShadow.js +14 -23
- package/libEs5/utils/event.js +49 -0
- package/libEs5/utils/filterObject.js +14 -12
- package/libEs5/utils/fireImage.js +10 -9
- package/libEs5/utils/flattenArray.js +4 -11
- package/libEs5/utils/flattenObject.js +8 -18
- package/libEs5/utils/getApexDomain.js +7 -6
- package/libEs5/utils/getBrowser.js +45 -12
- package/libEs5/utils/getLastArrayItems.js +2 -3
- package/libEs5/utils/getNamespacedCookieName.js +2 -3
- package/libEs5/utils/groupBy.js +6 -5
- package/libEs5/utils/index.js +50 -113
- package/libEs5/utils/injectDoesIdentityCookieExist.js +7 -7
- package/libEs5/utils/injectFireReferrerHideableImage.js +28 -34
- package/libEs5/utils/injectStorage.js +13 -15
- package/libEs5/utils/intersection.js +2 -6
- package/libEs5/utils/isBlankString.js +2 -3
- package/libEs5/utils/isBoolean.js +2 -3
- package/libEs5/utils/isEmptyObject.js +2 -3
- package/libEs5/utils/isFunction.js +2 -3
- package/libEs5/utils/isInteger.js +4 -3
- package/libEs5/utils/isNamespacedCookieName.js +2 -3
- package/libEs5/utils/isNil.js +2 -3
- package/libEs5/utils/isNonEmptyArray.js +2 -3
- package/libEs5/utils/isNonEmptyString.js +2 -3
- package/libEs5/utils/isNumber.js +2 -4
- package/libEs5/utils/isObject.js +3 -4
- package/libEs5/utils/isString.js +2 -3
- package/libEs5/utils/isUnique.js +6 -5
- package/libEs5/utils/isValidRegExp.js +3 -2
- package/libEs5/utils/memoize.js +7 -6
- package/libEs5/utils/noop.js +2 -1
- package/libEs5/utils/parseUrl.js +19 -25
- package/libEs5/utils/prepareConfigOverridesForEdge.js +6 -5
- package/libEs5/utils/request/createAddIdentity.js +4 -3
- package/libEs5/utils/request/createDataCollectionRequest.js +15 -11
- package/libEs5/utils/request/createDataCollectionRequestPayload.js +9 -10
- package/libEs5/utils/request/createGetAssuranceValidationTokenParams.js +17 -15
- package/libEs5/utils/request/createHasIdentity.js +4 -5
- package/libEs5/utils/request/createRequest.js +26 -23
- package/libEs5/utils/request/createRequestParams.js +13 -13
- package/libEs5/utils/request/createRequestPayload.js +13 -12
- package/libEs5/utils/request/index.js +8 -8
- package/libEs5/utils/sanitizeOrgIdForCookieName.js +2 -3
- package/libEs5/utils/stackError.js +8 -6
- package/libEs5/utils/stringToBoolean.js +3 -2
- package/libEs5/utils/toArray.js +3 -2
- package/libEs5/utils/toError.js +3 -2
- package/libEs5/utils/toISOStringLocal.js +29 -14
- package/libEs5/utils/toInteger.js +5 -5
- package/libEs5/utils/updateErrorMessage.js +6 -4
- package/libEs5/utils/validation/booleanValidator.js +3 -2
- package/libEs5/utils/validation/callbackValidator.js +3 -2
- package/libEs5/utils/validation/createAnyOfValidator.js +14 -17
- package/libEs5/utils/validation/createArrayOfValidator.js +16 -18
- package/libEs5/utils/validation/createDefaultValidator.js +7 -8
- package/libEs5/utils/validation/createDeprecatedValidator.js +12 -14
- package/libEs5/utils/validation/createLiteralValidator.js +5 -6
- package/libEs5/utils/validation/createMapOfValuesValidator.js +20 -22
- package/libEs5/utils/validation/createMaximumValidator.js +5 -6
- package/libEs5/utils/validation/createMinimumValidator.js +5 -6
- package/libEs5/utils/validation/createNoUnknownFieldsValidator.js +13 -14
- package/libEs5/utils/validation/createNonEmptyValidator.js +9 -10
- package/libEs5/utils/validation/createObjectOfValidator.js +27 -29
- package/libEs5/utils/validation/createRenamedValidator.js +24 -27
- package/libEs5/utils/validation/createUniqueItemsValidator.js +4 -3
- package/libEs5/utils/validation/createUniqueValidator.js +5 -4
- package/libEs5/utils/validation/domainValidator.js +4 -3
- package/libEs5/utils/validation/index.js +66 -72
- package/libEs5/utils/validation/integerValidator.js +3 -2
- package/libEs5/utils/validation/matchesRegexpValidator.js +5 -6
- package/libEs5/utils/validation/numberValidator.js +3 -2
- package/libEs5/utils/validation/regexpValidator.js +3 -2
- package/libEs5/utils/validation/requiredValidator.js +3 -2
- package/libEs5/utils/validation/stringValidator.js +3 -2
- package/libEs5/utils/validation/utils.js +29 -35
- package/libEs6/components/ActivityCollector/index.js +18 -8
- package/libEs6/components/Context/createComponent.js +1 -3
- package/libEs6/components/DecisioningEngine/createApplyResponse.js +1 -1
- package/libEs6/components/DecisioningEngine/createSubscribeRulesetItems.js +78 -28
- package/libEs6/components/DecisioningEngine/index.js +22 -2
- package/libEs6/components/DecisioningEngine/utils.js +2 -9
- package/libEs6/components/Identity/createComponent.js +4 -2
- package/libEs6/components/Identity/getEcidFromResponse.js +1 -3
- package/libEs6/components/LegacyMediaAnalytics/createGetInstance.js +2 -2
- package/libEs6/components/LibraryInfo/index.js +4 -5
- package/libEs6/components/Personalization/createActionsProvider.js +4 -2
- package/libEs6/components/Personalization/createComponent.js +2 -2
- package/libEs6/components/Personalization/createFetchDataHandler.js +35 -1
- package/libEs6/components/Personalization/createPersonalizationDetails.js +6 -6
- package/libEs6/components/Personalization/createViewCacheManager.js +5 -2
- package/libEs6/components/Personalization/createViewChangeHandler.js +11 -1
- package/libEs6/components/Personalization/dom-actions/createPreprocess.js +5 -2
- package/libEs6/components/Personalization/dom-actions/dom/selectNodesWithEq.js +1 -3
- package/libEs6/components/Personalization/dom-actions/remapCustomCodeOffers.js +6 -4
- package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +3 -2
- package/libEs6/components/Personalization/dom-actions/scripts.js +18 -2
- package/libEs6/components/Personalization/flicker/index.js +44 -30
- package/libEs6/components/Personalization/handlers/createDecorateProposition.js +2 -2
- package/libEs6/components/Personalization/handlers/createProcessPropositions.js +29 -9
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +9 -0
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +0 -3
- package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +8 -5
- package/libEs6/components/Personalization/in-app-message-actions/utils.js +2 -2
- package/libEs6/components/Personalization/index.js +9 -5
- package/libEs6/components/Personalization/utils/addRenderAttemptedToDecisions.js +4 -4
- package/libEs6/components/Personalization/utils/surfaceUtils.js +3 -3
- package/libEs6/constants/decisionProvider.js +1 -0
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/constants/schema.js +1 -1
- package/libEs6/core/buildAndValidateConfig.js +8 -5
- package/libEs6/core/componentCreators.js +14 -43
- package/libEs6/core/config/createConfig.js +3 -2
- package/libEs6/core/createCookieTransfer.js +1 -3
- package/libEs6/core/createInstanceFunction.js +1 -9
- package/libEs6/core/createLogger.js +17 -2
- package/libEs6/core/edgeNetwork/injectExtractEdgeInfo.js +1 -7
- package/libEs6/core/index.js +11 -10
- package/libEs6/core/injectCreateResponse.js +1 -3
- package/libEs6/core/network/isRequestRetryable.js +1 -2
- package/libEs6/core/network/requestMethods/injectSendFetchRequest.js +1 -2
- package/libEs6/{utils/assignIf.js → core/requiredComponentCreators.js} +4 -8
- package/libEs6/index.js +26 -6
- package/libEs6/standalone.js +7 -1
- package/libEs6/utils/areThirdPartyCookiesSupportedByDefault.js +1 -2
- package/libEs6/utils/assignConcatArrayValues.js +1 -2
- package/libEs6/utils/cookieJar.js +4 -4
- package/libEs6/{components/Personalization → utils}/createCollect.js +3 -3
- package/libEs6/utils/createSubscription.js +20 -3
- package/libEs6/utils/dom/querySelectorAll.js +1 -10
- package/libEs6/utils/dom/selectNodesWithShadow.js +2 -12
- package/libEs6/{components/Personalization → utils}/event.js +1 -1
- package/libEs6/utils/index.js +1 -10
- package/libEs6/utils/injectStorage.js +1 -2
- package/libEs6/utils/intersection.js +1 -4
- package/libEs6/utils/isNumber.js +1 -2
- package/libEs6/utils/toISOStringLocal.js +14 -1
- package/libEs6/utils/toInteger.js +1 -2
- package/libEs6/utils/validation/createAnyOfValidator.js +1 -2
- package/libEs6/utils/validation/utils.js +3 -6
- package/package.json +35 -37
- package/rollup.config.js +115 -7
- package/scripts/alloyBuilder.js +89 -55
- package/scripts/helpers/entryPointGeneratorBabelPlugin.js +39 -0
- package/libEs5/components/Personalization/createCollect.js +0 -53
- package/libEs5/components/Personalization/event.js +0 -49
- package/libEs5/core/network/requestMethods/injectSendXhrRequest.js +0 -50
- package/libEs5/utils/assign.js +0 -16
- package/libEs5/utils/assignIf.js +0 -21
- package/libEs5/utils/endsWith.js +0 -23
- package/libEs5/utils/find.js +0 -30
- package/libEs5/utils/flatMap.js +0 -17
- package/libEs5/utils/includes.js +0 -23
- package/libEs5/utils/padStart.js +0 -27
- package/libEs5/utils/startsWith.js +0 -23
- package/libEs5/utils/values.js +0 -25
- package/libEs6/core/network/requestMethods/injectSendXhrRequest.js +0 -49
- package/libEs6/utils/assign.js +0 -14
- package/libEs6/utils/endsWith.js +0 -19
- package/libEs6/utils/find.js +0 -28
- package/libEs6/utils/flatMap.js +0 -14
- package/libEs6/utils/includes.js +0 -21
- package/libEs6/utils/padStart.js +0 -25
- package/libEs6/utils/startsWith.js +0 -19
- package/libEs6/utils/values.js +0 -21
- package/scripts/helpers/alloyComponents.js +0 -63
- package/scripts/helpers/conditionalBuildBabelPlugin.js +0 -57
|
@@ -13,8 +13,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const DISPLAY = exports.DISPLAY = "decisioning.propositionDisplay";
|
|
17
|
+
const INTERACT = exports.INTERACT = "decisioning.propositionInteract";
|
|
18
|
+
const TRIGGER = exports.TRIGGER = "decisioning.propositionTrigger";
|
|
19
|
+
const DISMISS = exports.DISMISS = "decisioning.propositionDismiss";
|
|
20
|
+
const EVENT_TYPE_TRUE = exports.EVENT_TYPE_TRUE = 1;
|
|
@@ -12,4 +12,4 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
12
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
const PERSONALIZATION_DECISIONS_HANDLE = exports.PERSONALIZATION_DECISIONS_HANDLE = "personalization:decisions";
|
|
@@ -13,5 +13,5 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const RETRY_AFTER = exports.RETRY_AFTER = "Retry-After";
|
|
17
|
+
const ADOBE_EDGE = exports.ADOBE_EDGE = "x-adobe-edge";
|
|
@@ -13,8 +13,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const NO_CONTENT = exports.NO_CONTENT = 204;
|
|
17
|
+
const TOO_MANY_REQUESTS = exports.TOO_MANY_REQUESTS = 429;
|
|
18
|
+
const BAD_GATEWAY = exports.BAD_GATEWAY = 502;
|
|
19
|
+
const SERVICE_UNAVAILABLE = exports.SERVICE_UNAVAILABLE = 503;
|
|
20
|
+
const GATEWAY_TIMEOUT = exports.GATEWAY_TIMEOUT = 504;
|
|
@@ -12,6 +12,6 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
12
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const AMBIGUOUS = exports.AMBIGUOUS = "ambiguous";
|
|
16
|
+
const AUTHENTICATED = exports.AUTHENTICATED = "authenticated";
|
|
17
|
+
const LOGGED_OUT = exports.LOGGED_OUT = "loggedOut";
|
|
@@ -13,6 +13,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const MBOX_EDGE_CLUSTER = exports.MBOX_EDGE_CLUSTER = "mboxEdgeCluster";
|
|
17
|
+
const AT_QA_MODE = exports.AT_QA_MODE = "at_qa_mode";
|
|
18
|
+
const MBOX = exports.MBOX = "mbox";
|
|
@@ -14,4 +14,4 @@ governing permissions and limitations under the License.
|
|
|
14
14
|
*/
|
|
15
15
|
// The __VERSION__ keyword will be replace at alloy build time with the package.json version.
|
|
16
16
|
// see babel-plugin-version
|
|
17
|
-
var _default = exports.default = "2.
|
|
17
|
+
var _default = exports.default = "2.22.0-alpha.1";
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.getPropositionEventType = exports.getEventType = exports.PropositionEventType = void 0;
|
|
4
4
|
var _eventType = require("./eventType.js");
|
|
5
|
-
|
|
6
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
-
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); } /*
|
|
5
|
+
/*
|
|
9
6
|
Copyright 2022 Adobe. All rights reserved.
|
|
10
7
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11
8
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -16,17 +13,26 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
16
13
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
17
14
|
governing permissions and limitations under the License.
|
|
18
15
|
*/
|
|
19
|
-
|
|
16
|
+
|
|
17
|
+
const PropositionEventType = exports.PropositionEventType = {
|
|
20
18
|
DISPLAY: "display",
|
|
21
19
|
INTERACT: "interact",
|
|
22
20
|
TRIGGER: "trigger",
|
|
23
21
|
DISMISS: "dismiss"
|
|
24
22
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
const eventTypeToPropositionEventTypeMapping = {
|
|
24
|
+
[_eventType.DISPLAY]: PropositionEventType.DISPLAY,
|
|
25
|
+
[_eventType.INTERACT]: PropositionEventType.INTERACT,
|
|
26
|
+
[_eventType.TRIGGER]: PropositionEventType.TRIGGER,
|
|
27
|
+
[_eventType.DISMISS]: PropositionEventType.DISMISS
|
|
28
|
+
};
|
|
29
|
+
const propositionEventTypeToEventTypeMapping = {
|
|
30
|
+
[PropositionEventType.DISPLAY]: _eventType.DISPLAY,
|
|
31
|
+
[PropositionEventType.INTERACT]: _eventType.INTERACT,
|
|
32
|
+
[PropositionEventType.TRIGGER]: _eventType.TRIGGER,
|
|
33
|
+
[PropositionEventType.DISMISS]: _eventType.DISMISS
|
|
29
34
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
const getPropositionEventType = eventType => eventTypeToPropositionEventTypeMapping[eventType];
|
|
36
|
+
exports.getPropositionEventType = getPropositionEventType;
|
|
37
|
+
const getEventType = propositionEventType => propositionEventTypeToEventTypeMapping[propositionEventType];
|
|
38
|
+
exports.getEventType = getEventType;
|
|
@@ -12,7 +12,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
12
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const ALWAYS = exports.ALWAYS = "always";
|
|
16
|
+
const NEVER = exports.NEVER = "never";
|
|
17
|
+
const DECORATED_ELEMENTS_ONLY = exports.DECORATED_ELEMENTS_ONLY = "decoratedElementsOnly";
|
|
18
|
+
const PROPOSITION_INTERACTION_TYPES = exports.PROPOSITION_INTERACTION_TYPES = [ALWAYS, NEVER, DECORATED_ELEMENTS_ONLY];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports.RULESET_ITEM = exports.REDIRECT_ITEM = exports.MESSAGE_NATIVE_ALERT = exports.MESSAGE_IN_APP = exports.
|
|
3
|
+
exports.RULESET_ITEM = exports.REDIRECT_ITEM = exports.MESSAGE_NATIVE_ALERT = exports.MESSAGE_IN_APP = exports.MESSAGE_CONTENT_CARD = exports.MEASUREMENT_SCHEMA = exports.JSON_CONTENT_ITEM = exports.HTML_CONTENT_ITEM = exports.DOM_ACTION = exports.DEFAULT_CONTENT_ITEM = void 0;
|
|
4
4
|
/*
|
|
5
5
|
Copyright 2019 Adobe. All rights reserved.
|
|
6
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -13,13 +13,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
const DEFAULT_CONTENT_ITEM = exports.DEFAULT_CONTENT_ITEM = "https://ns.adobe.com/personalization/default-content-item";
|
|
17
|
+
const DOM_ACTION = exports.DOM_ACTION = "https://ns.adobe.com/personalization/dom-action";
|
|
18
|
+
const HTML_CONTENT_ITEM = exports.HTML_CONTENT_ITEM = "https://ns.adobe.com/personalization/html-content-item";
|
|
19
|
+
const JSON_CONTENT_ITEM = exports.JSON_CONTENT_ITEM = "https://ns.adobe.com/personalization/json-content-item";
|
|
20
|
+
const RULESET_ITEM = exports.RULESET_ITEM = "https://ns.adobe.com/personalization/ruleset-item";
|
|
21
|
+
const REDIRECT_ITEM = exports.REDIRECT_ITEM = "https://ns.adobe.com/personalization/redirect-item";
|
|
22
|
+
const MESSAGE_IN_APP = exports.MESSAGE_IN_APP = "https://ns.adobe.com/personalization/message/in-app";
|
|
23
|
+
const MESSAGE_CONTENT_CARD = exports.MESSAGE_CONTENT_CARD = "https://ns.adobe.com/personalization/message/content-card";
|
|
24
|
+
const MESSAGE_NATIVE_ALERT = exports.MESSAGE_NATIVE_ALERT = "https://ns.adobe.com/personalization/message/native-alert";
|
|
25
|
+
const MEASUREMENT_SCHEMA = exports.MEASUREMENT_SCHEMA = "https://ns.adobe.com/personalization/measurement";
|
|
@@ -12,4 +12,4 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
12
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
const CLICK_ACTIVITY_DATA = exports.CLICK_ACTIVITY_DATA = "clickData";
|
|
@@ -13,10 +13,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
13
13
|
governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const BODY = exports.BODY = "BODY";
|
|
17
|
+
const IFRAME = exports.IFRAME = "IFRAME";
|
|
18
|
+
const IMG = exports.IMG = "IMG";
|
|
19
|
+
const DIV = exports.DIV = "DIV";
|
|
20
|
+
const STYLE = exports.STYLE = "STYLE";
|
|
21
|
+
const SCRIPT = exports.SCRIPT = "SCRIPT";
|
|
22
|
+
const HEAD = exports.HEAD = "HEAD";
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
exports.default = void 0;
|
|
5
|
-
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
-
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); }
|
|
11
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
15
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
16
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /*
|
|
4
|
+
/*
|
|
17
5
|
Copyright 2019 Adobe. All rights reserved.
|
|
18
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
7
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -24,82 +12,78 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
24
12
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
13
|
governing permissions and limitations under the License.
|
|
26
14
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
|
|
16
|
+
const CONFIG_DOC_URI = "https://adobe.ly/3sHh553";
|
|
17
|
+
const transformOptions = ({
|
|
18
|
+
combinedConfigValidator,
|
|
19
|
+
options,
|
|
20
|
+
logger
|
|
21
|
+
}) => {
|
|
32
22
|
try {
|
|
33
|
-
|
|
23
|
+
const validator = combinedConfigValidator.noUnknownFields().required();
|
|
34
24
|
return validator.call({
|
|
35
|
-
logger
|
|
25
|
+
logger
|
|
36
26
|
}, options);
|
|
37
27
|
} catch (e) {
|
|
38
28
|
throw new Error("Resolve these configuration problems:\n\t - " + e.message.split("\n").join("\n\t - ") + "\nFor configuration documentation see: " + CONFIG_DOC_URI);
|
|
39
29
|
}
|
|
40
30
|
};
|
|
41
|
-
|
|
42
|
-
return componentCreators.reduce(
|
|
43
|
-
|
|
31
|
+
const buildAllOnInstanceConfiguredExtraParams = (config, logger, componentCreators) => {
|
|
32
|
+
return componentCreators.reduce((memo, {
|
|
33
|
+
buildOnInstanceConfiguredExtraParams
|
|
34
|
+
}) => {
|
|
44
35
|
if (buildOnInstanceConfiguredExtraParams) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
memo = {
|
|
37
|
+
...memo,
|
|
38
|
+
...buildOnInstanceConfiguredExtraParams({
|
|
39
|
+
config,
|
|
40
|
+
logger
|
|
41
|
+
})
|
|
42
|
+
};
|
|
49
43
|
}
|
|
50
44
|
return memo;
|
|
51
45
|
}, {});
|
|
52
46
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
const wrapLoggerInQueue = logger => {
|
|
48
|
+
const queue = [];
|
|
49
|
+
const queuedLogger = {
|
|
56
50
|
get enabled() {
|
|
57
51
|
return logger.enabled;
|
|
58
52
|
},
|
|
59
|
-
flush
|
|
60
|
-
queue.forEach(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
});
|
|
53
|
+
flush() {
|
|
54
|
+
queue.forEach(({
|
|
55
|
+
method,
|
|
56
|
+
args
|
|
57
|
+
}) => logger[method](...args));
|
|
65
58
|
}
|
|
66
59
|
};
|
|
67
|
-
Object.keys(logger).filter(
|
|
68
|
-
|
|
69
|
-
}).forEach(function (method) {
|
|
70
|
-
queuedLogger[method] = function () {
|
|
71
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
72
|
-
args[_key] = arguments[_key];
|
|
73
|
-
}
|
|
60
|
+
Object.keys(logger).filter(key => typeof logger[key] === "function").forEach(method => {
|
|
61
|
+
queuedLogger[method] = (...args) => {
|
|
74
62
|
queue.push({
|
|
75
|
-
method
|
|
76
|
-
args
|
|
63
|
+
method,
|
|
64
|
+
args
|
|
77
65
|
});
|
|
78
66
|
};
|
|
79
67
|
});
|
|
80
68
|
return queuedLogger;
|
|
81
69
|
};
|
|
82
|
-
var _default =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
var _default = ({
|
|
71
|
+
options,
|
|
72
|
+
componentCreators,
|
|
73
|
+
coreConfigValidators,
|
|
74
|
+
createConfig,
|
|
75
|
+
logger,
|
|
76
|
+
setDebugEnabled
|
|
77
|
+
}) => {
|
|
89
78
|
// We wrap the logger in a queue in case debugEnabled is set in the config
|
|
90
79
|
// but we need to log something before the config is created.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return validator.concat(configValidators);
|
|
99
|
-
}, coreConfigValidators);
|
|
100
|
-
var config = createConfig(transformOptions({
|
|
101
|
-
combinedConfigValidator: combinedConfigValidator,
|
|
102
|
-
options: options,
|
|
80
|
+
const queuedLogger = wrapLoggerInQueue(logger);
|
|
81
|
+
const combinedConfigValidator = componentCreators.map(({
|
|
82
|
+
configValidators
|
|
83
|
+
}) => configValidators).filter(configValidators => configValidators).reduce((validator, configValidators) => validator.concat(configValidators), coreConfigValidators);
|
|
84
|
+
const config = createConfig(transformOptions({
|
|
85
|
+
combinedConfigValidator,
|
|
86
|
+
options,
|
|
103
87
|
logger: queuedLogger
|
|
104
88
|
}));
|
|
105
89
|
setDebugEnabled(config.debugEnabled, {
|
|
@@ -107,9 +91,11 @@ var _default = exports.default = function _default(_ref4) {
|
|
|
107
91
|
});
|
|
108
92
|
queuedLogger.flush();
|
|
109
93
|
// eslint-disable-next-line no-underscore-dangle
|
|
110
|
-
|
|
111
|
-
logger.logOnInstanceConfigured(
|
|
112
|
-
|
|
113
|
-
|
|
94
|
+
const extraParams = buildAllOnInstanceConfiguredExtraParams(config, logger, componentCreators);
|
|
95
|
+
logger.logOnInstanceConfigured({
|
|
96
|
+
...extraParams,
|
|
97
|
+
config
|
|
98
|
+
});
|
|
114
99
|
return config;
|
|
115
|
-
};
|
|
100
|
+
};
|
|
101
|
+
exports.default = _default;
|
|
@@ -1,43 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
3
|
+
Object.defineProperty(exports, "activityCollector", {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: function () {
|
|
6
|
+
return _index.default;
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(exports, "audiences", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _index2.default;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "context", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _index3.default;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "decisioningEngine", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _index4.default;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "eventMerge", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _index5.default;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "legacyMediaAnalytics", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _index6.default;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "machineLearning", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return _index7.default;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "personalization", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () {
|
|
48
|
+
return _index8.default;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "privacy", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _index9.default;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "streamingMedia", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return _index10.default;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
var _index = require("../components/ActivityCollector/index.js");
|
|
64
|
+
var _index2 = require("../components/Audiences/index.js");
|
|
65
|
+
var _index3 = require("../components/Context/index.js");
|
|
66
|
+
var _index4 = require("../components/DecisioningEngine/index.js");
|
|
67
|
+
var _index5 = require("../components/EventMerge/index.js");
|
|
68
|
+
var _index6 = require("../components/LegacyMediaAnalytics/index.js");
|
|
69
|
+
var _index7 = require("../components/MachineLearning/index.js");
|
|
70
|
+
var _index8 = require("../components/Personalization/index.js");
|
|
71
|
+
var _index9 = require("../components/Privacy/index.js");
|
|
72
|
+
var _index10 = require("../components/StreamingMedia/index.js");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.default = void 0;
|
|
4
|
-
var _index = require("../../utils/index.js");
|
|
5
4
|
/*
|
|
6
5
|
Copyright 2019 Adobe. All rights reserved.
|
|
7
6
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -14,7 +13,9 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
14
13
|
governing permissions and limitations under the License.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
return
|
|
16
|
+
const createConfig = options => {
|
|
17
|
+
return {
|
|
18
|
+
...options
|
|
19
|
+
};
|
|
19
20
|
};
|
|
20
21
|
var _default = exports.default = createConfig;
|
|
@@ -17,15 +17,14 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
17
17
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
18
|
governing permissions and limitations under the License.
|
|
19
19
|
*/
|
|
20
|
-
var _default =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
20
|
+
var _default = () => (0, _index.objectOf)({
|
|
21
|
+
debugEnabled: (0, _index.boolean)().default(false),
|
|
22
|
+
defaultConsent: (0, _index.enumOf)(_consentStatus.IN, _consentStatus.OUT, _consentStatus.PENDING).default(_consentStatus.IN),
|
|
23
|
+
datastreamId: (0, _index.string)().unique().required(),
|
|
24
|
+
edgeDomain: (0, _index.string)().domain().default(_domain.EDGE),
|
|
25
|
+
edgeBasePath: (0, _index.string)().nonEmpty().default(_edgeBasePath.default),
|
|
26
|
+
orgId: (0, _index.string)().unique().required(),
|
|
27
|
+
onBeforeEventSend: (0, _index.callback)().default(_index2.noop),
|
|
28
|
+
edgeConfigOverrides: _index2.validateConfigOverride
|
|
29
|
+
}).renamed("edgeConfigId", (0, _index.string)().unique(), "datastreamId");
|
|
30
|
+
exports.default = _default;
|
|
@@ -15,10 +15,11 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
15
15
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
16
|
governing permissions and limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
var _default =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
var _default = ({
|
|
19
|
+
generalConsentState,
|
|
20
|
+
logger
|
|
21
|
+
}) => {
|
|
22
|
+
const setConsent = (consentByPurpose, source) => {
|
|
22
23
|
switch (consentByPurpose[_consentPurpose.GENERAL]) {
|
|
23
24
|
case _consentStatus.IN:
|
|
24
25
|
generalConsentState.in(source);
|
|
@@ -35,27 +36,28 @@ var _default = exports.default = function _default(_ref) {
|
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
return {
|
|
38
|
-
initializeConsent
|
|
39
|
+
initializeConsent(defaultConsentByPurpose, storedConsentByPurpose) {
|
|
39
40
|
if (storedConsentByPurpose[_consentPurpose.GENERAL]) {
|
|
40
|
-
|
|
41
|
+
setConsent(storedConsentByPurpose, _createConsentStateMachine.CONSENT_SOURCE_INITIAL);
|
|
41
42
|
} else {
|
|
42
|
-
|
|
43
|
+
setConsent(defaultConsentByPurpose, _createConsentStateMachine.CONSENT_SOURCE_DEFAULT);
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
|
-
setConsent
|
|
46
|
-
|
|
46
|
+
setConsent(consentByPurpose) {
|
|
47
|
+
setConsent(consentByPurpose, _createConsentStateMachine.CONSENT_SOURCE_NEW);
|
|
47
48
|
},
|
|
48
|
-
suspend
|
|
49
|
+
suspend() {
|
|
49
50
|
generalConsentState.pending();
|
|
50
51
|
},
|
|
51
|
-
awaitConsent
|
|
52
|
+
awaitConsent() {
|
|
52
53
|
return generalConsentState.awaitConsent();
|
|
53
54
|
},
|
|
54
|
-
withConsent
|
|
55
|
+
withConsent() {
|
|
55
56
|
return generalConsentState.withConsent();
|
|
56
57
|
},
|
|
57
|
-
current
|
|
58
|
+
current() {
|
|
58
59
|
return generalConsentState.current();
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
|
-
};
|
|
62
|
+
};
|
|
63
|
+
exports.default = _default;
|