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

    Interface ExportContext

    Everything buildResultsWorkbook needs to render both worksheets. Kept free of DOM/DB/table coupling so the builder is a pure, unit-testable function.

    interface ExportContext {
        scope: "all" | "filtered";
        createdAt: number;
        query?: string;
        appVersion: string;
        userSettings?: UserSettings;
        activeFilters: ExportFilterSummary[];
        groups: ExportGroup[];
        columnVisibility: Record<string, boolean>;
    }
    Index

    Properties

    scope: "all" | "filtered"

    Whether the export covers all results or only the currently-filtered view.

    createdAt: number

    Epoch milliseconds the export was created (shown on the Summary sheet).

    query?: string

    The originating search query, if any.

    appVersion: string

    Running ChemPal version (__APP_VERSION__).

    userSettings?: UserSettings

    User settings, used to format prices in the user's selected currency.

    activeFilters: ExportFilterSummary[]

    Active filters to list on the Summary sheet.

    groups: ExportGroup[]

    Parent products plus their variant subrows, in display order.

    columnVisibility: Record<string, boolean>

    Map of column id to on-screen visibility; not-visible columns export hidden.