npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dignite/ng.notification-center

v10.0.0-rc.3

Published

Angular UI library for the Dignite Notification Center — notification bell, subscriptions management, and ABP-generated API proxies over /api/notifications.

Readme

@dignite/ng.notification-center

Angular UI library for the Dignite Notification Center — a notification bell (unread badge + dropdown) and a subscriptions management component, plus the ABP-generated API proxies (UserNotificationService + NotificationSubscriptionService + DTOs/enums) over /api/notification-center. It mirrors the module's MVC UI for Angular consumers and is packaged like ABP's own @abp/ng.* libraries: a main entry point plus a /config secondary entry point.

npm install @dignite/[email protected]

The npm package version stays in lockstep with the repository's NuGet package version.

Entry points

| Import | Contents | |---|---| | @dignite/ng.notification-center | NotificationBellComponent (<abp-notification-bell>), NotificationSubscriptionsComponent, and the ABP-generated inbox + subscription API proxies (UserNotificationService, NotificationSubscriptionService) + DTOs/enums. | | @dignite/ng.notification-center/config | provideNotificationCenterConfig() — registers the navigation-menu entry into the host — plus the eNotificationCenterRouteNames route-name enum. Call the provider once in app.config.ts. |

Usage

Register the menu contribution in the host's app.config.ts (mirrors provideIdentityConfig() etc.):

import { provideNotificationCenterConfig } from '@dignite/ng.notification-center/config';

export const appConfig: ApplicationConfig = {
  providers: [
    // ...ABP providers...
    provideNotificationCenterConfig(),
  ],
};

When the SignalR hub is not under the same remote service URL as the generated Notification Center REST proxy, configure it once with the same provider. hubPath is appended to the NotificationCenter remote API URL; hubUrl is a fully resolved override:

provideNotificationCenterConfig({
  realtime: {
    hubPath: '/signalr-hubs/notifications',
    // hubUrl: 'https://notifications.example.com/signalr-hubs/notifications',
  },
});

Use the subscriptions component in a page:

import { NotificationSubscriptionsComponent } from '@dignite/ng.notification-center';

@Component({
  imports: [NotificationSubscriptionsComponent],
  template: `
    <abp-notification-subscriptions />
  `,
})
export class MyNotificationsPage {}

The toolbar bell is registered by provideNotificationCenterConfig(). It loads its initial count/list once, then listens to the application-scoped NotificationRealtimeService. Multiple bells or pages share one SignalR connection; mounting and destroying components only reference-counts that shared runtime and cannot accumulate duplicate ReceiveNotification handlers. SignalR is only a prompt: ReceiveNotification, reconnect, token renewal, login/logout, and tenant/account changes all invalidate the bell and trigger authoritative REST refreshes for unread count/list state. The hub endpoint follows ABP's SignalR convention and is mapped server-side by ABP. Angular uses the Microsoft SignalR client, as ABP's SignalR documentation directs non-MVC clients to do.

Advanced hosts can inject NotificationRealtimeService directly to observe refreshRequested$ and lifecycle$, or call requestRefresh() after local user actions that should resynchronize notification UI.

Custom notification bodies and entity links

The bell keeps the notification title and time in a fixed header row. The body below it is rendered by the notification data discriminator; register custom body components with NotificationDataComponentsService.

Notifications are not required to be navigable. Clicking an item marks it as read in place, updates the badge, and keeps the item visible in the currently open dropdown. The next time the bell is opened, it reloads the unread list and read items naturally drop out. If a resolver is registered for the item's entityTypeName, the bell marks it as read and navigates through Angular Router so the SPA is not reloaded:

import { inject, provideAppInitializer } from '@angular/core';
import { NotificationEntityLinksService } from '@dignite/ng.notification-center';

provideAppInitializer(() => {
  inject(NotificationEntityLinksService).register('MyApp.Order', notification => [
    '/orders',
    notification.entityId,
  ]);
});

Return a Router commands array, a UrlTree, or an app-relative URL string. External URLs still use normal browser navigation.

Structure

The config entry follows ABP's own convention (see @abp/ng.identity/config):

config/src/
├── enums/route-names.ts   # eNotificationCenterRouteNames (menu name = localization key)
├── providers/
│   ├── route.provider.ts                     # routes
│   ├── nav-item.provider.ts                  # toolbar bell
│   ├── setting-tab.provider.ts               # subscriptions settings tab
│   └── notification-center-config.provider.ts # provideNotificationCenterConfig()
└── public-api.ts

The proxy is generated — don't hand-edit

Everything under src/lib/proxy/ is produced by abp generate-proxy -t ng -m notification-center -s Host --target notification-center -a NotificationCenter (run against a running backend). Hand-written code (components) lives outside proxy/ so it survives regeneration.

Building

From the angular/ workspace root:

ng build notification-center

This emits both entry points — dist/notification-center (main) and dist/notification-center/config.

During local development the demo app consumes this library from source: the TypeScript path aliases in angular/tsconfig.json point at src/public-api.ts (and config/src/public-api.ts), so you don't need to pre-build the library or set up any symlinks to see your edits — just ng serve the host app.

Publishing

Tagged repository releases build, smoke-test, and publish this package automatically. Pre-releases use npm's next dist-tag and stable releases use latest. npm requires every package to have a latest tag, so the initial pre-release temporarily owns both tags until the first stable release. Do not publish a different npm version manually. For a local package inspection, run npm pack ./dist/notification-center from the angular/ workspace after building.