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

pavithra-quotation-info

v1.0.0

Published

Angular quotation info component library for micro-frontend architecture

Readme

Quotation Info - Angular Micro-Frontend Library

A reusable Angular component library for displaying quotation information forms using Formly. This library can be used as an NPM package in multiple applications as part of a micro-frontend architecture.

Features

  • 🎯 Standalone Angular component (no module required)
  • 📦 Published as NPM package
  • 🔌 Easy integration with dependency injection
  • 🎨 Formly-based dynamic forms
  • 🌍 i18n support with ngx-translate
  • 📱 Responsive design
  • ⚡ Lightweight with peer dependencies

Installation

npm install @your-org/quotation-info

Peer Dependencies

Make sure you have the following peer dependencies installed:

npm install @angular/common @angular/core @angular/forms @angular/material @ngx-formly/core @ngx-translate/core

Usage

Basic Usage (with Direct Data)

import { Component } from '@angular/core';
import { QuotationInfo } from '@your-org/quotation-info';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [QuotationInfo],
  template: `
    <lib-quotation-info
      [quotationRequestID]="quotationId"
      [formDataJson]="formJson"
      (formReady)="onFormReady($event)"
      (formValueChange)="onFormChange($event)">
    </lib-quotation-info>
  `
})
export class AppComponent {
  quotationId = 'QT-12345';
  formJson = '{"fieldGroup": [...]}'; // Your form JSON
  
  onFormReady(event: any) {
    console.log('Form ready:', event.form, event.fields);
  }
  
  onFormChange(value: any) {
    console.log('Form changed:', value);
  }
}

Advanced Usage (with Service Injection)

If you want to use your application's services (RestService, LoaderService, etc.):

import { ApplicationConfig } from '@angular/core';
import { QUOTATION_INFO_CONFIG, QuotationInfoConfig } from '@your-org/quotation-info';
import { RestService } from './services/rest.service';
import { LoaderService } from './services/loader.service';
import { CommonService } from './services/common.service';
import { LatestFormlyApiService } from './services/latest-formly-api.service';

export const appConfig: ApplicationConfig = {
  providers: [
    {
      provide: QUOTATION_INFO_CONFIG,
      useFactory: (
        rest: RestService,
        loader: LoaderService,
        common: CommonService,
        formly: LatestFormlyApiService
      ): QuotationInfoConfig => ({
        restService: rest,
        loaderService: loader,
        commonService: common,
        formlyApiService: formly
      }),
      deps: [RestService, LoaderService, CommonService, LatestFormlyApiService]
    }
  ]
};

Then use the component:

import { QuotationInfo } from '@your-org/quotation-info';

@Component({
  selector: 'app-quotation-page',
  standalone: true,
  imports: [QuotationInfo],
  template: `
    <lib-quotation-info
      [objectDetails]="details"
      (dataLoadError)="handleError($event)">
    </lib-quotation-info>
  `
})
export class QuotationPageComponent {
  details = {
    objectInfo: {
      quotationRequestID: 'QT-12345',
      quotationSearchID: 'QS-001',
      isGroupPolicy: false
    }
  };
  
  handleError(error: any) {
    console.error('Error loading quotation:', error);
  }
}

With Custom Table Component

import { QuotationInfo } from '@your-org/quotation-info';
import { YourTableComponent } from './your-table.component';

@Component({
  selector: 'app-quotation-with-table',
  standalone: true,
  imports: [QuotationInfo, YourTableComponent],
  template: `
    <lib-quotation-info
      [quotationRequestID]="quotationId"
      [formDataJson]="formJson"
      (tableDataChange)="onTableDataChange($event)">
      
      <your-table-component 
        quotationTable
        [data]="tableData"
        (dataChange)="onTableChange($event)">
      </your-table-component>
    </lib-quotation-info>
  `
})
export class QuotationWithTableComponent {
  quotationId = 'QT-12345';
  formJson = '...';
  tableData: any[] = [];
  
  onTableDataChange(data: any) {
    this.tableData = data;
  }
  
  onTableChange(event: any) {
    console.log('Table changed:', event);
  }
}

API Reference

Inputs

| Input | Type | Description | |-------|------|-------------| | quotationRequestID | string | The quotation request identifier | | quotationSearchID | string | The quotation search identifier | | isGroupPolicy | boolean | Flag for group policy (default: false) | | latestVersion | any | Latest version data | | currentMenuItem | any | Current menu item | | objectDetails | any | Complete object details | | formDataJson | string | JSON string of form configuration | | quotationData | any | Complete quotation data object |

Outputs

| Output | Type | Description | |--------|------|-------------| | formReady | EventEmitter<{form: FormGroup, fields: FormlyFieldConfig[]}> | Emitted when form is initialized | | formValueChange | EventEmitter<any> | Emitted when form value changes | | tableDataChange | EventEmitter<any> | Emitted when table data changes | | dataLoadError | EventEmitter<any> | Emitted when data loading fails |

Public Methods

| Method | Returns | Description | |--------|---------|-------------| | getFormValue() | any | Get current form value | | getFormData() | {model, form, fields} | Get complete form data | | isFormValid() | boolean | Check if form is valid |

Building the Library

# Build the library
ng build quotation-info --configuration production

# The output will be in dist/quotation-info/

Publishing to NPM

Before publishing, update the package name in package.json to match your organization:

{
  "name": "@your-org/quotation-info"
}

Then publish:

cd dist/quotation-info
npm login
npm publish --access public

Development

To work on this library locally:

  1. Build the library in watch mode:
ng build quotation-info --watch
  1. In your application, use npm link:
cd dist/quotation-info
npm link

cd /path/to/your/app
npm link @your-org/quotation-info

Module Federation Alternative

For runtime micro-frontend integration, consider using Webpack Module Federation:

npm install @angular-architects/module-federation
ng add @angular-architects/module-federation

This allows dynamically loading the component from a remote application at runtime.

License

MIT

Support

For issues and feature requests, please visit your repository's issue tracker.