UI Rating element

Rating

Hierarchy (view full)

Constructors

Properties

__preDataSource __preSource __preSourceFiltered _canBeLongTouch _captureListeners _cleanFuncs _cleanUpCalled _contextMenu _contextMenuAddons _contextMenuHandler _controlTitle _dataSource _dataSourceListenFuncts _dataSourceOrig _dataSourcePromises _disabled _dockMenuItems _dockable _frameIDs _frameMMIDs _globalListenerSet _hasSplitters _idleCallIDs _ignoreDefaultLookup _initialized _isDock _isFiltered _isLongTouch _isresizable _lastKey? _lastMousePos _layoutChangeHandler? _listeners _localPromises _menuArray _mouseMoveHandler _mouseOutHandler _needsFullRecalculation? _originalHeight _originalWidth _parentView _pointerAtPos _readOnly _readOnlyChangeTime _resizeStartX _resizeStartY _resizing _searchable _setFilteredSourceTm _statusBarPromises _statusBarSources _statusParams _tabIndex _tabbable _timeoutIDs _touchDownTime _value activatedHandler addArtworkRules bigRating bigRatingCtrl canBeUsedAsSource canvas? canvasPaddingLeft canvasPaddingLeftPx canvasPaddingRight canvasPaddingRightPx closediv? container contextMenuPromise currentMode debugMenuItemsCreated defaultBtn disableStateStoring disabledCounter dndEventsRegistered dragEnterHandler dragFinishedHandler dragLeaveHandler dragOverHandler dragStartHandler dragging dropHandler editSupported editingStarted excludeFromGlobalContextualSearch findDNDHandler focusEventsRegistered? forceDisabled? getCloseButtonAction itemCount? listenersSet mergeParentContextMenu noFocusOnClick paddingLeft paddingRight parentContainer position pressed readOnlyPadding resizediv setCloseButtonAction starMargin starWidth stars startEdit? statusInfo storeLastFocusedState tempvalue touchEnd touchEventsRegistered? touchMove touchStart uniqueID unknownDiv unkownText useBigRating useUnknown getHTML

Accessors

Methods

XtoRating _notifyFiltered _updateDisabledAttribute addCleanFunc addControl addEventListener addToContextMenu canDrawFocus canDrop canFocus cancelDataSourcePromises checkedCleanUp cleanUp cleanUpPromises cleanUpStatusBarSources clearFilterSource contextMenuHandler dataSourceListen dataSourcePromise dataSourceUnlistenFuncts dblClickHandler dragEnter dragFinished dragLeave dragOver drop editStart enableDragNDrop enableTouch fileTransferPrepare filterSource focus focusHandler focusIn focusRefresh formatStatus getContextMenuItems getDragDataType getDraggedObject getDropMode getFocusedElement getParentControl getPersistentStateRootControl getPersistentStateRootKey getPersistentStateRootKeyBase handle_layoutchange ignoreHotkey initialize isFiltered keyDownHandler localListen localPromise longTouch makeDraggable mouseDownHandler mouseMoveHandler mouseOutHandler mouseOverHandler mouseUpHandler notifyControlFocus openView qChild raiseEvent registerEventHandler registerStatusBarSource removeEventListener removeRating requestFrame requestFrameMM requestIdle requestTimeout restorePersistentStates restoreState sendStatus setChildsDisabled setDefaults setDisabledFromParent setDragElementData setFocus setFocusedAndSelectedIndex setItemFullyVisible setItemFullyVisibleCentered setRating setStatus storePersistentStates storeState thenWithProgress touchEndHandler touchMoveHandler touchStartHandler unregisterDragDrop unregisterEventHandler unregisterFocusEvents unregisterStatusBarSource unregisterTouchEvents updateBigRating updateControl

Constructors

Properties

__preDataSource: any

Undocumented

__preSource: any

Undocumented

__preSourceFiltered: any

Undocumented

_canBeLongTouch: any

Undocumented

_captureListeners: any

Undocumented

_cleanFuncs: any

Undocumented

_cleanUpCalled: boolean

Undocumented

_contextMenu: any

Undocumented

_contextMenuAddons: any

Undocumented

_contextMenuHandler: any

Undocumented

_controlTitle: string

Undocumented

_dataSource: any

Undocumented

_dataSourceListenFuncts: (() => void)[]

Type declaration

    • (): void
    • Returns void

Undocumented

_dataSourceOrig: any

Undocumented

_dataSourcePromises: any

Undocumented

_disabled: boolean

Undocumented

_dockMenuItems: any

Undocumented

_dockable: boolean

Undocumented

_frameIDs: any

