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

@eherve/angular-material-commercial-document-editor

v22.0.0

Published

`@eherve/angular-material-commercial-document-editor` provides one standalone `CommercialDocumentEditorComponent` (`ngx-mat-commercial-document-editor`) and `CommercialDocumentEditorModule`. Import either in Angular 22 applications.

Readme

Commercial document editor

@eherve/angular-material-commercial-document-editor provides one standalone CommercialDocumentEditorComponent (ngx-mat-commercial-document-editor) and CommercialDocumentEditorModule. Import either in Angular 22 applications.

The component owns the outlined card, root/child panel shell, ordering/removal actions and document totals. Applications own forms, validation, calculations, source locks and mutations. Prices are displayed exactly as supplied. IDs must be unique among siblings and stable through recalculation; panels are tracked by ID to preserve expansion and projected form DOM.

Inputs and events

nodes accepts CommercialDocumentEditorNode<T>[]: id, title, data, optional amounts, quantity, children, readOnly, canRemove, canMove. moveNode emits {node,parent,direction: -1 | 1}; removeNode emits {node,parent}. Root parent is null. Document, parent and node read-only guards block actions. Consumers remain responsible for mutation authorization.

Optional inputs: title, emptyLabel, readOnly, embedded (remove outer padding), pricing, discountControl, showDiscounts, discountHistory, warning, locale (default fr), currency (default EUR), amountScopeLabel (default document). Register Angular locale data in the host for the selected locale. pricing uses the exported CommercialDocumentPricing contract: already calculated gross, line/global/total discounts, subtotal, final HT/VAT/TTC and VAT breakdown. No calculator is included. The optional reactive discountControl stays owned by the application; the component never changes its disabled state. Read-only/disabled controls show a value instead of an input. showDiscounts=false displays only HT/VAT/TTC. discountHistory is an ordered array of {author?:string,date:Date|string|number}; the last entry is shown. Warning text remains visible without discount columns.

editorTemplate, nodeFooterTemplate and nodeHeaderExtraTemplate accept TemplateRef<CommercialDocumentEditorContext<T>>. Their context is {$implicit:node,node,data:node.data,parent,readOnly}. Use let-node, let-data="data", let-parent="parent", let-readOnly="readOnly". The footer appears after node editor fields and before expandable child nodes. It aligns its content to the right and receives every node; consumers can show root-only add menus using parent === null. toolbarTemplate receives {readOnly}. Consumer action buttons must bind this read-only value. Header extras sit beside the expansion header so their interactive controls are not nested in its toggle button. Reserve enough header action space with the token below for wider extras.

Theme

Styles inherit the existing --ngx-mat-extended-* foundations: space-2 (8px), radius (8px), surface, surface-selected, border, text, and muted. Component-specific public tokens:

| Token suffix after --ngx-mat-extended-commercial-document- | Default | | --- | --- | | accent | foundation text color | | warning | #a56800 | | danger | #ba1a1a | | actions-width | 136px |

Set tokens on the editor or an ancestor. Material styling uses public Sass component overrides. Totals adapt to two columns below 960px and place the remise block first below 600px. Application field grids belong to projected editors and should use the application's existing compact field conventions.