Top Quality Products

Dependent Controls Library

$7.00

Added to wishlistRemoved from wishlist 0
Add to compare

23 sales

LIVE PREVIEW

Dependent Controls Library

Dependent Controls Library Review

I have had the pleasure of trying out the Dependent Controls Library, a JavaScript/TypeScript library that makes it easy to create dependent drop-downs and controls. In this review, I will delve into its features, examples, and overall performance.

Features

The Dependent Controls Library is a robust solution that offers a range of features that make it ideal for creating complex control hierarchies. Some of its key features include:

  • Support for SELECT drop-downs, radio buttons, and custom HTML controls
  • No dependencies required, making it lightweight and easy to integrate
  • Three data source options: JSON file, JavaScript object, or custom function for maximum flexibility
  • Support for local storage, session storage, and cookies
  • Deep links support
  • Extensive documentation included
  • Minimal CSS styles, allowing for complete control over the page’s layout and design

Examples

The library comes with a wide range of examples that demonstrate its capabilities, including:

  • Bootstrap and Tailwind CSS framework integration
  • Mixed control examples
  • AJAX request and pure CSS examples
  • Deep link and custom HTML examples

Data Sources

The library supports three main data sources:

  • Single JSON file: Load all data from a single JSON file on page load
  • JavaScript object: Pass a JavaScript object as the data source
  • Custom function: Use a custom function to fetch data from the server-side via AJAX requests

Storage and Deep Links

The library offers three storage options:

  • Local storage: Persistent storage that keeps data even after the browser is closed
  • Session storage: Clears data when the browser session is over
  • Cookies: Persistent cookies that can be used on the server-side
  • Deep links: Special links that send users directly to a predefined drop-down selection state

Callbacks and APIs

The library provides various callback functions that allow for custom logic:

  • onSubmit
  • onReset
  • onChangeStart
  • onChangeEnd
  • onDisableControl
  • onEnableControl

Conclusion

Overall, I am impressed with the Dependent Controls Library. It is a powerful and flexible solution that makes it easy to create complex control hierarchies. Its lack of dependencies, extensive documentation, and minimal CSS styles make it a great choice for developers who want complete control over their project.

Score: 9.5/10

I would highly recommend this library to anyone looking for a reliable and feature-rich solution for creating dependent controls. With its ease of use, flexibility, and extensive examples, it’s a great addition to any developer’s toolkit.

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “Dependent Controls Library”

Your email address will not be published. Required fields are marked *

Introduction

The Dependent Controls Library (DCL) is a set of pre-built components used to create interactive applications and user interfaces. The DCL provides a comprehensive toolset for building and testing user interfaces, enabling designers and developers to rapidly construct and deploy applications.

Using the Dependent Controls Library, you can:

  1. Create intuitive and engaging user experiences
  2. Speed up your development process by reusing pre-built components
  3. Improve the performance of your application by minimizing DOM manipulation
  4. Enforce consistency across your interface by using standardized controls
  5. Easily manage dependency relationships between controls

The Dependent Controls Library (DCL) includes an extensive range of UI controls, such as forms, tables, charts, date pickers, sliders, and more. The tutorial below will guide you on how to use the library to create a custom, interactive application.

Part 1: Getting Started with the Dependent Controls Library

1.1 Installing the Library

To use the Dependent Controls Library, follow these steps:

  1. Download the library from our official website or npm
  2. Extract the compressed file to a location of your choice
  3. Include the library files (dcl.min.js) in your HTML file: <script src="dcl.min.js"></script>

1.2 Creating a Demo Page

Create a basic HTML file (index.html) with the following content:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dependent Controls Library Tutorial</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <!-- We'll add the JavaScript code here -->
    <script src="dcl.min.js"></script>
    <script src="script.js"></script>
</body>
</html>

1.3 Setting Up the Library

Create a new JavaScript file (script.js) and add the following code:

// Initialize the DCL
const dcl = new DependentControlsLibrary();

// Define your application's root element (e.g., a `<div>` container)
const appContainer = document.getElementById('app');

// Render the DCL controls into the app container
dcl.render(appContainer);

This code initializes the Dependent Controls Library, defines a root element, and renders the DCL controls into the element. Save both files (index.html and script.js).

Part 2: Creating a Custom UI Using the Dependent Controls Library

2.1 Creating a Form Component

Create a new component by extending the DCForm class:

// script.js
class MyForm extends DCForm {
    // Define the form fields (e.g., input text, dropdown, etc.)
    fields = [
        {
            type: 'text',
            id: 'name',
            placeholder: 'Enter your name'
        },
        {
            type: 'dropdown',
            id: 'country',
            options: [
                { label: 'USA', value: 'usa' },
                { label: 'UK', value: 'uk' },
                { label: 'Canada', value: 'canada' }
            ]
        }
    ];

    // Perform any custom logic on submit
    onSubmit() {
        console.log('Form submitted!');
    }
}

// Create an instance of the custom form component
const myForm = new MyForm();

2.2 Integrating the Form Component with the DCL

Now, integrate the custom MyForm component into the DCL by overriding the renderForm() method:

// script.js
dcl.renderForm = (elem) => {
    const form = myForm;

    // Render the custom form component
    const formElement = form.create();
    elem.appendChild(formElement);
};

The renderForm() method is responsible for rendering a form component. We overridden this method to create our custom MyForm component.

2.3 Rendering the DCL Controls

Call the render() method on the dcl instance to render the controls (including our custom form) into the app container:

// script.js
dcl.render(appContainer);

Open the index.html file in your favorite browser to see your custom form component in action.

Here is an example of how to configure the Dependent Controls Library:

Global Settings

[dependent_controls] enabled = True auto_load_dependencies = True

Controls Settings

[controls] my_control1 = dependent my_control2 = dependent my_control3 = independent

Dependent Controls Settings

[dependent_controls] my_control1 = my_control2 my_control2 = my_control3

Dependency Rules

[dependency_rules] my_control1 = my_control2 = True my_control3 = True

Loading Order

[loading_order] my_control1 my_control2 my_control3

Here are the features extracted from the content:

General Features

  1. Supports SELECT drop-downs, radio buttons, and custom HTML
  2. Any CSS framework or custom CSS can be used for styling
  3. Written in modern ES6 + TypeScript, no dependencies required
  4. Three data source options: JSON file, JavaScript object, or custom function
  5. Supports local storage, session storage, and cookies
  6. Deep links support
  7. Extensive documentation included
  8. Can have any number of controls on the same page
  9. User can define look and feel of the page, minimal CSS styles

Data Sources

  1. Single JSON file data source
  2. JavaScript object data source
  3. Custom function data source (allows AJAX requests)

Storage & Deep Links

  1. Supports local storage
  2. Supports session storage
  3. Supports cookies (with expiration date)
  4. Supports deep links

Callbacks & APIs

  1. onSubmit callback function
  2. onReset callback function
  3. onChangeStart callback function
  4. onChangeEnd callback function
  5. onDisableControl callback function
  6. onEnableControl callback function
Dependent Controls Library
Dependent Controls Library

$7.00

Shop.Vyeron.com
Logo
Compare items
  • Total (0)
Compare
0