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

xwtools

v1.0.3

Published

The WebForm / WebCall library by lirax.ua (PBX Cloud Platform)

Downloads

3

Readme

xwtools.js

The JS library for sending web form and web calls to lirax.net (Phone Cloud System)

Download

Full build

Installation

In a browser:

<script src="js/xwtools.js"></script>

CDN:

<script src="https://cdn.jsdelivr.net/npm/xwtools@latest/dist/js/xwtools.js"></script>

Using npm:

npm install xwtools --save

Usage

Initialization

ES6

import tools from 'xwtools';

Base markup web phone

add class from targetClass (see below) to buttons and link inside it (if needed)

<button type="submit" class="waves-effect waves-light btn lirax-make-call">Make Call</button>

Base markup web form

add class from targetClass (see below) to form and link inside it (if needed) input filds with attribute name = 'name' and attribute name = 'phone' are required name must be more then 3 letters phone must be more then 8 digits

<form class="col s12 lirax-custom-form">
  <div class="row">
    <div class="input-field col s12">
      <input id="name" type="text" name="name" class="validate" value="">
      <label for="name">Name</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="phone" type="tel" name="phone" class="validate" value="">
      <label for="phone">Phone</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_pipeline_status_id" type="text" name="lirax_pipeline_status_id" class="validate" value="">
      <label for="lirax_pipeline_status_id">lirax_pipeline_status_id</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_deal_name" type="text" name="lirax_deal_name" class="validate" value="">
      <label for="lirax_deal_name">lirax_deal_name</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_deal_sum" type="text" name="lirax_deal_sum" class="validate" value="">
      <label for="lirax_deal_sum">lirax_deal_sum</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_deal_task" type="text" name="lirax_deal_task" class="validate" value="">
      <label for="lirax_deal_task">lirax_deal_task</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_deal_tag" type="text" name="lirax_deal_tag" class="validate" value="">
      <label for="lirax_deal_tag">lirax_deal_tag</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_contact_task" type="text" name="lirax_contact_task" class="validate" value="">
      <label for="lirax_contact_task">lirax_contact_task</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input id="lirax_contact_tag" type="text" name="lirax_contact_tag" class="validate" value="">
      <label for="lirax_contact_tag">lirax_contact_tag</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
      <input type="text" class="datepicker" name="date">
      <label for="phone">Date</label>
    </div>
  </div>
  <div class="row">
     <div class="input-field col s12">
                <select>
                  <option value="" disabled selected>Choose your option</option>
                  <option selected value="1">Option 1</option>
                  <option value="2">Option 2</option>
                  <option value="3">Option 3</option>
                </select>
                <label>Materialize Select</label>
              </div>
  </div>
  <div class="row">
    <div class="col s12">
            <input type="checkbox" id="checkbox" name="checkbox" />
            <label for="checkbox">Red</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
            <button type="submit" class="waves-effect waves-light btn"><i class="material-icons left">send</i>Send</button>
    </div>
    <div class="input-field col s12">
        <a href="#" class="button lirax-custom-form">send</a>
    </div>
  </div>
</form>

Base markup web call

add class from targetClass (see below) to form and link inside it (if needed) input filds with attribute name = 'phone' is required phone must be more then 8 digits

<form class="col s12 lirax-custom-callback-form">
  <div class="row">
    <div class="input-field col s12">
      <input id="phone" type="tel" name="phone" class="validate" value="">
      <label for="phone">Phone</label>
    </div>
  </div>
  <div class="row">
    <div class="input-field col s12">
            <button type="submit" class="waves-effect waves-light btn"><i class="material-icons left">send</i>Book the call</button>
    </div>
    <div class="input-field col s12">
        <a href="#" class="button lirax-custom-callback-form">Book</a>
    </div>
  </div>
</form>

Base usage

widgetId, targetClass, scriptUrl are required if prefix is empty, all digits will be sent if prefix is not empty, phone will be sent by mask: prefix+last 9 digits

window.onload=function(){
  var tool = new xwtools();  
  tool.liraxWebPhoneInit({
    widgetId: "",
    targetClass: "lirax-make-call",
    scriptUrl: ""
  });
  tool.liraxWebFormInit({
    widgetId: "",
    targetClass: "lirax-custom-form",
    scriptUrl: "",
    prefix: '+380',
    infoMessage: 'Message from web site: ',  //for chat dialog
    successMessage: 'Data sent successfully!',
    errorMessage: 'Data sent error!',
    nameError: 'must be not empty and more then 3 letters',
    phoneError: 'must be not empty and more then 8 digits',
    onSubmit: function() {
      console.log('submit');
    },
    onSuccess: function() {
      console.log('success');
    },
    onError: function() {
      console.log('error');
    }
  });
  tool.liraxWebCallInit({
    widgetId: "",
    targetClass: "lirax-custom-callback-form",
    scriptUrl: "",
    prefix: '+380',
    successMessage: 'Data sent successfully!',
    errorMessage: 'Data sent error!',
    phoneError: 'must be not empty and more then 8 digits',
    onSubmit: function() {
      console.log('submit');
    },
    onSuccess: function() {
      console.log('success');
    },
    onError: function() {
      console.log('error');
    }
  });
}

Official Site

http://www.lirax.net