ChemPal Documentation - v1.7.0
    Preparing search index...

    Module constants/common

    Enumerations

    PANEL

    Indexes for the different panels in the application.

    DRAWER_INDEX

    Indexes for the different drawer tabs in the application.

    SPIN_SPEED

    Represents different rotation speeds for animations

    Functions

    isShippingRange

    Type guard for whether a string is a valid ShippingRange.

    Type Aliases

    ActionType
    MessageType
    AppActionType
    Cache
    IdbStore
    Availability
    UomLong
    Uom

    Variables - Helpers

    CAS_REGEX

    Regular expression for validating CAS (Chemical Abstracts Service) numbers. Matches the standard format of three segments: 2-7 digits, 2 digits, and 1 checksum digit.

    Variables - Other

    ACTION_TYPE

    Action types for settings panel form state management. Used by the SettingsPanel component.

    MESSAGE_TYPE

    Discriminators for chrome.runtime messages exchanged between extension contexts (pages) and the background service worker.

    APP_ACTION

    Action types dispatched to the App component's useActionState reducer. Each action corresponds to a specific state transition in the application.

    CACHE

    Keys used for storing and retrieving data in chrome.storage.session.

    CHROME_WEBSTORE_REVIEWS_URL

    Deep link to the extension's Chrome Web Store reviews tab — where the review prompt sends users to leave a rating. The store item id is read from config.json (extension.chromeWebstoreId).

    IDB_STORE

    IndexedDB object-store names for the ChemPal database. Centralized here so the store names aren't hardcoded across idbCache.ts. Values are snake_case to match the CACHE storage-key convention.

    AVAILABILITY

    Represents the availability of a product Keep values as lower case strings.

    UOM_LONG

    Contains full names of units of measurement

    UOM

    Contains abbreviated forms of units of measurement

    UOM_ALIASES

    A constant mapping of units of measurement to their various string representations. This object implements the UOMAliases interface and provides standardized ways to recognize different text forms of the same unit of measurement.

    AVAILABILITY_LABEL_MAP

    Maps availability group codes (used as filter chip values and i18n keys) to the AVAILABILITY enum values each group represents. A group may collapse several enum values (e.g. out_of_stock covers OUT_OF_STOCK and BACKORDER).

    AVAILABILITY_OPTIONS

    User-facing availability filter options for the drawer search panel. Derived from the keys of AVAILABILITY_LABEL_MAP.

    SHIPPING_OPTIONS

    Shipping range options available for filtering in the drawer search panel. Values correspond to the ShippingRange type.