@clarabridge/unified-angular-components

This library consists of Clarabridge's Angular UI Components that are shared among multiple projects. The library was generated with Angular CLI for Angular 11.

Usage no npm install needed!

<script type="module">
  import clarabridgeUnifiedAngularComponents from 'https://cdn.skypack.dev/@clarabridge/unified-angular-components';
</script>

README

Unified Angular Components

This library consists of Clarabridge's Angular UI Components that are shared among multiple projects. The library was generated with Angular CLI for Angular 11.

For a full list of the available components, visit our Storybook documentation (note: requires OpenVPN connection)

Basic usage

npm install @clarabridge/unified-angular-components;

Add the required module(s) to the project's module file.

import {InlineHelpModule} from '@clarabridge/unified-angular-components';
...
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    InlineHelpModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})

You can import individual modules, such as InlineHelpModule, or import UnifiedAngularComponentsModule which will import all the components.

The components can then be used as such:

<cb-inline-help>
</cb-inline-help>

Code scaffolding

Run ng generate component component-name --project unified-angular-components to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project unified-angular-components.

Note: Don't forget to add --project unified-angular-components or else it will be added to the default project in your angular.json file.

Build

Run ng build unified-angular-components --prod to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build unified-angular-components --prod, go to the dist folder cd dist/unified-angular-components and run npm publish.

Running unit tests

Run ng test unified-angular-components to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.