open-index/open-npm huggingface dataset:
npm package: @ngx-rime/data-access
Description: Back End utilities
Author: Carlos Bayarri Cebrecos
Latest version: 15.1.2

# data-access

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test data-access` to execute the unit tests.

## Info

A data-access library contains services and utilities for interacting with a
back-end system.
npm package: @ngx-rime/feature
Description: Smart UI for Business Use Cases
Author: Carlos Bayarri Cebrecos
Latest version: 15.1.2

# feature

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test feature` to execute the unit tests.

## Info

Developers should consider feature libraries as libraries that implement smart UI (with injected services) for Business Use Cases specific to that feature.
npm package: @ngx-rime/util
Description: Common utilities
Author: Carlos Bayarri Cebrecos
Latest version: 15.1.2

# util

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test util` to execute the unit tests.

## Info

A utility library contains common utilities and services used by many libraries and applications. It also includes all the code related to State management.
npm package: @ngx-rocket/ascii-logo
Description: Super-awesome ngX-Rocket ASCII logo
Author: Yohan Lasorsa
Latest version: 1.1.0

# :rocket: ngx-rocket/ascii-logo

[![NPM version](https://img.shields.io/npm/v/@ngx-rocket/ascii-logo.svg)](https://www.npmjs.com/package/@ngx-rocket/ascii-logo)
[![Build status](https://img.shields.io/travis/ngx-rocket/ascii-logo/master.svg)](https://travis-ci.org/ngx-rocket/ascii-logo)
![Node version](https://img.shields.io/badge/node-%3E%3D6.0.0-brightgreen.svg)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

> Super-awesome ngX-Rocket ASCII logo

![screenshot](https://cloud.githubusercontent.com/assets/593151/25958791/fcbfd5dc-3671-11e7-8a2d-5d618cb7e883.png)

## Installation

```bash
npm install -g @ngx-rocket/ascii-logo
```

### Usage

```javascript
const asciiLogo = require('@ngx-rocket/ascii-logo');
const pkg =  require('./package.json');

console.log(asciiLogo());
console.log(asciiLogo(pkg.version));
console.log(asciiLogo(pkg.version, 'My awesome title'));
```

# License

[MIT](LICENSE)
npm package: @ngx-runtime-i18n/core
Description: Runtime i18n core with ICU-lite formatting
Latest version: 2.0.0

# @ngx-runtime-i18n/core

Framework‑agnostic primitives for runtime internationalisation:

- Tiny, dependency‑free **ICU‑lite** formatter (interpolation + basic `plural`).
- Shared types used by the Angular wrapper.

This package is designed to be used directly or via `@ngx-runtime-i18n/angular`.

---

## Install

```bash
npm i @ngx-runtime-i18n/core
```

---

## Quick Start

```ts
import { formatIcu, type Catalog } from '@ngx-runtime-i18n/core';

const catalog: Catalog = {
  hello: { user: 'Hello, {name}!' },
  cart: { items: '{count, plural, one {1 item} other {# items}}' },
};

formatIcu('en', 'hello.user', catalog, { name: 'Ashwin' }); // "Hello, Ashwin!"
formatIcu('en', 'cart.items', catalog, { count: 2 }); // "2 items"
```

- `key` supports dotted paths (e.g., `hello.user`).
- `plural` supports `one`, `other`, and exact matches like `=0`, `=2`.
- The function is pure and side‑effect free.

---

## API

### `formatIcu(lang, key, catalog, params?, onMissingKey?)`

- **`lang: string`** — current language (for plural rules and future features).
- **`key: string`** — dotted path into the catalog.
- **`catalog: Catalog`** — a nested object of strings/objects.
- **`params?: Record<string, unknown>`** — interpolation values.
- **`onMissingKey?: (key: string) => string`** — transform for missing keys (defaults to returning the key).

### Types

- **`Catalog`** — `Record<string, unknown>` (nested object).
- **`RuntimeI18nConfig`** — shape shared with the Angular wrapper for consistency.

---

## Catalog structure

```json
{
  "hello": { "user": "Hello, {name}!" },
  "cart": { "items": "{count, plural, one {1 item} other {# items}}" }
}
```

> Keep catalogs per language (e.g., `en.json`, `hi.json`).

---

## Pitfalls & Notes

- Not a full ICU implementation; aims to cover common 80% with a tiny footprint.
- If you need Angular binding or SSR helpers, prefer `@ngx-runtime-i18n/angular`.
- Keep your catalogs **flat-ish and predictable** to avoid fragile deep paths.

---

## ICU-lite support

### Supported

- Basic `{param}` interpolation (tokens may include dots and hyphens for nested data).
- `plural` blocks with `one`, `other`, and `=n` selectors plus `#` replacement.
- Nested placeholders inside plural option bodies (balanced braces are retained).

