pivotick - v3.0.0
    Preparing search index...

    Interface PivotSaveContext

    Handed to PivotDefinition.save as the last argument. Mirrors PivotContext minus the narrowing concerns.

    signal is here so a write can be forwarded like any other request, but the library never aborts it except when the graph is destroyed: cancelling a write mid-flight leaves nobody knowing what happened, which is worse than waiting.

    interface PivotSaveContext {
        graph: Pivotick;
        pivotId: string;
        promptData: <T = Record<string, unknown>>(
            options: PromptDataOptions<T>,
        ) => Promise<T | null>;
        signal: AbortSignal;
    }
    Index

    Properties

    graph: Pivotick
    pivotId: string
    promptData: <T = Record<string, unknown>>(
        options: PromptDataOptions<T>,
    ) => Promise<T | null>

    Ask the analyst for something before writing, in the library's own modal: a declarative form (fields) or custom HTML (render + getValues), titled and submitted with Save unless told otherwise. Resolves to the values, or null on cancel.

    A save nobody clicked (PivotDefinition.autoSave, or PivotManagerLike.save called without interactive) gets null at once, with nothing drawn. Return { cancelled: true } after a null to leave the run pending with no toast.

    signal: AbortSignal