Options
All
  • Public
  • Public/Protected
  • All
Menu

AttributesSystem manages shared art attributes and modules capable of selecting from them. It auto-installs / uninstalls attribute modules.

collboard-system

Hierarchy

  • AbstractSystem
    • AttributesSystem

Index

Constructors

  • Parameters

    • systems: ISystemsExtended

    Returns AttributesSystem

Properties

attributesRules: any
attributesValue: any
getAttributeValueDefined: any
inputRenderDefined: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended

Accessors

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

  • get registeredAttributeNames(): string[]
  • Returns string[]

Methods

  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns AttributesSystem

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • destroy(): Promise<void>
  • Returns Promise<void>

  • getAttributeValue(attributeName: string, valueScope?: string): BehaviorSubject<attribute_value>
  • Parameters

    • attributeName: string
    • Optional valueScope: string

    Returns BehaviorSubject<attribute_value>

  • init(): Promise<void>
  • Returns Promise<void>

  • inputRender(attributeName: string, options?: { overrideValue?: attribute_value; valueScope?: string; additionaOnChange?: any }): null | Element
  • Note: this is not async because when it need to do some async stuff it will return AsyncContentComponent immediatelly and load in in the fly TODO: Is it a good solution?

    Parameters

    • attributeName: string
    • Optional options: { overrideValue?: attribute_value; valueScope?: string; additionaOnChange?: any }
      • Optional overrideValue?: attribute_value
      • Optional valueScope?: string
      • additionaOnChange?:function
        • additionaOnChange(value: attribute_value): void
        • Parameters

          • value: attribute_value

          Returns void

    Returns null | Element

  • registerAttributeRule(rule: IAttributeRule<attribute_value>): Registration
  • Parameters

    • rule: IAttributeRule<attribute_value>

    Returns Registration

  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable