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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-zendesk-webwidget

v0.1.13

Published

[![Dependency Status](https://dependencyci.com/github/mackelito/ng-zendesk-webwidget/badge)](https://dependencyci.com/github/mackelito/ng-zendesk-webwidget) [![Maintainability](https://api.codeclimate.com/v1/badges/933c908a637cbd67013b/maintainability)](h

Downloads

346

Readme

Dependency Status Maintainability contributions welcome codebeat badge

ng-zendesk-webwidget

Zendesk-Webwidget for Angular

Installation

$ npm install ng-zendesk-webwidget --save
$ yarn add ng-zendesk-webwidget

Usage

In app.module import ZendeskWebwidgetModule

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { ZendeskWebwidgetModule } from 'ng-zendesk-webwidget';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    ZendeskWebwidgetModule.forRoot()
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
Using a SharedModule
@NgModule({
    exports: [
        CommonModule,
        ZendeskWebwidgetModule
    ]
})
export class SharedModule { }
Configuration
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';

import {ZendeskWebwidgetModule, ZendeskWebwidgetConfig} from 'ng-zendesk-webwidget';

import {AppComponent} from './app';

export class ZendeskConfig extends ZendeskWebwidgetConfig {
  accountUrl = 'yourdomain.zendesk.com';
  beforePageLoad(zE) {
    zE.setLocale('en');
    zE.hide();
  }
}

@NgModule({
    imports: [
        BrowserModule,
        HttpClientModule,
        ZendeskWebwidgetModule.forRoot(ZendeskConfig)
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

2. Init the ZendeskWebwidgetService for your application:

import { ZendeskWebwidgetService } from 'ng-zendesk-webwidget';

@Component({
  selector: 'app',
  templateUrl: './app.html'
})
export class app {

  constructor(private _ZendeskWebwidgetService: ZendeskWebwidgetService) {
  }
}

3. Example to usage:

  constructor(private _ZendeskWebwidgetService: ZendeskWebwidgetService) {
    _ZendeskWebwidgetService.identify({
     name: 'John Doe',
     email: '[email protected]'
    })
    _ZendeskWebwidgetService.show()
  }

  logout(){
    _ZendeskWebwidgetService.hide()
  }
}

API

ZendeskWebwidgetService

Methods:

setLocale('en') Set to change language

identify(userObj) If your user is signed in, you can use this methods for to pass the details of that user to your Zendesk

hide(): The method completely hides all parts of the Widget from the page.

show(): The method displays the Widget on the host page in its starting 'button' state.

activate(options): The method activates and opens the Widget in its starting state.

setHelpCenterSuggestions(options): The method enhances the contextual help provided by the Web Widget.

setSettings(settings): The method sets window.zESettings.

For more info, see: ZendeskAPI

ZendeskWebwidgetConfig:

  • accountUrl: Url of your domain (example.zendesk.com)
  • beforePageLoad: Callback, executed after Zendesk loaded

Deploy

To deploy new versions use np

Issues

Please report bugs and issues here.

License

MIT © Markus Thiel