Handles mask values to send messages to renderer process when a group changes state. It does this storing groups into a MaskAsArray structure, and monitoring the changes from empty to populated (and viceversa) of the arrays into the structure. (Groups=nested level, i.e. an entry with type: object in JSON schema)

Hierarchy

  • MaskHandler

Constructors

Properties

groupsVisibilityState: MaskAsArray

Stores information about groups to show/hide, one array for each group

mainWindow: BrowserWindow

Methods

  • Gets the visibility state of a group by its path

    Parameters

    • path: string

    Returns undefined | boolean

    the visibility state (true/false) for the group, or undefined in case of errors.

  • Inserts a group, via its mask, into the group visibility state object. Used in complex objects (like arrays, oneOf, and so on) that are not rendered by default.

    Parameters

    • mask: any

      the (sub)mask for the group

    • pathToInsert: string

      the path name for the entry to insert

    Returns void

  • Insert the name of a field that has been set as true in the mask into the its group array. Insert the path-to-field into all the parent group arrays. If the group arrays change state sends a message to renderer.

    Parameters

    • groupArray: string[]

      the array for the group

    • valueToInsert: string

      the name of the field that has been set to true

    • groupPath: string

      the path to the field

    Returns void

  • Remove the name of a field that has been set as false in the mask into the its group array. Remove the path-to-field from all the parent group arrays. If the group arrays change state sends a message to renderer.

    Parameters

    • groupArray: string[]

      the array for the group

    • valueToRemove: string
    • groupPath: string

      the path to the field

    Returns void

  • Updates the groupsVisibilityState when a mask field is changed

    Parameters

    • key: string

      path to the field

    • val: boolean

      true or false

    Returns void

Generated using TypeDoc