@adobe/alloy 2.32.1-beta.0 → 2.33.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +9 -0
- package/dist/alloy.js +13696 -12143
- package/dist/alloy.min.js +1 -1
- package/dist/alloyServiceWorker.js +8 -20
- package/dist/alloyServiceWorker.min.js +1 -1
- package/dist/types/browser/src/allOptionalComponents.d.ts +2 -0
- package/dist/types/{core → browser}/src/components/Advertising/constants/index.d.ts +3 -0
- package/dist/types/{core → browser}/src/components/Advertising/handlers/createOnBeforeSendEventHandler.d.ts +4 -1
- package/dist/types/{core → browser}/src/components/Advertising/handlers/sendAdConversion.d.ts +3 -1
- package/dist/types/{core → browser}/src/components/Advertising/handlers/viewThroughHandler.d.ts +3 -1
- package/dist/types/{core → browser}/src/components/Advertising/identities/collectAllIdentities.d.ts +1 -1
- package/dist/types/browser/src/components/Advertising/identities/collectSurferId.d.ts +15 -0
- package/dist/types/browser/src/components/Advertising/identities/createHashedIpHandler.d.ts +9 -0
- package/dist/types/browser/src/components/Advertising/identities/initiateAdvertisingIdentityCall.d.ts +5 -0
- package/dist/types/{core → browser}/src/components/Advertising/utils/helpers.d.ts +14 -0
- package/dist/types/browser/src/components/Advertising/utils/murmurHash128GuavaHex.d.ts +2 -0
- package/dist/types/browser/src/components/Personalization/constants/surface.d.ts +4 -0
- package/dist/types/browser/src/components/Personalization/dom-actions/dom/isDomElement.d.ts +2 -0
- package/dist/types/browser/src/components/Personalization/utils/addRenderAttemptedToDecisions.d.ts +5 -0
- package/dist/types/browser/src/components/Personalization/utils/surfaceUtils.d.ts +3 -0
- package/dist/types/{core → browser}/src/components/PushNotifications/helpers/saveToIndexedDb.d.ts +1 -1
- package/dist/types/{core → browser}/src/components/PushNotifications/index.d.ts +6 -6
- package/dist/types/{core → browser}/src/components/PushNotifications/request/createSendPushSubscriptionPayload.d.ts +2 -2
- package/dist/types/browser/src/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts +6 -0
- package/dist/types/{core → browser}/src/components/PushNotifications/request/makeSendPushSubscriptionRequest.d.ts +6 -6
- package/dist/types/{core → browser}/src/components/PushNotifications/types.d.ts +1 -1
- package/dist/types/browser/src/components/componentCreators.d.ts +4 -0
- package/dist/types/browser/src/components/requiredComponentCreators.d.ts +1 -0
- package/dist/types/browser/src/index.d.ts +4 -2
- package/dist/types/browser/src/initializeStandalone.d.ts +4 -0
- package/dist/types/core/src/components/Identity/injectAddQueryStringIdentityToPayload.d.ts +2 -1
- package/dist/types/core/src/components/MediaAnalyticsBridge/createGetInstance.d.ts +1 -1
- package/dist/types/core/src/components/MediaAnalyticsBridge/createMediaHelper.d.ts +7 -56
- package/dist/types/core/src/core/componentCreators.d.ts +0 -4
- package/dist/types/core/src/core/requiredComponentCreators.d.ts +0 -1
- package/dist/types/core/src/types.d.ts +0 -4
- package/dist/utils/createEventMergeId.js +38 -30
- package/dist/utils/deepAssign.js +10 -4
- package/package.json +9 -13
- package/rollup.config.js +9 -15
- package/scripts/alloyBuilder.js +34 -42
- package/scripts/helpers/componentMetadata.js +25 -0
- package/scripts/helpers/generateEntryPoint.js +29 -0
- package/src/allOptionalComponents.js +14 -0
- package/src/components/ActivityCollector/attachClickActivityCollector.js +55 -0
- package/src/components/ActivityCollector/configValidators.js +52 -0
- package/src/components/ActivityCollector/createClickActivityStorage.js +33 -0
- package/src/components/ActivityCollector/createClickedElementProperties.js +224 -0
- package/src/components/ActivityCollector/createGetClickedElementProperties.js +68 -0
- package/src/components/ActivityCollector/createInjectClickedElementProperties.js +80 -0
- package/src/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js +45 -0
- package/src/components/ActivityCollector/createStorePageViewProperties.js +20 -0
- package/src/components/ActivityCollector/getLinkName.js +145 -0
- package/src/components/ActivityCollector/getLinkRegion.js +65 -0
- package/src/components/ActivityCollector/index.js +132 -0
- package/src/components/ActivityCollector/utils/activityMapExtensionEnabled.js +16 -0
- package/src/components/ActivityCollector/utils/createTransientStorage.js +26 -0
- package/src/components/ActivityCollector/utils/determineLinkType.js +27 -0
- package/src/components/ActivityCollector/utils/dom/elementHasClickHandler.js +15 -0
- package/src/components/ActivityCollector/utils/dom/extractDomain.js +20 -0
- package/src/components/ActivityCollector/utils/dom/findClickableElement.js +36 -0
- package/src/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.js +25 -0
- package/src/components/ActivityCollector/utils/dom/isButtonSubmitElement.js +15 -0
- package/src/components/ActivityCollector/utils/dom/isDownloadLink.js +27 -0
- package/src/components/ActivityCollector/utils/dom/isExitLink.js +24 -0
- package/src/components/ActivityCollector/utils/dom/isInputSubmitElement.js +26 -0
- package/src/components/ActivityCollector/utils/dom/isSupportedAnchorElement.js +24 -0
- package/src/components/ActivityCollector/utils/dom/isSupportedTextNode.js +27 -0
- package/src/components/ActivityCollector/utils/hasPageName.js +23 -0
- package/src/components/ActivityCollector/utils/isDifferentDomains.js +19 -0
- package/src/components/ActivityCollector/utils/trimQueryFromUrl.js +31 -0
- package/src/components/ActivityCollector/utils/truncateWhiteSpace.js +22 -0
- package/src/components/ActivityCollector/validateClickCollectionConfig.js +47 -0
- package/src/components/Advertising/configValidators.js +32 -0
- package/src/components/Advertising/constants/index.js +80 -0
- package/src/components/Advertising/createComponent.js +24 -0
- package/src/components/Advertising/handlers/clickThroughHandler.js +94 -0
- package/src/components/Advertising/handlers/createAdConversionHandler.js +50 -0
- package/src/components/Advertising/handlers/createOnBeforeSendEventHandler.js +177 -0
- package/src/components/Advertising/handlers/sendAdConversion.js +74 -0
- package/src/components/Advertising/handlers/viewThroughHandler.js +107 -0
- package/src/components/Advertising/identities/collectAllIdentities.js +57 -0
- package/src/components/Advertising/identities/collectID5Id.js +133 -0
- package/src/components/Advertising/identities/collectRampId.js +265 -0
- package/src/components/Advertising/identities/collectSurferId.js +72 -0
- package/src/components/Advertising/identities/createHashedIpHandler.js +36 -0
- package/src/components/Advertising/identities/initiateAdvertisingIdentityCall.js +153 -0
- package/src/components/Advertising/index.js +109 -0
- package/src/components/Advertising/utils/advertisingCookieManager.js +92 -0
- package/src/components/Advertising/utils/helpers.js +190 -0
- package/src/components/Advertising/utils/murmurHash128GuavaHex.js +195 -0
- package/src/components/Context/createComponent.js +35 -0
- package/src/components/Context/implementationDetails.js +23 -0
- package/src/components/Context/index.js +56 -0
- package/src/components/Context/injectDevice.js +77 -0
- package/src/components/Context/injectEnvironment.js +38 -0
- package/src/components/Context/injectHighEntropyUserAgentHints.js +55 -0
- package/src/components/Context/injectOneTimeAnalyticsReferrer.js +61 -0
- package/src/components/Context/injectPlaceContext.js +38 -0
- package/src/components/Context/injectWeb.js +26 -0
- package/src/components/Personalization/constants/loggerMessage.js +14 -0
- package/src/components/Personalization/constants/scopeType.js +15 -0
- package/src/components/Personalization/constants/surface.js +16 -0
- package/src/components/Personalization/createApplyPropositions.js +136 -0
- package/src/components/Personalization/createClickStorage.js +56 -0
- package/src/components/Personalization/createComponent.js +133 -0
- package/src/components/Personalization/createFetchDataHandler.js +149 -0
- package/src/components/Personalization/createGetPageLocation.js +16 -0
- package/src/components/Personalization/createHandleConsentFlicker.js +22 -0
- package/src/components/Personalization/createInteractionStorage.js +104 -0
- package/src/components/Personalization/createNotificationHandler.js +49 -0
- package/src/components/Personalization/createOnClickHandler.js +102 -0
- package/src/components/Personalization/createOnDecisionHandler.js +98 -0
- package/src/components/Personalization/createPersonalizationDetails.js +138 -0
- package/src/components/Personalization/createSetTargetMigration.js +22 -0
- package/src/components/Personalization/createViewCacheManager.js +101 -0
- package/src/components/Personalization/createViewChangeHandler.js +53 -0
- package/src/components/Personalization/dom-actions/action.js +97 -0
- package/src/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +37 -0
- package/src/components/Personalization/dom-actions/appendHtml.js +42 -0
- package/src/components/Personalization/dom-actions/clicks/collectClicks.js +89 -0
- package/src/components/Personalization/dom-actions/clicks/collectInteractions.js +113 -0
- package/src/components/Personalization/dom-actions/collectInteractions.js +15 -0
- package/src/components/Personalization/dom-actions/createPreprocess.js +21 -0
- package/src/components/Personalization/dom-actions/createRedirect.js +23 -0
- package/src/components/Personalization/dom-actions/dom/createFragment.js +18 -0
- package/src/components/Personalization/dom-actions/dom/getAttribute.js +15 -0
- package/src/components/Personalization/dom-actions/dom/getChildNodes.js +23 -0
- package/src/components/Personalization/dom-actions/dom/getChildren.js +23 -0
- package/src/components/Personalization/dom-actions/dom/getElementById.js +21 -0
- package/src/components/Personalization/dom-actions/dom/getFirstChild.js +15 -0
- package/src/components/Personalization/dom-actions/dom/getNextSibling.js +15 -0
- package/src/components/Personalization/dom-actions/dom/getNonce.js +33 -0
- package/src/components/Personalization/dom-actions/dom/getParent.js +15 -0
- package/src/components/Personalization/dom-actions/dom/helperForEq.js +22 -0
- package/src/components/Personalization/dom-actions/dom/index.js +26 -0
- package/src/components/Personalization/dom-actions/dom/insertAfter.js +26 -0
- package/src/components/Personalization/dom-actions/dom/insertBefore.js +25 -0
- package/src/components/Personalization/dom-actions/dom/isDomElement.js +13 -0
- package/src/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +37 -0
- package/src/components/Personalization/dom-actions/dom/removeAttribute.js +15 -0
- package/src/components/Personalization/dom-actions/dom/selectNodesWithEq.js +101 -0
- package/src/components/Personalization/dom-actions/dom/setAttribute.js +15 -0
- package/src/components/Personalization/dom-actions/dom/setStyle.js +23 -0
- package/src/components/Personalization/dom-actions/dom/util.js +17 -0
- package/src/components/Personalization/dom-actions/images.js +34 -0
- package/src/components/Personalization/dom-actions/index.js +13 -0
- package/src/components/Personalization/dom-actions/initDomActionsModules.js +67 -0
- package/src/components/Personalization/dom-actions/insertHtmlAfter.js +43 -0
- package/src/components/Personalization/dom-actions/insertHtmlBefore.js +40 -0
- package/src/components/Personalization/dom-actions/move.js +28 -0
- package/src/components/Personalization/dom-actions/prependHtml.js +60 -0
- package/src/components/Personalization/dom-actions/rearrangeChildren.js +34 -0
- package/src/components/Personalization/dom-actions/remapCustomCodeOffers.js +33 -0
- package/src/components/Personalization/dom-actions/remapHeadOffers.js +63 -0
- package/src/components/Personalization/dom-actions/replaceHtml.js +20 -0
- package/src/components/Personalization/dom-actions/resize.js +28 -0
- package/src/components/Personalization/dom-actions/scripts.js +106 -0
- package/src/components/Personalization/dom-actions/setAttributes.js +21 -0
- package/src/components/Personalization/dom-actions/setHtml.js +27 -0
- package/src/components/Personalization/dom-actions/setStyles.js +23 -0
- package/src/components/Personalization/dom-actions/setText.js +16 -0
- package/src/components/Personalization/dom-actions/swapImage.js +32 -0
- package/src/components/Personalization/flicker/index.js +106 -0
- package/src/components/Personalization/handlers/createDecorateProposition.js +100 -0
- package/src/components/Personalization/handlers/createProcessDomAction.js +79 -0
- package/src/components/Personalization/handlers/createProcessHtmlContent.js +60 -0
- package/src/components/Personalization/handlers/createProcessInAppMessage.js +91 -0
- package/src/components/Personalization/handlers/createProcessPropositions.js +228 -0
- package/src/components/Personalization/handlers/createProcessRedirect.js +54 -0
- package/src/components/Personalization/handlers/createRenderStatusHandler.js +62 -0
- package/src/components/Personalization/handlers/injectCreateProposition.js +121 -0
- package/src/components/Personalization/handlers/processDefaultContent.js +20 -0
- package/src/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +309 -0
- package/src/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +18 -0
- package/src/components/Personalization/in-app-message-actions/utils.js +55 -0
- package/src/components/Personalization/index.js +223 -0
- package/src/components/Personalization/utils/addRenderAttemptedToDecisions.js +15 -0
- package/src/components/Personalization/utils/createAsyncArray.js +37 -0
- package/src/components/Personalization/utils/isAuthoringModeEnabled.js +15 -0
- package/src/components/Personalization/utils/metaUtils.js +27 -0
- package/src/components/Personalization/utils/surfaceUtils.js +120 -0
- package/src/components/Personalization/validateApplyPropositionsOptions.js +56 -0
- package/src/components/PushNotifications/helpers/constants.js +16 -0
- package/src/components/PushNotifications/helpers/getPushSubscriptionDetails.js +122 -0
- package/src/components/PushNotifications/helpers/readFromIndexedDb.js +50 -0
- package/src/components/PushNotifications/helpers/saveToIndexedDb.js +64 -0
- package/src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.js +84 -0
- package/src/components/PushNotifications/helpers/serviceWorkerPushListener.js +72 -0
- package/src/components/PushNotifications/index.js +128 -0
- package/src/components/PushNotifications/request/createSendPushSubscriptionPayload.js +66 -0
- package/src/components/PushNotifications/request/createSendPushSubscriptionRequest.js +35 -0
- package/src/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +98 -0
- package/src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js +154 -0
- package/src/components/PushNotifications/types.js +104 -0
- package/src/components/componentCreators.js +16 -0
- package/src/components/requiredComponentCreators.js +13 -0
- package/src/createEventListeners.js +81 -0
- package/src/index.js +14 -2
- package/src/initializeStandalone.js +34 -0
- package/src/serviceWorker.js +2 -2
- package/src/standalone.js +3 -26
- package/.browserslistrc +0 -2
- package/babel.config.js +0 -76
- package/dist/types/core/src/components/Advertising/identities/collectSurferId.d.ts +0 -2
- package/dist/types/core/src/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts +0 -6
- package/dist/types/core/src/constants/sessionDataKeys.d.ts +0 -1
- package/scripts/helpers/entryPointGeneratorBabelPlugin.js +0 -101
- /package/dist/types/{core → browser}/src/components/ActivityCollector/attachClickActivityCollector.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/configValidators.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/createClickActivityStorage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/createClickedElementProperties.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/createGetClickedElementProperties.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/createInjectClickedElementProperties.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/createRecallAndInjectClickedElementProperties.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/createStorePageViewProperties.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/getLinkName.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/getLinkRegion.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/activityMapExtensionEnabled.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/createTransientStorage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/determineLinkType.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/elementHasClickHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/extractDomain.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/findClickableElement.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isButtonSubmitElement.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isDownloadLink.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isExitLink.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isInputSubmitElement.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isSupportedAnchorElement.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isSupportedTextNode.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/hasPageName.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/isDifferentDomains.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/trimQueryFromUrl.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/truncateWhiteSpace.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/ActivityCollector/validateClickCollectionConfig.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/configValidators.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/createComponent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/handlers/clickThroughHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/handlers/createAdConversionHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/identities/collectID5Id.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/identities/collectRampId.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Advertising/utils/advertisingCookieManager.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/createComponent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/implementationDetails.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/injectDevice.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/injectEnvironment.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/injectHighEntropyUserAgentHints.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/injectOneTimeAnalyticsReferrer.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/injectPlaceContext.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Context/injectWeb.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/constants/loggerMessage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/constants/scopeType.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createApplyPropositions.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createClickStorage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createComponent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createFetchDataHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createGetPageLocation.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createHandleConsentFlicker.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createInteractionStorage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createNotificationHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createOnClickHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createOnDecisionHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createPersonalizationDetails.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createSetTargetMigration.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createViewCacheManager.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/createViewChangeHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/action.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/addNonceToInlineStyleElements.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/appendHtml.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/clicks/collectClicks.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/clicks/collectInteractions.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/collectInteractions.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/createPreprocess.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/createRedirect.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/createFragment.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getAttribute.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getChildNodes.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getChildren.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getElementById.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getFirstChild.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getNextSibling.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getNonce.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getParent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/helperForEq.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/insertAfter.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/insertBefore.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/matchesSelectorWithEq.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/removeAttribute.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/selectNodesWithEq.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/setAttribute.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/setStyle.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/util.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/images.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/initDomActionsModules.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/insertHtmlAfter.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/insertHtmlBefore.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/move.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/prependHtml.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/rearrangeChildren.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/remapCustomCodeOffers.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/remapHeadOffers.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/replaceHtml.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/resize.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/scripts.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setAttributes.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setHtml.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setStyles.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setText.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/swapImage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/flicker/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createDecorateProposition.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessDomAction.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessHtmlContent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessInAppMessage.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessPropositions.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessRedirect.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/createRenderStatusHandler.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/injectCreateProposition.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/handlers/processDefaultContent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/in-app-message-actions/actions/displayIframeContent.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/in-app-message-actions/utils.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/index.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/utils/createAsyncArray.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/utils/isAuthoringModeEnabled.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/utils/metaUtils.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/Personalization/validateApplyPropositionsOptions.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/constants.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/getPushSubscriptionDetails.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/readFromIndexedDb.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/serviceWorkerPushListener.d.ts +0 -0
- /package/dist/types/{core → browser}/src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.d.ts +0 -0
- /package/dist/types/{core → browser}/src/createEventListeners.d.ts +0 -0
- /package/dist/types/core/src/{components/Context → utils}/injectTimestamp.d.ts +0 -0
|
@@ -294,8 +294,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
294
294
|
governing permissions and limitations under the License.
|
|
295
295
|
*/
|
|
296
296
|
|
|
297
|
-
/* eslint-disable no-underscore-dangle */
|
|
298
|
-
|
|
299
297
|
/** @import { ServiceWorkerLogger } from '../types.js' */
|
|
300
298
|
/** @import { TrackingDataPayload } from '../types.js' */
|
|
301
299
|
|
|
@@ -466,21 +464,17 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
466
464
|
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
467
465
|
}
|
|
468
466
|
|
|
469
|
-
let getRandomValues;
|
|
470
467
|
const rnds8 = new Uint8Array(16);
|
|
471
468
|
function rng() {
|
|
472
|
-
|
|
473
|
-
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
474
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
475
|
-
}
|
|
476
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
477
|
-
}
|
|
478
|
-
return getRandomValues(rnds8);
|
|
469
|
+
return crypto.getRandomValues(rnds8);
|
|
479
470
|
}
|
|
480
471
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
472
|
+
function v4(options, buf, offset) {
|
|
473
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
474
|
+
return crypto.randomUUID();
|
|
475
|
+
}
|
|
476
|
+
return _v4(options, buf, offset);
|
|
477
|
+
}
|
|
484
478
|
function _v4(options, buf, offset) {
|
|
485
479
|
options = options || {};
|
|
486
480
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
@@ -501,12 +495,6 @@ function _v4(options, buf, offset) {
|
|
|
501
495
|
}
|
|
502
496
|
return unsafeStringify(rnds);
|
|
503
497
|
}
|
|
504
|
-
function v4(options, buf, offset) {
|
|
505
|
-
if (native.randomUUID && !buf && !options) {
|
|
506
|
-
return native.randomUUID();
|
|
507
|
-
}
|
|
508
|
-
return _v4(options, buf, offset);
|
|
509
|
-
}
|
|
510
498
|
|
|
511
499
|
/*
|
|
512
500
|
Copyright 2025 Adobe. All rights reserved.
|
|
@@ -602,7 +590,7 @@ governing permissions and limitations under the License.
|
|
|
602
590
|
// @ts-check
|
|
603
591
|
/// <reference lib="webworker" />
|
|
604
592
|
|
|
605
|
-
/** @import { ServiceWorkerLogger } from '
|
|
593
|
+
/** @import { ServiceWorkerLogger } from './components/PushNotifications/types.js' */
|
|
606
594
|
|
|
607
595
|
/** @type {ServiceWorkerGlobalScope} */
|
|
608
596
|
// @ts-ignore
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
const e=e=>["DEEPLINK","WEBURL"].includes(e);const t="config";var n=async e=>{try{const e=await(n="alloyPushNotifications",o=1,r=e=>{e.objectStoreNames.contains(t)||e.createObjectStore(t,{keyPath:"id"})},new Promise((e,t)=>{const a=indexedDB.open(n,o);a.onerror=()=>t(a.error),a.onsuccess=()=>e(a.result),a.onupgradeneeded=e=>{const t=e.target.result;r&&r(t)}})),a=await((e,t,n)=>new Promise((o,r)=>{const a=e.transaction([t],"readonly").objectStore(t).get(n);a.onerror=()=>r(a.error),a.onsuccess=()=>o(a.result)}))(e,t,"alloyConfig");return e.close(),a}catch(t){e.error("Failed to read data from IndexedDB",{error:t})}var n,o,r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));
|
|
13
|
+
const e=e=>["DEEPLINK","WEBURL"].includes(e);const t="config";var n=async e=>{try{const e=await(n="alloyPushNotifications",o=1,r=e=>{e.objectStoreNames.contains(t)||e.createObjectStore(t,{keyPath:"id"})},new Promise((e,t)=>{const a=indexedDB.open(n,o);a.onerror=()=>t(a.error),a.onsuccess=()=>e(a.result),a.onupgradeneeded=e=>{const t=e.target.result;r&&r(t)}})),a=await((e,t,n)=>new Promise((o,r)=>{const a=e.transaction([t],"readonly").objectStore(t).get(n);a.onerror=()=>r(a.error),a.onsuccess=()=>o(a.result)}))(e,t,"alloyConfig");return e.close(),a}catch(t){e.error("Failed to read data from IndexedDB",{error:t})}var n,o,r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));const r=new Uint8Array(16);function a(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){e=e||{};const a=e.random??e.rng?.()??crypto.getRandomValues(r);if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=a[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(a)}(e,t,n):crypto.randomUUID()}const i=self,s={namespace:"[alloy][pushNotificationWorker]",info:(...e)=>console.log(s.namespace,...e),error:(...e)=>console.error(s.namespace,...e)},c=(({platform:t,sw:o})=>{const r=(({readFromIndexedDb:e,uuidv4:t,logger:n,fetch:o})=>async({xdm:r,actionLabel:a,applicationLaunches:i=0})=>{const s=await e(n),{browser:c,ecid:l,edgeDomain:d,edgeBasePath:u,datastreamId:g,datasetId:m}=s||{};let f={};a&&(f={customAction:{actionID:a}});const p=[{name:"browser",errorField:"Browser"},{name:"ecid",errorField:"ECID"},{name:"edgeDomain",errorField:"Edge domain"},{name:"edgeBasePath",errorField:"Edge base path"},{name:"datastreamId",errorField:"Datastream ID"},{name:"datasetId",errorField:"Dataset ID"}];try{for(const e of p)if(!s[e.name])throw new Error(`Cannot send tracking call. ${e.errorField} is missing.`);const e=`https://${d}/${u}/v1/interact?configId=${g}&requestId=${t()}`,h={events:[{xdm:{identityMap:{ECID:[{id:l}]},timestamp:(new Date).toISOString(),pushNotificationTracking:{...f,pushProviderMessageID:t(),pushProvider:c.toLowerCase()},application:{launches:{value:i}},eventType:a?"pushTracking.customAction":"pushTracking.applicationOpened",_experience:{...r._experience,customerJourneyManagement:{...r._experience.customerJourneyManagement,pushChannelContext:{platform:"web"},messageProfile:{channel:{_id:"https://ns.adobe.com/xdm/channels/push"}}}}},meta:{collect:{datasetId:m}}}]},w=await o(e,{method:"POST",headers:{"content-type":"text/plain; charset=UTF-8"},body:JSON.stringify(h)});return!!w.ok||(n.error("Tracking call failed: ",w.status,w.statusText),!1)}catch(e){return n.error("Error sending tracking call:",e),!1}})({readFromIndexedDb:n,uuidv4:a,logger:t.logger,fetch:t.fetch}),i=(({makeSendServiceWorkerTrackingData:t,sw:n,logger:o})=>({event:r})=>{r.notification.close();const a=r.notification.data;let i=null,s=null;if(r.action){const t=parseInt(r.action.replace("action_",""),10);if(a?.actions?.buttons[t]){const n=a.actions.buttons[t];s=n.label,e(n.type)&&n.uri&&(i=n.uri)}}else e(a?.interaction?.type)&&a?.interaction?.uri&&(i=a.interaction.uri);t({xdm:a._xdm.mixins,actionLabel:s,applicationLaunches:1}).catch(e=>{o.error("Failed to send tracking call:",e)}),i&&r.waitUntil(n.clients.matchAll({type:"window"}).then(e=>{for(const t of e)if(t.url===i&&"focus"in t)return t.focus();if(n.clients.openWindow)return n.clients.openWindow(i)}))})({makeSendServiceWorkerTrackingData:r,sw:o,logger:t.logger});return{pushNotifications:{onPush:e=>(async({sw:e,event:t,logger:n})=>{if(!t.data)return;let o;try{o=t.data.json()}catch(e){return void n.error("Error decoding notification JSON data:",e)}const r=o.web;if(!r?.title)return;const a={body:r.body,icon:r.media,image:r.media,data:r,actions:[]};return Object.keys(a).forEach(e=>{null==a[e]&&delete a[e]}),r.actions&&r.actions.buttons&&(a.actions=r.actions.buttons.map((e,t)=>({action:`action_${t}`,title:e.label}))),e.registration.showNotification(r.title,a)})({event:e,sw:o,logger:t.logger}),onNotificationClick(e){i({event:e})},async onNotificationClose(e){const n=e.notification.data;try{await r({xdm:n._xdm.mixins,actionLabel:"Dismiss"})}catch(e){t.logger.error("Failed to send tracking call:",e)}}}}})({sw:i,platform:{logger:s,fetch:fetch}});i.addEventListener("install",()=>{i.skipWaiting()}),i.addEventListener("activate",e=>{e.waitUntil(i.clients.claim())}),i.addEventListener("push",e=>c.pushNotifications.onPush(e)),i.addEventListener("notificationclick",e=>c.pushNotifications.onNotificationClick(e)),i.addEventListener("notificationclose",e=>{c.pushNotifications.onNotificationClose(e)});
|
|
@@ -10,6 +10,8 @@ export const LAST_CONVERSION_TIME_KEY_EXPIRES: "lastConversionTimeExpires";
|
|
|
10
10
|
export const SKWCID_PARAM: "s_kwcid";
|
|
11
11
|
export const EFID_PARAM: "ef_id";
|
|
12
12
|
export const SURFER_ID: "surferId";
|
|
13
|
+
export const HASHED_IP: "hashedIp";
|
|
14
|
+
export const HASHED_IP_ADDR: "hashedIPAddr";
|
|
13
15
|
export const RAMP_ID: "rampId";
|
|
14
16
|
export const ID5_ID: "id5Id";
|
|
15
17
|
export const UNKNOWN_ADVERTISER: "";
|
|
@@ -30,6 +32,7 @@ export const SURFER_USER_ID: "1";
|
|
|
30
32
|
export const SURFER_TIMEOUT_MS: 5000;
|
|
31
33
|
export const SURFER_TRUSTED_ORIGIN: "www.everestjs.net";
|
|
32
34
|
export const SURFER_PARAM_KEY: "gsurfer";
|
|
35
|
+
export const SURFER_IP: "clientIp";
|
|
33
36
|
export const ERROR_ID5_PARTNER_ID_REQUIRED: "ID5 partner ID is required";
|
|
34
37
|
export const ERROR_RAMP_ID_MAX_RETRIES: "Failed to retrieve RampID after maximum retries";
|
|
35
38
|
export const LOG_AD_CONVERSION_START: "Processing ad conversion";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function _default({ cookieManager, logger, componentConfig, getBrowser, consent, collectSurferId, getID5Id, getRampId, appendAdvertisingIdQueryToEvent, getUrlParams, isThrottled, }: {
|
|
1
|
+
declare function _default({ cookieManager, logger, componentConfig, getBrowser, consent, collectSurferId, getID5Id, getRampId, appendAdvertisingIdQueryToEvent, appendAdCloudIdentityToEvent, collectHashedIPAddr, getUrlParams, isThrottled, normalizeAdvertiser, }: {
|
|
2
2
|
cookieManager: any;
|
|
3
3
|
logger: any;
|
|
4
4
|
componentConfig: any;
|
|
@@ -8,8 +8,11 @@ declare function _default({ cookieManager, logger, componentConfig, getBrowser,
|
|
|
8
8
|
getID5Id: Function;
|
|
9
9
|
getRampId: Function;
|
|
10
10
|
appendAdvertisingIdQueryToEvent: Function;
|
|
11
|
+
appendAdCloudIdentityToEvent: Function;
|
|
12
|
+
collectHashedIPAddr: Function;
|
|
11
13
|
getUrlParams: Function;
|
|
12
14
|
isThrottled: Function;
|
|
15
|
+
normalizeAdvertiser: Function;
|
|
13
16
|
}): ({ event, advertising }: {
|
|
14
17
|
event: any;
|
|
15
18
|
advertising?: any;
|
package/dist/types/{core → browser}/src/components/Advertising/handlers/sendAdConversion.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function _default({ eventManager, cookieManager, adConversionHandler, logger, componentConfig, getBrowser, consent, }: {
|
|
1
|
+
declare function _default({ eventManager, cookieManager, adConversionHandler, logger, componentConfig, getBrowser, consent, collectSurferId, collectHashedIPAddr, }: {
|
|
2
2
|
eventManager: any;
|
|
3
3
|
cookieManager: any;
|
|
4
4
|
adConversionHandler: any;
|
|
@@ -6,5 +6,7 @@ declare function _default({ eventManager, cookieManager, adConversionHandler, lo
|
|
|
6
6
|
componentConfig: any;
|
|
7
7
|
getBrowser: any;
|
|
8
8
|
consent: any;
|
|
9
|
+
collectSurferId: any;
|
|
10
|
+
collectHashedIPAddr: any;
|
|
9
11
|
}): () => Promise<any>;
|
|
10
12
|
export default _default;
|
package/dist/types/{core → browser}/src/components/Advertising/handlers/viewThroughHandler.d.ts
RENAMED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export default function handleViewThrough({ eventManager, cookieManager, logger, componentConfig, adConversionHandler, getBrowser, }: {
|
|
1
|
+
export default function handleViewThrough({ eventManager, cookieManager, logger, componentConfig, adConversionHandler, getBrowser, collectSurferId, collectHashedIPAddr, }: {
|
|
2
2
|
eventManager: any;
|
|
3
3
|
cookieManager: any;
|
|
4
4
|
logger: any;
|
|
5
5
|
componentConfig: any;
|
|
6
6
|
adConversionHandler: any;
|
|
7
7
|
getBrowser: any;
|
|
8
|
+
collectSurferId: any;
|
|
9
|
+
collectHashedIPAddr: any;
|
|
8
10
|
}): Promise<PromiseSettledResult<any>[]>;
|
package/dist/types/{core → browser}/src/components/Advertising/identities/collectAllIdentities.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default collectAllIdentities;
|
|
2
|
-
declare function collectAllIdentities(logger: any, componentConfig: any, cookieManager: any, getBrowser: any): {
|
|
2
|
+
declare function collectAllIdentities(logger: any, componentConfig: any, cookieManager: any, getBrowser: any, collectSurferId: any): {
|
|
3
3
|
surferId: any;
|
|
4
4
|
id5Id: any;
|
|
5
5
|
rampId: any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default createCollectSurferId;
|
|
2
|
+
/**
|
|
3
|
+
* Factory for surferId collection. Cache lives at closure scope — no module-level state.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} deps
|
|
6
|
+
* @param {Function} deps.initiateAdvertisingIdentityCall
|
|
7
|
+
* @param {Object} deps.cookieManager
|
|
8
|
+
* @param {Function} deps.getBrowser
|
|
9
|
+
* @returns {Function} collectSurferId(useShortTimeout?)
|
|
10
|
+
*/
|
|
11
|
+
declare function createCollectSurferId({ initiateAdvertisingIdentityCall, cookieManager, getBrowser, }: {
|
|
12
|
+
initiateAdvertisingIdentityCall: Function;
|
|
13
|
+
cookieManager: any;
|
|
14
|
+
getBrowser: Function;
|
|
15
|
+
}): Function;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare function _default({ cookieManager, hash }: {
|
|
2
|
+
cookieManager: any;
|
|
3
|
+
hash?: (str: string, seed?: number) => string;
|
|
4
|
+
}): {
|
|
5
|
+
captureFromIframe: (clientIp: any) => void;
|
|
6
|
+
get: () => any;
|
|
7
|
+
collect: (initiateCallFn: any) => any;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -16,6 +16,20 @@ export function normalizeAdvertiser(advertiserSettings: any[]): string;
|
|
|
16
16
|
*/
|
|
17
17
|
export function createManagedAsyncOperation(operationName: string, workerFn: Function): Function;
|
|
18
18
|
export function appendAdvertisingIdQueryToEvent(idsToInclude: any, event: any, cookieManager: any, componentConfig: any, addEventType?: boolean): any;
|
|
19
|
+
/**
|
|
20
|
+
* Appends AdCloud identity data to the event XDM as _experience.adcloud.stitchId.
|
|
21
|
+
* @param {{ surferId?: string, hashedIp?: string, id5Id?: string, rampId?: string, adfId?: string }} idsToInclude
|
|
22
|
+
* @param {{ mergeXdm: (xdm: Object) => void }} event
|
|
23
|
+
*/
|
|
24
|
+
export function appendAdCloudIdentityToEvent(idsToInclude: {
|
|
25
|
+
surferId?: string;
|
|
26
|
+
hashedIp?: string;
|
|
27
|
+
id5Id?: string;
|
|
28
|
+
rampId?: string;
|
|
29
|
+
adfId?: string;
|
|
30
|
+
}, event: {
|
|
31
|
+
mergeXdm: (xdm: any) => void;
|
|
32
|
+
}): void;
|
|
19
33
|
export function isAnyIdUnused(availableIds: any, conversionCalled: any): boolean;
|
|
20
34
|
export function markIdsAsConverted(idTypes: any, conversionCalled: any, cookieManager: any, logger: any): void;
|
|
21
35
|
export function isThrottled(idType: any, cookieManager: any): boolean;
|
|
@@ -42,9 +42,9 @@ declare namespace createPushNotifications {
|
|
|
42
42
|
let namespace: string;
|
|
43
43
|
let configValidators: any;
|
|
44
44
|
}
|
|
45
|
-
import type { StorageCreator } from '
|
|
46
|
-
import type { EventManager } from '
|
|
47
|
-
import type { Logger } from '
|
|
48
|
-
import type { ConsentManager } from '
|
|
49
|
-
import type { IdentityManager } from '
|
|
50
|
-
import type { EdgeRequestExecutor } from '
|
|
45
|
+
import type { StorageCreator } from '@adobe/alloy-core/utils/types.js';
|
|
46
|
+
import type { EventManager } from '@adobe/alloy-core/core/types.js';
|
|
47
|
+
import type { Logger } from '@adobe/alloy-core/core/types.js';
|
|
48
|
+
import type { ConsentManager } from '@adobe/alloy-core/core/consent/types.js';
|
|
49
|
+
import type { IdentityManager } from '@adobe/alloy-core/core/identity/types.js';
|
|
50
|
+
import type { EdgeRequestExecutor } from '@adobe/alloy-core/core/edgeNetwork/types.js';
|
|
@@ -5,5 +5,5 @@ declare function _default({ ecid, eventManager, serializedPushSubscriptionDetail
|
|
|
5
5
|
appId: string;
|
|
6
6
|
}): Promise<DataCollectionRequestPayload>;
|
|
7
7
|
export default _default;
|
|
8
|
-
import type { EventManager } from "
|
|
9
|
-
import type { DataCollectionRequestPayload } from "
|
|
8
|
+
import type { EventManager } from "@adobe/alloy-core/core/types.js";
|
|
9
|
+
import type { DataCollectionRequestPayload } from "@adobe/alloy-core/utils/request/types.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare function _default({ payload }: {
|
|
2
|
+
payload: DataCollectionRequestPayload;
|
|
3
|
+
}): Request;
|
|
4
|
+
export default _default;
|
|
5
|
+
import type { DataCollectionRequestPayload } from '@adobe/alloy-core/utils/request/types.js';
|
|
6
|
+
import type { Request } from '@adobe/alloy-core/utils/request/types.js';
|
|
@@ -12,9 +12,9 @@ declare function _default({ config: { vapidPublicKey, appId }, storage, logger,
|
|
|
12
12
|
window: Window;
|
|
13
13
|
}): Promise<void>;
|
|
14
14
|
export default _default;
|
|
15
|
-
import type { Storage } from '
|
|
16
|
-
import type { Logger } from '
|
|
17
|
-
import type { EventManager } from '
|
|
18
|
-
import type { IdentityManager } from '
|
|
19
|
-
import type { EdgeRequestExecutor } from '
|
|
20
|
-
import type { ConsentManager } from '
|
|
15
|
+
import type { Storage } from '@adobe/alloy-core/utils/types.js';
|
|
16
|
+
import type { Logger } from '@adobe/alloy-core/core/types.js';
|
|
17
|
+
import type { EventManager } from '@adobe/alloy-core/core/types.js';
|
|
18
|
+
import type { IdentityManager } from '@adobe/alloy-core/core/identity/types.js';
|
|
19
|
+
import type { EdgeRequestExecutor } from '@adobe/alloy-core/core/edgeNetwork/types.js';
|
|
20
|
+
import type { ConsentManager } from '@adobe/alloy-core/core/consent/types.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as activityCollector } from "./ActivityCollector/index.js";
|
|
2
|
+
export { default as advertising } from "./Advertising/index.js";
|
|
3
|
+
export { default as personalization } from "./Personalization/index.js";
|
|
4
|
+
export { default as pushNotifications } from "./PushNotifications/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as context } from "./Context/index.js";
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export function createInstance(options?: {}): (commandName: string, options?: any) => Promise<any>;
|
|
2
|
+
import { createCustomInstance } from "@adobe/alloy-core";
|
|
3
|
+
import * as allOptionalComponents from "./allOptionalComponents.js";
|
|
4
|
+
export { createCustomInstance, allOptionalComponents as components };
|
|
@@ -10,7 +10,7 @@ declare function _default({ logger, trackMediaSession, trackMediaEvent, uuid }:
|
|
|
10
10
|
trackSessionEnd: () => any;
|
|
11
11
|
trackComplete: () => any;
|
|
12
12
|
trackError: (errorId: any) => any;
|
|
13
|
-
trackEvent: (eventType: any, info: any,
|
|
13
|
+
trackEvent: (eventType: any, info: any, contextData: any) => any;
|
|
14
14
|
updatePlayhead: (time: any) => void;
|
|
15
15
|
updateQoEObject: (qoeObject: any) => void;
|
|
16
16
|
destroy: () => void;
|
|
@@ -1,61 +1,12 @@
|
|
|
1
1
|
declare function _default({ logger }: {
|
|
2
2
|
logger: any;
|
|
3
3
|
}): {
|
|
4
|
-
createMediaObject: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
} | {
|
|
13
|
-
sessionDetails?: undefined;
|
|
14
|
-
};
|
|
15
|
-
createAdBreakObject: (name: any, position: any, startTime: any) => {
|
|
16
|
-
advertisingPodDetails: {
|
|
17
|
-
friendlyName: any;
|
|
18
|
-
offset: any;
|
|
19
|
-
index: any;
|
|
20
|
-
};
|
|
21
|
-
} | {
|
|
22
|
-
advertisingPodDetails?: undefined;
|
|
23
|
-
};
|
|
24
|
-
createAdObject: (name: any, id: any, position: any, length: any) => {
|
|
25
|
-
advertisingDetails: {
|
|
26
|
-
friendlyName: any;
|
|
27
|
-
name: any;
|
|
28
|
-
podPosition: any;
|
|
29
|
-
length: any;
|
|
30
|
-
};
|
|
31
|
-
} | {
|
|
32
|
-
advertisingDetails?: undefined;
|
|
33
|
-
};
|
|
34
|
-
createChapterObject: (name: any, position: any, length: any, startTime: any) => {
|
|
35
|
-
chapterDetails: {
|
|
36
|
-
friendlyName: any;
|
|
37
|
-
offset: any;
|
|
38
|
-
index: any;
|
|
39
|
-
length: any;
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
|
-
chapterDetails?: undefined;
|
|
43
|
-
};
|
|
44
|
-
createStateObject: (stateName: any) => {
|
|
45
|
-
name: any;
|
|
46
|
-
} | {
|
|
47
|
-
name?: undefined;
|
|
48
|
-
};
|
|
49
|
-
createQoEObject: (bitrate: any, droppedFrames: any, fps: any, startupTime: any) => {
|
|
50
|
-
bitrate: any;
|
|
51
|
-
droppedFrames: any;
|
|
52
|
-
framesPerSecond: any;
|
|
53
|
-
timeToStart: any;
|
|
54
|
-
} | {
|
|
55
|
-
bitrate?: undefined;
|
|
56
|
-
droppedFrames?: undefined;
|
|
57
|
-
framesPerSecond?: undefined;
|
|
58
|
-
timeToStart?: undefined;
|
|
59
|
-
};
|
|
4
|
+
createMediaObject: (...args: any[]) => any;
|
|
5
|
+
createAdBreakObject: (...args: any[]) => any;
|
|
6
|
+
createAdObject: (...args: any[]) => any;
|
|
7
|
+
createChapterObject: (...args: any[]) => any;
|
|
8
|
+
createStateObject: (...args: any[]) => any;
|
|
9
|
+
createQoEObject: (...args: any[]) => any;
|
|
10
|
+
version: string;
|
|
60
11
|
};
|
|
61
12
|
export default _default;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
export { default as activityCollector } from "../components/ActivityCollector/index.js";
|
|
2
1
|
export { default as audiences } from "../components/Audiences/index.js";
|
|
3
2
|
export { default as consent } from "../components/Consent/index.js";
|
|
4
3
|
export { default as eventMerge } from "../components/EventMerge/index.js";
|
|
5
4
|
export { default as mediaAnalyticsBridge } from "../components/MediaAnalyticsBridge/index.js";
|
|
6
|
-
export { default as personalization } from "../components/Personalization/index.js";
|
|
7
5
|
export { default as rulesEngine } from "../components/RulesEngine/index.js";
|
|
8
6
|
export { default as streamingMedia } from "../components/StreamingMedia/index.js";
|
|
9
|
-
export { default as advertising } from "../components/Advertising/index.js";
|
|
10
|
-
export { default as pushNotifications } from "../components/PushNotifications/index.js";
|
|
11
7
|
export { default as brandConcierge } from "../components/BrandConcierge/index.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { default as context } from "../components/Context/index.js";
|
|
2
1
|
export { default as dataCollector } from "../components/DataCollector/index.js";
|
|
3
2
|
export { default as identity } from "../components/Identity/index.js";
|
|
4
3
|
export { default as libraryInfo } from "../components/LibraryInfo/index.js";
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {import("./core/types.js").AlloyMonitor} AlloyMonitor
|
|
3
3
|
*/
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {import("./components/PushNotifications/types.js").ServiceWorkerLogger} ServiceWorkerLogger
|
|
6
|
-
*/
|
|
7
4
|
export const Types: {};
|
|
8
5
|
export type AlloyMonitor = import("./core/types.js").AlloyMonitor;
|
|
9
|
-
export type ServiceWorkerLogger = import("./components/PushNotifications/types.js").ServiceWorkerLogger;
|
|
@@ -12,44 +12,51 @@
|
|
|
12
12
|
|
|
13
13
|
const byteToHex = [];
|
|
14
14
|
for (let i = 0; i < 256; ++i) {
|
|
15
|
-
|
|
15
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
16
16
|
}
|
|
17
17
|
function unsafeStringify(arr, offset = 0) {
|
|
18
|
-
|
|
18
|
+
return (byteToHex[arr[offset + 0]] +
|
|
19
|
+
byteToHex[arr[offset + 1]] +
|
|
20
|
+
byteToHex[arr[offset + 2]] +
|
|
21
|
+
byteToHex[arr[offset + 3]] +
|
|
22
|
+
'-' +
|
|
23
|
+
byteToHex[arr[offset + 4]] +
|
|
24
|
+
byteToHex[arr[offset + 5]] +
|
|
25
|
+
'-' +
|
|
26
|
+
byteToHex[arr[offset + 6]] +
|
|
27
|
+
byteToHex[arr[offset + 7]] +
|
|
28
|
+
'-' +
|
|
29
|
+
byteToHex[arr[offset + 8]] +
|
|
30
|
+
byteToHex[arr[offset + 9]] +
|
|
31
|
+
'-' +
|
|
32
|
+
byteToHex[arr[offset + 10]] +
|
|
33
|
+
byteToHex[arr[offset + 11]] +
|
|
34
|
+
byteToHex[arr[offset + 12]] +
|
|
35
|
+
byteToHex[arr[offset + 13]] +
|
|
36
|
+
byteToHex[arr[offset + 14]] +
|
|
37
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
19
38
|
}
|
|
20
39
|
|
|
21
|
-
let getRandomValues;
|
|
22
40
|
const rnds8 = new Uint8Array(16);
|
|
23
41
|
function rng() {
|
|
24
|
-
|
|
25
|
-
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
26
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
27
|
-
}
|
|
28
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
29
|
-
}
|
|
30
|
-
return getRandomValues(rnds8);
|
|
42
|
+
return crypto.getRandomValues(rnds8);
|
|
31
43
|
}
|
|
32
44
|
|
|
33
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
34
|
-
var native = {
|
|
35
|
-
randomUUID
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
function _v4(options, buf, offset) {
|
|
39
|
-
options = options || {};
|
|
40
|
-
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
41
|
-
if (rnds.length < 16) {
|
|
42
|
-
throw new Error('Random bytes length must be >= 16');
|
|
43
|
-
}
|
|
44
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
45
|
-
rnds[8] = rnds[8] & 0x3f | 0x80;
|
|
46
|
-
return unsafeStringify(rnds);
|
|
47
|
-
}
|
|
48
45
|
function v4(options, buf, offset) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
if (crypto.randomUUID) {
|
|
47
|
+
return crypto.randomUUID();
|
|
48
|
+
}
|
|
49
|
+
return _v4(options);
|
|
50
|
+
}
|
|
51
|
+
function _v4(options, buf, offset) {
|
|
52
|
+
options = options || {};
|
|
53
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
54
|
+
if (rnds.length < 16) {
|
|
55
|
+
throw new Error('Random bytes length must be >= 16');
|
|
56
|
+
}
|
|
57
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
58
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
59
|
+
return unsafeStringify(rnds);
|
|
53
60
|
}
|
|
54
61
|
|
|
55
62
|
/*
|
|
@@ -64,9 +71,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
64
71
|
governing permissions and limitations under the License.
|
|
65
72
|
*/
|
|
66
73
|
|
|
74
|
+
|
|
67
75
|
var createEventMergeId = () => {
|
|
68
76
|
return {
|
|
69
|
-
eventMergeId: v4()
|
|
77
|
+
eventMergeId: v4(),
|
|
70
78
|
};
|
|
71
79
|
};
|
|
72
80
|
|
package/dist/utils/deepAssign.js
CHANGED
|
@@ -27,7 +27,7 @@ governing permissions and limitations under the License.
|
|
|
27
27
|
* @param {*} value
|
|
28
28
|
* @returns {boolean}
|
|
29
29
|
*/
|
|
30
|
-
var isNil = value => value == null;
|
|
30
|
+
var isNil = (value) => value == null;
|
|
31
31
|
|
|
32
32
|
/*
|
|
33
33
|
Copyright 2019 Adobe. All rights reserved.
|
|
@@ -47,7 +47,8 @@ governing permissions and limitations under the License.
|
|
|
47
47
|
* @param {*} value
|
|
48
48
|
* @returns {boolean}
|
|
49
49
|
*/
|
|
50
|
-
var isObject =
|
|
50
|
+
var isObject = (value) =>
|
|
51
|
+
!isNil(value) && !Array.isArray(value) && typeof value === "object";
|
|
51
52
|
|
|
52
53
|
/*
|
|
53
54
|
Copyright 2019 Adobe. All rights reserved.
|
|
@@ -64,11 +65,13 @@ governing permissions and limitations under the License.
|
|
|
64
65
|
|
|
65
66
|
// Keys that should never be copied to prevent prototype pollution.
|
|
66
67
|
const DANGEROUS_KEYS = ["__proto__", "constructor", "prototype"];
|
|
68
|
+
|
|
67
69
|
const deepAssignObject = (target, source) => {
|
|
68
|
-
Object.keys(source).forEach(key => {
|
|
70
|
+
Object.keys(source).forEach((key) => {
|
|
69
71
|
if (DANGEROUS_KEYS.includes(key)) {
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
74
|
+
|
|
72
75
|
if (isObject(target[key]) && isObject(source[key])) {
|
|
73
76
|
deepAssignObject(target[key], source[key]);
|
|
74
77
|
return;
|
|
@@ -89,8 +92,11 @@ var deepAssign = (target, ...sources) => {
|
|
|
89
92
|
if (isNil(target)) {
|
|
90
93
|
throw new TypeError('deepAssign "target" cannot be null or undefined');
|
|
91
94
|
}
|
|
95
|
+
|
|
92
96
|
const result = Object(target);
|
|
93
|
-
|
|
97
|
+
|
|
98
|
+
sources.forEach((source) => deepAssignObject(result, Object(source)));
|
|
99
|
+
|
|
94
100
|
return result;
|
|
95
101
|
};
|
|
96
102
|
|