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

@zohodesk/library-platform

v1.0.2

Published

This library provides components for rendering Table List pages in compliance with the Zoho Desk Module Framework standards. It includes functionality for table handling.

Downloads

293

Readme

Table List Library

This library provides components for rendering Table List pages in compliance with the Zoho Desk Module Framework standards. It includes functionality for table handling.

Installation

To install the library, use the following command:

npm install @zohodesk/library-platform

Usage

Creating a Table Connected Component

To create a Table Connected component, you can use the TableConnectedFactory. Here is a simple example:

import TableConnectedFactory from '@zohodesk/library-platform/TableConnectedFactory';

const myTableComponent = TableConnectedFactory.create({
  name: 'MyTableComponent',
  dataBroker: myDataBroker,
  eventHandlers: {
    onRowSelect: row => {
      console.log('Selected row:', row);
    }
  }
});

Custom Component Creation

You can create custom components using the createCustomComponent function. This function sets up the component with the necessary dependencies and lifecycle methods.

Example

import createCustomComponent from '@zohodesk/library-platform/createCustomComponent';

const MyCustomComponent = createCustomComponent({
  name: 'MyCustomComponent',
  View: MyComponentView // Your component view
});

// Usage in application
<MyCustomComponent />;

Component Registry

The ComponentRegistry class is a singleton that allows you to register and retrieve components by name. This can be useful for managing component instances throughout your application.

Example

import ComponentRegistry from '@zohodesk/library-platform/ComponentRegistry';

// Register a component
ComponentRegistry.register('MyComponent', myComponentInstance);

// Retrieve a component
const myComponent = ComponentRegistry.get('MyComponent');

Props Contract

The TableConnectedFactory.create method accepts the following parameters:

  • name: string - The name of the component.
  • dataBroker: object - The data broker instance to manage data fetching and manipulation.
  • eventHandlers: object - An object containing event handler functions.
  • View: React.Component - Custom view component to render the table.

Components Overview

  • Properties: Defines the props contract for the Table Connected component.
  • TableConnectedView: The default view component for rendering the table.
  • EventHandlersFactory: Factory to manage event handlers for the component.
  • Behaviour Factories: Include various behaviours such as HTTP requests, field management, and list rendering.
  • ComponentRegistry: Singleton for managing component instances across your application.
  • createCustomComponent: Function to create custom components with necessary dependencies and lifecycle methods.