From 30dbb478dd68e7e330592ecf696bcf92aa23612e Mon Sep 17 00:00:00 2001 From: Damien Retzinger Date: Tue, 28 May 2024 09:25:12 -0400 Subject: [PATCH 1/2] feat(seo)!: remove explicit dep on ngrx/router-store BREAKING CHANGE: The following tokens are now exported from `@daffodil/seo/router`: ``` DaffSeoUpdateEventPair DAFF_SEO_META_ROUTER_UPDATES daffProvideMetaRouterUpdates DAFF_SEO_CANONICAL_URL_ROUTER_UPDATES daffProvideCanonicalUrlRouterUpdates DAFF_SEO_TITLE_ROUTER_UPDATES daffProvideTitleRouterUpdates daffSeoRouterTitleProvider daffSeoRouterMetaProvider daffSeoRouterCanonicalProvider ``` You can simply adjust the imports from `@daffodil/seo/state` to `@daffodil/seo/router`. Additionally, `DaffSeoNativeStateModule` has been removed in favor of feature providers like: `daffSeoRouterTitleProvider`, `daffSeoRouterMetaProvider` and `daffSeoRouterCanonicalProvider` --- libs/seo/package.json | 6 +- libs/seo/router/ng-package.json | 6 ++ .../src/canonical}/updates.token.spec.ts | 3 +- .../src/canonical}/updates.token.ts | 3 +- .../src/effects}/canonical.effects.ts | 5 +- .../src/effects}/meta.effects.ts | 5 +- .../src/effects}/page-hook.effects.ts | 73 +++++++------------ .../src/effects}/title.effects.ts | 6 +- libs/seo/router/src/index.ts | 1 + .../src/meta}/updates.token.spec.ts | 3 +- .../src/meta}/updates.token.ts | 2 +- .../src/model}/update-event-pair.interface.ts | 0 .../src/providers/canonical-provider.ts | 34 +++++++++ libs/seo/router/src/providers/initializer.ts | 8 ++ .../seo/router/src/providers/meta-provider.ts | 33 +++++++++ .../router/src/providers/title-provider.ts | 35 +++++++++ libs/seo/router/src/public_api.ts | 16 ++++ .../src/title}/updates.token.spec.ts | 3 +- .../src/title}/updates.token.ts | 2 +- .../effects/router/page-hook.effects.spec.ts | 0 .../state/src/injection-tokens/public_api.ts | 12 --- libs/seo/state/src/models/public_api.ts | 1 - libs/seo/state/src/native-state.module.ts | 17 ----- libs/seo/state/src/public_api.ts | 1 - 24 files changed, 182 insertions(+), 93 deletions(-) create mode 100644 libs/seo/router/ng-package.json rename libs/seo/{state/src/injection-tokens/canonical/router => router/src/canonical}/updates.token.spec.ts (90%) rename libs/seo/{state/src/injection-tokens/canonical/router => router/src/canonical}/updates.token.ts (91%) rename libs/seo/{state/src/effects/router => router/src/effects}/canonical.effects.ts (80%) rename libs/seo/{state/src/effects/router => router/src/effects}/meta.effects.ts (83%) rename libs/seo/{state/src/effects/router => router/src/effects}/page-hook.effects.ts (50%) rename libs/seo/{state/src/effects/router => router/src/effects}/title.effects.ts (76%) create mode 100644 libs/seo/router/src/index.ts rename libs/seo/{state/src/injection-tokens/meta/router => router/src/meta}/updates.token.spec.ts (91%) rename libs/seo/{state/src/injection-tokens/meta/router => router/src/meta}/updates.token.ts (91%) rename libs/seo/{state/src/models => router/src/model}/update-event-pair.interface.ts (100%) create mode 100644 libs/seo/router/src/providers/canonical-provider.ts create mode 100644 libs/seo/router/src/providers/initializer.ts create mode 100644 libs/seo/router/src/providers/meta-provider.ts create mode 100644 libs/seo/router/src/providers/title-provider.ts create mode 100644 libs/seo/router/src/public_api.ts rename libs/seo/{state/src/injection-tokens/title/router => router/src/title}/updates.token.spec.ts (90%) rename libs/seo/{state/src/injection-tokens/title/router => router/src/title}/updates.token.ts (91%) delete mode 100644 libs/seo/state/src/effects/router/page-hook.effects.spec.ts delete mode 100644 libs/seo/state/src/native-state.module.ts diff --git a/libs/seo/package.json b/libs/seo/package.json index 21e3db14f4..f3fddb7fea 100644 --- a/libs/seo/package.json +++ b/libs/seo/package.json @@ -32,10 +32,12 @@ "@angular/router": "0.0.0-PLACEHOLDER", "@angular/platform-browser": "0.0.0-PLACEHOLDER", "@daffodil/core": "0.0.0-PLACEHOLDER", + "rxjs": "0.0.0-PLACEHOLDER" + }, + "optionalDependencies": { "@ngrx/effects": "0.0.0-PLACEHOLDER", "@ngrx/store": "0.0.0-PLACEHOLDER", - "@ngrx/router-store": "0.0.0-PLACEHOLDER", - "rxjs": "0.0.0-PLACEHOLDER" + "@ngrx/router-store": "0.0.0-PLACEHOLDER" }, "devDependencies": { "@daffodil/core": "0.0.0-PLACEHOLDER" diff --git a/libs/seo/router/ng-package.json b/libs/seo/router/ng-package.json new file mode 100644 index 0000000000..0f621f8520 --- /dev/null +++ b/libs/seo/router/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-entrypoint.schema.json", + "lib": { + "entryFile": "src/index.ts" + } +} diff --git a/libs/seo/state/src/injection-tokens/canonical/router/updates.token.spec.ts b/libs/seo/router/src/canonical/updates.token.spec.ts similarity index 90% rename from libs/seo/state/src/injection-tokens/canonical/router/updates.token.spec.ts rename to libs/seo/router/src/canonical/updates.token.spec.ts index 723741042a..b256da6d09 100644 --- a/libs/seo/state/src/injection-tokens/canonical/router/updates.token.spec.ts +++ b/libs/seo/router/src/canonical/updates.token.spec.ts @@ -8,7 +8,8 @@ import { daffProvideCanonicalUrlRouterUpdates, DAFF_SEO_CANONICAL_URL_ROUTER_UPDATES, } from './updates.token'; -import { DaffSeoUpdateEventPair } from '../../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; + describe('daffProvideCanonicalUrlUpdates', () => { let updates: DaffSeoUpdateEventPair[]; diff --git a/libs/seo/state/src/injection-tokens/canonical/router/updates.token.ts b/libs/seo/router/src/canonical/updates.token.ts similarity index 91% rename from libs/seo/state/src/injection-tokens/canonical/router/updates.token.ts rename to libs/seo/router/src/canonical/updates.token.ts index 5391912e92..f712754b2b 100644 --- a/libs/seo/state/src/injection-tokens/canonical/router/updates.token.ts +++ b/libs/seo/router/src/canonical/updates.token.ts @@ -4,8 +4,7 @@ import { } from '@angular/core'; import { Event } from '@angular/router'; -import { DaffSeoUpdateEventPair } from '../../../models/update-event-pair.interface'; - +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; /** * A multi-provider injection token for providing canonical URL update logic. diff --git a/libs/seo/state/src/effects/router/canonical.effects.ts b/libs/seo/router/src/effects/canonical.effects.ts similarity index 80% rename from libs/seo/state/src/effects/router/canonical.effects.ts rename to libs/seo/router/src/effects/canonical.effects.ts index c9f4ae0d42..e710fb6bd1 100644 --- a/libs/seo/state/src/effects/router/canonical.effects.ts +++ b/libs/seo/router/src/effects/canonical.effects.ts @@ -10,9 +10,10 @@ import { import { DaffRestoreableCanonicalService } from '@daffodil/seo'; + import { DaffSeoPageHookRouterEffects } from './page-hook.effects'; -import { DAFF_SEO_CANONICAL_URL_ROUTER_UPDATES } from '../../injection-tokens/canonical/router/updates.token'; -import { DaffSeoUpdateEventPair } from '../../models/update-event-pair.interface'; +import { DAFF_SEO_CANONICAL_URL_ROUTER_UPDATES } from '../canonical/updates.token'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; /** * Page hook effects for the canonical URL. diff --git a/libs/seo/state/src/effects/router/meta.effects.ts b/libs/seo/router/src/effects/meta.effects.ts similarity index 83% rename from libs/seo/state/src/effects/router/meta.effects.ts rename to libs/seo/router/src/effects/meta.effects.ts index fbb0838a95..c1cc7136fb 100644 --- a/libs/seo/state/src/effects/router/meta.effects.ts +++ b/libs/seo/router/src/effects/meta.effects.ts @@ -14,9 +14,10 @@ import { DaffSeoMetaDefinition, } from '@daffodil/seo'; + import { DaffSeoPageHookRouterEffects } from './page-hook.effects'; -import { DAFF_SEO_META_ROUTER_UPDATES } from '../../injection-tokens/meta/router/updates.token'; -import { DaffSeoUpdateEventPair } from '../../models/update-event-pair.interface'; +import { DAFF_SEO_META_ROUTER_UPDATES } from '../meta/updates.token'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; /** * Page hook effects for the page meta tags. diff --git a/libs/seo/state/src/effects/router/page-hook.effects.ts b/libs/seo/router/src/effects/page-hook.effects.ts similarity index 50% rename from libs/seo/state/src/effects/router/page-hook.effects.ts rename to libs/seo/router/src/effects/page-hook.effects.ts index 8e24c09d5a..8ececfc0ff 100644 --- a/libs/seo/state/src/effects/router/page-hook.effects.ts +++ b/libs/seo/router/src/effects/page-hook.effects.ts @@ -7,7 +7,6 @@ import { Event, ActivatedRoute, } from '@angular/router'; -import { createEffect } from '@ngrx/effects'; import { EMPTY } from 'rxjs'; import { map, @@ -18,7 +17,7 @@ import { import { DaffSeoRestoreableServiceInterface } from '@daffodil/seo'; -import { DaffSeoUpdateEventPair } from '../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; export const shouldHandleEvent = (routingEvent: Event, operators: T[]): boolean => !!operators.find((trackableEvents) => routingEvent instanceof trackableEvents.event); @@ -45,24 +44,19 @@ export abstract class DaffSeoPageHookRouterEffects< * * @docs-private */ - getData$ = createEffect( - () => this.router.events.pipe( - filter((e) => shouldHandleEvent(e, this.updates)), - map(event => this.updates.filter(update => - event instanceof update.event, - ).map(({ getData }) => - getData(event, this.activatedRoute), - )), - tap((data: V[]) => data.forEach(datum => { - if (datum) { - this.service.upsert(datum); - }; - })), - switchMap(() => EMPTY), - ), - { - dispatch: false, - }, + getData$ = () => this.router.events.pipe( + filter((e) => shouldHandleEvent(e, this.updates)), + map(event => this.updates.filter(update => + event instanceof update.event, + ).map(({ getData }) => + getData(event, this.activatedRoute), + )), + tap((data: V[]) => data.forEach(datum => { + if (datum) { + this.service.upsert(datum); + }; + })), + switchMap(() => EMPTY), ); /** @@ -70,15 +64,10 @@ export abstract class DaffSeoPageHookRouterEffects< * * @docs-private */ - remove$ = createEffect( - () => this.router.events.pipe( - filter((e) => e instanceof NavigationStart), - tap(() => this.service.clear()), - switchMap(() => EMPTY), - ), - { - dispatch: false, - }, + remove$ = () => this.router.events.pipe( + filter((e) => e instanceof NavigationStart), + tap(() => this.service.clear()), + switchMap(() => EMPTY), ); /** @@ -86,15 +75,10 @@ export abstract class DaffSeoPageHookRouterEffects< * * @docs-private */ - restore$ = createEffect( - () => this.router.events.pipe( - filter((e) => e instanceof NavigationCancel || e instanceof NavigationError), - tap(() => this.service.restore()), - switchMap(() => EMPTY), - ), - { - dispatch: false, - }, + restore$ = () => this.router.events.pipe( + filter((e) => e instanceof NavigationCancel || e instanceof NavigationError), + tap(() => this.service.restore()), + switchMap(() => EMPTY), ); /** @@ -102,14 +86,9 @@ export abstract class DaffSeoPageHookRouterEffects< * * @docs-private */ - emptyRestoreCache$ = createEffect( - () => this.router.events.pipe( - filter((e) => e instanceof NavigationEnd), - tap(() => this.service.emptyRestoreCache()), - switchMap(() => EMPTY), - ), - { - dispatch: false, - }, + emptyRestoreCache$ = () => this.router.events.pipe( + filter((e) => e instanceof NavigationEnd), + tap(() => this.service.emptyRestoreCache()), + switchMap(() => EMPTY), ); } diff --git a/libs/seo/state/src/effects/router/title.effects.ts b/libs/seo/router/src/effects/title.effects.ts similarity index 76% rename from libs/seo/state/src/effects/router/title.effects.ts rename to libs/seo/router/src/effects/title.effects.ts index 24f05060ad..cbb5e28f70 100644 --- a/libs/seo/state/src/effects/router/title.effects.ts +++ b/libs/seo/router/src/effects/title.effects.ts @@ -11,11 +11,13 @@ import { import { DaffRestoreableTitleService } from '@daffodil/seo'; import { DaffSeoPageHookRouterEffects } from './page-hook.effects'; -import { DAFF_SEO_TITLE_ROUTER_UPDATES } from '../../injection-tokens/title/router/updates.token'; -import { DaffSeoUpdateEventPair } from '../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; +import { DAFF_SEO_TITLE_ROUTER_UPDATES } from '../title/updates.token'; /** * Page hook effects for the page title. + * + * @deprecated since Angular 14. See https://angular.io/api/router/TitleStrategy */ @Injectable() export class DaffSeoNativeTitleEffects extends DaffSeoPageHookRouterEffects< diff --git a/libs/seo/router/src/index.ts b/libs/seo/router/src/index.ts new file mode 100644 index 0000000000..4aaf8f92ed --- /dev/null +++ b/libs/seo/router/src/index.ts @@ -0,0 +1 @@ +export * from './public_api'; diff --git a/libs/seo/state/src/injection-tokens/meta/router/updates.token.spec.ts b/libs/seo/router/src/meta/updates.token.spec.ts similarity index 91% rename from libs/seo/state/src/injection-tokens/meta/router/updates.token.spec.ts rename to libs/seo/router/src/meta/updates.token.spec.ts index 8e286b27c1..9403ad8c74 100644 --- a/libs/seo/state/src/injection-tokens/meta/router/updates.token.spec.ts +++ b/libs/seo/router/src/meta/updates.token.spec.ts @@ -10,7 +10,8 @@ import { daffProvideMetaRouterUpdates, DAFF_SEO_META_ROUTER_UPDATES, } from './updates.token'; -import { DaffSeoUpdateEventPair } from '../../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; + describe('daffProvideMetaUpdates', () => { let updates: DaffSeoUpdateEventPair[]; diff --git a/libs/seo/state/src/injection-tokens/meta/router/updates.token.ts b/libs/seo/router/src/meta/updates.token.ts similarity index 91% rename from libs/seo/state/src/injection-tokens/meta/router/updates.token.ts rename to libs/seo/router/src/meta/updates.token.ts index b791cd664c..506a6a242e 100644 --- a/libs/seo/state/src/injection-tokens/meta/router/updates.token.ts +++ b/libs/seo/router/src/meta/updates.token.ts @@ -6,7 +6,7 @@ import { Event } from '@angular/router'; import { DaffSeoMetaDefinition } from '@daffodil/seo'; -import { DaffSeoUpdateEventPair } from '../../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; /** * A multi-provider injection token for providing page meta update logic. diff --git a/libs/seo/state/src/models/update-event-pair.interface.ts b/libs/seo/router/src/model/update-event-pair.interface.ts similarity index 100% rename from libs/seo/state/src/models/update-event-pair.interface.ts rename to libs/seo/router/src/model/update-event-pair.interface.ts diff --git a/libs/seo/router/src/providers/canonical-provider.ts b/libs/seo/router/src/providers/canonical-provider.ts new file mode 100644 index 0000000000..a4ca02c337 --- /dev/null +++ b/libs/seo/router/src/providers/canonical-provider.ts @@ -0,0 +1,34 @@ +import { + APP_INITIALIZER, + Provider, +} from '@angular/core'; + +import { initializeRouterService } from './initializer'; +import { DaffSeoNativeCanonicalUrlEffects } from '../effects/canonical.effects'; + +/** + * Configures an Angular application to track routing configuration + * and subsequently set canonical url information in the document. + * + * This provider is intended to only be imported exactly once in the root of the application. + * + * ## Usage + * + * ```ts + * @NgModule({ + * providers: [ + * daffSeoRouterCanonicalProvider() + * ], + * }) + * export class AppModule { } + * ``` + */ +export const daffSeoRouterCanonicalProvider = (): Provider[] => [ + DaffSeoNativeCanonicalUrlEffects, + { + provide: APP_INITIALIZER, + useFactory: initializeRouterService, + deps: [DaffSeoNativeCanonicalUrlEffects], + multi: true, + }, +]; diff --git a/libs/seo/router/src/providers/initializer.ts b/libs/seo/router/src/providers/initializer.ts new file mode 100644 index 0000000000..d4157b2d2d --- /dev/null +++ b/libs/seo/router/src/providers/initializer.ts @@ -0,0 +1,8 @@ +import { DaffSeoPageHookRouterEffects } from '../effects/page-hook.effects'; + +export const initializeRouterService = (effects: DaffSeoPageHookRouterEffects) => () => { + effects.getData$().subscribe(); + effects.emptyRestoreCache$().subscribe(); + effects.remove$().subscribe(); + effects.restore$().subscribe(); +}; diff --git a/libs/seo/router/src/providers/meta-provider.ts b/libs/seo/router/src/providers/meta-provider.ts new file mode 100644 index 0000000000..870898879d --- /dev/null +++ b/libs/seo/router/src/providers/meta-provider.ts @@ -0,0 +1,33 @@ +import { + APP_INITIALIZER, + Provider, +} from '@angular/core'; + +import { initializeRouterService } from './initializer'; +import { DaffSeoNativeMetaEffects } from '../effects/meta.effects'; + +/** + * Configures an Angular application to track routing configuration and subsequently set meta information in the document. + * + * This provider is intended to only be imported exactly once in the root of the application. + * + * ## Usage + * + * ```ts + * @NgModule({ + * providers: [ + * daffSeoRouterMetaProvider() + * ], + * }) + * export class AppModule { } + * ``` + */ +export const daffSeoRouterMetaProvider = (): Provider[] => [ + DaffSeoNativeMetaEffects, + { + provide: APP_INITIALIZER, + useFactory: initializeRouterService, + deps: [DaffSeoNativeMetaEffects], + multi: true, + }, +]; diff --git a/libs/seo/router/src/providers/title-provider.ts b/libs/seo/router/src/providers/title-provider.ts new file mode 100644 index 0000000000..057c93b24b --- /dev/null +++ b/libs/seo/router/src/providers/title-provider.ts @@ -0,0 +1,35 @@ +import { + APP_INITIALIZER, + Provider, +} from '@angular/core'; + +import { initializeRouterService } from './initializer'; +import { DaffSeoNativeTitleEffects } from '../effects/title.effects'; + +/** + * Configures an Angular application to track routing configuration and subsequently set title information in the document. + * + * This provider is intended to only be imported exactly once in the root of the application. + * + * @deprecated since Angular 14. See https://angular.io/api/router/TitleStrategy + * + * ## Usage + * + * ```ts + * @NgModule({ + * providers: [ + * daffSeoRouterTitleProvider() + * ], + * }) + * export class AppModule { } + * ``` + */ +export const daffSeoRouterTitleProvider = (): Provider[] => [ + DaffSeoNativeTitleEffects, + { + provide: APP_INITIALIZER, + useFactory: initializeRouterService, + deps: [DaffSeoNativeTitleEffects], + multi: true, + }, +]; diff --git a/libs/seo/router/src/public_api.ts b/libs/seo/router/src/public_api.ts new file mode 100644 index 0000000000..b821bfa456 --- /dev/null +++ b/libs/seo/router/src/public_api.ts @@ -0,0 +1,16 @@ +export { DaffSeoUpdateEventPair } from './model/update-event-pair.interface'; +export { + DAFF_SEO_META_ROUTER_UPDATES, + daffProvideMetaRouterUpdates, +} from './meta/updates.token'; +export { + DAFF_SEO_CANONICAL_URL_ROUTER_UPDATES, + daffProvideCanonicalUrlRouterUpdates, +} from './canonical/updates.token'; +export { + DAFF_SEO_TITLE_ROUTER_UPDATES, + daffProvideTitleRouterUpdates, +} from './title/updates.token'; +export { daffSeoRouterTitleProvider } from './providers/title-provider'; +export { daffSeoRouterMetaProvider } from './providers/meta-provider'; +export { daffSeoRouterCanonicalProvider } from './providers/canonical-provider'; diff --git a/libs/seo/state/src/injection-tokens/title/router/updates.token.spec.ts b/libs/seo/router/src/title/updates.token.spec.ts similarity index 90% rename from libs/seo/state/src/injection-tokens/title/router/updates.token.spec.ts rename to libs/seo/router/src/title/updates.token.spec.ts index bb7e028f2e..ed0c9adb47 100644 --- a/libs/seo/state/src/injection-tokens/title/router/updates.token.spec.ts +++ b/libs/seo/router/src/title/updates.token.spec.ts @@ -8,7 +8,8 @@ import { daffProvideTitleRouterUpdates, DAFF_SEO_TITLE_ROUTER_UPDATES, } from './updates.token'; -import { DaffSeoUpdateEventPair } from '../../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; + describe('daffProvideTitleUpdates', () => { let updates: DaffSeoUpdateEventPair[]; diff --git a/libs/seo/state/src/injection-tokens/title/router/updates.token.ts b/libs/seo/router/src/title/updates.token.ts similarity index 91% rename from libs/seo/state/src/injection-tokens/title/router/updates.token.ts rename to libs/seo/router/src/title/updates.token.ts index 5f990b12b2..d318cab9bc 100644 --- a/libs/seo/state/src/injection-tokens/title/router/updates.token.ts +++ b/libs/seo/router/src/title/updates.token.ts @@ -4,7 +4,7 @@ import { } from '@angular/core'; import { Event } from '@angular/router'; -import { DaffSeoUpdateEventPair } from '../../../models/update-event-pair.interface'; +import { DaffSeoUpdateEventPair } from '../model/update-event-pair.interface'; /** * A multi-provider injection token for providing canonical URL update logic. diff --git a/libs/seo/state/src/effects/router/page-hook.effects.spec.ts b/libs/seo/state/src/effects/router/page-hook.effects.spec.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libs/seo/state/src/injection-tokens/public_api.ts b/libs/seo/state/src/injection-tokens/public_api.ts index f3e68f5020..dd12c36dbc 100644 --- a/libs/seo/state/src/injection-tokens/public_api.ts +++ b/libs/seo/state/src/injection-tokens/public_api.ts @@ -2,25 +2,13 @@ export { daffProvideTitleUpdates, DAFF_SEO_TITLE_UPDATES, } from './title/updates.token'; -export { - daffProvideTitleRouterUpdates, - DAFF_SEO_TITLE_ROUTER_UPDATES, -} from './title/router/updates.token'; export { daffProvideMetaUpdates, DAFF_SEO_META_UPDATES, } from './meta/updates.token'; -export { - daffProvideMetaRouterUpdates, - DAFF_SEO_META_ROUTER_UPDATES, -} from './meta/router/updates.token'; export { daffProvideCanonicalUrlUpdates, DAFF_SEO_CANONICAL_URL_UPDATES, } from './canonical/updates.token'; -export { - daffProvideCanonicalUrlRouterUpdates, - DAFF_SEO_CANONICAL_URL_ROUTER_UPDATES, -} from './canonical/router/updates.token'; diff --git a/libs/seo/state/src/models/public_api.ts b/libs/seo/state/src/models/public_api.ts index ae83ed0303..3bdc3353bb 100644 --- a/libs/seo/state/src/models/public_api.ts +++ b/libs/seo/state/src/models/public_api.ts @@ -1,5 +1,4 @@ export { DaffSeoUpdateActionPair } from './update-action-pair.interface'; -export { DaffSeoUpdateEventPair } from './update-event-pair.interface'; export { DaffSeoTitleUpdate } from './title-update.interface'; export { DaffSeoMetaUpdate } from './meta-update.interface'; export { DaffSeoCanonicalUrlUpdate } from './canonical-url-update.interface'; diff --git a/libs/seo/state/src/native-state.module.ts b/libs/seo/state/src/native-state.module.ts deleted file mode 100644 index ed1c3a5a00..0000000000 --- a/libs/seo/state/src/native-state.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { EffectsModule } from '@ngrx/effects'; - -import { DaffSeoNativeCanonicalUrlEffects } from './effects/router/canonical.effects'; -import { DaffSeoNativeMetaEffects } from './effects/router/meta.effects'; -import { DaffSeoNativeTitleEffects } from './effects/router/title.effects'; - -@NgModule({ - imports: [ - EffectsModule.forFeature([ - DaffSeoNativeCanonicalUrlEffects, - DaffSeoNativeMetaEffects, - DaffSeoNativeTitleEffects, - ]), - ], -}) -export class DaffSeoNativeStateModule {} diff --git a/libs/seo/state/src/public_api.ts b/libs/seo/state/src/public_api.ts index ebad622a6e..33838e263d 100644 --- a/libs/seo/state/src/public_api.ts +++ b/libs/seo/state/src/public_api.ts @@ -2,4 +2,3 @@ export * from './models/public_api'; export * from './injection-tokens/public_api'; export { DaffSeoStateModule } from './state.module'; -export { DaffSeoNativeStateModule } from './native-state.module'; From 37e9f7171338c0be72d31feca838d0bb593cb942 Mon Sep 17 00:00:00 2001 From: Damien Retzinger Date: Mon, 29 Jul 2024 13:29:37 -0400 Subject: [PATCH 2/2] add missed tsconfig path --- libs/seo/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/seo/tsconfig.json b/libs/seo/tsconfig.json index 8b8ab52a14..d5089441ce 100644 --- a/libs/seo/tsconfig.json +++ b/libs/seo/tsconfig.json @@ -12,6 +12,9 @@ "@daffodil/seo/state": [ "libs/seo/state/src" ], + "@daffodil/seo/router": [ + "libs/seo/router/src" + ], } } }