Undocumented

_frameMMIDs: any

Undocumented

_globalListenerSet: any

Undocumented

_hasSplitters: boolean

Undocumented

_idleCallIDs: any

Undocumented

_ignoreDefaultLookup: any

Undocumented

_initialized: boolean

Undocumented

_isDock: boolean

Undocumented

_isFiltered: boolean

Undocumented

_isLongTouch: any

Undocumented

_isresizable: boolean

Undocumented

_lastKey?: string

Undocumented

_lastMousePos: {
    x: any;
    y: any;
}

Type declaration

  • x: any

    Undocumented

  • y: any

    Undocumented

Undocumented

_layoutChangeHandler?: ((evt) => void)

Type declaration

Undocumented

_listeners: any

Undocumented

_localPromises: Promise<any>[]

Undocumented

_menuArray: Action[]

Undocumented

_mouseMoveHandler: ((evt) => void)

Type declaration

Undocumented

_mouseOutHandler: ((evt) => void)

Type declaration

Undocumented

_needsFullRecalculation?: boolean

Undocumented

_originalHeight: number

Undocumented

_originalWidth: number

Undocumented

_parentView: ViewData

Undocumented

_pointerAtPos: any

Undocumented

_readOnly: any

Undocumented

_readOnlyChangeTime: number

Undocumented

_resizeStartX: number

Undocumented

_resizeStartY: number

Undocumented

_resizing: boolean

Undocumented

_searchable: boolean

Undocumented

_setFilteredSourceTm: any

Undocumented

_statusBarPromises: any

Undocumented

_statusBarSources: any

Undocumented

_statusParams: AnyDict

Undocumented

_tabIndex: number

Undocumented

_tabbable: boolean

Undocumented

_timeoutIDs: any

Undocumented

_touchDownTime: any

Undocumented

_value: number

Undocumented

activatedHandler: ((active) => void)

Type declaration

    • (active): void
    • Parameters

      • active: boolean

      Returns void

Undocumented

addArtworkRules: any

Undocumented

bigRating: HTMLDivElement

Undocumented

bigRatingCtrl: Rating

Undocumented

canBeUsedAsSource: boolean

Undocumented

canvas?: any

Undocumented

canvasPaddingLeft: any

Undocumented

canvasPaddingLeftPx: number

Undocumented

canvasPaddingRight: any

Undocumented

canvasPaddingRightPx: number

Undocumented

closediv?: HTMLDivElement

Undocumented

container: HTMLElement

Undocumented

contextMenuPromise: any

Undocumented

currentMode: any

Undocumented

debugMenuItemsCreated: any

Undocumented

defaultBtn: HTMLElement

Undocumented

disableStateStoring: boolean

Undocumented

disabledCounter: number

Undocumented

dndEventsRegistered: boolean

Undocumented

dragEnterHandler: ((e) => void)

Type declaration

Undocumented

dragFinishedHandler: ((e?) => void)

Type declaration

    • (e?): void
    • Parameters

      Returns void

Undocumented

dragLeaveHandler: ((e) => void)

Type declaration

Undocumented

dragOverHandler: ((e) => void)

Type declaration

Undocumented

dragStartHandler: ((e) => void)

Type declaration

Undocumented

dragging: boolean

Undocumented

dropHandler: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      • e: any

      Returns void

Undocumented

editSupported: boolean

Undocumented

editingStarted: boolean

Undocumented

excludeFromGlobalContextualSearch: boolean

Undocumented

findDNDHandler: ((e) => any)

Type declaration

Undocumented

focusEventsRegistered?: boolean

Undocumented

forceDisabled?: boolean

Undocumented

getCloseButtonAction: (() => any)

Type declaration

    • (): any
    • Returns any

Undocumented

itemCount?: number

Undocumented

listenersSet: any

Undocumented

mergeParentContextMenu: any

Undocumented

noFocusOnClick: any

Undocumented

paddingLeft: any

Undocumented

paddingRight: any

Undocumented

parentContainer: any

Undocumented

position: string

Undocumented

pressed: boolean

Undocumented

readOnlyPadding: string

Undocumented

resizediv: HTMLDivElement

Undocumented

setCloseButtonAction: ((action) => void)

Type declaration

    • (action): void
    • Parameters

      Returns void

Undocumented

starMargin: number

Undocumented

starWidth: any

Undocumented

stars: any

Undocumented

startEdit?: procedure

Undocumented

statusInfo: any

Undocumented

storeLastFocusedState: boolean

Undocumented

tempvalue: number

Undocumented

touchEnd: ((e) => void)

Type declaration

Undocumented