### Not supported

- `select` or other ICU argument types beyond `plural`.
- Full ICU-style escaping, quoting, or nested plural/select grammar.
- Plural blocks inside other plural blocks (depth beyond one level is skipped).
- Escaping braces beyond the literals above; unmatched braces must not resemble valid tokens.

---

## License

MIT
npm package: @ngx-runtime-i18n/primeng
Description: PrimeNG adapter for @ngx-runtime-i18n/angular
Latest version: 2.0.0

# @ngx-runtime-i18n/primeng

Optional PrimeNG adapter that listens to `I18nService.lang()` and applies the matching PrimeNG translations via `PrimeNGConfig`.

## Install

This package is optional ⏤ install it alongside the runtime core, Angular binding, and PrimeNG itself:

```bash
npm install @ngx-runtime-i18n/core @ngx-runtime-i18n/angular @ngx-runtime-i18n/primeng primeng
```

## Setup

Provide the runtime `I18nService` and the PrimeNG adapter together in your `ApplicationConfig`:

```ts
import { ApplicationConfig } from '@angular/core';
import { provideRuntimeI18n } from '@ngx-runtime-i18n/angular';
import { providePrimeNgRuntimeI18n } from '@ngx-runtime-i18n/primeng';

const translationMap = {
  en: { firstDayOfWeek: 0 },
  es: { firstDayOfWeek: 1 },
};

export const appConfig: ApplicationConfig = {
  providers: [
    provideRuntimeI18n({
      defaultLang: 'en',
      supported: ['en', 'es'],
      fetchCatalog: (lang, signal) => fetch(`/i18n/${lang}.json`, { signal }).then((res) => res.json()),
    }),
    providePrimeNgRuntimeI18n({
      resolveTranslation: (lang) => translationMap[lang] ?? {},
      onApplied: (lang) => console.debug(`PrimeNG translation ${lang} applied`),
    }),
  ],
};
```

## Translation resolvers

Use simple maps for most apps, or lazy-load translation files for each language:

```ts
const translationResolvers = {
  en: () => import('./primeng/en').then((m) => m.PRIMENG),
  es: () => import('./primeng/es').then((m) => m.PRIMENG),
};

providePrimeNgRuntimeI18n({
  resolveTranslation: (lang) => translationResolvers[lang]?.() ?? Promise.resolve({}),
});
```

The resolver may return either a `Record<string, any>` directly or a `Promise` (e.g., from a dynamic import).

## Notes

- This package never runs unless you call `providePrimeNgRuntimeI18n(...)`, so it keeps the core and Angular stacks untouched.
- PrimeNG is only a peer dependency here; your app still controls the installed version and bundling surface.
npm package: @ngx-security/core
Description: Angular Core Roles Module
Author: User
Latest version: 21.0.0

# ngx-security/core

This package provides the core functionality for managing subjects in the `@ngx-security` ecosystem. It includes the `SubjectService`, which is used to manage user details, authorities, and other subject-related information.

## Installation

```shell script
npm install --save @ngx-security/core
```

## Setup

`SubjectService` is provided using the `provideSecurityCore` helper function, which most apps include in the application `providers` in `app.config.ts`.

```typescript
export const appConfig: ApplicationConfig = {
  providers: [
    provideSecurityCore()
  ]
};
```

## Usage

```typescript
import { Component, OnInit } from '@angular/core';
import { Subject, SubjectDetails, SubjectService } from '@ngx-security/core';

class UserDetails extends SubjectDetails {
}

class User extends Subject<UserDetails> {
}

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {

  constructor(public user: SubjectService<UserDetails, User>) {
  }

  ngOnInit(): void {
    setTimeout(() => {
      this.user.update({
        principal: 'jsnow',
        authorities: ['ROLE_1', 'ROLE_2', 'ROLE_3'],
        details: {
          displayName: 'Jon Snow'
        }
      });
    });
  }
}
```

```html
<h3>{{user.displayName$ | async}}</h3>
<h5>{{user.authorities$ | async | json}}</h5>
```
npm package: @ngx-security/permissions
Description: Angular Security Permissions Module
Author: User
Latest version: 21.0.0

# ngx-security/permissions

This module provides a way to manage permissions in your Angular application using structural directives and pipes. Default permissions are provided by the `SubjectService` from `@ngx-security/core`, which is used to manage user details and authorities.

## Installation

```shell script
npm install --save @ngx-security/core @ngx-security/permissions
```

## Setup

`SubjectPermissionsProvider` is provided using the `provideSecurityPermissions` helper function, which most apps include in the application `providers` in `app.config.ts`.

```typescript
export const appConfig: ApplicationConfig = {
  providers: [
    provideSecurityCore(),
    provideSecurityPermissions()
  ]
};
```

Now you are ready to use it. See [SecurityCoreModule](https://github.com/xbranch/ngx-security/tree/develop/projects/core) for `SubjectService` implementation which provide authorities as permissions.

## Usage

### Structural directives

```html
<p *isPermitted="'printer:xpc4000:*'">This should see users with printer:xpc4000:*</p>
```

### Pipes

```angular20html
@if ('printer:xpc4000:*' | isPermitted) {
    <p>This should see users with printer:xpc4000:*</p>
}
```

### Pipes with poetry

```angular20html
@if ('user' | isPermitted:'printer:xpc4000:*') {
    <p>This should see users with printer:xpc4000:*</p>`
}
```

## Advance setup

Implement custom `SubjectPermissionsProvider` class:

```typescript
import { Injectable, OnDestroy } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { SubjectPermissionsProvider } from '@ngx-security/permissions';

@Injectable()
export class MyPermissionsProvider extends SubjectPermissionsProvider implements OnDestroy {

  private permissions: BehaviorSubject<string[]> = new BehaviorSubject(['printer:xpc5000:print', 'printer:xpc4000:*', 'nas:timeCapsule,fritzbox:read']);

  permissions$: Observable<string[]> = this.permissions.asObservable();

  constructor() {
    super();
  }

  ngOnDestroy(): void {
    this.permissions.complete();
  }

