├── .editorconfig ├── .github └── workflows │ └── ci_cd.yml ├── .gitignore ├── README.md ├── angular.json ├── package-lock.json ├── package.json ├── src ├── .browserslistrc ├── lib │ ├── ngx-zendesk-webwidget.model.ts │ ├── ngx-zendesk-webwidget.module.ts │ └── ngx-zendesk-webwidget.service.ts ├── ng-package.json ├── package.json ├── public-api.ts ├── tsconfig.lib.json └── tsconfig.lib.prod.json └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.github/workflows/ci_cd.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push] 4 | 5 | jobs: 6 | Install: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v2 11 | 12 | - name: Cache node modules 13 | uses: actions/cache@v2 14 | with: 15 | path: node_modules 16 | key: node_modules-${{ hashFiles('package-lock.json') }} 17 | restore-keys: | 18 | node_modules- 19 | 20 | - name: Install Dependencies 21 | run: npm install 22 | 23 | Build: 24 | needs: install 25 | runs-on: ubuntu-latest 26 | 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v2 30 | 31 | - name: Load node_modules 32 | uses: actions/cache@v2 33 | with: 34 | path: node_modules 35 | key: node_modules-${{ hashFiles('package-lock.json') }} 36 | 37 | - name: Cache dist 38 | uses: actions/cache@v2 39 | with: 40 | path: dist 41 | key: dist-${{ github.sha }} 42 | restore-keys: | 43 | dist- 44 | 45 | - name: Build 46 | run: npm run build 47 | 48 | Deploy: 49 | needs: build 50 | runs-on: ubuntu-latest 51 | if: github.ref == 'refs/heads/master' 52 | 53 | steps: 54 | - name: Checkout 55 | uses: actions/checkout@v2 56 | 57 | - name: Load node_modules 58 | uses: actions/cache@v2 59 | with: 60 | path: node_modules 61 | key: node_modules-${{ hashFiles('package-lock.json') }} 62 | 63 | - name: Load dist 64 | uses: actions/cache@v2 65 | with: 66 | path: dist 67 | key: dist-${{ github.sha }} 68 | 69 | - name: Open folder 70 | run: cd dist/ngx-zendesk-webwidget 71 | 72 | - name: Deploy 73 | uses: JS-DevTools/npm-publish@v1 74 | with: 75 | token: ${{ secrets.NPM_TOKEN }} 76 | 77 | - name: Finishing 78 | if: steps.Deploy.outputs.type != 'none' 79 | run: | 80 | echo "Version changed: ${{ steps.Deploy.outputs.old-version }} => ${{ steps.Deploy.outputs.version }}" 81 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | 16 | # IDEs and editors 17 | /.idea 18 | .project 19 | .classpath 20 | .c9/ 21 | *.launch 22 | .settings/ 23 | *.sublime-workspace 24 | 25 | # IDE - VSCode 26 | /.vscode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.angular/cache 36 | /.sass-cache 37 | /connect.lock 38 | /coverage 39 | /libpeerconnection.log 40 | npm-debug.log 41 | yarn-error.log 42 | testem.log 43 | /typings 44 | 45 | # System Files 46 | .DS_Store 47 | Thumbs.db 48 | 49 | .angular 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ngx-zendesk-webwidget 2 | 3 | [![Maintainability](https://api.codeclimate.com/v1/badges/75bc5877b3bf6939fe44/maintainability)](https://codeclimate.com/github/AlisonVilela/ngx-zendesk-webwidget/maintainability) 4 | [![Build Status](https://travis-ci.org/AlisonVilela/ngx-zendesk-webwidget.svg?branch=master)](https://travis-ci.org/AlisonVilela/ngx-zendesk-webwidget) 5 | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues) 6 | 7 | Zendesk-Webwidget for Angular 2+ 8 | 9 | Zendesk-Webwidget for Angular 1.x see [here](https://github.com/CrossLead/angular-zendesk-widget) 10 | 11 | ## Installation 12 | 13 | Via [npm](https://www.npmjs.com/package/ngx-zendesk-webwidget): 14 | 15 | ```bash 16 | npm install ngx-zendesk-webwidget --save 17 | ``` 18 | 19 | ## Usage 20 | 21 | The examples were made using the classic web widget 22 | 23 | ### 1. Import the `NgxZendeskWebwidgetModule` 24 | 25 | ```ts 26 | import { BrowserModule } from '@angular/platform-browser'; 27 | import { NgModule } from '@angular/core'; 28 | 29 | import { AppComponent } from './app.component'; 30 | 31 | import { NgxZendeskWebwidgetModule } from 'ngx-zendesk-webwidget'; 32 | 33 | @NgModule({ 34 | declarations: [ 35 | AppComponent 36 | ], 37 | imports: [ 38 | BrowserModule, 39 | NgxZendeskWebwidgetModule.forRoot() 40 | ], 41 | bootstrap: [AppComponent] 42 | }) 43 | export class AppModule { } 44 | ``` 45 | 46 | #### SharedModule 47 | 48 | ```ts 49 | @NgModule({ 50 | exports: [ 51 | CommonModule, 52 | NgxZendeskWebwidgetModule 53 | ] 54 | }) 55 | export class SharedModule { } 56 | ``` 57 | 58 | ##### Configuration 59 | 60 | ```ts 61 | import { NgModule } from '@angular/core'; 62 | import { BrowserModule } from '@angular/platform-browser'; 63 | 64 | import { NgxZendeskWebwidgetModule, NgxZendeskWebwidgetConfig } from 'ngx-zendesk-webwidget'; 65 | 66 | import { AppComponent } from './app'; 67 | 68 | export class ZendeskConfig extends NgxZendeskWebwidgetConfig { 69 | accountUrl = 'yourdomain.zendesk.com'; 70 | callback(zE) { 71 | // You can call every command you want in here 72 | // zE('webWidget', 'hide'); 73 | // zE('webWidget', 'show'); 74 | } 75 | } 76 | 77 | @NgModule({ 78 | imports: [ 79 | BrowserModule, 80 | HttpClientModule, 81 | NgxZendeskWebwidgetModule.forRoot(ZendeskConfig) 82 | ], 83 | bootstrap: [AppComponent] 84 | }) 85 | export class AppModule { } 86 | ``` 87 | 88 | ##### Configuration with Lazyload 89 | 90 | ```ts 91 | import { NgModule } from '@angular/core'; 92 | import { BrowserModule } from '@angular/platform-browser'; 93 | 94 | import { NgxZendeskWebwidgetModule, NgxZendeskWebwidgetConfig } from 'ngx-zendesk-webwidget'; 95 | 96 | import { AppComponent } from './app'; 97 | 98 | export class ZendeskConfig extends NgxZendeskWebwidgetConfig { 99 | override lazyLoad = true; 100 | accountUrl = 'yourdomain.zendesk.com'; 101 | callback(zE) { 102 | // You can call every command you want in here 103 | // zE('webWidget', 'hide'); 104 | // zE('webWidget', 'show'); 105 | } 106 | } 107 | 108 | @NgModule({ 109 | imports: [ 110 | BrowserModule, 111 | HttpClientModule, 112 | NgxZendeskWebwidgetModule.forRoot(ZendeskConfig) 113 | ], 114 | bootstrap: [ AppComponent ] 115 | }) 116 | export class AppModule { } 117 | ``` 118 | 119 | #### 2. Init the `NgxZendeskWebwidgetService` 120 | 121 | ##### For your application 122 | 123 | ```ts 124 | import { NgxZendeskWebwidgetService } from 'ngx-zendesk-webwidget'; 125 | 126 | @Component({ 127 | selector: 'app', 128 | templateUrl: './app.html' 129 | }) 130 | export class app { 131 | 132 | constructor(private _NgxZendeskWebwidgetService: NgxZendeskWebwidgetService) { } 133 | 134 | } 135 | ``` 136 | 137 | ##### With Lazyload 138 | 139 | ```ts 140 | import { NgxZendeskWebwidgetService } from 'ngx-zendesk-webwidget'; 141 | 142 | @Component({ 143 | selector: 'app', 144 | templateUrl: './app.html' 145 | }) 146 | export class app { 147 | 148 | constructor(private _NgxZendeskWebwidgetService: NgxZendeskWebwidgetService) { 149 | this._NgxZendeskWebwidgetService_.initZendesk(); 150 | } 151 | 152 | } 153 | ``` 154 | 155 | #### 3. Example to usage 156 | 157 | ```ts 158 | constructor(private _NgxZendeskWebwidgetService: NgxZendeskWebwidgetService) { 159 | this._NgxZendeskWebwidgetService.zE('webWidget', 'identify', { 160 | name: 'Fulano de Tal', 161 | email: 'your_user_email@email.com' 162 | }); 163 | 164 | this._NgxZendeskWebwidgetService.zE('webWidget', 'prefill', { 165 | name: { 166 | value: 'Fulano de Tal', 167 | readOnly: true 168 | }, 169 | email: { 170 | value: 'your_user_email@email.com', 171 | readOnly: true 172 | } 173 | }); 174 | 175 | this._NgxZendeskWebwidgetService.zE('webWidget', 'show'); 176 | } 177 | 178 | logout() { 179 | this._NgxZendeskWebwidgetService.zE('webWidget', 'hide'); 180 | } 181 | ``` 182 | 183 | ## API 184 | 185 | ### NgxZendeskWebwidgetService 186 | 187 | ### Web Widget (Messenger) 188 | 189 | - The new web widget is not as supported as the classic one, you can check the documentation [here](https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/web/sdk_api_reference/). 190 | 191 | ### Web widget (Classic) 192 | 193 | - `zE('webWidget:', '', )`: All commands follow the same basic syntax. Please see [Zendesk Documentation](https://developer.zendesk.com/embeddables/docs/widget/introduction) for more information. 194 | 195 | #### NgxZendeskWebwidgetConfig 196 | 197 | - `lazyLoad`: Boolean for activate Lazyload initialization of Zendesk Web Widget 198 | - `timeOut`: Timeout in milliseconds of the timer before opening the widget, zendesk unfortunately needs to load more files after the initial promise has been resolved, such as translation files. (default: 30 seconds) 199 | - `injectionTag`: You can identify which tag will be used as a reference for widget injection('head', 'body', 'script'). (Default: 'head') 200 | - `accountUrl`: Url of your domain (example.zendesk.com) 201 | - `callback`: Callback, executed after Zendesk loaded 202 | 203 | ## Issues 204 | 205 | Please report bugs and issues [here](https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues). 206 | 207 | ## To do 208 | 209 | - Tests with jest 210 | - Error handler 211 | 212 | ## License 213 | 214 | MIT © [Alison Vilela](https://github.com/AlisonVilela) 215 | 216 | ## Change log 217 | 218 | ### v3.0.1 219 | 220 | - Fix documentation 221 | 222 | ### v3.0.0 223 | 224 | - Support Angular 13 225 | - Changed the library core 226 | - Fix initZendesk parameters based on [issue 47](https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues/47) and [issue 43](https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues/43) 227 | 228 | ### v2.1.1 229 | 230 | - Fix injectionTag in NgxZendeskWebwidgetConfig based on [issue 30](https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues/30) by [mps2209](https://github.com/mps2209) 231 | 232 | ### v2.1.0 233 | 234 | - Include injectionTag in NgxZendeskWebwidgetConfig based on [issue 30](https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues/30) 235 | 236 | ### V2.0.0 237 | 238 | - API services that used legacy zE methods (setLocale, identify, hide, show, activate, setHelpCenterSuggestions, setSettings) have been removed, you now need to use the new command syntax for greater flexibility (breaking changes) 239 | - beforePageLoad(zE) changed to callback(zE) (breaking changes) 240 | 241 | ### V1.0.1 242 | 243 | - Fix bugs 244 | 245 | ### v1.0.0 246 | 247 | - Update Packages 248 | - Change Class name to pascal case (breaking changes) 249 | - Lazyload Implemented, based on [Pull 23](https://github.com/AlisonVilela/ngx-zendesk-webwidget/pull/23) 250 | - Configure Timeout on Webwidget initialization 251 | 252 | ### v0.1.5 253 | 254 | - Support Angular 8 255 | 256 | ### v0.1.4 257 | 258 | - Support Angular 6 259 | 260 | ### v0.1.3 261 | 262 | - Support Angular 5 263 | 264 | ### v0.1.2 265 | 266 | - Added custom settings 267 | 268 | ### v0.1.1 269 | 270 | - Change documentation 271 | 272 | ### v0.1.0 273 | 274 | - Added documentation 275 | - Initial version 276 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "src", 5 | "projects": { 6 | "ngx-zendesk-webwidget": { 7 | "projectType": "library", 8 | "root": "ngx-zendesk-webwidget", 9 | "sourceRoot": "src", 10 | "prefix": "lib", 11 | "architect": { 12 | "build": { 13 | "builder": "@angular-devkit/build-angular:ng-packagr", 14 | "options": { 15 | "project": "src/ng-package.json" 16 | }, 17 | "configurations": { 18 | "production": { 19 | "tsConfig": "src/tsconfig.lib.prod.json" 20 | }, 21 | "development": { 22 | "tsConfig": "src/tsconfig.lib.json" 23 | } 24 | }, 25 | "defaultConfiguration": "production" 26 | }, 27 | "test": { 28 | "builder": "@angular-devkit/build-angular:karma", 29 | "options": { 30 | "main": "src/test.ts", 31 | "tsConfig": "src/tsconfig.spec.json", 32 | "karmaConfig": "src/karma.conf.js" 33 | } 34 | } 35 | } 36 | } 37 | }, 38 | "defaultProject": "ngx-zendesk-webwidget" 39 | } 40 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngx-zendesk-webwidget", 3 | "version": "3.0.1", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build && cp ./README.md ./dist/ngx-zendesk-webwidget", 8 | "watch": "ng build --watch --configuration development" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/AlisonVilela/ngx-zendesk-webwidget.git" 13 | }, 14 | "author": { 15 | "name": "Alison Vilela", 16 | "email": "alison.vilela@live.nl" 17 | }, 18 | "keywords": [ 19 | "angular" 20 | ], 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues" 24 | }, 25 | "dependencies": { 26 | "@angular/animations": "~13.0.0", 27 | "@angular/common": "~13.0.0", 28 | "@angular/compiler": "~13.0.0", 29 | "@angular/core": "~13.0.0", 30 | "@angular/forms": "~13.0.0", 31 | "@angular/platform-browser": "~13.0.0", 32 | "@angular/platform-browser-dynamic": "~13.0.0", 33 | "@angular/router": "~13.0.0", 34 | "rxjs": "~7.4.0", 35 | "tslib": "^2.3.0", 36 | "zone.js": "~0.11.4" 37 | }, 38 | "devDependencies": { 39 | "@angular-devkit/build-angular": "~13.0.4", 40 | "@angular/cli": "~13.0.4", 41 | "@angular/compiler-cli": "~13.0.0", 42 | "@types/jasmine": "~3.10.0", 43 | "@types/node": "^12.11.1", 44 | "jasmine-core": "~3.10.0", 45 | "karma": "~6.3.0", 46 | "karma-chrome-launcher": "~3.1.0", 47 | "karma-coverage": "~2.0.3", 48 | "karma-jasmine": "~4.0.0", 49 | "karma-jasmine-html-reporter": "~1.7.0", 50 | "ng-packagr": "^13.0.0", 51 | "typescript": "~4.4.3" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /src/lib/ngx-zendesk-webwidget.model.ts: -------------------------------------------------------------------------------- 1 | export abstract class NgxZendeskWebwidgetConfig { 2 | lazyLoad: boolean; 3 | timeOut: number; 4 | injectionTag: 'head' | 'body' | 'script' | string; 5 | abstract accountUrl: string; 6 | abstract callback(zE: any): any; 7 | } 8 | -------------------------------------------------------------------------------- /src/lib/ngx-zendesk-webwidget.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, ModuleWithProviders, Type } from '@angular/core' 2 | import { NgxZendeskWebwidgetConfig } from './ngx-zendesk-webwidget.model' 3 | import { NgxZendeskWebwidgetService } from './ngx-zendesk-webwidget.service' 4 | 5 | @NgModule({}) 6 | export class NgxZendeskWebwidgetModule { 7 | static forRoot(zendeskConfig: Type): ModuleWithProviders { 8 | return { 9 | ngModule: NgxZendeskWebwidgetModule, 10 | providers: [ 11 | {provide: NgxZendeskWebwidgetConfig, useClass: zendeskConfig }, 12 | {provide: NgxZendeskWebwidgetService, useClass: NgxZendeskWebwidgetService, deps: [NgxZendeskWebwidgetConfig] } 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/lib/ngx-zendesk-webwidget.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | import { NgxZendeskWebwidgetConfig } from './ngx-zendesk-webwidget.model'; 4 | 5 | function getWindow(): any { 6 | return window; 7 | } 8 | 9 | @Injectable({ 10 | providedIn: 'root' 11 | }) 12 | export class NgxZendeskWebwidgetService { 13 | 14 | private readonly window: any; 15 | private initialized = false; 16 | private _zE: any; 17 | 18 | constructor(private ngxZendeskWebwidgetConfig: NgxZendeskWebwidgetConfig) { 19 | if (!this.ngxZendeskWebwidgetConfig.accountUrl) { 20 | throw new Error('Missing accountUrl. Please set in app config via ZendeskWidgetProvider'); 21 | } 22 | 23 | this.window = getWindow(); 24 | 25 | if (!this.ngxZendeskWebwidgetConfig.lazyLoad) { 26 | this.initZendesk(); 27 | } 28 | } 29 | 30 | public initZendesk(): Promise { 31 | const window = this.window; 32 | const config = this.ngxZendeskWebwidgetConfig; 33 | 34 | // tslint:disable 35 | window.zEmbed || function(e, t) { 36 | let n, o, d, i, s, a = [] 37 | let r = document.createElement("iframe") 38 | window.zEmbed = function() { 39 | a.push(arguments) 40 | } 41 | window.zE = window.zE || window.zEmbed 42 | r.src = "javascript:false" 43 | r.title = "" 44 | r.style.cssText = "display: none" 45 | d = document.getElementsByTagName(config.injectionTag || "head") 46 | d = d[d.length - 1] 47 | d.parentNode.insertBefore(r, d) 48 | i = r.contentWindow 49 | s = i.document 50 | try { 51 | o = s 52 | } catch (e) { 53 | n = document.domain 54 | r.src = 'javascript:var d=document.open();d.domain="' + n + '";void(0);' 55 | o = s 56 | } 57 | o.open()._l = function() { 58 | let e = this.createElement("script") 59 | n && (this.domain = n) 60 | e.id = "js-iframe-async" 61 | e.src = "https://static.zdassets.com/ekr/snippet.js" 62 | this.t += new Date 63 | this.zendeskHost = config.accountUrl 64 | this.zEQueue = a 65 | this.body.appendChild(e) 66 | } 67 | o.write('') 68 | o.close() 69 | }(); 70 | // tslint:enable 71 | 72 | return this.finishLoading(); 73 | } 74 | 75 | private finishLoading(): Promise { 76 | return new Promise((resolve, reject) => { 77 | 78 | const timeout = setTimeout(() => { 79 | this.initialized = false; 80 | reject(Error('timeout')); 81 | }, this.ngxZendeskWebwidgetConfig.timeOut || 30000); // 30 seconds 82 | 83 | this.window.zE(() => { 84 | this.ngxZendeskWebwidgetConfig.callback(this.window.zE); 85 | this.initialized = true; 86 | this._zE = this.window.zE; 87 | clearTimeout(timeout); 88 | resolve(true); 89 | }); 90 | }); 91 | } 92 | 93 | get isInitialized(): boolean { 94 | return this.initialized; 95 | } 96 | 97 | get zE(): any { 98 | return this._zE 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../dist/ngx-zendesk-webwidget", 4 | "lib": { 5 | "entryFile": "public-api.ts" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngx-zendesk-webwidget", 3 | "version": "3.0.1", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/AlisonVilela/ngx-zendesk-webwidget.git" 7 | }, 8 | "author": { 9 | "name": "Alison Vilela", 10 | "email": "alison.vilela@live.nl" 11 | }, 12 | "keywords": [ 13 | "angular" 14 | ], 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/AlisonVilela/ngx-zendesk-webwidget/issues" 18 | }, 19 | "peerDependencies": { 20 | "@angular/core": "^13.0.0" 21 | }, 22 | "dependencies": { 23 | "tslib": "^2.3.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/public-api.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/ngx-zendesk-webwidget.model'; 2 | export * from './lib/ngx-zendesk-webwidget.module'; 3 | export * from './lib/ngx-zendesk-webwidget.service'; 4 | -------------------------------------------------------------------------------- /src/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "../out-tsc/lib", 6 | "declaration": true, 7 | "declarationMap": true, 8 | "inlineSources": true, 9 | "types": [] 10 | }, 11 | "exclude": [ 12 | "test.ts", 13 | "**/*.spec.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.lib.json", 4 | "compilerOptions": { 5 | "declarationMap": false 6 | }, 7 | "angularCompilerOptions": { 8 | "compilationMode": "partial" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "es2015", 6 | "target": "es5", 7 | "baseUrl": "./src", 8 | "stripInternal": true, 9 | "experimentalDecorators": true, 10 | "emitDecoratorMetadata": true, 11 | "moduleResolution": "node", 12 | "outDir": "./build", 13 | "rootDir": "./src", 14 | "lib": [ 15 | "es2015", 16 | "dom" 17 | ], 18 | "skipLibCheck": true, 19 | "types": [] 20 | }, 21 | "angularCompilerOptions": { 22 | "enableI18nLegacyMessageIdFormat": false, 23 | "strictInjectionParameters": true, 24 | "strictInputAccessModifiers": true, 25 | "strictTemplates": true 26 | }, 27 | "files": [ 28 | "./src/lib/ngx-zendesk-webwidget.module.ts" 29 | ] 30 | } 31 | --------------------------------------------------------------------------------