centricity-chatbot
v0.0.22
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
Downloads
9
Readme
CentricityChatBot
This library was generated with Angular CLI version 14.2.0.
How to implement
Dependencies
"angular-calendar": "^0.30.0",
"date-fns": "^2.29.3",
"ng-recaptcha": "^10.0.0",
"ng2-date-picker": "^14.0.0",
import module to app.module.ts
@NgModule({
declarations: [
AppComponent,
],
imports: [
...,
CentricityBotModule.forRoot({
baseURL: environment.dialogflow.baseURL,
projectId: environment.dialogflow.projectId,
region: environment.dialogflow.region,
agentId: environment.dialogflow.agentId,
language: environment.dialogflow.language,
reCaptchSiteKey: environment.recaptcha.siteKey,
sessionId: Math.random() + '',
tokenURL: environment.botAPIs.tokenURL,
emailAccountLookUp: environment.botAPIs.emailAccountLookUp,
phoneAccountLookUp: environment.botAPIs.phoneAccountLookUp,
contractAccoutLookUp: environment.botAPIs.contractAccoutLookUp,
verifyOtpURL: environment.botAPIs.verifyOtpURL,
generateOTPForContractLookUp: environment.botAPIs.generateOTPForContractLookUp,
refreshTokenURL: environment.botAPIs.refreshTokenURL
})
],
providers: [],
bootstrap: [AppComponent]
})
Add css files to styles.css
@import "../node_modules/angular-calendar/css/angular-calendar.css";
@import '~@angular/cdk/overlay-prebuilt.css';
Add followig code in your html
<centricity-chatbot></centricity-chatbot>
Open chat bot
@ViewChild(CentricityBotComponent)
child!: CentricityBotComponent;
openChat() {
this.child.openChat();
}
Code scaffolding
Run ng generate component component-name --project centricity-chatbot
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project centricity-chatbot
.
Note: Don't forget to add
--project centricity-chatbot
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build centricity-chatbot
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build centricity-chatbot
, go to the dist folder cd dist/centricity-chatbot
and run npm publish
.
Running unit tests
Run ng test centricity-chatbot
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.