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

sb-cb-ui-toc

v0.0.12-mauritius

Published

This library contains Table of Contents (TOC) components and modules for Sunbird CB.

Downloads

91

Readme

sb-cb-ui-toc

This library contains Table of Contents (TOC) components and modules for Sunbird CB.

Overview

This package contains all the components, services, models, and resolvers related to the Table of Contents functionality, including:

  • TOC home and overview pages
  • Content cards and sessions
  • Cohorts management
  • Analytics and certifications
  • Discussion integration
  • Enrollment forms and questionnaires

Installation

npm install @sunbird-cb/toc

Important Documentation

Before using this package, please review:

  1. MIGRATION-GUIDE.md - Comprehensive guide for migrating from app-toc to this package
  2. EXTERNAL-DEPENDENCIES.md - Detailed list of all external dependencies that must be provided

Quick Start

Basic Usage

Import the required modules in your Angular application:

import { AppTocModule } from '@sunbird-cb/toc';

@NgModule({
  imports: [
    AppTocModule
  ]
})
export class AppModule { }

Required Dependencies

This package has external dependencies that must be provided by the consuming application. See EXTERNAL-DEPENDENCIES.md for the complete list.

Application Services Required:

  • GeneralGuard
  • FormDataResolverService
  • MobileAppsService
  • NetCoreService
  • AppPublicTocResolverService

Package Services Required (when properly exported):

  • RatingService (from @sunbird-cb/collection)
  • ApiService, AccessControlService, EditorService (from @sunbird-cb/author)
  • UserProfileService, OtpService (from @sunbird-cb/user-profile)

Features

Components

  • Home & Overview: Display TOC content in various layouts
  • Content Cards: Show content information with actions
  • Sessions: Manage learning sessions
  • Cohorts: Handle cohort enrollment and management
  • Analytics: Display learning analytics and progress
  • Certification: Manage certifications
  • Discussion: Integrated discussion functionality
  • Forms: Enrollment and survey forms

Services

  • AppTocService: Core TOC functionality
  • ActionService: Handle user actions
  • TitleTagService: Manage page titles and meta tags
  • And more...

Routing

The package includes a pre-configured routing module (AppTocRoutingModule), but routing is optional. You can:

Option 1: Configure routing in your application (Recommended)

import { Routes } from '@angular/router';
import { AppTocHomeV2Component } from '@sunbird-cb/toc';

const routes: Routes = [
  {
    path: 'toc/:id',
    component: AppTocHomeV2Component,
    // Add your guards, resolvers, etc.
  }
];

Option 2: Use the pre-configured routing module

import { AppTocRoutingModule } from '@sunbird-cb/toc';

@NgModule({
  imports: [
    AppTocRoutingModule // Import only if you want pre-configured routes
  ]
})
export class AppRoutingModule { }

Note: Pre-configured routes require guards and resolvers (GeneralGuard, FormDataResolverService) which are commented out. See EXTERNAL-DEPENDENCIES.md for details.

Build

Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run npm test to execute the unit tests via Jest.

Current Status

⚠️ Beta Version: This package is currently in beta. Some external dependencies need to be properly configured:

  • Import paths for external services are documented but commented out
  • Some services need to be exported from their respective packages
  • Integration testing is ongoing

See MIGRATION-GUIDE.md for detailed migration steps and current status.

Contributing

When contributing to this package:

  1. Ensure all new components are properly exported in public-api.ts
  2. Update documentation for any new dependencies
  3. Add unit tests for new functionality
  4. Update MIGRATION-GUIDE.md if adding external dependencies

Version

Current version: 0.0.1

License

See LICENSE file for details.

Support

For questions or issues:

  • Review the MIGRATION-GUIDE.md
  • Check EXTERNAL-DEPENDENCIES.md
  • Contact the development team
  • Create an issue in the repository