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

@bailaya/angular

v1.2.5

Published

An Angular component library for the BailaYa public API

Readme

@bailaya/angular

An Angular component library and service for the BailaYa public API

Overview

@bailaya/angular builds on top of @bailaya/core to provide:

  • A provideBailaya provider function + BailayaService injectable
  • An Angular service wrapping all API methods as RxJS Observables
  • Standalone components with sensible defaults (and full styling slots)
  • Full TypeScript support, including localized text & date formatting

Works with or without Tailwind. If you don't use Tailwind, just override the class input props to apply your own styling.

Features

  • Provider + service (provideBailaya + BailayaService)

  • BailayaService methods (all return Observable<T>)

    • getStudioProfile(overrideId?)
    • getUserProfile(userId)
    • getInstructors(overrideId?)
    • getClasses(startDate?, overrideId?)
    • getClassesByType(typeName, startDate?, overrideId?)
    • getEvents(startDate?, overrideId?)
    • getPackages(overrideId?)
    • getPrivateLessonInstructors(overrideId?)
  • Components (all inputs overridable, standalone with Angular 17 @if/@for)

    • <bailaya-class-schedule>
    • <bailaya-class-schedule-by-type>
    • <bailaya-event-schedule>
    • <bailaya-instructor-list>
    • <bailaya-studio-profile-card>
    • <bailaya-studio-description>
    • <bailaya-studio-types-list>
    • <bailaya-studio-types-grid>
    • <bailaya-user-profile-card>
    • <bailaya-private-lesson-list>
    • <bailaya-package-list>

Installation

npm install @bailaya/angular @bailaya/core

or with Yarn:

yarn add @bailaya/angular @bailaya/core

Peer Dependencies

  • "@angular/common": "^17.3.0"
  • "@angular/core": "^17.3.0"
  • "@bailaya/core": "^1.2.0"

Quick Start

Register the provider in app.config.ts:

import { ApplicationConfig } from '@angular/core';
import { provideBailaya } from '@bailaya/angular';

export const appConfig: ApplicationConfig = {
  providers: [
    provideBailaya({ studioId: 'YOUR_STUDIO_ID' }),
  ],
};

Using the Service

import { Component, inject, OnInit } from '@angular/core';
import { AsyncPipe } from '@angular/common';
import { BailayaService } from '@bailaya/angular';
import { Observable } from 'rxjs';
import type { Instructor } from '@bailaya/angular';

@Component({
  standalone: true,
  imports: [AsyncPipe],
  template: `
    <ul>
      @for (i of instructors$ | async; track i.id) {
        <li>{{ i.name }} {{ i.lastname }}</li>
      }
    </ul>
  `,
})
export class TeamComponent implements OnInit {
  private bailaya = inject(BailayaService);
  instructors$!: Observable<Instructor[]>;

  ngOnInit() {
    this.instructors$ = this.bailaya.getInstructors();
  }
}

Using a Component

import { Component } from '@angular/core';
import { StudioProfileCardComponent } from '@bailaya/angular';

@Component({
  standalone: true,
  imports: [StudioProfileCardComponent],
  template: `<bailaya-studio-profile-card locale="en" />`,
})
export class DashboardComponent {}

API Reference

provideBailaya(options)

Registers the BailayaClient and BailayaService in the Angular dependency injection tree.

  • options.baseUrl?: string – override default API URL
  • options.studioId?: string – default studio ID

BailayaService

Inject BailayaService to call API methods directly as Observables.

| Method | Returns | |---------------------------------------------------------|--------------------------------------| | getStudioProfile(overrideId?) | Observable<StudioProfile> | | getUserProfile(userId) | Observable<UserProfile> | | getInstructors(overrideId?) | Observable<Instructor[]> | | getClasses(startDate?, overrideId?) | Observable<StudioClass[]> | | getClassesByType(typeName, startDate?, overrideId?) | Observable<StudioClass[]> | | getEvents(startDate?, overrideId?) | Observable<StudioEvent[]> | | getPackages(overrideId?) | Observable<StudioPackage[]> | | getPrivateLessonInstructors(overrideId?) | Observable<PrivateLessonInstructor[]> |

Components

All components are standalone and use Angular 17 @if/@for control flow. All styling class names are overridable via @Input().

| Selector | Key Inputs | |-------------------------------------|----------------------------------------------------------------------------------------------------| | <bailaya-studio-profile-card> | overrideId?, locale?, labels? | | <bailaya-studio-description> | overrideId?, locale? | | <bailaya-instructor-list> | overrideId?, locale? | | <bailaya-user-profile-card> | userId, locale?, labels? | | <bailaya-class-schedule> | from?, overrideId?, locale?, currency?, bookBaseUrl?, hideBookButton?, labels? | | <bailaya-class-schedule-by-type> | typeName, from?, overrideId?, locale?, currency?, bookBaseUrl?, hideBookButton? | | <bailaya-event-schedule> | from?, overrideId?, locale?, currency?, bookBaseUrl?, hideBookButton?, labels? | | <bailaya-studio-types-list> | overrideId?, locale?, hrefPrefix? | | <bailaya-studio-types-grid> | overrideId?, locale?, showDescription? | | <bailaya-private-lesson-list> | overrideId?, locale?, bookBaseUrl?, labels? | | <bailaya-package-list> | overrideId?, locale?, buyBaseUrl?, labels? |

Importing components

import {
  ClassScheduleComponent,
  PrivateLessonListComponent,
  PackageListComponent,
} from '@bailaya/angular';

@Component({
  standalone: true,
  imports: [ClassScheduleComponent, PrivateLessonListComponent, PackageListComponent],
  templateUrl: './my.component.html',
})
export class MyComponent {}

License

ISC