ConfigMetadata: {
    configComponent?: {
        name: string;
        props?: Record<string, unknown>;
    };
    description?: string;
    icon?: string | Icon;
    tags?: string[];
    title?: string;
}

Extensible metadata for registered resources in the Lime CRM platform.

This metadata structure is used to describe various resources like web components, commands, actions, and other extensible elements. It provides a consistent way to attach human-readable information, icons, tags, and configuration components to any registered resource.

Resources that use this metadata include:

  • Web components (via WebComponentRegistry)
  • Commands (via CommandBus and @Command decorator)

Example

// Register a web component with metadata
registry.register('customer-insights', {
title: 'Customer Insights',
description: 'Advanced analytics dashboard for customer behavior',
icon: 'chart-line',
tags: ['card-widget', 'start-page'],
configComponent: {
name: 'customer-insights-config',
props: { defaultView: 'monthly' }
}
});

Example

// Register a command with metadata
@Command({ id: 'export-to-excel' })
class ExportToExcelCommand {
// Command implementation
}

// Metadata is provided when registering the command
commandBus.register(ExportToExcelCommand, handler, {
title: 'Export to Excel',
description: 'Export selected records to Microsoft Excel',
icon: { name: 'file-excel', color: 'green' },
tags: ['bulk-object']
});

See

Type declaration

  • Optional configComponent?: {
        name: string;
        props?: Record<string, unknown>;
    }

    Optional configuration UI component for this resource.

    Specifies a web component that provides a configuration interface for customizing the resource's behavior. This is typically used in admin interfaces or setup wizards.

    • name: string

      Tag name of the configuration web component.

      Must be a registered web component that can receive the specified props.

    • Optional props?: Record<string, unknown>

      Initial properties to pass to the configuration component.

      These props configure the initial state of the configuration UI.

  • Optional description?: string

    Detailed description of what the resource does.

    Provide helpful context about the resource's purpose, functionality, and any important usage notes. This typically appears in tooltips or help documentation.

  • Optional icon?: string | Icon

    Icon to visually represent the resource.

    Can be either a string referencing an icon name from the icon library, or an Icon object with additional properties like color and style.

  • Optional tags?: string[]

    Semantic tags for categorization and context-aware filtering.

    Tags help the platform determine where a component can be placed and when it is relevant for a given context. These tags typically describe the slot types or contexts that the component is suited for.

    The available tags are platform-specific and depend on the extensibility points provided by the host application.

  • Optional title?: string

    Human-readable display name for the resource.

    This should be a concise, user-friendly name that appears in UI elements like menus, toolbars, and configuration screens.