  getPermissions(): string[] {
    return this.permissions.getValue();
  }
}
```

Add provider for core and permissions module in your `app.config.ts` and set your custom provider:

```typescript
export const appConfig: ApplicationConfig = {
  providers: [
    provideSecurityCore(),
    provideSecurityPermissions({
      subjectPermissions: {provide: SubjectPermissionsProvider, useClass: MyPermissionsProvider}
    })
  ]
};
```
npm package: @ngx-security/roles
Description: Angular Security Roles Module
Author: User
Latest version: 21.0.0

# ngx-security/roles

This module provides structural directives and pipes to check roles of the current user. Default roles are provided by the `SubjectService` from `@ngx-security/core`, which is used to manage user details and authorities.

## Installation

```shell script
npm install --save @ngx-security/core @ngx-security/roles
```

## Setup

`SubjectRolesProvider` is provided using the `provideSecurityRoles` helper function, which most apps include in the application `providers` in `app.config.ts`.

```typescript
export const appConfig: ApplicationConfig = {
  providers: [
    provideSecurityCore(),
    provideSecurityRoles()
  ]
};
```

Now you are ready to use it. See [SecurityCoreModule](https://github.com/xbranch/ngx-security/tree/develop/projects/core) for `SubjectService` implementation which provide authorities as roles.

## Usage

### Structural directives

```html
<p *hasRole="'ROLE_1'">This should see users with ROLE_1</p>
```

```html
<p *hasAnyRole="['ROLE_1','ROLE_2']">This should see users with ROLE_1 or ROLE_2</p>
```

```html
<p *hasRoles="['ROLE_1','ROLE_2']">This should see users with ROLE_1 and ROLE_2</p>
```

### Pipes

```angular20html
@if ('ROLE_1' | hasRole) {
    <p>This should see users with ROLE_1</p>
}
```

```angular20html
@if (['ROLE_1','ROLE_2'] | hasAnyRole) {
    <p>This should see users with ROLE_1 or ROLE_2</p>
}
```

```angular20html
@if (['ROLE_1','ROLE_2'] | hasRoles) {
    <p>This should see users with ROLE_1 and ROLE_2</p>
}
```

### Pipes with poetry

```angular20html
@if ('user' | hasRole:'ROLE_1') {
    <p>This should see users with ROLE_1</p>`
}
```

```angular20html
@if ('user' | hasAnyRole:['ROLE_1','ROLE_2']) {
    <p>This should see users with ROLE_1 or ROLE_2</p>`
}
```

```angular20html
@if ('user' | hasRoles:['ROLE_1','ROLE_2']) {
    <p>This should see users with ROLE_1 and ROLE_2</p>`
}
```

## Advance setup

Implement custom custom `SubjectRolesProvider` class:

```typescript
import { Injectable, OnDestroy } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { SubjectRolesProvider } from '@ngx-security/roles';

@Injectable()
export class MyRolesProvider extends SubjectRolesProvider implements OnDestroy {

  private roles: BehaviorSubject<string[]> = new BehaviorSubject(['ROLE_1', 'ROLE_2']);

  roles$: Observable<string[]> = this.roles.asObservable();

  constructor() {
    super();
  }

  ngOnDestroy(): void {
    this.roles.complete();
  }

  getRoles(): string[] {
    return this.roles.getValue();
  }
}
```

Add provider for core and roles module in your `app.config.ts` and set `SubjectRolesProvider` to your custom provider:

```typescript
export const appConfig: ApplicationConfig = {
  providers: [
    provideSecurityCore(),
    provideSecurityRoles({
      subjectRoles: {provide: SubjectRolesProvider, useClass: MyRolesProvider}
    })
  ]
};
```
npm package: @ngx-signal-store-query/core
Description: Signal Store feature that bridges with Angular Query
Author: Piotr Stępniewski
Latest version: 0.8.0

# ngx-signal-store-query

Signal Store feature that bridges with Angular Query

## Simple Example

#### Create Store

```typescript
import { signalStore, withState } from '@ngrx/signals';
import { withQuery } from '@ngx-signal-store-query/core';
import { lastValueFrom } from 'rxjs';

import { ApiService } from './api.service';

export const ExampleStore = signalStore(
  withState({ categoryId: 1 }),
  withQuery('example', (store) => {
    const apiService = inject(ApiService);

    return () => {
      const categoryId = store.categoryId();

      return {
        enabled: !!categoryId,
        queryKey: ['category', { id: categoryId }],
        queryFn: () =>
          lastValueFrom(apiService.getCategory$(categoryId)).catch((error) => {
            console.error(error);

            return null;
          }),
      };
    };
  }),
);
```

#### Use it in component

<!-- prettier-ignore-start -->
```typescript
import { JsonPipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';

import { ExampleStore } from './example.store.ts';

@Component({
  standalone: true,
  selector: 'app-example',
  template: `
    <pre>
      Loading: {{ store.exampleQuery.isLoading() }}
      Fetching: {{ store.exampleQuery.isFetching() }}
      Data:
      {{ store.exampleQuery.data() | json }}
    </pre>
  `,
  changeDetection: ChangeDetectionStrategy.OnPush,
  imports: [JsonPipe],
})
export class ExampleComponent {
  public readonly store = inject(ExampleStore);
}
```
<!-- prettier-ignore-end -->