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 🙏

© 2025 – Pkg Stats / Ryan Hefner

smartec-consent-manager

v1.0.23

Published

A simple and lightweight Angular library for managing user consent and cookie banners.

Downloads

11

Readme

Smartec Consent Manager - Angular Library

A customizable consent manager for Angular applications that provides GDPR-compliant cookie consent management with a floating action button and configurable dialog.

Features

  • Floating action button with configurable tooltip
  • Customizable consent dialog
  • Persistent consent preferences (using localStorage)
  • GDPR compliant design
  • Built with Angular Material
  • Easy integration with Angular applications

Installation

  1. Install the package:
npm install smartec-consent-manager --save --legacy-peer-deps
  1. Import the component in your application:
import { SmartecConsentManagerComponent } from 'smartec-consent-manager';
  1. Add the component to your app template:
<smartec-consent-manager-manager [tooltipText]="'Administrar preferencias de cookies'"></smartec-consent-manager-manager>

Usage

Basic Usage

<smartec-consent-manager-manager></smartec-consent-manager-manager>

Customizing Tooltip

<smartec-consent-manager-manager [tooltipText]="'Administrar preferencias de cookies'"></smartec-consent-manager-manager>

Or with a component property:

// In your component
consentTooltip = 'Custom tooltip text';
<smartec-consent-manager-manager [tooltipText]="consentTooltip"></smartec-consent-manager-manager>

Customizing Default Consent Preferences

You can customize the default consent preferences by providing your own implementation of the ConsentService:

import { Injectable } from '@angular/core';
import { ConsentService } from 'smartec-consent-manager';

@Injectable()
export class CustomConsentService extends ConsentService {
  getDefaultPreferences() {
    return {
      necessary: true,
      analytics: true, // Default to true for analytics
      marketing: false,
      preferences: true
    };
  }
}

Then provide it in your module:

@NgModule({
  providers: [
    { provide: ConsentService, useClass: CustomConsentService }
  ]
})
export class AppModule { }

Styling

The floating button position can be customized by overriding these CSS variables in your global styles:

:root {
  --smartec-consent-manager-fab-bottom: 20px;
  --smartec-consent-manager-fab-right: 20px;
  --smartec-consent-manager-fab-z-index: 1000;
}

Development

Building the Library

  1. Navigate to the project root:
cd C:\dev\ng\smartec-consent-manager
  1. Build the library:
ng build smartec-consent-manager

Publishing the Library

  1. After building, navigate to the dist folder:
cd C:\dev\ng\smartec-consent-manager\projects\smartec-consent\dist
  1. Publish to npm:
npm publish

Publishing Tips

  1. Make sure you're logged in to npm:
npm login
  1. Update the version in projects/smartec-consent-manager/package.json before publishing:
npm version patch  # or minor, major
  1. If publishing to a private registry, use:
npm publish --registry http://your-registry-url

Dependencies

This library requires:

  • Angular (v12+ recommended)
  • Angular Material
  • @angular/cdk
  • @angular/animations