@coolms/document-viewer-angular
v2.0.0-alpha.2
Published
The CoolMS in-browser document viewer: a registry-backed dispatcher that reads the server viewer manifest and mounts the right component, plus the DOCX viewer.
Readme
@coolms/document-viewer-angular
The CoolMS in-browser document viewer: a registry-backed dispatcher that reads
the server's viewer manifest, resolves the component registered for a MIME
type, and mounts it. The DOCX viewer ships here; PDF lives in @coolms/pdf-angular.
Install
npm install @coolms/document-viewer-angular @coolms/core-angular @coolms/ui-angularUse
Consumers dispatch through the host rather than naming a viewer component:
<cms-viewer-host [mimeType]="mime" [url]="url" />A format package registers itself during provideAppInitializer, so adding a
viewer needs no edit to the surfaces that show documents -- which is the point
of the registry.
import { ViewerComponentRegistry, ViewerHostComponent } from '@coolms/document-viewer-angular';Building it
Peers are consumed as BUILT output, never as sources: compiling a peer's
sources in would place them outside this package's rootDir (TS6059) and ship
a second copy of that peer to anyone installing both. Build in dependency
order:
document-engine -> core-angular -> editor-angular -> ui-angular
-> document-angular, document-viewer-angular,
image-editor-angular -> pdf-angularStatus
A pre-release: the shape is still moving and it carries no compatibility promise.
Licence
MIT.
