@dereekb/dbx-analytics 13.3.0 → 13.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-analytics.mjs","sources":["../../../../packages/dbx-analytics/src/lib/analytics/analytics.stream.ts","../../../../packages/dbx-analytics/src/lib/analytics/analytics.service.ts","../../../../packages/dbx-analytics/src/lib/action/analytics.action.directive.ts","../../../../packages/dbx-analytics/src/lib/action/analytics.module.ts","../../../../packages/dbx-analytics/src/lib/analytics/analytics.providers.ts","../../../../packages/dbx-analytics/src/lib/providers/segment/segment.service.ts","../../../../packages/dbx-analytics/src/lib/providers/segment/segment.listener.service.ts","../../../../packages/dbx-analytics/src/lib/providers/segment/segment.providers.ts","../../../../packages/dbx-analytics/src/dereekb-dbx-analytics.ts"],"sourcesContent":["import { type Maybe } from '@dereekb/util';\nimport { type DbxAnalyticsUser, type DbxUserAnalyticsEvent, type DbxAnalyticsUserId } from './analytics';\n\nexport enum DbxAnalyticsStreamEventType {\n PageView,\n /**\n * Emitted any time the user value changes.\n *\n * Can emit when the user goes from defined to undefined.\n */\n UserChange,\n /**\n * Emitted any time the user id changes.\n */\n UserIdChange,\n\n // User Events\n NewUserEvent,\n UserLoginEvent,\n UserLogoutEvent,\n UserPropertiesEvent,\n\n // Events\n Event\n}\n\nexport interface DbxAnalyticsStreamEvent {\n readonly type: DbxAnalyticsStreamEventType;\n readonly user?: Maybe<DbxAnalyticsUser>;\n readonly event?: DbxUserAnalyticsEvent;\n readonly userId?: DbxAnalyticsUserId;\n}\n","import { type Observable, Subject, BehaviorSubject, of, type Subscription, first, shareReplay, switchMap, distinctUntilChanged } from 'rxjs';\nimport { Injectable, inject } from '@angular/core';\nimport { SubscriptionObject, filterMaybe } from '@dereekb/rxjs';\nimport { type DbxAnalyticsEvent, type DbxAnalyticsEventData, type DbxAnalyticsEventName, type DbxAnalyticsUser, type NewUserAnalyticsEventData, type DbxUserAnalyticsEvent } from './analytics';\nimport { type DbxAnalyticsStreamEvent, DbxAnalyticsStreamEventType } from './analytics.stream';\nimport { type Maybe, type Destroyable, safeCompareEquality } from '@dereekb/util';\n\nexport abstract class DbxAnalyticsEventEmitterService {\n abstract sendNewUserEvent(user: DbxAnalyticsUser, data: NewUserAnalyticsEventData): void;\n abstract sendUserLoginEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void;\n abstract sendUserLogoutEvent(data?: DbxAnalyticsEventData): void;\n abstract sendUserPropertiesEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void;\n abstract sendEventData(name: DbxAnalyticsEventName, data?: DbxAnalyticsEventData): void;\n abstract sendEvent(event: DbxAnalyticsEvent): void;\n abstract sendPageView(page?: string): void;\n}\n\nexport abstract class DbxAnalyticsEventStreamService {\n abstract readonly events$: Observable<DbxAnalyticsStreamEvent>;\n}\n\nexport abstract class DbxAnalyticsUserSource {\n abstract readonly analyticsUser$: Observable<Maybe<DbxAnalyticsUser>>;\n}\n\nexport abstract class DbxAnalyticsServiceListener {\n public abstract listenToService(service: DbxAnalyticsService): void;\n}\n\n/**\n * Abstract AnalyticsServiceListener implementation.\n */\nexport abstract class AbstractDbxAnalyticsServiceListener implements DbxAnalyticsServiceListener, Destroyable {\n private _sub = new SubscriptionObject();\n protected _analytics = new BehaviorSubject<Maybe<DbxAnalyticsService>>(undefined);\n\n readonly analytics$ = this._analytics.pipe(filterMaybe(), shareReplay(1));\n readonly analyticsEvents$ = this.analytics$.pipe(\n switchMap((x) => x.events$),\n shareReplay(1)\n );\n\n // MARK: AnalyticsServiceListener\n listenToService(service: DbxAnalyticsService): void {\n this._analytics.next(service);\n const sub = this._initializeServiceSubscription();\n\n if (sub !== false) {\n this._sub.subscription = sub;\n }\n }\n\n protected abstract _initializeServiceSubscription(): Subscription | false;\n\n // MARK: Destroy\n destroy(): void {\n this._analytics.complete();\n this._sub.destroy();\n }\n}\n\nexport abstract class DbxAnalyticsServiceConfiguration {\n readonly listeners: DbxAnalyticsServiceListener[] = [];\n readonly isProduction?: boolean;\n readonly logEvents?: boolean;\n readonly userSource?: DbxAnalyticsUserSource;\n}\n\nexport interface DbxAnalyticsStreamEventAnalyticsEventWrapper extends DbxAnalyticsStreamEvent {\n readonly event: DbxUserAnalyticsEvent;\n readonly type: DbxAnalyticsStreamEventType;\n readonly user: Maybe<DbxAnalyticsUser>;\n readonly userId: string | undefined;\n}\n\nexport function dbxAnalyticsStreamEventAnalyticsEventWrapper(event: DbxUserAnalyticsEvent, type: DbxAnalyticsStreamEventType = DbxAnalyticsStreamEventType.Event) {\n const { user } = event;\n const userId = user ? user.user : undefined;\n\n return {\n event,\n type,\n user,\n userId\n };\n}\n\n/**\n * Primary analytics service that emits analytics events that components can listen to.\n */\n@Injectable()\nexport class DbxAnalyticsService implements DbxAnalyticsEventStreamService, DbxAnalyticsEventEmitterService, Destroyable {\n private readonly _config = inject(DbxAnalyticsServiceConfiguration);\n\n // TODO: Make these configurable.\n static readonly USER_REGISTRATION_EVENT_NAME = 'User Registered';\n static readonly USER_LOGIN_EVENT_NAME = 'User Login';\n static readonly USER_LOGOUT_EVENT_NAME = 'User Logout';\n static readonly USER_PROPERTIES_EVENT_NAME = 'User Properties';\n\n private _subject = new Subject<DbxAnalyticsStreamEvent>();\n readonly events$ = this._subject.asObservable();\n\n private _userSource = new BehaviorSubject<Maybe<DbxAnalyticsUserSource>>(undefined);\n\n readonly user$ = this._userSource.pipe(\n switchMap((x) => (x ? x.analyticsUser$ : of(undefined))),\n shareReplay(1)\n );\n\n private _userSourceSub = new SubscriptionObject();\n private _userIdEventSub = new SubscriptionObject();\n private _loggerSub = new SubscriptionObject();\n\n constructor() {\n this._init();\n let userSource: Maybe<DbxAnalyticsUserSource> = inject(DbxAnalyticsUserSource, { optional: true });\n userSource = userSource || this._config.userSource;\n\n if (userSource) {\n this.setUserSource(userSource);\n }\n }\n\n // MARK: Source\n /**\n * Sets the user directly, overridding the UserSource.\n */\n public setUser(user: Maybe<DbxAnalyticsUser>): void {\n let source: Maybe<DbxAnalyticsUserSource>;\n\n if (user) {\n source = { analyticsUser$: of(user) };\n }\n\n this._userSource.next(source);\n\n if (this._userSource.value) {\n console.warn('DbxAnalyticsService has a userSource that is set. Source is now overridden by setUser() value.');\n }\n }\n\n public setUserSource(source: DbxAnalyticsUserSource): void {\n this._userSource.next(source);\n }\n\n // MARK: AnalyticsEventEmitterService\n /**\n * Sends an event.\n */\n public sendNewUserEvent(user: DbxAnalyticsUser, data: NewUserAnalyticsEventData): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_REGISTRATION_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.NewUserEvent,\n user\n );\n }\n\n public sendUserLoginEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_LOGIN_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.UserLoginEvent,\n user\n );\n }\n\n public sendUserLogoutEvent(data?: DbxAnalyticsEventData, clearUser = true): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_LOGOUT_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.UserLogoutEvent\n );\n\n if (clearUser) {\n this.setUser(undefined);\n }\n }\n\n public sendUserPropertiesEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_PROPERTIES_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.UserPropertiesEvent,\n user\n );\n }\n\n public sendEventData(name: DbxAnalyticsEventName, data?: DbxAnalyticsEventData): void {\n return this.sendEvent({\n name,\n data\n });\n }\n\n public sendEventType(eventType: DbxAnalyticsEventName): void {\n this.sendNextEvent(\n {\n name: eventType\n },\n DbxAnalyticsStreamEventType.Event\n );\n }\n\n public sendEvent(event: DbxAnalyticsEvent): void {\n this.sendNextEvent(event, DbxAnalyticsStreamEventType.Event);\n }\n\n public sendPageView(page?: string): void {\n this.sendNextEvent(\n {\n name: page\n },\n DbxAnalyticsStreamEventType.PageView\n );\n }\n\n /**\n * Sends the next event.\n *\n * @param event\n * @param type\n * @param userOverride Uses this user if set as null or an override value. If undefined the current analytics user is used.\n */\n protected sendNextEvent(event: DbxAnalyticsEvent = {}, type: DbxAnalyticsStreamEventType, userOverride?: Maybe<DbxAnalyticsUser>): void {\n this.user$.pipe(first()).subscribe((analyticsUser) => {\n const user: Maybe<DbxAnalyticsUser> = userOverride !== undefined ? userOverride : analyticsUser;\n const analyticsEvent: DbxUserAnalyticsEvent = { ...event, user };\n this.nextEvent(analyticsEvent, type);\n });\n }\n\n protected nextEvent(event: DbxUserAnalyticsEvent, type: DbxAnalyticsStreamEventType): void {\n const wrapper = dbxAnalyticsStreamEventAnalyticsEventWrapper(event, type);\n this._subject.next(wrapper);\n }\n\n // MARK: Internal\n private _init(): void {\n if (this._config.isProduction) {\n // Initialize listeners.\n this._config.listeners.forEach((listener) => {\n listener.listenToService(this);\n });\n } else {\n console.warn('AnalyticsService: Analytics not in production mode. All analytics events are ignored.');\n }\n\n if (this._config.logEvents || !this._config.isProduction) {\n console.log('AnalyticsService: Log analytics events enabled.');\n\n // Create a new subscription\n this._loggerSub.subscription = this._subject.subscribe((x) => {\n console.log(`AnalyticsService: Analytics Event - ${DbxAnalyticsStreamEventType[x.type]} | User: ${x.userId} | Data: ${JSON.stringify(x.event)}.`);\n });\n }\n\n this._userSourceSub.subscription = this.user$.subscribe((user) => {\n this.sendNextEvent({}, DbxAnalyticsStreamEventType.UserChange, user ?? null);\n });\n\n this._userIdEventSub.subscription = this.user$.pipe(distinctUntilChanged((a, b) => safeCompareEquality(a, b, (x, y) => x.user === y.user))).subscribe((user) => {\n this.sendNextEvent({}, DbxAnalyticsStreamEventType.UserIdChange, user ?? null);\n });\n }\n\n destroy() {\n this._subject.complete();\n this._userSource.complete();\n this._userSourceSub.destroy();\n this._userIdEventSub.destroy();\n this._loggerSub.destroy();\n }\n}\n","import { filterMaybe } from '@dereekb/rxjs';\nimport { switchMap, tap, shareReplay, merge, type Observable, of } from 'rxjs';\nimport { Directive, inject, input } from '@angular/core';\nimport { DbxActionContextStoreSourceInstance, cleanSubscriptionWithLockSet } from '@dereekb/dbx-core';\nimport { DbxAnalyticsService } from '../analytics/analytics.service';\nimport { type Maybe, type ReadableError } from '@dereekb/util';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n/**\n * DbxActionAnalyticsDirective config\n */\nexport interface DbxActionAnalyticsConfig<T = unknown, O = unknown> {\n readonly onTriggered?: (service: DbxAnalyticsService) => void;\n readonly onReady?: (service: DbxAnalyticsService, value: T) => void;\n readonly onSuccess?: (service: DbxAnalyticsService, result: Maybe<O>, value: T) => void;\n readonly onError?: (service: DbxAnalyticsService, error: Maybe<ReadableError>) => void;\n}\n\n/**\n * Used to listen to an ActionContext and send analytical events based on action events.\n */\n@Directive({\n selector: '[dbxActionAnalytics]',\n standalone: true\n})\nexport class DbxActionAnalyticsDirective<T, O> {\n readonly source = inject(DbxActionContextStoreSourceInstance<T, O>, { host: true });\n readonly analyticsService = inject(DbxAnalyticsService);\n\n readonly config = input<Maybe<DbxActionAnalyticsConfig<T, O>>>(undefined, { alias: 'dbxActionAnalytics' });\n readonly config$ = toObservable(this.config).pipe(filterMaybe(), shareReplay(1));\n\n constructor() {\n cleanSubscriptionWithLockSet({\n lockSet: this.source.lockSet,\n sub: this.config$\n .pipe(\n switchMap(({ onTriggered, onReady, onSuccess, onError }) => {\n const triggerObs: Observable<unknown>[] = [];\n\n if (onTriggered) {\n triggerObs.push(this.source.triggered$.pipe(tap(() => onTriggered(this.analyticsService))));\n }\n\n if (onReady) {\n triggerObs.push(this.source.valueReady$.pipe(tap((value) => onReady(this.analyticsService, value))));\n }\n\n if (onSuccess) {\n triggerObs.push(this.source.successPair$.pipe(tap(({ result, value }) => onSuccess(this.analyticsService, result, value))));\n }\n\n if (onError) {\n triggerObs.push(\n this.source.error$.pipe(\n filterMaybe(),\n tap((error) => onError(this.analyticsService, error))\n )\n );\n }\n\n if (triggerObs.length) {\n return merge(...triggerObs);\n } else {\n return of();\n }\n })\n )\n .subscribe()\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxActionAnalyticsDirective } from './analytics.action.directive';\n\n/**\n * @deprecated The exported DbxActionAnalyticsDirective is now a standalone component. Import that instead.\n */\n@NgModule({\n imports: [DbxActionAnalyticsDirective],\n exports: [DbxActionAnalyticsDirective]\n})\nexport class DbxAnalyticsActionModule {}\n","import { type EnvironmentProviders, Injector, type Provider, makeEnvironmentProviders } from '@angular/core';\nimport { DbxAnalyticsServiceConfiguration, DbxAnalyticsService } from './analytics.service';\n\n/**\n * Factory function that creates a {@link DbxAnalyticsServiceConfiguration} using the Angular injector.\n *\n * Used by {@link provideDbxAnalyticsService} to defer configuration resolution to runtime.\n */\nexport type DbxAnalyticsServiceConfigurationFactory = (injector: Injector) => DbxAnalyticsServiceConfiguration;\n\n/**\n * Configuration for provideDbxAnalyticsService()\n */\nexport interface ProvideDbxAnalyticsConfig {\n readonly dbxAnalyticsServiceConfigurationFactory: DbxAnalyticsServiceConfigurationFactory;\n}\n\n/**\n * Creates a EnvironmentProviders that provides a DbxAnalyticsService.\n *\n * @param config Configuration\n * @returns EnvironmentProviders\n */\nexport function provideDbxAnalyticsService(config: ProvideDbxAnalyticsConfig): EnvironmentProviders {\n const { dbxAnalyticsServiceConfigurationFactory } = config;\n\n const providers: Provider[] = [\n // configuration\n {\n provide: DbxAnalyticsServiceConfiguration,\n useFactory: dbxAnalyticsServiceConfigurationFactory,\n deps: [Injector]\n },\n // service\n DbxAnalyticsService\n ];\n\n return makeEnvironmentProviders(providers);\n}\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport { AbstractAsyncWindowLoadedService } from '@dereekb/browser';\nimport { poll } from '@dereekb/util';\n\nexport const PRELOAD_SEGMENT_TOKEN = new InjectionToken<string>('DbxAnalyticsSegmentApiServicePreload');\n\nexport class DbxAnalyticsSegmentApiServiceConfig {\n writeKey: string;\n logging = true;\n active = true;\n constructor(writeKey: string) {\n this.writeKey = writeKey;\n }\n}\n\n/**\n * When the Segment library finishes loading, it is invoked.\n */\ntype SegmentAnalyticsInvoked = SegmentAnalytics.AnalyticsJS & { invoked?: boolean };\n\n/**\n * Segment API Service used for waiting/retrieving the segment API from window when initialized.\n *\n * This requires some setup in index.html.\n */\n@Injectable()\nexport class DbxAnalyticsSegmentApiService extends AbstractAsyncWindowLoadedService<SegmentAnalytics.AnalyticsJS> {\n private readonly _config = inject(DbxAnalyticsSegmentApiServiceConfig);\n\n static readonly SEGMENT_API_WINDOW_KEY = 'analytics';\n static readonly SEGMENT_READY_KEY = 'SegmentReady';\n\n constructor() {\n const preload = inject(PRELOAD_SEGMENT_TOKEN, { optional: true });\n super(DbxAnalyticsSegmentApiService.SEGMENT_API_WINDOW_KEY, undefined, 'Segment', preload);\n }\n\n get config(): DbxAnalyticsSegmentApiServiceConfig {\n return this._config;\n }\n\n protected override _prepareCompleteLoadingService(): Promise<void> {\n return poll({\n // poll until analytics.invoked is true.\n check: () => Boolean((window.analytics as SegmentAnalyticsInvoked).invoked),\n timesToGiveup: 100\n });\n }\n\n protected override _initService(service: SegmentAnalytics.AnalyticsJS): Promise<SegmentAnalytics.AnalyticsJS> {\n return new Promise((resolve, reject) => {\n try {\n service.load(this._config.writeKey); // Initialize Segment\n\n // Wait for the service to ready itself.\n service.ready(() => {\n // Segment changes itself or rather the target, and the previous initial target is ignored after.\n const segment: SegmentAnalytics.AnalyticsJS = window[DbxAnalyticsSegmentApiService.SEGMENT_API_WINDOW_KEY];\n resolve(segment);\n });\n } catch (e) {\n console.log('Failed to init segment: ' + e);\n reject(e);\n }\n });\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\nimport { combineLatest } from 'rxjs';\nimport { AbstractDbxAnalyticsServiceListener, type DbxAnalyticsStreamEvent, DbxAnalyticsStreamEventType, type DbxAnalyticsUser } from '../../analytics';\nimport { DbxAnalyticsSegmentApiService } from './segment.service';\n\n/**\n * DbxAnalyticsServiceListener adapter for Segment.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DbxAnalyticsSegmentServiceListener extends AbstractDbxAnalyticsServiceListener {\n private readonly _segmentApi = inject(DbxAnalyticsSegmentApiService);\n\n constructor() {\n super();\n\n if (this._segmentApi.config.logging) {\n console.log('SegmentAnalyticsListenerService: Segment is logging events.');\n }\n\n if (!this._segmentApi.config.active) {\n console.log('SegmentAnalyticsListenerService: Segment is disabled from sending events to the server.');\n }\n }\n\n /**\n * Subscribes to the Segment API service and analytics event stream, forwarding events to the Segment SDK.\n *\n * Events are only sent when the Segment configuration is marked as active.\n */\n protected _initializeServiceSubscription() {\n return combineLatest([this._segmentApi.service$, this.analyticsEvents$]).subscribe(([segment, streamEvent]: [SegmentAnalytics.AnalyticsJS, DbxAnalyticsStreamEvent]) => {\n if (this._segmentApi.config.logging) {\n console.log('Segment Listener Logging Event: ', streamEvent);\n }\n\n if (this._segmentApi.config.active) {\n this.handleStreamEvent(segment, streamEvent);\n }\n });\n }\n\n /**\n * Routes an analytics stream event to the appropriate Segment API method based on event type.\n *\n * @param api - The Segment analytics SDK instance\n * @param streamEvent - The analytics event to process\n */\n protected handleStreamEvent(api: SegmentAnalytics.AnalyticsJS, streamEvent: DbxAnalyticsStreamEvent): void {\n switch (streamEvent.type) {\n case DbxAnalyticsStreamEventType.NewUserEvent:\n this.updateWithNewUserEvent(api, streamEvent);\n break;\n case DbxAnalyticsStreamEventType.UserLoginEvent:\n this.changeUser(api, streamEvent.user);\n this.updateWithEvent(api, streamEvent);\n break;\n case DbxAnalyticsStreamEventType.Event:\n this.updateWithEvent(api, streamEvent);\n break;\n case DbxAnalyticsStreamEventType.UserLogoutEvent:\n this.changeUser(api, undefined);\n break;\n case DbxAnalyticsStreamEventType.PageView:\n api.page();\n break;\n case DbxAnalyticsStreamEventType.UserChange:\n this.changeUser(api, streamEvent.user);\n break;\n }\n }\n\n /**\n * Handles a new user registration event by identifying the user in Segment.\n *\n * @param api - The Segment analytics SDK instance\n * @param streamEvent - The event containing the new user data\n */\n protected updateWithNewUserEvent(api: SegmentAnalytics.AnalyticsJS, streamEvent: DbxAnalyticsStreamEvent): void {\n this.changeUser(api, streamEvent.user);\n }\n\n /**\n * Sends a track event to Segment with the event name, value, and additional data properties.\n *\n * @param api - The Segment analytics SDK instance\n * @param streamEvent - The analytics event containing name, value, and data\n * @param name - Optional override for the event name\n */\n protected updateWithEvent(api: SegmentAnalytics.AnalyticsJS, streamEvent: DbxAnalyticsStreamEvent, name?: string): void {\n const event = streamEvent.event;\n const eventName = name || event?.name;\n\n if (eventName) {\n const value = event?.value;\n const data = event?.data;\n\n api.track(\n eventName,\n {\n ...(value != null\n ? {\n value\n }\n : undefined),\n ...data\n },\n {},\n () => {\n if (this._segmentApi.config.logging) {\n console.log('Segment track success.');\n }\n }\n );\n }\n }\n\n private changeUser(api: SegmentAnalytics.AnalyticsJS, user: Maybe<DbxAnalyticsUser>): void {\n if (user?.user) {\n api.identify(\n user.user,\n {\n ...user.properties\n },\n {},\n () => {\n if (this._segmentApi.config.logging) {\n console.log('Segment identify success.');\n }\n }\n );\n } else {\n api.reset();\n }\n }\n}\n","import { type EnvironmentProviders, Injector, makeEnvironmentProviders, type Provider } from '@angular/core';\nimport { DbxAnalyticsSegmentApiService, DbxAnalyticsSegmentApiServiceConfig, PRELOAD_SEGMENT_TOKEN } from './segment.service';\n\nexport type DbxAnalyticsSegmentApiServiceConfigFactory = (injector: Injector) => DbxAnalyticsSegmentApiServiceConfig;\n\n/**\n * Configuration for provideDbxAnalyticsSegmentApiService()\n */\nexport interface ProvideDbxAnalyticsSegmentModuleConfig {\n readonly preloadSegmentToken?: boolean;\n readonly dbxAnalyticsSegmentApiServiceConfigFactory: DbxAnalyticsSegmentApiServiceConfigFactory;\n}\n\n/**\n * Creates a EnvironmentProviders that provides a DbxAnalyticsSegmentApiService.\n *\n * @param config Configuration\n * @returns EnvironmentProviders\n */\nexport function provideDbxAnalyticsSegmentApiService(config: ProvideDbxAnalyticsSegmentModuleConfig): EnvironmentProviders {\n const { preloadSegmentToken, dbxAnalyticsSegmentApiServiceConfigFactory } = config;\n\n const providers: Provider[] = [\n // configuration\n {\n provide: DbxAnalyticsSegmentApiServiceConfig,\n useFactory: dbxAnalyticsSegmentApiServiceConfigFactory,\n deps: [Injector]\n },\n // service\n DbxAnalyticsSegmentApiService\n ];\n\n if (preloadSegmentToken) {\n providers.push({\n provide: PRELOAD_SEGMENT_TOKEN,\n useValue: preloadSegmentToken\n });\n }\n\n return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAGY;AAAZ,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,2BAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACR;;;;AAIG;AACH,IAAA,2BAAA,CAAA,2BAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU;AACV;;AAEG;AACH,IAAA,2BAAA,CAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY;;AAGZ,IAAA,2BAAA,CAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY;AACZ,IAAA,2BAAA,CAAA,2BAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,gBAAc;AACd,IAAA,2BAAA,CAAA,2BAAA,CAAA,iBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,iBAAe;AACf,IAAA,2BAAA,CAAA,2BAAA,CAAA,qBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,qBAAmB;;AAGnB,IAAA,2BAAA,CAAA,2BAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK;AACP,CAAC,EArBW,2BAA2B,KA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YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE;AACX,SAAA,CAAC;IACJ;AAEA,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;;ACzCA;;AAEG;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-analytics.mjs","sources":["../../../../packages/dbx-analytics/src/lib/analytics/analytics.stream.ts","../../../../packages/dbx-analytics/src/lib/analytics/analytics.service.ts","../../../../packages/dbx-analytics/src/lib/action/analytics.action.directive.ts","../../../../packages/dbx-analytics/src/lib/action/analytics.module.ts","../../../../packages/dbx-analytics/src/lib/analytics/analytics.providers.ts","../../../../packages/dbx-analytics/src/lib/providers/segment/segment.service.ts","../../../../packages/dbx-analytics/src/lib/providers/segment/segment.listener.service.ts","../../../../packages/dbx-analytics/src/lib/providers/segment/segment.providers.ts","../../../../packages/dbx-analytics/src/dereekb-dbx-analytics.ts"],"sourcesContent":["import { type Maybe } from '@dereekb/util';\nimport { type DbxAnalyticsUser, type DbxUserAnalyticsEvent, type DbxAnalyticsUserId } from './analytics';\n\n/**\n * Categorizes the kind of analytics stream event emitted by {@link DbxAnalyticsService}.\n *\n * Listeners use this type to route events to the appropriate analytics provider method\n * (e.g., Segment `track()`, `identify()`, `page()`).\n */\nexport enum DbxAnalyticsStreamEventType {\n /** A page/screen view event, typically sent on route transitions. */\n PageView,\n /**\n * Emitted any time the user value changes, including when transitioning from defined to undefined.\n *\n * Used by listeners to update the identified user in analytics providers.\n */\n UserChange,\n /**\n * Emitted only when the user's unique ID changes, filtering out property-only updates.\n *\n * Useful for triggering identity calls without redundant updates when only traits change.\n */\n UserIdChange,\n\n // User Events\n /** A new user registration event. */\n NewUserEvent,\n /** A returning user login event. */\n UserLoginEvent,\n /** A user logout event. */\n UserLogoutEvent,\n /** An update to user profile properties/traits. */\n UserPropertiesEvent,\n\n // Events\n /** A generic custom analytics event. */\n Event\n}\n\n/**\n * Represents a single event in the analytics stream, combining the event type, payload, and user context.\n *\n * Emitted by {@link DbxAnalyticsService} and consumed by {@link DbxAnalyticsServiceListener} implementations\n * (e.g., {@link DbxAnalyticsSegmentServiceListener}) to forward events to external analytics providers.\n *\n * @example\n * ```ts\n * // Subscribe to the analytics event stream\n * analyticsService.events$.subscribe((streamEvent: DbxAnalyticsStreamEvent) => {\n * console.log(streamEvent.type, streamEvent.event?.name, streamEvent.userId);\n * });\n * ```\n */\nexport interface DbxAnalyticsStreamEvent {\n readonly type: DbxAnalyticsStreamEventType;\n readonly user?: Maybe<DbxAnalyticsUser>;\n readonly event?: DbxUserAnalyticsEvent;\n readonly userId?: DbxAnalyticsUserId;\n}\n","import { type Observable, Subject, BehaviorSubject, of, type Subscription, first, shareReplay, switchMap, distinctUntilChanged } from 'rxjs';\nimport { Injectable, inject } from '@angular/core';\nimport { SubscriptionObject, filterMaybe } from '@dereekb/rxjs';\nimport { type DbxAnalyticsEvent, type DbxAnalyticsEventData, type DbxAnalyticsEventName, type DbxAnalyticsUser, type NewUserAnalyticsEventData, type DbxUserAnalyticsEvent } from './analytics';\nimport { type DbxAnalyticsStreamEvent, DbxAnalyticsStreamEventType } from './analytics.stream';\nimport { type Maybe, type Destroyable, safeCompareEquality } from '@dereekb/util';\n\n/**\n * Abstract emitter interface for sending analytics events.\n *\n * Implemented by {@link DbxAnalyticsService} as the primary concrete implementation.\n * Components and services use this to fire analytics events without coupling to a specific provider.\n *\n * @example\n * ```ts\n * // Inject and send a custom event\n * const emitter = inject(DbxAnalyticsEventEmitterService);\n * emitter.sendEventData('Button Clicked', { buttonId: 'save' });\n * ```\n */\nexport abstract class DbxAnalyticsEventEmitterService {\n abstract sendNewUserEvent(user: DbxAnalyticsUser, data: NewUserAnalyticsEventData): void;\n abstract sendUserLoginEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void;\n abstract sendUserLogoutEvent(data?: DbxAnalyticsEventData): void;\n abstract sendUserPropertiesEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void;\n /**\n * @deprecated When sending an event with no data, use {@link sendEventType} instead.\n */\n abstract sendEventData(name: DbxAnalyticsEventName): void;\n abstract sendEventData(name: DbxAnalyticsEventName, data: DbxAnalyticsEventData): void;\n abstract sendEvent(event: DbxAnalyticsEvent): void;\n abstract sendPageView(page?: string): void;\n}\n\n/**\n * Abstract interface exposing the analytics event stream as an observable.\n *\n * Implemented by {@link DbxAnalyticsService}. Listeners subscribe to `events$` to forward events to external providers.\n */\nexport abstract class DbxAnalyticsEventStreamService {\n abstract readonly events$: Observable<DbxAnalyticsStreamEvent>;\n}\n\n/**\n * Abstract source for the current analytics user identity.\n *\n * Provide an implementation to automatically associate a user with all emitted analytics events.\n * Typically backed by the auth system (e.g., {@link DbxFirebaseAnalyticsUserSource}).\n *\n * @example\n * ```ts\n * // Provide a static user source\n * const userSource: DbxAnalyticsUserSource = {\n * analyticsUser$: of({ user: 'uid_abc123', properties: { role: 'admin' } })\n * };\n * ```\n */\nexport abstract class DbxAnalyticsUserSource {\n abstract readonly analyticsUser$: Observable<Maybe<DbxAnalyticsUser>>;\n}\n\n/**\n * Abstract listener that receives analytics events from {@link DbxAnalyticsService}.\n *\n * Implement this to forward events to an external analytics provider (e.g., Segment, Mixpanel).\n * Register listeners via {@link DbxAnalyticsServiceConfiguration.listeners}.\n */\nexport abstract class DbxAnalyticsServiceListener {\n public abstract listenToService(service: DbxAnalyticsService): void;\n}\n\n/**\n * Base class for analytics service listeners that manages subscription lifecycle and provides\n * reactive access to the analytics service and its event stream.\n *\n * Subclasses implement {@link _initializeServiceSubscription} to subscribe to events and forward them\n * to an external analytics provider.\n *\n * @example\n * ```ts\n * class MyAnalyticsListener extends AbstractDbxAnalyticsServiceListener {\n * protected _initializeServiceSubscription(): Subscription | false {\n * return this.analyticsEvents$.subscribe((event) => {\n * console.log('Event:', event.type, event.event?.name);\n * });\n * }\n * }\n * ```\n */\nexport abstract class AbstractDbxAnalyticsServiceListener implements DbxAnalyticsServiceListener, Destroyable {\n private _sub = new SubscriptionObject();\n protected _analytics = new BehaviorSubject<Maybe<DbxAnalyticsService>>(undefined);\n\n readonly analytics$ = this._analytics.pipe(filterMaybe(), shareReplay(1));\n readonly analyticsEvents$ = this.analytics$.pipe(\n switchMap((x) => x.events$),\n shareReplay(1)\n );\n\n // MARK: AnalyticsServiceListener\n listenToService(service: DbxAnalyticsService): void {\n this._analytics.next(service);\n const sub = this._initializeServiceSubscription();\n\n if (sub !== false) {\n this._sub.subscription = sub;\n }\n }\n\n protected abstract _initializeServiceSubscription(): Subscription | false;\n\n // MARK: Destroy\n destroy(): void {\n this._analytics.complete();\n this._sub.destroy();\n }\n}\n\n/**\n * Configuration for {@link DbxAnalyticsService}, controlling which listeners receive events,\n * whether analytics runs in production mode, and optionally providing a user source.\n *\n * In non-production mode, listeners are not initialized and all events are logged to the console instead.\n * Provide via {@link provideDbxAnalyticsService} using a factory function.\n *\n * @example\n * ```ts\n * const config: DbxAnalyticsServiceConfiguration = {\n * isProduction: environment.production,\n * logEvents: !environment.production,\n * listeners: [segmentListener],\n * userSource: firebaseAnalyticsUserSource\n * };\n * ```\n */\nexport abstract class DbxAnalyticsServiceConfiguration {\n readonly listeners: DbxAnalyticsServiceListener[] = [];\n readonly isProduction?: boolean;\n readonly logEvents?: boolean;\n readonly userSource?: DbxAnalyticsUserSource;\n}\n\n/**\n * A fully resolved analytics stream event that includes the event payload, type, user context, and extracted user ID.\n *\n * Created by {@link dbxAnalyticsStreamEventAnalyticsEventWrapper} and emitted through the analytics event stream.\n */\nexport interface DbxAnalyticsStreamEventAnalyticsEventWrapper extends DbxAnalyticsStreamEvent {\n readonly event: DbxUserAnalyticsEvent;\n readonly type: DbxAnalyticsStreamEventType;\n readonly user: Maybe<DbxAnalyticsUser>;\n readonly userId: string | undefined;\n}\n\n/**\n * Wraps a {@link DbxUserAnalyticsEvent} into a {@link DbxAnalyticsStreamEventAnalyticsEventWrapper},\n * extracting the user ID for convenient access by listeners.\n *\n * @param event - the analytics event with optional user context\n * @param type - the stream event type classification; defaults to `Event`\n * @returns a wrapper combining the event, type, user, and extracted userId\n *\n * @example\n * ```ts\n * const wrapper = dbxAnalyticsStreamEventAnalyticsEventWrapper(\n * { name: 'Button Clicked', user: { user: 'uid_123' } },\n * DbxAnalyticsStreamEventType.Event\n * );\n * // wrapper.userId === 'uid_123'\n * ```\n */\nexport function dbxAnalyticsStreamEventAnalyticsEventWrapper(event: DbxUserAnalyticsEvent, type: DbxAnalyticsStreamEventType = DbxAnalyticsStreamEventType.Event) {\n const { user } = event;\n const userId = user ? user.user : undefined;\n\n return {\n event,\n type,\n user,\n userId\n };\n}\n\n/**\n * Central analytics service that emits typed analytics events for consumption by registered listeners.\n *\n * Acts as both the event emitter (components call methods like {@link sendEventData}, {@link sendPageView})\n * and the event stream source (listeners subscribe to {@link events$}).\n *\n * In production mode, registered {@link DbxAnalyticsServiceListener} instances (e.g., Segment) receive all events.\n * In non-production mode, events are logged to the console for debugging.\n *\n * Provided via {@link provideDbxAnalyticsService} with a {@link DbxAnalyticsServiceConfiguration} factory.\n *\n * @example\n * ```ts\n * // Send a custom event from a component\n * const analytics = inject(DbxAnalyticsService);\n * analytics.sendEventData('Interview Started', { candidateId: 'abc123' });\n *\n * // Send a page view on route transitions\n * transitionService.onSuccess({}, () => {\n * analytics.sendPageView();\n * });\n * ```\n */\n@Injectable()\nexport class DbxAnalyticsService implements DbxAnalyticsEventStreamService, DbxAnalyticsEventEmitterService, Destroyable {\n private readonly _config = inject(DbxAnalyticsServiceConfiguration);\n\n // TODO: Make these configurable.\n static readonly USER_REGISTRATION_EVENT_NAME = 'User Registered';\n static readonly USER_LOGIN_EVENT_NAME = 'User Login';\n static readonly USER_LOGOUT_EVENT_NAME = 'User Logout';\n static readonly USER_PROPERTIES_EVENT_NAME = 'User Properties';\n\n private _subject = new Subject<DbxAnalyticsStreamEvent>();\n readonly events$ = this._subject.asObservable();\n\n private _userSource = new BehaviorSubject<Maybe<DbxAnalyticsUserSource>>(undefined);\n\n readonly user$ = this._userSource.pipe(\n switchMap((x) => (x ? x.analyticsUser$ : of(undefined))),\n shareReplay(1)\n );\n\n private _userSourceSub = new SubscriptionObject();\n private _userIdEventSub = new SubscriptionObject();\n private _loggerSub = new SubscriptionObject();\n\n constructor() {\n this._init();\n let userSource: Maybe<DbxAnalyticsUserSource> = inject(DbxAnalyticsUserSource, { optional: true });\n userSource = userSource || this._config.userSource;\n\n if (userSource) {\n this.setUserSource(userSource);\n }\n }\n\n // MARK: Source\n /**\n * Sets the analytics user directly, overriding any configured {@link DbxAnalyticsUserSource}.\n *\n * Pass `undefined` to clear the current user (e.g., on logout).\n *\n * @param user - the user to identify, or undefined to clear\n */\n public setUser(user: Maybe<DbxAnalyticsUser>): void {\n let source: Maybe<DbxAnalyticsUserSource>;\n\n if (user) {\n source = { analyticsUser$: of(user) };\n }\n\n this._userSource.next(source);\n\n if (this._userSource.value) {\n console.warn('DbxAnalyticsService has a userSource that is set. Source is now overridden by setUser() value.');\n }\n }\n\n /**\n * Sets the reactive user source that automatically updates the analytics user as auth state changes.\n *\n * @param source - the user source providing an observable of the current analytics user\n */\n public setUserSource(source: DbxAnalyticsUserSource): void {\n this._userSource.next(source);\n }\n\n // MARK: AnalyticsEventEmitterService\n /**\n * Emits a new user registration event, typically sent once after account creation.\n *\n * @param user - the newly registered user\n * @param data - registration-specific data including the signup method\n */\n public sendNewUserEvent(user: DbxAnalyticsUser, data: NewUserAnalyticsEventData): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_REGISTRATION_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.NewUserEvent,\n user\n );\n }\n\n /**\n * Emits a user login event, identifying the user in analytics providers.\n *\n * @param user - the user who logged in\n * @param data - optional additional event data\n */\n public sendUserLoginEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_LOGIN_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.UserLoginEvent,\n user\n );\n }\n\n /**\n * Emits a user logout event and optionally clears the current analytics user.\n *\n * @param data - optional additional event data\n * @param clearUser - whether to reset the analytics user identity; defaults to `true`\n */\n public sendUserLogoutEvent(data?: DbxAnalyticsEventData, clearUser = true): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_LOGOUT_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.UserLogoutEvent\n );\n\n if (clearUser) {\n this.setUser(undefined);\n }\n }\n\n /**\n * Emits a user properties update event, used to sync user traits to analytics providers.\n *\n * @param user - the user whose properties are being updated\n * @param data - optional additional event data\n */\n public sendUserPropertiesEvent(user: DbxAnalyticsUser, data?: DbxAnalyticsEventData): void {\n this.sendNextEvent(\n {\n name: DbxAnalyticsService.USER_PROPERTIES_EVENT_NAME,\n data\n },\n DbxAnalyticsStreamEventType.UserPropertiesEvent,\n user\n );\n }\n\n /**\n * @deprecated When sending an event with no data, use {@link sendEventType} instead.\n */\n public sendEventData(name: DbxAnalyticsEventName): void;\n /**\n * Sends a named analytics event with a data payload.\n *\n * This is the primary method for tracking custom events with associated properties.\n *\n * @param name - the event name (e.g., `'Interview Ended'`)\n * @param data - key-value data attached to the event\n *\n * @example\n * ```ts\n * analytics.sendEventData('Interview Ended', {\n * seconds: 120,\n * endedDueToTime: 'true'\n * });\n * ```\n */\n public sendEventData(name: DbxAnalyticsEventName, data: DbxAnalyticsEventData): void;\n public sendEventData(name: DbxAnalyticsEventName, data?: DbxAnalyticsEventData): void {\n return this.sendEvent({\n name,\n data\n });\n }\n\n /**\n * Sends a named event with no additional data, useful for simple occurrence tracking.\n *\n * @param eventType - the event name to track\n *\n * @example\n * ```ts\n * analytics.sendEventType('Finish Account Setup');\n * ```\n */\n public sendEventType(eventType: DbxAnalyticsEventName): void {\n this.sendNextEvent(\n {\n name: eventType\n },\n DbxAnalyticsStreamEventType.Event\n );\n }\n\n /**\n * Sends a fully constructed analytics event object.\n *\n * @param event - the event containing name, optional value, and data\n */\n public sendEvent(event: DbxAnalyticsEvent): void {\n this.sendNextEvent(event, DbxAnalyticsStreamEventType.Event);\n }\n\n /**\n * Sends a page view event, typically called on successful route transitions.\n *\n * @param page - optional page name/path override; if omitted, the provider determines the current page\n *\n * @example\n * ```ts\n * // In a router config function\n * transitionService.onSuccess({}, () => {\n * analyticsService.sendPageView();\n * });\n * ```\n */\n public sendPageView(page?: string): void {\n this.sendNextEvent(\n {\n name: page\n },\n DbxAnalyticsStreamEventType.PageView\n );\n }\n\n /**\n * Sends the next event.\n *\n * @param event\n * @param type\n * @param userOverride Uses this user if set as null or an override value. If undefined the current analytics user is used.\n */\n protected sendNextEvent(event: DbxAnalyticsEvent = {}, type: DbxAnalyticsStreamEventType, userOverride?: Maybe<DbxAnalyticsUser>): void {\n this.user$.pipe(first()).subscribe((analyticsUser) => {\n const user: Maybe<DbxAnalyticsUser> = userOverride !== undefined ? userOverride : analyticsUser;\n const analyticsEvent: DbxUserAnalyticsEvent = { ...event, user };\n this.nextEvent(analyticsEvent, type);\n });\n }\n\n protected nextEvent(event: DbxUserAnalyticsEvent, type: DbxAnalyticsStreamEventType): void {\n const wrapper = dbxAnalyticsStreamEventAnalyticsEventWrapper(event, type);\n this._subject.next(wrapper);\n }\n\n // MARK: Internal\n private _init(): void {\n if (this._config.isProduction) {\n // Initialize listeners.\n this._config.listeners.forEach((listener) => {\n listener.listenToService(this);\n });\n } else {\n console.warn('AnalyticsService: Analytics not in production mode. All analytics events are ignored.');\n }\n\n if (this._config.logEvents || !this._config.isProduction) {\n console.log('AnalyticsService: Log analytics events enabled.');\n\n // Create a new subscription\n this._loggerSub.subscription = this._subject.subscribe((x) => {\n console.log(`AnalyticsService: Analytics Event - ${DbxAnalyticsStreamEventType[x.type]} | User: ${x.userId} | Data: ${JSON.stringify(x.event)}.`);\n });\n }\n\n this._userSourceSub.subscription = this.user$.subscribe((user) => {\n this.sendNextEvent({}, DbxAnalyticsStreamEventType.UserChange, user ?? null);\n });\n\n this._userIdEventSub.subscription = this.user$.pipe(distinctUntilChanged((a, b) => safeCompareEquality(a, b, (x, y) => x.user === y.user))).subscribe((user) => {\n this.sendNextEvent({}, DbxAnalyticsStreamEventType.UserIdChange, user ?? null);\n });\n }\n\n destroy() {\n this._subject.complete();\n this._userSource.complete();\n this._userSourceSub.destroy();\n this._userIdEventSub.destroy();\n this._loggerSub.destroy();\n }\n}\n","import { filterMaybe } from '@dereekb/rxjs';\nimport { switchMap, tap, shareReplay, merge, type Observable, of } from 'rxjs';\nimport { Directive, inject, input } from '@angular/core';\nimport { DbxActionContextStoreSourceInstance, cleanSubscriptionWithLockSet } from '@dereekb/dbx-core';\nimport { DbxAnalyticsService } from '../analytics/analytics.service';\nimport { type Maybe, type ReadableError } from '@dereekb/util';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n/**\n * Configuration for {@link DbxActionAnalyticsDirective} that maps action lifecycle events to analytics calls.\n *\n * Each callback receives the {@link DbxAnalyticsService} and relevant action data, allowing you to\n * send targeted analytics events at each stage of an action's lifecycle (trigger, ready, success, error).\n *\n * @example\n * ```ts\n * // In a component, define analytics config for a form submit action\n * readonly submitAnalytics: DbxActionAnalyticsConfig<MyFormValue, MyResult> = {\n * onReady: (service, value) => {\n * service.sendEventData('Form Submitted', { formType: 'onboard' });\n * },\n * onSuccess: (service, result, value) => {\n * service.sendEventType('Onboarding Complete');\n * },\n * onError: (service, error) => {\n * service.sendEventData('Form Submit Failed', { code: error?.code ?? 'unknown' });\n * }\n * };\n *\n * // In the template\n * // <button dbxAction [dbxActionAnalytics]=\"submitAnalytics\">Submit</button>\n * ```\n */\nexport interface DbxActionAnalyticsConfig<T = unknown, O = unknown> {\n /** Called when the action is triggered (button pressed). */\n readonly onTriggered?: (service: DbxAnalyticsService) => void;\n /** Called when the action value is ready and about to be processed. */\n readonly onReady?: (service: DbxAnalyticsService, value: T) => void;\n /** Called when the action completes successfully. */\n readonly onSuccess?: (service: DbxAnalyticsService, result: Maybe<O>, value: T) => void;\n /** Called when the action encounters an error. */\n readonly onError?: (service: DbxAnalyticsService, error: Maybe<ReadableError>) => void;\n}\n\n/**\n * Standalone directive that listens to a host {@link DbxActionDirective} and fires analytics events\n * based on the action's lifecycle (triggered, ready, success, error).\n *\n * Attach to any element that has a `dbxAction` directive and pass a {@link DbxActionAnalyticsConfig}\n * to define which events to send at each lifecycle stage.\n *\n * @example\n * ```html\n * <button dbxAction\n * [dbxActionHandler]=\"handleSave\"\n * [dbxActionAnalytics]=\"saveAnalytics\">\n * Save\n * </button>\n * ```\n */\n@Directive({\n selector: '[dbxActionAnalytics]',\n standalone: true\n})\nexport class DbxActionAnalyticsDirective<T, O> {\n readonly source = inject(DbxActionContextStoreSourceInstance<T, O>, { host: true });\n readonly analyticsService = inject(DbxAnalyticsService);\n\n readonly config = input<Maybe<DbxActionAnalyticsConfig<T, O>>>(undefined, { alias: 'dbxActionAnalytics' });\n readonly config$ = toObservable(this.config).pipe(filterMaybe(), shareReplay(1));\n\n constructor() {\n cleanSubscriptionWithLockSet({\n lockSet: this.source.lockSet,\n sub: this.config$\n .pipe(\n switchMap(({ onTriggered, onReady, onSuccess, onError }) => {\n const triggerObs: Observable<unknown>[] = [];\n\n if (onTriggered) {\n triggerObs.push(this.source.triggered$.pipe(tap(() => onTriggered(this.analyticsService))));\n }\n\n if (onReady) {\n triggerObs.push(this.source.valueReady$.pipe(tap((value) => onReady(this.analyticsService, value))));\n }\n\n if (onSuccess) {\n triggerObs.push(this.source.successPair$.pipe(tap(({ result, value }) => onSuccess(this.analyticsService, result, value))));\n }\n\n if (onError) {\n triggerObs.push(\n this.source.error$.pipe(\n filterMaybe(),\n tap((error) => onError(this.analyticsService, error))\n )\n );\n }\n\n if (triggerObs.length) {\n return merge(...triggerObs);\n } else {\n return of();\n }\n })\n )\n .subscribe()\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxActionAnalyticsDirective } from './analytics.action.directive';\n\n/**\n * @deprecated The exported DbxActionAnalyticsDirective is now a standalone component. Import that instead.\n */\n@NgModule({\n imports: [DbxActionAnalyticsDirective],\n exports: [DbxActionAnalyticsDirective]\n})\nexport class DbxAnalyticsActionModule {}\n","import { type EnvironmentProviders, Injector, type Provider, makeEnvironmentProviders } from '@angular/core';\nimport { DbxAnalyticsServiceConfiguration, DbxAnalyticsService } from './analytics.service';\n\n/**\n * Factory function that creates a {@link DbxAnalyticsServiceConfiguration} using the Angular injector.\n *\n * Used by {@link provideDbxAnalyticsService} to defer configuration resolution to runtime.\n */\nexport type DbxAnalyticsServiceConfigurationFactory = (injector: Injector) => DbxAnalyticsServiceConfiguration;\n\n/**\n * Configuration for {@link provideDbxAnalyticsService}.\n */\nexport interface ProvideDbxAnalyticsConfig {\n readonly dbxAnalyticsServiceConfigurationFactory: DbxAnalyticsServiceConfigurationFactory;\n}\n\n/**\n * Creates Angular environment providers that register {@link DbxAnalyticsService} and its configuration.\n *\n * Call this in your application's `providers` array to set up analytics with a custom configuration factory\n * that resolves listeners, user sources, and environment flags at runtime.\n *\n * @param config - contains the factory function that produces a {@link DbxAnalyticsServiceConfiguration}\n * @returns environment providers for the analytics service\n *\n * @example\n * ```ts\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideDbxAnalyticsService({\n * dbxAnalyticsServiceConfigurationFactory: (injector: Injector) => ({\n * isProduction: environment.production,\n * logEvents: !environment.production,\n * listeners: [injector.get(DbxAnalyticsSegmentServiceListener)],\n * userSource: injector.get(DbxFirebaseAnalyticsUserSource)\n * })\n * })\n * ]\n * };\n * ```\n */\nexport function provideDbxAnalyticsService(config: ProvideDbxAnalyticsConfig): EnvironmentProviders {\n const { dbxAnalyticsServiceConfigurationFactory } = config;\n\n const providers: Provider[] = [\n // configuration\n {\n provide: DbxAnalyticsServiceConfiguration,\n useFactory: dbxAnalyticsServiceConfigurationFactory,\n deps: [Injector]\n },\n // service\n DbxAnalyticsService\n ];\n\n return makeEnvironmentProviders(providers);\n}\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport { AbstractAsyncWindowLoadedService } from '@dereekb/browser';\nimport { poll } from '@dereekb/util';\n\n/**\n * Injection token for optionally preloading the Segment analytics script.\n */\nexport const PRELOAD_SEGMENT_TOKEN = new InjectionToken<string>('DbxAnalyticsSegmentApiServicePreload');\n\n/**\n * Configuration for the Segment analytics integration.\n *\n * @example\n * ```ts\n * const config = new DbxAnalyticsSegmentApiServiceConfig('your-segment-write-key');\n * config.active = environment.production;\n * config.logging = !environment.production;\n * ```\n */\nexport class DbxAnalyticsSegmentApiServiceConfig {\n writeKey: string;\n logging = true;\n active = true;\n constructor(writeKey: string) {\n this.writeKey = writeKey;\n }\n}\n\n/**\n * Extended Segment analytics type that includes the `invoked` flag set after the snippet initializes.\n */\ntype SegmentAnalyticsInvoked = SegmentAnalytics.AnalyticsJS & { invoked?: boolean };\n\n/**\n * Service that manages the async loading and initialization of the Segment analytics SDK from `window.analytics`.\n *\n * Polls for the Segment snippet to be invoked, then calls `analytics.load()` with the configured write key.\n * Once Segment reports ready, the resolved SDK instance is available via the inherited `service$` observable.\n *\n * Requires the Segment analytics snippet to be included in `index.html`.\n *\n * Provided via {@link provideDbxAnalyticsSegmentApiService}.\n *\n * @example\n * ```ts\n * // In app.config.ts\n * provideDbxAnalyticsSegmentApiService({\n * dbxAnalyticsSegmentApiServiceConfigFactory: (injector) => {\n * const config = new DbxAnalyticsSegmentApiServiceConfig(environment.analytics.segment);\n * config.active = environment.production;\n * return config;\n * }\n * })\n * ```\n */\n@Injectable()\nexport class DbxAnalyticsSegmentApiService extends AbstractAsyncWindowLoadedService<SegmentAnalytics.AnalyticsJS> {\n private readonly _config = inject(DbxAnalyticsSegmentApiServiceConfig);\n\n static readonly SEGMENT_API_WINDOW_KEY = 'analytics';\n static readonly SEGMENT_READY_KEY = 'SegmentReady';\n\n constructor() {\n const preload = inject(PRELOAD_SEGMENT_TOKEN, { optional: true });\n super(DbxAnalyticsSegmentApiService.SEGMENT_API_WINDOW_KEY, undefined, 'Segment', preload);\n }\n\n get config(): DbxAnalyticsSegmentApiServiceConfig {\n return this._config;\n }\n\n protected override _prepareCompleteLoadingService(): Promise<void> {\n return poll({\n // poll until analytics.invoked is true.\n check: () => Boolean((window.analytics as SegmentAnalyticsInvoked).invoked),\n timesToGiveup: 100\n });\n }\n\n protected override _initService(service: SegmentAnalytics.AnalyticsJS): Promise<SegmentAnalytics.AnalyticsJS> {\n return new Promise((resolve, reject) => {\n try {\n service.load(this._config.writeKey); // Initialize Segment\n\n // Wait for the service to ready itself.\n service.ready(() => {\n // Segment changes itself or rather the target, and the previous initial target is ignored after.\n const segment: SegmentAnalytics.AnalyticsJS = window[DbxAnalyticsSegmentApiService.SEGMENT_API_WINDOW_KEY];\n resolve(segment);\n });\n } catch (e) {\n console.log('Failed to init segment: ' + e);\n reject(e);\n }\n });\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\nimport { combineLatest } from 'rxjs';\nimport { AbstractDbxAnalyticsServiceListener, type DbxAnalyticsStreamEvent, DbxAnalyticsStreamEventType, type DbxAnalyticsUser } from '../../analytics';\nimport { DbxAnalyticsSegmentApiService } from './segment.service';\n\n/**\n * Analytics listener that forwards {@link DbxAnalyticsStreamEvent} events to the Segment SDK.\n *\n * Automatically maps event types to the appropriate Segment methods:\n * - {@link DbxAnalyticsStreamEventType.Event} / {@link DbxAnalyticsStreamEventType.UserLoginEvent} -> `track()`\n * - {@link DbxAnalyticsStreamEventType.UserChange} / {@link DbxAnalyticsStreamEventType.NewUserEvent} -> `identify()`\n * - {@link DbxAnalyticsStreamEventType.UserLogoutEvent} -> `reset()`\n * - {@link DbxAnalyticsStreamEventType.PageView} -> `page()`\n *\n * Events are only sent when the Segment configuration is marked as `active`.\n * Provided at root level and registered as a listener via {@link DbxAnalyticsServiceConfiguration.listeners}.\n *\n * @example\n * ```ts\n * // Register in analytics configuration factory\n * function analyticsConfigFactory(injector: Injector): DbxAnalyticsServiceConfiguration {\n * const segmentListener = injector.get(DbxAnalyticsSegmentServiceListener);\n * return {\n * isProduction: true,\n * listeners: [segmentListener]\n * };\n * }\n * ```\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DbxAnalyticsSegmentServiceListener extends AbstractDbxAnalyticsServiceListener {\n private readonly _segmentApi = inject(DbxAnalyticsSegmentApiService);\n\n constructor() {\n super();\n\n if (this._segmentApi.config.logging) {\n console.log('SegmentAnalyticsListenerService: Segment is logging events.');\n }\n\n if (!this._segmentApi.config.active) {\n console.log('SegmentAnalyticsListenerService: Segment is disabled from sending events to the server.');\n }\n }\n\n /**\n * Subscribes to the Segment API service and analytics event stream, forwarding events to the Segment SDK.\n *\n * Events are only sent when the Segment configuration is marked as active.\n */\n protected _initializeServiceSubscription() {\n return combineLatest([this._segmentApi.service$, this.analyticsEvents$]).subscribe(([segment, streamEvent]: [SegmentAnalytics.AnalyticsJS, DbxAnalyticsStreamEvent]) => {\n if (this._segmentApi.config.logging) {\n console.log('Segment Listener Logging Event: ', streamEvent);\n }\n\n if (this._segmentApi.config.active) {\n this.handleStreamEvent(segment, streamEvent);\n }\n });\n }\n\n /**\n * Routes an analytics stream event to the appropriate Segment API method based on event type.\n *\n * @param api - The Segment analytics SDK instance\n * @param streamEvent - The analytics event to process\n */\n protected handleStreamEvent(api: SegmentAnalytics.AnalyticsJS, streamEvent: DbxAnalyticsStreamEvent): void {\n switch (streamEvent.type) {\n case DbxAnalyticsStreamEventType.NewUserEvent:\n this.updateWithNewUserEvent(api, streamEvent);\n break;\n case DbxAnalyticsStreamEventType.UserLoginEvent:\n this.changeUser(api, streamEvent.user);\n this.updateWithEvent(api, streamEvent);\n break;\n case DbxAnalyticsStreamEventType.Event:\n this.updateWithEvent(api, streamEvent);\n break;\n case DbxAnalyticsStreamEventType.UserLogoutEvent:\n this.changeUser(api, undefined);\n break;\n case DbxAnalyticsStreamEventType.PageView:\n api.page();\n break;\n case DbxAnalyticsStreamEventType.UserChange:\n this.changeUser(api, streamEvent.user);\n break;\n }\n }\n\n /**\n * Handles a new user registration event by identifying the user in Segment.\n *\n * @param api - The Segment analytics SDK instance\n * @param streamEvent - The event containing the new user data\n */\n protected updateWithNewUserEvent(api: SegmentAnalytics.AnalyticsJS, streamEvent: DbxAnalyticsStreamEvent): void {\n this.changeUser(api, streamEvent.user);\n }\n\n /**\n * Sends a track event to Segment with the event name, value, and additional data properties.\n *\n * @param api - The Segment analytics SDK instance\n * @param streamEvent - The analytics event containing name, value, and data\n * @param name - Optional override for the event name\n */\n protected updateWithEvent(api: SegmentAnalytics.AnalyticsJS, streamEvent: DbxAnalyticsStreamEvent, name?: string): void {\n const event = streamEvent.event;\n const eventName = name || event?.name;\n\n if (eventName) {\n const value = event?.value;\n const data = event?.data;\n\n api.track(\n eventName,\n {\n ...(value != null\n ? {\n value\n }\n : undefined),\n ...data\n },\n {},\n () => {\n if (this._segmentApi.config.logging) {\n console.log('Segment track success.');\n }\n }\n );\n }\n }\n\n private changeUser(api: SegmentAnalytics.AnalyticsJS, user: Maybe<DbxAnalyticsUser>): void {\n if (user?.user) {\n api.identify(\n user.user,\n {\n ...user.properties\n },\n {},\n () => {\n if (this._segmentApi.config.logging) {\n console.log('Segment identify success.');\n }\n }\n );\n } else {\n api.reset();\n }\n }\n}\n","import { type EnvironmentProviders, Injector, makeEnvironmentProviders, type Provider } from '@angular/core';\nimport { DbxAnalyticsSegmentApiService, DbxAnalyticsSegmentApiServiceConfig, PRELOAD_SEGMENT_TOKEN } from './segment.service';\n\n/**\n * Factory function that creates a {@link DbxAnalyticsSegmentApiServiceConfig} using the Angular injector.\n *\n * Used by {@link provideDbxAnalyticsSegmentApiService} to defer Segment configuration to runtime.\n */\nexport type DbxAnalyticsSegmentApiServiceConfigFactory = (injector: Injector) => DbxAnalyticsSegmentApiServiceConfig;\n\n/**\n * Configuration for {@link provideDbxAnalyticsSegmentApiService}.\n */\nexport interface ProvideDbxAnalyticsSegmentModuleConfig {\n /** Whether to preload the Segment script token. */\n readonly preloadSegmentToken?: boolean;\n /** Factory function that produces the Segment API service configuration. */\n readonly dbxAnalyticsSegmentApiServiceConfigFactory: DbxAnalyticsSegmentApiServiceConfigFactory;\n}\n\n/**\n * Creates Angular environment providers that register {@link DbxAnalyticsSegmentApiService} for Segment analytics integration.\n *\n * Use alongside {@link provideDbxAnalyticsService} to wire Segment as an analytics listener.\n *\n * @param config - Segment-specific configuration including the write key factory\n * @returns environment providers for Segment analytics\n *\n * @example\n * ```ts\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideDbxAnalyticsSegmentApiService({\n * dbxAnalyticsSegmentApiServiceConfigFactory: (injector) => {\n * const config = new DbxAnalyticsSegmentApiServiceConfig(environment.analytics.segment);\n * config.active = environment.production;\n * config.logging = !environment.production;\n * return config;\n * }\n * }),\n * provideDbxAnalyticsService({\n * dbxAnalyticsServiceConfigurationFactory: (injector) => ({\n * isProduction: environment.production,\n * listeners: [injector.get(DbxAnalyticsSegmentServiceListener)]\n * })\n * })\n * ]\n * };\n * ```\n */\nexport function provideDbxAnalyticsSegmentApiService(config: ProvideDbxAnalyticsSegmentModuleConfig): EnvironmentProviders {\n const { preloadSegmentToken, dbxAnalyticsSegmentApiServiceConfigFactory } = config;\n\n const providers: Provider[] = [\n // configuration\n {\n provide: DbxAnalyticsSegmentApiServiceConfig,\n useFactory: dbxAnalyticsSegmentApiServiceConfigFactory,\n deps: [Injector]\n },\n // service\n DbxAnalyticsSegmentApiService\n ];\n\n if (preloadSegmentToken) {\n providers.push({\n provide: PRELOAD_SEGMENT_TOKEN,\n useValue: preloadSegmentToken\n });\n }\n\n return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;AAKG;IACS;AAAZ,CAAA,UAAY,2BAA2B,EAAA;;AAErC,IAAA,2BAAA,CAAA,2BAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACR;;;;AAIG;AACH,IAAA,2BAAA,CAAA,2BAAA,CAAA,YAAA,CAAA,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
2
  "name": "@dereekb/dbx-analytics",
3
- "version": "13.3.0",
3
+ "version": "13.3.1",
4
4
  "peerDependencies": {
5
- "@dereekb/rxjs": "13.3.0",
5
+ "@dereekb/rxjs": "13.3.1",
6
6
  "rxjs": "^7.8.0",
7
7
  "@angular/core": "^21.0.0",
8
- "@dereekb/dbx-core": "13.3.0",
9
- "@dereekb/util": "13.3.0",
10
- "@dereekb/browser": "13.3.0"
8
+ "@dereekb/dbx-core": "13.3.1",
9
+ "@dereekb/util": "13.3.1",
10
+ "@dereekb/browser": "13.3.1"
11
11
  },
12
12
  "dependencies": {
13
13
  "tslib": "^2.3.0"