Constructors

Properties

[INITIALIZED]: boolean = false
[ZONES]: ZoneStore = ...
defaultControls: ZoneDefaultControls = defaults

Methods

  • Add a component to the zone.

    Type Parameters

    • P = any

    Parameters

    • zone: string | string[]

      The zone(s) to add the component to.

    • component: ComponentType<P>

      The component to add.

    • Optional props: P

      Additional properties for the component.

    • Optional update: boolean

      Whether to update the component if it already exists.

    • Optional id: string

      The ID of the component. If not provided, a UUID will be generated.

    Returns string

    The ID of the added component.

  • Add a component to the zone.

    Type Parameters

    • P = any

    Parameters

    Returns any

    The ID of the added component.

  • Add an underscore sorter to a zone.

    Parameters

    • zone: string

      The name of the zone.

    • Optional sortBy: string = 'order'

      The property to sort by.

    • Optional reverse: boolean = false

      Whether to reverse the sort order.

    • order: any

      The order of the sorter.

    Returns string

    The ID of the added sorter.

  • Check if a specific component exists in a zone.

    Parameters

    • zone: any

      The name of the zone.

    • id: any

      The ID of the component to check.

    Returns boolean

    True if the component exists in the zone, false otherwise.

  • Subscribe to changes in a zone.

    Parameters

    • zone: string

      The name of the zone.

    • cb: Function

      The callback function to call when the zone changes.

    Returns (() => void)

    A function that, when called, will unsubscribe the callback from the zone.

      • (): void
      • Returns void

  • Update a component in the zone.

    Type Parameters

    • P = any

    Parameters

    • id: string

      The ID of the component to update.

    • updates: ComponentRegistration<P>

      The updates to apply to the component.

    Returns string

    The ID of the updated component.

    Throws

    If the component with the given ID does not exist.