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

@ripcord.io/meeting

v1.1.1

Published

A booking widget library for Ripcord.io

Downloads

1

Readme

Ripcord.io Meeting Widget

Embeddable widget and React component for scheduling meetings with Ripcord.io.

Table of Contents

Install

Via npm:

npm install @ripcord.io/meeting --save

Via yarn:

yarn add @ripcord.io/meeting

Via CDN:

<script src="https://cdn.ripcord.io/booking-widget.js"></script>

Usage

Simple Usage

To get started, import and instantiate the Ripcord class, passing in the ID of the Routing you want to use. The widget will be opened when the element is clicked.

Import via ES6

import { Ripcord } from '@ripcord.io/meeting';

const button = document.getElementById('open-widget');

const instance = new Ripcord({
  routingId: '<your_routing_id>',
  el: button,
  productId: '<your_product_id>',
});

Import via CDN

<script src="https://cdn.ripcord.io/booking-widget.js"></script>
<script>
  const button = document.getElementById('open-widget');

  const instance = new Ripcord({
    routingId: '<your_routing_id>',
    el: button,
    productId: '<your_product_id>',
  });
</script>

When used via the CDN, any UTM parameters in the URL will automatically be captured and sent to the Ripcord API. This needs to be enabled manually when using ES6 (more below).

API

Ripcord

The Ripcord class provides methods to control the lifecycle of an object that can be opened and closed.

Constructor

The Ripcord constructor accepts the following parameters:

  • routingId: string The UUID of the routing that should be used to determine which team members will be assigned the new deals.

  • el?: HTMLElement | string
    The element that will open the widget when clicked. If a string is passed in, the element will be found using querySelector. If not provided, the widget will be opened when the open method is called.

  • productId?: string
    The UUID of a product you want all new deals to be associated with. This will override the product selection by the routing.

Methods

  • open(): Opens the booking modal.

  • close(): Closes the booking modal.

  • destroy(): Destroys the instance, removing all event listeners elements created by the instance. The instance cannot be used after this method is called. Does not remove the element passed in the constructor.

BookingWidget Component

The BookingWidget is a React component that provides a user interface for making bookings.

Props

  • open: boolean
    Controls the visibility of the BookingWidget. When true, the widget is displayed; when false, the widget is hidden.

  • onClose: function
    A callback function that is triggered when the widget is closed. This function should handle any cleanup or state management required when the widget is no longer visible.

  • routingId: string The UUID of the routing that should be used to determine which team members will be assigned the new deals.

  • productId?: string
    The UUID of a product you want all new deals to be associated with. This will override the product selection by the routing.

Example Usage

import React, { useState } from 'react';
import { BookingWidget } from '@ripcord.io/meeting';

function App() {
  const [isOpen, setIsOpen] = useState(false);

  const handleClose = () => {
    setIsOpen(false);
  };

  return (
    <div>
      <button onClick={() => setIsOpen(true)}>Open Booking Widget<button>
      {isOpen && (
        <BookingWidget
          open={isOpen}
          onClose={handleClose}
          routingId="<your_routing_id>"
          productId="<your_product_id>" // Optional
        />
      )}
    </div>
  );
}

export default App;

UTM Parameters

When using the widget via the CDN, any UTM parameters in the URL will automatically be captured and sent to the Ripcord API. This needs to be enabled manually when using ES6.

initUTMCapture: () => void

This function captures any UTM parameters in the URL and stores them to be sent to the Ripcord API. This function should be called as early as possible, and as few times a possible. Call this function at the root of your application.

Example Usage

import React, { useState, useEffect } from 'react';
import { BookingWidget, initUTMCapture } from '@ripcord.io/meeting';

function App() {
  const [isOpen, setIsOpen] = useState(false);

  useEffect(() => {
    initUTMCapture();
  }, []);

  const handleClose = () => {
    setIsOpen(false);
  };

  return (
    <div>
      <button onClick={() => setIsOpen(true)}>Open Booking Widget</button>
      {isOpen && (
        <BookingWidget
          open={isOpen}
          onClose={handleClose}
          routingId="<your_routing_id>"
          productId="<your_product_id>" // Optional
        />
      )}
    </div>
  );
}

export default App;

License

MIT © Ripcord.io, LLC