SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Variable SheetProtectionPanelConst

    SheetProtectionPanel: NamedExoticComponent<
        SheetProtectionPanelProps & RefAttributes<HTMLDivElement>,
    > = ...

    The Sheet tab of Manage Protection: protect / pause / highlight, the password, and the options.

    Nothing here has an Apply button. Excel has none either — its dialog has OK, which this pane is not. Every control commits the moment it is used:

    • the two switches and the pause button act immediately;
    • the password is a dialog; confirming it stages the password for the Protect switch, since an unprotected sheet keeps no hash (PasswordField);
    • an option checkbox writes through setProperties — the unprotected sheet keeps its options (and saves them) for the next lock().

    While the sheet is locked, neither the password nor the options can change: the model refuses, and both are disabled with the instruction Excel gives — unprotect first. A pause is a temporary unprotect that already asked for the password, so the options open up again; the password stays disabled, since only lock() writes a hash.

    The options are collapsed by default; expanded they take the rest of the pane and scroll inside themselves. Fifteen checkboxes are a rare edit, and letting them push the toggles off the top made the common ones the hard ones.

    Three states for the sheet, not two. isLocked() reads false while paused — correct for enforcement, wrong for chrome — so this reads isPaused() separately: the Protect switch stays on and a banner says why nothing is being enforced.