@adobe/alloy 2.20.0-alpha.1 → 2.20.0-beta.0
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 +2 -3
- package/libEs5/components/ActivityCollector/attachClickActivityCollector.js +2 -3
- package/libEs5/components/ActivityCollector/configValidators.js +3 -5
- package/libEs5/components/ActivityCollector/createGetLinkDetails.js +2 -3
- package/libEs5/components/ActivityCollector/createLinkClick.js +2 -3
- package/libEs5/components/ActivityCollector/getLinkName.js +2 -3
- package/libEs5/components/ActivityCollector/getLinkRegion.js +2 -3
- package/libEs5/components/ActivityCollector/index.js +1 -2
- package/libEs5/components/ActivityCollector/utils.js +11 -21
- package/libEs5/components/Audiences/index.js +1 -2
- package/libEs5/components/Audiences/injectProcessDestinations.js +18 -16
- package/libEs5/components/Audiences/injectProcessResponse.js +2 -3
- package/libEs5/components/Context/createComponent.js +2 -3
- package/libEs5/components/Context/implementationDetails.js +2 -3
- package/libEs5/components/Context/index.js +17 -15
- package/libEs5/components/Context/injectDevice.js +2 -3
- package/libEs5/components/Context/injectEnvironment.js +6 -7
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +15 -16
- package/libEs5/components/Context/injectPlaceContext.js +2 -3
- package/libEs5/components/Context/injectTimestamp.js +2 -3
- package/libEs5/components/Context/injectWeb.js +2 -3
- package/libEs5/components/DataCollector/index.js +1 -2
- package/libEs5/components/DataCollector/validateApplyResponse.js +2 -3
- package/libEs5/components/DataCollector/validateUserEventOptions.js +2 -3
- package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +2 -3
- package/libEs5/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +2 -3
- package/libEs5/components/DecisioningEngine/constants.js +4 -7
- package/libEs5/components/DecisioningEngine/createApplyResponse.js +2 -3
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +17 -16
- package/libEs5/components/DecisioningEngine/createContextProvider.js +18 -16
- package/libEs5/components/DecisioningEngine/createDecisionHistory.js +2 -3
- package/libEs5/components/DecisioningEngine/createDecisionProvider.js +2 -3
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +18 -16
- package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +2 -3
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +20 -20
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +18 -16
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +18 -16
- package/libEs5/components/DecisioningEngine/index.js +19 -19
- package/libEs5/components/DecisioningEngine/utils.js +10 -18
- package/libEs5/components/EventMerge/createComponent.js +2 -3
- package/libEs5/components/EventMerge/createEventMergeId.js +2 -3
- package/libEs5/components/EventMerge/index.js +1 -2
- package/libEs5/components/Identity/addEcidQueryToPayload.js +2 -3
- package/libEs5/components/Identity/addEcidToPayload.js +2 -3
- package/libEs5/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +2 -3
- package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +4 -5
- package/libEs5/components/Identity/configValidators.js +1 -2
- package/libEs5/components/Identity/constants/authState.js +3 -6
- package/libEs5/components/Identity/constants/defaultIdSyncTtlMinutes.js +1 -2
- package/libEs5/components/Identity/createComponent.js +2 -3
- package/libEs5/components/Identity/createLegacyIdentity.js +8 -6
- package/libEs5/components/Identity/getEcidFromResponse.js +2 -3
- package/libEs5/components/Identity/getIdentity/createGetIdentity.js +2 -3
- package/libEs5/components/Identity/getIdentity/createIdentityRequest.js +2 -3
- package/libEs5/components/Identity/getIdentity/createIdentityRequestPayload.js +2 -3
- package/libEs5/components/Identity/getIdentity/getIdentityOptionsValidator.js +2 -3
- package/libEs5/components/Identity/index.js +3 -3
- package/libEs5/components/Identity/injectAddLegacyEcidToPayload.js +2 -3
- package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +18 -15
- package/libEs5/components/Identity/injectAwaitIdentityCookie.js +9 -14
- package/libEs5/components/Identity/injectEnsureSingleIdentity.js +8 -6
- package/libEs5/components/Identity/injectHandleResponseForIdSyncs.js +2 -3
- package/libEs5/components/Identity/injectProcessIdSyncs.js +2 -3
- package/libEs5/components/Identity/injectSetDomainForInitialIdentityPayload.js +2 -3
- package/libEs5/components/Identity/visitorService/awaitVisitorOptIn.js +2 -3
- package/libEs5/components/Identity/visitorService/getVisitor.js +2 -3
- package/libEs5/components/Identity/visitorService/injectGetEcidFromVisitor.js +2 -3
- package/libEs5/components/LegacyMediaAnalytics/{media → constants}/constants.js +15 -25
- package/libEs5/components/LegacyMediaAnalytics/{media → constants}/mediaKeysToXdmConverter.js +3 -5
- package/libEs5/components/LegacyMediaAnalytics/createGetInstance.js +246 -0
- package/libEs5/components/LegacyMediaAnalytics/createLegacyMediaComponent.js +87 -0
- package/libEs5/components/LegacyMediaAnalytics/createMediaHelper.js +7 -14
- package/libEs5/components/LegacyMediaAnalytics/index.js +43 -20
- package/libEs5/components/LibraryInfo/index.js +21 -17
- package/libEs5/components/MachineLearning/index.js +1 -2
- package/libEs5/components/MachineLearning/processResponse.js +2 -3
- package/libEs5/components/Personalization/constants/loggerMessage.js +2 -4
- package/libEs5/components/Personalization/constants/scopeType.js +3 -6
- package/libEs5/components/Personalization/constants/surface.js +4 -8
- package/libEs5/components/Personalization/createActionsProvider.js +2 -3
- package/libEs5/components/Personalization/createApplyPropositions.js +19 -17
- package/libEs5/components/Personalization/createClickStorage.js +8 -6
- package/libEs5/components/Personalization/createCollect.js +2 -3
- package/libEs5/components/Personalization/createComponent.js +7 -4
- package/libEs5/components/Personalization/createFetchDataHandler.js +28 -20
- package/libEs5/components/Personalization/createGetPageLocation.js +2 -3
- package/libEs5/{utils/debounce.js → components/Personalization/createHandleConsentFlicker.js} +13 -14
- package/libEs5/components/Personalization/createNotificationHandler.js +10 -5
- package/libEs5/components/Personalization/createOnClickHandler.js +2 -3
- package/libEs5/components/Personalization/createOnDecisionHandler.js +3 -4
- package/libEs5/components/Personalization/createPersonalizationDetails.js +13 -14
- package/libEs5/components/Personalization/createPreprocessors.js +16 -14
- package/libEs5/components/Personalization/createSetTargetMigration.js +2 -3
- package/libEs5/components/Personalization/createViewCacheManager.js +2 -3
- package/libEs5/components/Personalization/createViewChangeHandler.js +2 -3
- package/libEs5/components/Personalization/dom-actions/action.js +2 -3
- package/libEs5/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +2 -3
- package/libEs5/components/Personalization/dom-actions/appendHtml.js +2 -3
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +3 -4
- package/libEs5/components/Personalization/dom-actions/createPreprocess.js +2 -3
- package/libEs5/components/Personalization/dom-actions/createRedirect.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/createFragment.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getAttribute.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getChildNodes.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getChildren.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getElementById.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getFirstChild.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getNextSibling.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/getNonce.js +3 -5
- package/libEs5/components/Personalization/dom-actions/dom/getParent.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/helperForEq.js +3 -5
- package/libEs5/components/Personalization/dom-actions/dom/insertAfter.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/insertBefore.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/removeAttribute.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +16 -19
- package/libEs5/components/Personalization/dom-actions/dom/setAttribute.js +2 -3
- package/libEs5/components/Personalization/dom-actions/dom/setStyle.js +2 -3
- package/libEs5/components/Personalization/dom-actions/images.js +4 -7
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +2 -3
- package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +2 -3
- package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +2 -3
- package/libEs5/components/Personalization/dom-actions/prependHtml.js +2 -3
- package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +2 -3
- package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +2 -3
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +2 -3
- package/libEs5/components/Personalization/dom-actions/replaceHtml.js +2 -3
- package/libEs5/components/Personalization/dom-actions/scripts.js +22 -24
- package/libEs5/components/Personalization/dom-actions/setAttributes.js +2 -3
- package/libEs5/components/Personalization/dom-actions/setHtml.js +2 -3
- package/libEs5/components/Personalization/dom-actions/setStyles.js +2 -3
- package/libEs5/components/Personalization/dom-actions/setText.js +2 -3
- package/libEs5/components/Personalization/dom-actions/swapImage.js +2 -3
- package/libEs5/components/Personalization/event.js +19 -18
- package/libEs5/components/Personalization/flicker/index.js +21 -22
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +8 -6
- package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +2 -3
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +18 -16
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +3 -4
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +2 -4
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +24 -22
- package/libEs5/components/Personalization/handlers/processDefaultContent.js +2 -3
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +25 -29
- package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +2 -3
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +3 -5
- package/libEs5/components/Personalization/index.js +31 -22
- package/libEs5/components/Personalization/utils/addRenderAttemptedToDecisions.js +2 -3
- package/libEs5/components/Personalization/utils/createAsyncArray.js +2 -3
- package/libEs5/components/Personalization/utils/isAuthoringModeEnabled.js +2 -3
- package/libEs5/components/Personalization/utils/surfaceUtils.js +4 -7
- package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +3 -5
- package/libEs5/components/Privacy/computeConsentHash.js +13 -14
- package/libEs5/components/Privacy/createComponent.js +16 -14
- package/libEs5/components/Privacy/createConsentHashStore.js +2 -3
- package/libEs5/components/Privacy/createConsentRequest.js +2 -3
- package/libEs5/components/Privacy/createConsentRequestPayload.js +2 -3
- package/libEs5/components/Privacy/createStoredConsent.js +2 -3
- package/libEs5/components/Privacy/index.js +1 -2
- package/libEs5/components/Privacy/injectSendSetConsentRequest.js +2 -3
- package/libEs5/components/Privacy/parseConsentCookie.js +4 -5
- package/libEs5/components/Privacy/validateSetConsentOptions.js +2 -3
- package/libEs5/components/StreamingMedia/configValidators.js +24 -0
- package/libEs5/components/{MediaCollection → StreamingMedia}/constants/eventTypes.js +14 -5
- package/{libEs6/utils/debounce.js → libEs5/components/StreamingMedia/constants/playbackState.js} +9 -12
- package/libEs5/components/{MediaCollection → StreamingMedia}/createMediaEventManager.js +27 -24
- package/libEs5/components/{MediaCollection → StreamingMedia}/createMediaRequest.js +2 -3
- package/libEs5/components/StreamingMedia/createMediaResponseHandler.js +57 -0
- package/libEs5/components/{MediaCollection → StreamingMedia}/createMediaSessionCacheManager.js +21 -25
- 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/{MediaCollection → StreamingMedia}/validateMediaSessionOptions.js +3 -4
- package/libEs5/constants/apiVersion.js +1 -2
- package/libEs5/constants/browser.js +7 -14
- package/libEs5/constants/consentPurpose.js +1 -2
- package/libEs5/constants/consentStatus.js +3 -6
- package/libEs5/constants/contentType.js +2 -4
- package/libEs5/constants/cookieNameKey.js +3 -6
- package/libEs5/constants/cookieNamePrefix.js +1 -2
- package/libEs5/constants/coreCommands.js +2 -4
- package/libEs5/constants/debugQueryParam.js +1 -2
- package/libEs5/constants/decisionProvider.js +1 -2
- package/libEs5/constants/domain.js +2 -4
- package/libEs5/constants/ecidNamespace.js +1 -2
- package/libEs5/constants/edgeBasePath.js +1 -2
- package/libEs5/constants/elementAttribute.js +1 -2
- package/libEs5/constants/eventType.js +5 -10
- package/libEs5/constants/handle.js +1 -2
- package/libEs5/constants/highEntropyUserAgentClientHints.js +1 -2
- package/libEs5/constants/httpHeaderNames.js +2 -4
- package/libEs5/constants/httpStatusCode.js +5 -10
- package/libEs5/constants/identityMapAuthenticatedState.js +3 -6
- package/libEs5/constants/legacyCookies.js +3 -6
- package/libEs5/constants/libraryName.js +1 -2
- package/libEs5/constants/libraryVersion.js +1 -2
- package/libEs5/constants/namespace.js +1 -2
- package/libEs5/constants/pageWideScope.js +1 -2
- package/libEs5/constants/propositionEventType.js +20 -21
- package/libEs5/constants/queryStringIdentityParam.js +1 -2
- package/libEs5/constants/schema.js +10 -20
- package/libEs5/constants/shadowSeparator.js +1 -2
- package/libEs5/constants/tagName.js +7 -14
- package/libEs5/core/buildAndValidateConfig.js +19 -17
- package/libEs5/core/componentCreators.js +9 -4
- package/libEs5/core/config/createConfig.js +1 -2
- package/libEs5/core/config/createCoreConfigs.js +2 -3
- package/libEs5/core/consent/createConsent.js +5 -3
- package/libEs5/core/consent/createConsentStateMachine.js +41 -13
- package/libEs5/core/createComponentRegistry.js +5 -3
- package/libEs5/core/createCookieTransfer.js +2 -3
- package/libEs5/core/createEvent.js +13 -14
- package/libEs5/core/createEventManager.js +8 -6
- package/libEs5/core/createInstanceFunction.js +2 -3
- package/libEs5/core/createLifecycle.js +2 -3
- package/libEs5/core/createLogController.js +2 -3
- package/libEs5/core/createLogger.js +2 -3
- package/libEs5/core/edgeNetwork/handleRequestFailure.js +2 -3
- package/libEs5/core/edgeNetwork/injectApplyResponse.js +2 -3
- package/libEs5/core/edgeNetwork/injectExtractEdgeInfo.js +2 -3
- package/libEs5/core/edgeNetwork/injectGetLocationHint.js +2 -3
- package/libEs5/core/edgeNetwork/injectProcessWarningsAndErrors.js +2 -3
- package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +2 -3
- package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +13 -14
- package/libEs5/core/index.js +3 -5
- package/libEs5/core/initializeComponents.js +2 -3
- package/libEs5/core/injectCreateResponse.js +2 -3
- package/libEs5/core/injectExecuteCommand.js +2 -3
- package/libEs5/core/injectHandleError.js +2 -3
- package/libEs5/core/injectShouldTransferCookie.js +2 -3
- package/libEs5/core/network/getRequestRetryDelay.js +2 -3
- package/libEs5/core/network/injectSendNetworkRequest.js +18 -16
- package/libEs5/core/network/isRequestRetryable.js +2 -3
- package/libEs5/core/network/requestMethods/injectSendBeaconRequest.js +2 -3
- package/libEs5/core/network/requestMethods/injectSendFetchRequest.js +2 -3
- package/libEs5/core/network/requestMethods/injectSendXhrRequest.js +2 -3
- package/libEs5/core/validateCommandOptions.js +2 -3
- package/libEs5/index.js +2 -3
- package/libEs5/utils/areThirdPartyCookiesSupportedByDefault.js +2 -3
- package/libEs5/utils/assign.js +1 -2
- package/libEs5/utils/assignConcatArrayValues.js +13 -14
- package/libEs5/utils/assignIf.js +2 -3
- package/libEs5/utils/clone.js +2 -3
- package/libEs5/utils/cookieJar.js +2 -3
- package/libEs5/utils/crc32.js +1 -2
- package/libEs5/utils/createCallbackAggregator.js +2 -3
- package/libEs5/utils/createLoggingCookieJar.js +8 -6
- package/libEs5/utils/createMerger.js +2 -3
- package/libEs5/utils/createSubscription.js +12 -13
- package/libEs5/utils/createTaskQueue.js +2 -3
- package/libEs5/utils/deduplicateArray.js +2 -3
- package/libEs5/utils/deepAssign.js +2 -3
- package/libEs5/utils/defer.js +2 -3
- package/libEs5/utils/dom/appendNode.js +2 -3
- package/libEs5/utils/dom/awaitSelector.js +7 -13
- package/libEs5/utils/dom/createNode.js +2 -3
- package/libEs5/utils/dom/isShadowSelector.js +2 -3
- package/libEs5/utils/dom/matchesSelector.js +2 -3
- package/libEs5/utils/dom/querySelectorAll.js +2 -3
- package/libEs5/utils/dom/removeNode.js +2 -3
- package/libEs5/utils/dom/selectNodes.js +2 -3
- package/libEs5/utils/dom/selectNodesWithShadow.js +2 -3
- package/libEs5/utils/endsWith.js +2 -3
- package/libEs5/utils/filterObject.js +17 -15
- package/libEs5/utils/find.js +2 -3
- package/libEs5/utils/fireImage.js +2 -3
- package/libEs5/utils/flatMap.js +2 -3
- package/libEs5/utils/flattenArray.js +2 -3
- package/libEs5/utils/flattenObject.js +4 -5
- package/libEs5/utils/getApexDomain.js +2 -3
- package/libEs5/utils/getBrowser.js +17 -16
- package/libEs5/utils/getLastArrayItems.js +2 -3
- package/libEs5/utils/getNamespacedCookieName.js +2 -3
- package/libEs5/utils/groupBy.js +2 -3
- package/libEs5/utils/includes.js +2 -3
- package/libEs5/utils/injectDoesIdentityCookieExist.js +2 -3
- package/libEs5/utils/injectFireReferrerHideableImage.js +14 -15
- package/libEs5/utils/injectStorage.js +2 -3
- package/libEs5/utils/intersection.js +2 -3
- 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 +2 -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 -3
- package/libEs5/utils/isObject.js +13 -14
- package/libEs5/utils/isString.js +2 -3
- package/libEs5/utils/isUnique.js +2 -3
- package/libEs5/utils/isValidRegExp.js +2 -3
- package/libEs5/utils/memoize.js +2 -3
- package/libEs5/utils/noop.js +1 -2
- package/libEs5/utils/padStart.js +2 -3
- package/libEs5/utils/parseUrl.js +17 -15
- package/libEs5/utils/prepareConfigOverridesForEdge.js +13 -14
- package/libEs5/utils/querystring.js +1 -2
- package/libEs5/utils/request/createAddIdentity.js +2 -3
- package/libEs5/utils/request/createDataCollectionRequest.js +2 -3
- package/libEs5/utils/request/createDataCollectionRequestPayload.js +2 -3
- package/libEs5/utils/request/createGetAssuranceValidationTokenParams.js +2 -3
- package/libEs5/utils/request/createHasIdentity.js +2 -3
- package/libEs5/utils/request/createRequest.js +2 -3
- package/libEs5/utils/request/createRequestParams.js +2 -3
- package/libEs5/utils/request/createRequestPayload.js +2 -3
- package/libEs5/utils/sanitizeOrgIdForCookieName.js +2 -3
- package/libEs5/utils/stackError.js +2 -3
- package/libEs5/utils/startsWith.js +2 -3
- package/libEs5/utils/stringToBoolean.js +2 -3
- package/libEs5/utils/toArray.js +2 -3
- package/libEs5/utils/toError.js +2 -3
- package/libEs5/utils/toISOStringLocal.js +2 -3
- package/libEs5/utils/toInteger.js +2 -3
- package/libEs5/utils/updateErrorMessage.js +2 -3
- package/libEs5/utils/uuid.js +1 -2
- package/libEs5/utils/validateConfigOverride.js +1 -2
- package/libEs5/utils/validateIdentityMap.js +2 -3
- package/libEs5/utils/validation/booleanValidator.js +2 -3
- package/libEs5/utils/validation/callbackValidator.js +2 -3
- package/libEs5/utils/validation/createAnyOfValidator.js +2 -3
- package/libEs5/utils/validation/createArrayOfValidator.js +2 -3
- package/libEs5/utils/validation/createDefaultValidator.js +2 -3
- package/libEs5/utils/validation/createDeprecatedValidator.js +18 -19
- package/libEs5/utils/validation/createLiteralValidator.js +2 -3
- package/libEs5/utils/validation/createMapOfValuesValidator.js +2 -3
- package/libEs5/utils/validation/createMaximumValidator.js +2 -3
- package/libEs5/utils/validation/createMinimumValidator.js +2 -3
- package/libEs5/utils/validation/createNoUnknownFieldsValidator.js +2 -3
- package/libEs5/utils/validation/createNonEmptyValidator.js +2 -3
- package/libEs5/utils/validation/createObjectOfValidator.js +2 -3
- package/libEs5/utils/validation/createUniqueItemsValidator.js +2 -3
- package/libEs5/utils/validation/createUniqueValidator.js +2 -3
- package/libEs5/utils/validation/domainValidator.js +2 -3
- package/libEs5/utils/validation/index.js +84 -92
- package/libEs5/utils/validation/integerValidator.js +2 -3
- package/libEs5/utils/validation/matchesRegexpValidator.js +2 -3
- package/libEs5/utils/validation/numberValidator.js +2 -3
- package/libEs5/utils/validation/regexpValidator.js +2 -3
- package/libEs5/utils/validation/requiredValidator.js +2 -3
- package/libEs5/utils/validation/stringValidator.js +2 -3
- package/libEs5/utils/validation/utils.js +5 -9
- package/libEs5/utils/values.js +2 -3
- package/libEs6/components/ActivityCollector/index.js +0 -1
- package/libEs6/components/Identity/index.js +2 -1
- package/libEs6/components/Identity/injectAddQueryStringIdentityToPayload.js +5 -1
- package/libEs6/components/Identity/injectAwaitIdentityCookie.js +7 -11
- package/libEs6/components/Identity/injectEnsureSingleIdentity.js +4 -3
- package/libEs6/components/LegacyMediaAnalytics/{media → constants}/constants.js +3 -2
- package/libEs6/components/LegacyMediaAnalytics/createGetInstance.js +240 -0
- package/libEs6/components/LegacyMediaAnalytics/createLegacyMediaComponent.js +85 -0
- package/libEs6/components/LegacyMediaAnalytics/createMediaHelper.js +5 -11
- package/libEs6/components/LegacyMediaAnalytics/index.js +40 -18
- package/libEs6/components/LibraryInfo/index.js +3 -1
- package/libEs6/components/Personalization/createComponent.js +5 -1
- package/libEs6/components/Personalization/createFetchDataHandler.js +16 -6
- package/libEs6/components/Personalization/createHandleConsentFlicker.js +26 -0
- package/libEs6/components/Personalization/createNotificationHandler.js +6 -2
- package/libEs6/components/Personalization/createOnDecisionHandler.js +1 -1
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +0 -1
- package/libEs6/components/Personalization/index.js +11 -3
- package/libEs6/components/StreamingMedia/configValidators.js +22 -0
- package/libEs6/components/StreamingMedia/constants/eventTypes.js +31 -0
- package/libEs6/components/{MediaCollection/constants/eventTypes.js → StreamingMedia/constants/playbackState.js} +4 -9
- package/libEs6/components/{MediaCollection → StreamingMedia}/createMediaEventManager.js +23 -16
- package/libEs6/components/StreamingMedia/createMediaResponseHandler.js +58 -0
- package/libEs6/components/{MediaCollection → StreamingMedia}/createMediaSessionCacheManager.js +15 -19
- 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/{MediaCollection → StreamingMedia}/validateMediaEventOptions.js +4 -3
- package/libEs6/components/{MediaCollection → StreamingMedia}/validateMediaSessionOptions.js +1 -1
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/core/componentCreators.js +19 -3
- package/libEs6/core/consent/createConsent.js +3 -0
- package/libEs6/core/consent/createConsentStateMachine.js +34 -0
- package/libEs6/core/createComponentRegistry.js +3 -0
- package/package.json +19 -4
- package/libEs5/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -272
- package/libEs5/components/MediaCollection/createHeartbeatEngine.js +0 -63
- package/libEs5/components/MediaCollection/createUpdateMediaSessionState.js +0 -31
- package/libEs5/components/MediaCollection/index.js +0 -165
- package/libEs5/components/MediaCollection/validateMediaEventOptions.js +0 -35
- package/libEs6/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -276
- package/libEs6/components/MediaCollection/createHeartbeatEngine.js +0 -64
- package/libEs6/components/MediaCollection/createUpdateMediaSessionState.js +0 -30
- package/libEs6/components/MediaCollection/index.js +0 -164
- /package/libEs6/components/LegacyMediaAnalytics/{media → constants}/mediaKeysToXdmConverter.js +0 -0
- /package/libEs6/components/{MediaCollection → StreamingMedia}/createMediaRequest.js +0 -0
|
@@ -12,20 +12,17 @@ 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
|
-
var CONTEXT_KEY = {
|
|
15
|
+
var CONTEXT_KEY = exports.CONTEXT_KEY = {
|
|
16
16
|
TYPE: "~type",
|
|
17
17
|
SOURCE: "~source"
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
20
|
-
var CONTEXT_EVENT_TYPE = {
|
|
19
|
+
var CONTEXT_EVENT_TYPE = exports.CONTEXT_EVENT_TYPE = {
|
|
21
20
|
LIFECYCLE: "com.adobe.eventType.lifecycle",
|
|
22
21
|
TRACK: "com.adobe.eventType.generic.track",
|
|
23
22
|
EDGE: "com.adobe.eventType.edge",
|
|
24
23
|
RULES_ENGINE: "com.adobe.eventType.rulesEngine"
|
|
25
24
|
};
|
|
26
|
-
exports.
|
|
27
|
-
var CONTEXT_EVENT_SOURCE = {
|
|
25
|
+
var CONTEXT_EVENT_SOURCE = exports.CONTEXT_EVENT_SOURCE = {
|
|
28
26
|
LAUNCH: "com.adobe.eventSource.applicationLaunch",
|
|
29
27
|
REQUEST: "com.adobe.eventSource.requestContent"
|
|
30
|
-
};
|
|
31
|
-
exports.CONTEXT_EVENT_SOURCE = CONTEXT_EVENT_SOURCE;
|
|
28
|
+
};
|
|
@@ -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
|
-
var _default = function _default(lifecycle) {
|
|
15
|
+
var _default = exports.default = function _default(lifecycle) {
|
|
16
16
|
return function (_ref) {
|
|
17
17
|
var _ref$renderDecisions = _ref.renderDecisions,
|
|
18
18
|
renderDecisions = _ref$renderDecisions === void 0 ? false : _ref$renderDecisions,
|
|
@@ -32,5 +32,4 @@ var _default = function _default(lifecycle) {
|
|
|
32
32
|
propositions: propositions
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
};
|
|
36
|
-
exports.default = _default;
|
|
35
|
+
};
|
|
@@ -3,27 +3,28 @@
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _inAppMessageConsequenceAdapter = require("./consequenceAdapters/inAppMessageConsequenceAdapter");
|
|
5
5
|
var _schemaTypeConsequenceAdapter = require("./consequenceAdapters/schemaTypeConsequenceAdapter");
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 _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; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
+
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); } /*
|
|
10
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
11
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
|
|
15
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
18
20
|
var CJM_IN_APP_MESSAGE_TYPE = "cjmiam";
|
|
19
21
|
var SCHEMA = "schema";
|
|
20
|
-
var adapters = (
|
|
21
|
-
var _default = function _default() {
|
|
22
|
+
var adapters = _defineProperty(_defineProperty({}, CJM_IN_APP_MESSAGE_TYPE, _inAppMessageConsequenceAdapter.default), SCHEMA, _schemaTypeConsequenceAdapter.default);
|
|
23
|
+
var _default = exports.default = function _default() {
|
|
22
24
|
return function (consequence) {
|
|
23
25
|
var id = consequence.id,
|
|
24
26
|
type = consequence.type,
|
|
25
27
|
detail = consequence.detail;
|
|
26
28
|
return typeof adapters[type] === "function" ? adapters[type](id, type, detail) : detail;
|
|
27
29
|
};
|
|
28
|
-
};
|
|
29
|
-
exports.default = _default;
|
|
30
|
+
};
|
|
@@ -5,20 +5,23 @@ var _getBrowser = require("../../utils/getBrowser");
|
|
|
5
5
|
var _parseUrl = require("../../utils/parseUrl");
|
|
6
6
|
var _flattenObject = require("../../utils/flattenObject");
|
|
7
7
|
var _libraryVersion = require("../../constants/libraryVersion");
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
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); }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
|
+
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); } /*
|
|
14
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
15
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
|
|
19
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
var _default = exports.default = function _default(_ref) {
|
|
22
25
|
var eventRegistry = _ref.eventRegistry,
|
|
23
26
|
window = _ref.window;
|
|
24
27
|
var pageLoadTimestamp = new Date().getTime();
|
|
@@ -89,5 +92,4 @@ var _default = function _default(_ref) {
|
|
|
89
92
|
return {
|
|
90
93
|
getContext: getContext
|
|
91
94
|
};
|
|
92
|
-
};
|
|
93
|
-
exports.default = _default;
|
|
95
|
+
};
|
|
@@ -13,7 +13,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
|
|
|
13
13
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
14
|
governing permissions and limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
var _default = function _default(_ref) {
|
|
16
|
+
var _default = exports.default = function _default(_ref) {
|
|
17
17
|
var eventRegistry = _ref.eventRegistry;
|
|
18
18
|
var recordQualified = function recordQualified(id) {
|
|
19
19
|
if (!id) {
|
|
@@ -24,5 +24,4 @@ var _default = function _default(_ref) {
|
|
|
24
24
|
return {
|
|
25
25
|
recordQualified: recordQualified
|
|
26
26
|
};
|
|
27
|
-
};
|
|
28
|
-
exports.default = _default;
|
|
27
|
+
};
|
|
@@ -15,7 +15,7 @@ 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 = function _default(_ref) {
|
|
18
|
+
var _default = exports.default = function _default(_ref) {
|
|
19
19
|
var eventRegistry = _ref.eventRegistry;
|
|
20
20
|
var payloadsBasedOnActivityId = {};
|
|
21
21
|
var decisionHistory = (0, _createDecisionHistory.default)({
|
|
@@ -47,5 +47,4 @@ var _default = function _default(_ref) {
|
|
|
47
47
|
addPayloads: addPayloads,
|
|
48
48
|
evaluate: evaluate
|
|
49
49
|
};
|
|
50
|
-
};
|
|
51
|
-
exports.default = _default;
|
|
50
|
+
};
|
|
@@ -7,19 +7,22 @@ var _eventType = require("../../constants/eventType");
|
|
|
7
7
|
var _utils = require("./utils");
|
|
8
8
|
var _flattenArray = require("../../utils/flattenArray");
|
|
9
9
|
var _createConsequenceAdapter = require("./createConsequenceAdapter");
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /*
|
|
16
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
17
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
18
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
19
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
|
|
21
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
22
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
23
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
24
|
+
governing permissions and limitations under the License.
|
|
25
|
+
*/
|
|
23
26
|
var isRulesetItem = function isRulesetItem(item) {
|
|
24
27
|
var schema = item.schema,
|
|
25
28
|
data = item.data;
|
|
@@ -36,7 +39,7 @@ var isRulesetItem = function isRulesetItem(item) {
|
|
|
36
39
|
return false;
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
|
-
var _default = function _default(payload, eventRegistry, decisionHistory) {
|
|
42
|
+
var _default = exports.default = function _default(payload, eventRegistry, decisionHistory) {
|
|
40
43
|
var consequenceAdapter = (0, _createConsequenceAdapter.default)();
|
|
41
44
|
var activityId = (0, _utils.getActivityId)(payload);
|
|
42
45
|
var items = [];
|
|
@@ -76,5 +79,4 @@ var _default = function _default(payload, eventRegistry, decisionHistory) {
|
|
|
76
79
|
evaluate: evaluate,
|
|
77
80
|
isEvaluable: items.length > 0
|
|
78
81
|
};
|
|
79
|
-
};
|
|
80
|
-
exports.default = _default;
|
|
82
|
+
};
|
|
@@ -24,7 +24,7 @@ var validateOptions = function validateOptions(_ref) {
|
|
|
24
24
|
}).noUnknownFields();
|
|
25
25
|
return validator(options);
|
|
26
26
|
};
|
|
27
|
-
var _default = function _default(_ref2) {
|
|
27
|
+
var _default = exports.default = function _default(_ref2) {
|
|
28
28
|
var contextProvider = _ref2.contextProvider,
|
|
29
29
|
decisionProvider = _ref2.decisionProvider;
|
|
30
30
|
var run = function run(_ref3) {
|
|
@@ -45,5 +45,4 @@ var _default = function _default(_ref2) {
|
|
|
45
45
|
optionsValidator: optionsValidator,
|
|
46
46
|
run: run
|
|
47
47
|
};
|
|
48
|
-
};
|
|
49
|
-
exports.default = _default;
|
|
48
|
+
};
|
|
@@ -4,26 +4,29 @@ exports.default = exports.createEventPruner = void 0;
|
|
|
4
4
|
var _utils = require("./utils");
|
|
5
5
|
var _eventType = require("../../constants/eventType");
|
|
6
6
|
var _decisionProvider = require("../../constants/decisionProvider");
|
|
7
|
-
function
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
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); } /*
|
|
13
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
14
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
|
|
18
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
20
23
|
var STORAGE_KEY = "events";
|
|
21
24
|
var MAX_EVENT_RECORDS = 1000;
|
|
22
25
|
var RETENTION_PERIOD = 30;
|
|
23
26
|
var prefixed = function prefixed(key) {
|
|
24
27
|
return "iam." + key;
|
|
25
28
|
};
|
|
26
|
-
var createEventPruner = function createEventPruner() {
|
|
29
|
+
var createEventPruner = exports.createEventPruner = function createEventPruner() {
|
|
27
30
|
var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : MAX_EVENT_RECORDS;
|
|
28
31
|
var retentionPeriod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : RETENTION_PERIOD;
|
|
29
32
|
return function (events) {
|
|
@@ -41,8 +44,7 @@ var createEventPruner = function createEventPruner() {
|
|
|
41
44
|
return pruned;
|
|
42
45
|
};
|
|
43
46
|
};
|
|
44
|
-
exports.
|
|
45
|
-
var _default = function _default(_ref) {
|
|
47
|
+
var _default = exports.default = function _default(_ref) {
|
|
46
48
|
var storage = _ref.storage;
|
|
47
49
|
var currentStorage = storage;
|
|
48
50
|
var restore;
|
|
@@ -56,7 +58,6 @@ var _default = function _default(_ref) {
|
|
|
56
58
|
};
|
|
57
59
|
setStorage(storage);
|
|
58
60
|
var addEvent = function addEvent(event, eventType, eventId, action) {
|
|
59
|
-
var _objectSpread2;
|
|
60
61
|
if (!eventType || !eventId) {
|
|
61
62
|
return undefined;
|
|
62
63
|
}
|
|
@@ -68,7 +69,7 @@ var _default = function _default(_ref) {
|
|
|
68
69
|
var timestamp = new Date().getTime();
|
|
69
70
|
var firstTimestamp = existingEvent ? existingEvent.firstTimestamp || existingEvent.timestamp : timestamp;
|
|
70
71
|
events[eventType][eventId] = {
|
|
71
|
-
event: _objectSpread(_objectSpread({}, event), {}, (
|
|
72
|
+
event: _objectSpread(_objectSpread({}, event), {}, _defineProperty(_defineProperty(_defineProperty({}, prefixed("id"), eventId), prefixed("eventType"), eventType), prefixed("action"), action)),
|
|
72
73
|
firstTimestamp: firstTimestamp,
|
|
73
74
|
timestamp: timestamp,
|
|
74
75
|
count: count + 1
|
|
@@ -126,5 +127,4 @@ var _default = function _default(_ref) {
|
|
|
126
127
|
},
|
|
127
128
|
setStorage: setStorage
|
|
128
129
|
};
|
|
129
|
-
};
|
|
130
|
-
exports.default = _default;
|
|
130
|
+
};
|
|
@@ -3,20 +3,23 @@
|
|
|
3
3
|
exports.default = void 0;
|
|
4
4
|
var _handle = require("../../constants/handle");
|
|
5
5
|
var _flattenObject = require("../../utils/flattenObject");
|
|
6
|
-
function
|
|
7
|
-
function
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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) {
|
|
20
23
|
var renderDecisions = _ref.renderDecisions,
|
|
21
24
|
decisionProvider = _ref.decisionProvider,
|
|
22
25
|
applyResponse = _ref.applyResponse,
|
|
@@ -42,5 +45,4 @@ var _default = function _default(_ref) {
|
|
|
42
45
|
personalization: personalization
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
|
-
};
|
|
46
|
-
exports.default = _default;
|
|
48
|
+
};
|
|
@@ -4,19 +4,22 @@ exports.default = void 0;
|
|
|
4
4
|
var _validation = require("../../utils/validation");
|
|
5
5
|
var _createSubscription = require("../../utils/createSubscription");
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
|
-
function
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
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); } /*
|
|
13
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
14
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
|
|
18
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
20
23
|
var validateOptions = function validateOptions(_ref) {
|
|
21
24
|
var options = _ref.options;
|
|
22
25
|
var validator = (0, _validation.objectOf)({
|
|
@@ -49,7 +52,7 @@ var emissionPreprocessor = function emissionPreprocessor(params, propositions) {
|
|
|
49
52
|
var emissionCondition = function emissionCondition(params, result) {
|
|
50
53
|
return result.propositions.length > 0;
|
|
51
54
|
};
|
|
52
|
-
var _default = function _default() {
|
|
55
|
+
var _default = exports.default = function _default() {
|
|
53
56
|
var subscription = (0, _createSubscription.default)();
|
|
54
57
|
subscription.setEmissionPreprocessor(emissionPreprocessor);
|
|
55
58
|
subscription.setEmissionCondition(emissionCondition);
|
|
@@ -83,5 +86,4 @@ var _default = function _default() {
|
|
|
83
86
|
run: run
|
|
84
87
|
}
|
|
85
88
|
};
|
|
86
|
-
};
|
|
87
|
-
exports.default = _default;
|
|
89
|
+
};
|
|
@@ -12,19 +12,22 @@ var _constants = require("./constants");
|
|
|
12
12
|
var _createEvaluateRulesetsCommand = require("./createEvaluateRulesetsCommand");
|
|
13
13
|
var _utils2 = require("./utils");
|
|
14
14
|
var _validation = require("../../utils/validation");
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); } /*
|
|
21
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
22
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
24
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
|
|
26
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
27
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
|
+
governing permissions and limitations under the License.
|
|
30
|
+
*/
|
|
28
31
|
var createDecisioningEngine = function createDecisioningEngine(_ref) {
|
|
29
32
|
var config = _ref.config,
|
|
30
33
|
createNamespacedStorage = _ref.createNamespacedStorage,
|
|
@@ -70,7 +73,6 @@ var createDecisioningEngine = function createDecisioningEngine(_ref) {
|
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
onBeforeEvent: function onBeforeEvent(_ref3) {
|
|
73
|
-
var _objectSpread2;
|
|
74
76
|
var event = _ref3.event,
|
|
75
77
|
renderDecisions = _ref3.renderDecisions,
|
|
76
78
|
_ref3$personalization = _ref3.personalization,
|
|
@@ -85,7 +87,7 @@ var createDecisioningEngine = function createDecisioningEngine(_ref) {
|
|
|
85
87
|
applyResponse: applyResponse,
|
|
86
88
|
event: event,
|
|
87
89
|
personalization: personalization,
|
|
88
|
-
decisionContext: contextProvider.getContext(_objectSpread((
|
|
90
|
+
decisionContext: contextProvider.getContext(_objectSpread(_defineProperty(_defineProperty({}, _constants.CONTEXT_KEY.TYPE, _constants.CONTEXT_EVENT_TYPE.EDGE), _constants.CONTEXT_KEY.SOURCE, _constants.CONTEXT_EVENT_SOURCE.REQUEST), decisionContext))
|
|
89
91
|
}));
|
|
90
92
|
eventRegistry.addExperienceEdgeEvent(event);
|
|
91
93
|
}
|
|
@@ -93,7 +95,6 @@ var createDecisioningEngine = function createDecisioningEngine(_ref) {
|
|
|
93
95
|
commands: {
|
|
94
96
|
evaluateRulesets: {
|
|
95
97
|
run: function run(_ref4) {
|
|
96
|
-
var _objectSpread3;
|
|
97
98
|
var renderDecisions = _ref4.renderDecisions,
|
|
98
99
|
_ref4$personalization = _ref4.personalization,
|
|
99
100
|
personalization = _ref4$personalization === void 0 ? {} : _ref4$personalization;
|
|
@@ -101,7 +102,7 @@ var createDecisioningEngine = function createDecisioningEngine(_ref) {
|
|
|
101
102
|
decisionContext = _personalization$deci2 === void 0 ? {} : _personalization$deci2;
|
|
102
103
|
return evaluateRulesetsCommand.run({
|
|
103
104
|
renderDecisions: renderDecisions,
|
|
104
|
-
decisionContext: _objectSpread((
|
|
105
|
+
decisionContext: _objectSpread(_defineProperty(_defineProperty({}, _constants.CONTEXT_KEY.TYPE, _constants.CONTEXT_EVENT_TYPE.RULES_ENGINE), _constants.CONTEXT_KEY.SOURCE, _constants.CONTEXT_EVENT_SOURCE.REQUEST), decisionContext),
|
|
105
106
|
applyResponse: applyResponse
|
|
106
107
|
});
|
|
107
108
|
},
|
|
@@ -115,5 +116,4 @@ createDecisioningEngine.namespace = "DecisioningEngine";
|
|
|
115
116
|
createDecisioningEngine.configValidators = (0, _validation.objectOf)({
|
|
116
117
|
personalizationStorageEnabled: (0, _validation.boolean)().default(false)
|
|
117
118
|
});
|
|
118
|
-
var _default = createDecisioningEngine;
|
|
119
|
-
exports.default = _default;
|
|
119
|
+
var _default = exports.default = createDecisioningEngine;
|