Source

maintenance-mode/maintenace-mode-popup-actions.js

const CANCEL = 'maintenanceMode/popup/CANCEL';
const CLOSE = 'maintenanceMode/popup/CLOSE';
const OPEN = 'maintenanceMode/popup/OPEN';

/**
 * Actions to manipulate with the maintenance modal dialog.
 *
 * @module maintenanceMode/popup
 */
export default {
    CANCEL,
    /**
     * Rejects all pending changes and closes popup.
     *
     * @property {string} type - CANCEL
     */
    cancel: () => ({type: CANCEL}),
    CLOSE,
    /**
     * Closes maintenance modal dialog, changes pristinity to true.
     * There is no check performed before closing the  whether user has pending changes or not.
     * Use {cancel} for that.
     * @param isMaintenanceModeEnabled
     * @property {string} type - CLOSE
     */
    close: (isMaintenanceModeEnabled) => ({
        isMaintenanceModeEnabled,
        type: CLOSE
    }),
    OPEN,
    /**
     * Opens maintenance modal dialog.
     *
     * @property {string} type - OPEN
     */
    open: () => ({type: OPEN})
};