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

    Variable APP_ACTIONConst

    APP_ACTION: {
        UPDATE_SETTINGS: "UPDATE_SETTINGS";
        SET_CURRENCY_RATE: "SET_CURRENCY_RATE";
        SET_PANEL: "SET_PANEL";
        SET_SPEED_DIAL_VISIBILITY: "SET_SPEED_DIAL_VISIBILITY";
        LOAD_FROM_STORAGE: "LOAD_FROM_STORAGE";
        HYDRATE_SETTINGS: "HYDRATE_SETTINGS";
        SET_DRAWER_TAB: "SET_DRAWER_TAB";
        SET_SELECTED_SUPPLIERS: "SET_SELECTED_SUPPLIERS";
        SET_BOOKMARKS_FOLDER_ID: "SET_BOOKMARKS_FOLDER_ID";
    } = ...

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

    Type declaration

    • ReadonlyUPDATE_SETTINGS: "UPDATE_SETTINGS"

      Applies new user settings and persists them to chrome.storage.local

    • ReadonlySET_CURRENCY_RATE: "SET_CURRENCY_RATE"

      Stores the fetched USD→currency conversion rate for the selected currency

    • ReadonlySET_PANEL: "SET_PANEL"

      Switches the active panel (0 = SearchHome, 1 = Results, 2 = Stats)

    • ReadonlySET_SPEED_DIAL_VISIBILITY: "SET_SPEED_DIAL_VISIBILITY"

      Toggles the SpeedDial FAB visibility based on mouse proximity

    • ReadonlyLOAD_FROM_STORAGE: "LOAD_FROM_STORAGE"

      Hydrates app state from chrome.storage on initial mount

    • ReadonlyHYDRATE_SETTINGS: "HYDRATE_SETTINGS"

      Re-hydrates user settings from an external storage change (no write-back)

    • ReadonlySET_DRAWER_TAB: "SET_DRAWER_TAB"

      Opens a specific drawer tab or closes the drawer (tab = -1)

    • ReadonlySET_SELECTED_SUPPLIERS: "SET_SELECTED_SUPPLIERS"

      Updates the selected suppliers list for search filtering

    • ReadonlySET_BOOKMARKS_FOLDER_ID: "SET_BOOKMARKS_FOLDER_ID"

      Stores the ID of the ChemPal Favorites bookmarks folder

    export const APP_ACTION = {
    /** Applies new user settings and persists them to chrome.storage.local */
    UPDATE_SETTINGS: 'UPDATE_SETTINGS',
    /** Stores the fetched USD→currency conversion rate for the selected currency */
    SET_CURRENCY_RATE: 'SET_CURRENCY_RATE',
    /** Switches the active panel (0 = SearchHome, 1 = Results, 2 = Stats) */
    SET_PANEL: 'SET_PANEL',
    /** Toggles the SpeedDial FAB visibility based on mouse proximity */
    SET_SPEED_DIAL_VISIBILITY: 'SET_SPEED_DIAL_VISIBILITY',
    /** Hydrates app state from chrome.storage on initial mount */
    LOAD_FROM_STORAGE: 'LOAD_FROM_STORAGE',
    /** Re-hydrates user settings from an external storage change (no write-back) */
    HYDRATE_SETTINGS: 'HYDRATE_SETTINGS',
    /** Opens a specific drawer tab or closes the drawer (tab = -1) */
    SET_DRAWER_TAB: 'SET_DRAWER_TAB',
    /** Updates the selected suppliers list for search filtering */
    SET_SELECTED_SUPPLIERS: 'SET_SELECTED_SUPPLIERS',
    /** Stores the ID of the ChemPal Favorites bookmarks folder */
    SET_BOOKMARKS_FOLDER_ID: 'SET_BOOKMARKS_FOLDER_ID',
    } as const;