githubEdit

What's New With 4.1

09/29/2024

New Features

Limited BoxLang Support

CBWIRE 4.1 introduces BoxLang support, allowing you to build components and templates using BoxLang's powerful, modular, and modern feature set. This opens up a whole new world of possibilities for CBWIRE development with BoxLang's enhanced syntax and capabilities.

Requirements:

  • bx-compat-cfml BoxLang module

  • bx-esapi BoxLang module

// wires/UserDashboard.bx
class extends="cbwire.models.Component" {
    data = {
        "users": [],
        "searchTerm": "",
        "selectedRole": "all"
    };
    
    function onMount() {
        data.users = getUserService().getAllUsers();
    }
    
    function filterUsers() {
        var filteredUsers = data.users
            .filter(function(user) {
                return data.selectedRole == "all" || user.role == data.selectedRole;
            })
            .filter(function(user) {
                return !data.searchTerm.len() || 
                       user.name.findNoCase(data.searchTerm) || 
                       user.email.findNoCase(data.searchTerm);
            });
        
        return filteredUsers;
    }
}

BoxLang brings modern language features like enhanced member functions, improved syntax, and better type handling to your CBWIRE components.

Assets Management

CBWIRE 4.1 introduces <cbwire:script> and <cbwire:assets> functionality for better control over component-specific assets. These assets are automatically tracked throughout the request and appended to the <head> tag during page load.

Locked Data Properties

Protect sensitive data properties from client-side modifications by defining a locked variable in your component. This prevents certain properties from being updated via wire:model or other client interactions.

Module Root URL Configuration

Configure custom module root URLs for better control over CBWIRE routing in complex applications.

File Upload Enhancement

New getTemporaryStoragePath() method in FileUpload components provides access to temporary file storage locations.

Progress Bar Customization

Enhanced progress bar configuration with proper color setting and disable functionality.

String Trimming

Automatically trim whitespace from string values in form inputs.

External Module Support

Load CBWIRE components from external module locations for better code organization.

Update Endpoint Configuration

Customize the CBWIRE update endpoint for advanced routing scenarios.

Enhancements

Asset Rendering Optimization

  • Assets are now tracked throughout the request and only rendered once

  • Component-specific assets are automatically injected into the <head> tag

  • Prevents duplicate asset loading for better performance

Performance Improvements

  • CBWIRE rendering speed improvements

  • Enhanced child/nested component tracking

  • Optimized asset management and injection

Bug Fixes

Component Lifecycle

  • Fixed onRender() method: Restored missing onRender() method from previous versions

  • Fixed onUpdate() behavior: Resolved issue where onUpdate() was called when no updates occurred

Component Management

  • Child/nested component tracking: Improved tracking of child components in Livewire

  • Component isolation: Better handling of component isolation and lazy loading

Asset Management

  • Duplicate asset prevention: Assets that have already been rendered are not returned again

  • Asset injection: Component assets are properly tracked and injected into page head

External Module Support

  • Module loading: Fixed issues loading wires from external module locations

  • Path resolution: Improved component path resolution for complex module structures

Last updated

Was this helpful?