ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Interface UserSettings

    Application configuration settings that control various features and behaviors. Used to store user preferences and feature flags.

    const userSettings: UserSettings = {
    showHelp: true,
    caching: true,
    currency: "USD",
    location: "US",
    suppliers: ["supplier1", "supplier2"],
    theme: "light"
    };
    interface UserSettings {
        showHelp?: boolean;
        caching?: boolean;
        doNotCacheEmptyResults?: boolean;
        cacheTtlMinutes?: number;
        currencyRate?: number;
        currency?: string;
        location?: string;
        fontSize?: "medium" | "small" | "large";
        suppliers?: string[];
        theme?: "light" | "dark";
        showAllColumns?: boolean;
        hideColumns?: string[];
        showColumnFilters?: boolean;
        columnFilterConfig?: Record<string, ColumnMeta>;
        supplierResultLimit?: number;
        priceMin?: number;
        priceMax?: number;
        fuzzScorerOverride?: string;
    }
    Index

    Properties

    showHelp?: boolean

    Controls visibility of help tooltips throughout the application. Defaults to false.

    caching?: boolean

    Enables or disables data caching functionality. Defaults to true.

    doNotCacheEmptyResults?: boolean

    When true, suppliers that return zero results for a query will not write a cache entry for that query. Lets a previously-out-of-stock supplier surface fresh results on the next search instead of returning the cached empty list. Defaults to false.

    cacheTtlMinutes?: number

    Maximum age of a query cache entry, in minutes. On read, entries older than this are evicted and treated as a cache miss, forcing a fresh fetch. Set to 0 (the default) to disable TTL expiration entirely — entries then live until LRU eviction or version-mismatch eviction.

    60
    
    currencyRate?: number

    Currency rate for the user's currency

    1.0
    
    currency?: string

    Selected currency code for price display

    "USD"
    
    location?: string

    User's geographical location for shipping calculations

    "US"
    
    fontSize?: "medium" | "small" | "large"

    UI font size scale. Controls the root html font-size so every rem-based style (MUI defaults and styled components) scales proportionally.

    "medium"
    
    suppliers?: string[]

    List of supplier IDs that are enabled for searching

    ["supplier1", "supplier2"]
    
    theme?: "light" | "dark"

    Selected UI theme identifier

    "light"
    
    showAllColumns?: boolean

    Controls visibility of all available table columns. Defaults to true.

    hideColumns?: string[]

    List of column identifiers that should be hidden from view

    ["price", "quantity"]
    
    showColumnFilters?: boolean

    Controls visibility of column filter UI elements. Defaults to false.

    columnFilterConfig?: Record<string, ColumnMeta>

    Configuration object for individual column filter settings.

    {
    price: {
    filterVariant: "range",
    rangeValues: [0, 1000]
    }
    }
    supplierResultLimit?: number

    Number of results to display per supplier

    20
    
    priceMin?: number

    Minimum price (in the user's selected currency) to include in results. Applied by useSearch.passesSearchFilters after suppliers return. Undefined disables the lower bound.

    0
    
    priceMax?: number

    Maximum price (in the user's selected currency) to include in results. Applied by useSearch.passesSearchFilters after suppliers return. Undefined disables the upper bound.

    100
    
    fuzzScorerOverride?: string

    Optional global override for the fuzz-match scorer used by each supplier. When set, fuzzyFilter uses this scorer instead of each supplier class's default fuzzScorer. Value is the exported function name from fuzzball (e.g. "ratio", "token_set_ratio", "WRatio").

    Surfaced via the "Advanced" drawer accordion — hidden unless showAdvancedSettings is true in config.json.

    "token_set_ratio"