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

@kvass.ai/order-widget

v1.1.0

Published

KVASS Order Widget

Downloads

8

Readme

Kvass logo

Kvass Ordering Widget

Kvass offers a platform as a service that digitizes core business functions and optimizes resource allocation with baked-in machine learning capabilities.

Kvass ordering widget uses the Kvass platform for product, order, payment and user management.

Requirement

Install

From the unpkg CDN

<script src="https://unpkg.com/@kvass.ai/order-widget@latest/dist/kvass.bundle.js"></script>

From npm

npm install @kvass.ai/order-widget

Demo

Try out our demo

Getting started

Add the required script dependencies in your header, and remember to add your Google Maps JavaScript API key.

Add a div element in the body with an id of your choosing.

<head>
  <link rel="stylesheet" href="https://unpkg.com/@kvass.ai/order-widget@latest/dist/kvass.css">
  <script src="https://js.stripe.com/v3/" async></script>
  <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script>
  <script src="https://unpkg.com/@kvass.ai/order-widget@latest/dist/kvass.bundle.js"></script>
</head>

<body>
  <div id="kvass-example-instance"></div>
</body>

init(options)

  • domElementId {String}
  • apiKey {String}
  • endpoint {String}
  • lng {String}
  • firebaseConfig {Object}
  • stripeApiKey {String}

Initialize the widget by providing the required configuration, using your Kvass API key and Kvass endpoint (https://qa.kvass.ai/ for our QA environment or https://api.kvass.ai/ for our production environment), Firebase domain and API key for the user verification and authentication, a Stripe API key to process payments and the locale you want to use (en or no are the only supported locals)

<script>
  KvassOrdering.init({
    domElementId: 'kvass-example-instance',
    apiKey: "KVASS_API_KEY",
    endpoint: "KVASS_API_ENDPOINT",
    lng: 'en',
    firebaseConfig: {
      domain: "YOUR_FIREBASE_DOMAIN",
      apiKey: "YOUR_FIREBASE_APIKEY"
    },
    stripeApiKey: "YOUR_STRIPE_KEY"
  });
</script>

open()

function to open the widget

<script>
  KvassOrdering.open();
</script>

close()

function to close the widget

<script>
  KvassOrdering.close();
</script>

destroy()

function to destroy the widget instance

<script>
  KvassOrdering.destroy();
</script>

Development

Install dependencies:

npm install

Add config file named keys.json to the config folder, containing your keys:

{
  "domElementId": "",
  "apiKey": "",
  "endpoint": "",
  "lng": "",
  "firebaseConfig": {
    "domain": "",
    "apiKey": ""
  },
  "stripeApiKey": ""
}
npm run start