touchEventsRegistered?: boolean

Undocumented

touchMove: ((e) => void)

Type declaration

Undocumented

touchStart: ((e) => void)

Type declaration

Undocumented

uniqueID: string

Undocumented

unknownDiv: HTMLDivElement

Undocumented

unkownText: any

Undocumented

useBigRating: boolean

Undocumented

useUnknown: boolean

Undocumented

getHTML: ((params) => string)

Type declaration

    • (params): string
    • Parameters

      • params: any

      Returns string

Undocumented

Accessors

  • get contextMenu(): any
  • Gets/sets context menu of the control. It could be also a function returning Menu object.

    Returns any

  • set contextMenu(value): void
  • Parameters

    • value: any

    Returns void

  • get dataSource(): any
  • Returns any

  • set dataSource(value): void
  • Parameters

    • value: any

    Returns void

  • get disabled(): boolean
  • Gets/sets data-disabled attribute of the control and his childs

    Returns boolean

  • set disabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get dockMenuItems(): any
  • Gets/sets dock menu of the control. It could be also a function returning Menu object.

    Returns any

  • set dockMenuItems(value): void
  • Parameters

    • value: any

    Returns void

  • get dockTitle(): string
  • Gets/sets dock title.

    Returns string

  • set dockTitle(value): void
  • Parameters

    • value: string

    Returns void

  • get dockable(): boolean
  • Gets/sets dockable status of the control.

    Returns boolean

  • set dockable(value): void
  • Parameters

    • value: boolean

    Returns void

  • get hasSplitters(): boolean
  • Returns boolean

  • set hasSplitters(value): void
  • Parameters

    • value: boolean

    Returns void

  • get helpContext(): string
  • Returns string

  • set helpContext(value): void
  • Parameters

    • value: string

    Returns void

  • get isDock(): boolean
  • Gets/sets isDock status of the control.

    Returns boolean

  • set isDock(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isSearchable(): boolean
  • Get/set whether this control is searchable (e.g. via search bar)

    Returns boolean

  • set isSearchable(value): void
  • Parameters

    • value: boolean

    Returns void

  • Returns any[]

  • Parameters

    • value: any[]

    Returns void

  • get minHeight(): number
  • Returns number

  • set minHeight(value): void
  • Parameters

    • value: number

    Returns void

  • get minWidth(): number
  • Returns number

  • set minWidth(value): void
  • Parameters

    • value: number

    Returns void

  • get multiselect(): boolean
  • Returns boolean

  • set multiselect(value): void
  • Parameters

    • value: boolean

    Returns void

  • get parentView(): ViewData
  • Gets/sets view data.

    Returns ViewData

  • set parentView(value): void
  • Parameters

    Returns void

  • get readOnly(): any
  • If true, makes rating control readOnly

    Returns any

    Default

    false
    
  • set readOnly(val): void
  • Parameters

    • val: any

    Returns void

  • get resizable(): boolean
  • Returns boolean

  • set resizable(val): void
  • Parameters

    • val: boolean

    Returns void

  • get selectionMode(): boolean
  • Returns boolean

  • set selectionMode(value): void
  • Parameters

    • value: boolean

    Returns void

  • get statusParams(): AnyDict
  • Gets/sets params for statusbar.

    Returns AnyDict

  • set statusParams(value): void
  • Parameters

    Returns void

  • get tabIndex(): number
  • Gets/sets tabIndex property. Use instead of tabIndex in HTMLElement for correct handling of disabled state.

    Returns number

  • set tabIndex(value): void
  • Parameters

    • value: number

    Returns void

  • get tabbable(): boolean
  • If true, makes rating control tabbable

    Returns boolean

    Default

    false
    
  • set tabbable(val): void
  • Parameters

    • val: boolean

    Returns void

  • get value(): number
  • Gets/sets value of the rating (-1 - 100). Value -1 is allowed only for rating with useUnknown property set to true.

    Returns number

  • set value(val): void
  • Parameters

    • val: number

    Returns void

  • get visible(): boolean
  • Gets/sets visibility state of the control.

    Returns boolean

Methods

  • Parameters

    • x: any
    • w: any

    Returns number

    Undocumented

  • Parameters

    • orig: any
    • filtered: any
    • phrase: any

    Returns void

    Undocumented

  • Add function to be called once during Control cleanUp

    Parameters

    • func: any

      Function to add

    Returns void

    Method

    addCleanFunc

  • Creates a new sub-control.

    Parameters

    • controlClass: string

      Class of the new control.

    • Optional initParams: AnyDict

      Initialization parameters.

    Returns HTMLDivElement

    The new control.

    Method

    addControl

  • Parameters

    • event: any
    • func: any
    • capture: any

    Returns void

    Undocumented

  • Adds item(s) to control context menu.

    Parameters

    • items: any

    Returns void

    Method

    addToContextMenu

  • Returns boolean

    Undocumented

  • Control is allow drop objects.

    Parameters

    Returns boolean

    true if dragged object can be dropped here

    Method

    canDrop

  • Returns boolean

    Undocumented

  • Returns void

    Undocumented

  • Should clean up all the control stuff, i.e. mainly unlisten events.

    Returns void

    Method

    cleanUp

  • Returns void

    Undocumented

  • Returns void

    Undocumented

  • Parameters

    • e: any

    Returns void

    Undocumented

  • Parameters

    • object: any
    • event: any
    • func: any
    • Optional capture: boolean

    Returns ((...args) => any)

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    Undocumented

  • Parameters

    • pr: any

    Returns any

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Handle drag enter operation

    Parameters

    Returns void

    Method

    dragEnter

  • Parameters

    Returns void

    Undocumented

  • Handle drag leave operation

    Parameters

    Returns void

    Method

    dragLeave

  • Handle drag over operation

    Parameters

    Returns void

    Method

    dragOver

  • Handle drop operation

    Parameters

    Returns void

    Method

    drop

  • Returns void

    Undocumented

  • Returns void

    Undocumented

  • Returns void

    Undocumented

  • Filters dataSource based on given criteria (used when searching/filtering items within, e.g. via search bar)

    Parameters

    • phrase: any

      string phrase to filter

    Returns void

    String message or object with detailed data

    Method

    filterSource

  • Sets the focus on the control

    Returns void

    Method

    focus

  • Parameters

    • element: HTMLElement
    • newState: any

    Returns boolean

    Undocumented

  • Parameters

    Returns void

    Undocumented

  • Parameters

    • newFocusState: any

    Returns void

    Undocumented

  • Format status text in this callback, when using object with detailed data.

    Parameters

    • data: any

    Returns string

    String message or object with detailed data

    Method

    formatStatus

  • Parameters

    • evt: any

    Returns any

    Undocumented

  • Returns string

    Undocumented

  • Returns HTMLElement

    Undocumented

  • Returns the first ancestor in the HTML DOM tree, that has controlClass and data-id. Searching is stopped on topParentCtrl, if defined.

    Parameters

    • topParentCtrl: any

      ControlClass of the top parent, where to stop searching.

    Returns Control

    Parent Control or undefined if there's no parent.

    Method

    getParentControl

  • Returns control to decide which subcontrols should be stored e.g. Multiview component overrides this as it stores states only for the active control/view

    Returns HTMLElement

    control

    Method

    getPersistentStateRootControl

  • Returns root key string under which the values are stored in persistent.JSON file on the disk.

    Returns string

    store key id

    Method

    getPersistentStateRootKey

  • Parameters

    • hotkey: any

    Returns boolean

    Undocumented

  • Parameters

    • parentel: any
    • params: any

    Returns void

    Undocumented

  • Returns boolean

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • This method is pretty similar as app.listen(), but app.unlisten() is called automatically in Control.cleanUp()

    Parameters

    • object: any

      Object where to set listener

    • event: string

      Event of the listener

    • func: AnyCallback

      Method for callback dispatch

    • Optional capture: boolean

    Returns ((...args) => any)

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    Method

    localListen

  • This method is supposed to automatically cancel running promises when component is going to destroy.

    Parameters

    • promise: any

    Returns any

    Method

    localPromise

  • Parameters

    Returns boolean

    Undocumented

  • Control is allow drag object

    Parameters

    • element: any
    • Optional canBeDragged: boolean

    Returns void

    Method

    makeDraggable

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Returns void

    Undocumented

  • Parameters

    • nodeDataSource: any
    • nodeHandlerID: any
    • clickedArea: any
    • Optional newTab: boolean

    Returns void

    Undocumented

  • Parameters

    • id: string

    Returns any

    Undocumented

  • Raise the event on the Control

    Parameters

    • eventName: any

      Name of the event

    • Optional details: AnyDict

      Custom parameters to be sent with the event

    • Optional isCancelable: boolean

      Whether the event can be canceled.

    • Optional canBubble: boolean

      Whether the event can bubble.

    • Optional sender: EventTarget

      of the event. Container by default.

    Returns boolean

    Success. If 'false', the event was canceled.

    Example

    if (!this.raiseEvent('selecting', {
    tabIndex: value,
    oldTabIndex: oldSelected
    }, true))
    return; // canceled, do not change selection
  • Parameters

    • event: any
    • Optional capture: boolean

    Returns void

    Undocumented

  • Parameters

    • source: any

    Returns void

    Undocumented

  • Parameters

    • event: any
    • func: any
    • capture: any

    Returns void

    Undocumented

  • Returns void

    Undocumented

  • Request an animation frame in the control context. If the control has been cleaned up, then the callback will not execute.

    Parameters

    • callback: (() => void)

      Callback to run.

        • (): void
        • Returns void

    • Optional callbackID: string

      Optional ID for callback, so that multiple instances of the callback do not execute at the same time.

    Returns void

    Example

    this.requestFrame(function () {
    // this callback will be executed at a maximum of your monitor's natural refresh rate.
    }, "myUniqueFrameCallbackName");
  • Request an animation frame in the control context, with the same features as requestAnimationFrameMM(). If the control has been cleaned up, then the callback will not execute.

    Parameters

    • callback: (() => void)

      Callback to run.

        • (): void
        • Returns void

    • Optional callbackID: string

      Optional ID for callback, so that multiple instances of the callback do not execute at the same time.

    Returns void

    Example

    this.requestFrame(function () {
    // this callback will be executed at a maximum of your monitor's natural refresh rate when focused, maximum of 30 fps when not focused, and maximum of 2 fps when window is not visible.
    }, "myUniqueFrameCallbackName");

    Method

    requestFrameMM

  • Calls requestIdleCallback, cancels the previous sheduled callback on cleanup or multiple calls

    Parameters

    • callback: any

      Callback, which should be called when idle

    • Optional callbackID: string

      String name, which identifies the callback. If present, it cancels the previous sheduled callback

    • Optional useFirst: boolean

      Valid only if callbackID is present, if true, previous unfinished timer is finished and the last is revoked

    Returns number

    Method

    requestIdle

  • Calls setTimeout, cancels the previous sheduled callback on cleanup or multiple calls

    Parameters

    • callback: (() => void)

      Callback, which should be called after timeout

        • (): void
        • Returns void

    • timeMS: number

      Timeout, in ms

    • Optional callbackID: string

      String name, which identifies the callback. If present, it cancels the previous sheduled callback

    • Optional useFirst: boolean

      Valid only if callbackID is present, if true, previous unfinished timer is finished and the last is revoked

    Returns number

    Method

    requestTimeout

  • Restores persistent (class) states for the control class and all subcontrols, this stores global (class) state (is same for all instances of the control)

    Returns void

    Method

    restorePersistentStates

  • Parameters

    • fromObject: any

    Returns void

    Undocumented

  • Parameters

    • message: any

    Returns void

    Undocumented

  • Parameters

    • el: any
    • val: any
    • effectiveVal: any

    Returns void

    Undocumented

  • Returns void

    Undocumented

  • Parameters

    • value: any

    Returns void

    Undocumented

  • Set details for dragged element

    Parameters

    • element: any
    • e: any

    Returns void

    Method

    setDragElementData

  • Parameters

    • Optional onlyLV: boolean

    Returns void

    Undocumented

  • Parameters

    • idx: number

    Returns void

    Undocumented

  • Parameters

    • idx: number

    Returns void

    Undocumented

  • Parameters

    • idx: number

    Returns void

    Undocumented

  • Parameters

    • val: any
    • Optional params: any

    Returns void

    Undocumented

  • Set status text. Can be simple string or object with data formatted later in formatStatus method.

    Parameters

    • data: any

    Returns void

    String message or object with detailed data

    Method

    setStatus

  • Stores persistent (class) states for the control class and all subcontrols, this stores global (class) state (is same for all instances of the control)

    Returns void

    Method

    storePersistentStates

  • Method for handling Promise with delayed progress.

    Parameters

    • pPromise: any

      Passed promise

    • Optional params: any

      Object with possible parameters:

      • thenFunc - function called after resolving promise
      • errorFunc - function called after rejecting promise
      • delayedFunc - function called after given delay
      • delayMS - progress delay, default 100ms. Progress is displayed after this time, in case promise was not resolved yet
      • progressText - text displayed in delayed progress, default string is "Getting data"
      • progress - SimpleTasksController object, used for progress. If not present, use global progress.

    Returns void

    Method

    thenWithProgress

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Parameters

    • evt: any

    Returns void

    Undocumented

  • Returns void

    Undocumented

  • Parameters

    • event: string
    • Optional capture: boolean

    Returns void

    Undocumented

  • Parameters

    • source: any

    Returns void

    Undocumented

  • Returns void

    Undocumented

  • Returns void

    Undocumented