New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zohodesk/library-platform

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zohodesk/library-platform

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

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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.

FAQs

Package last updated on 17 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc