UNPKG

@eclipse-scout/core

Version:
36 lines 2.04 kB
import { Widget } from '../index'; export declare const widgets: { /** * @param $elem HTML or jQuery element to find the corresponding widget for * @returns the widget for the given element. If the element is not linked with a widget directly, it searches its ancestors for the widget. */ get($elem: HTMLElement | JQuery): Widget; /** * @deprecated Use {@link ObjectIdProvider.createUiSeqId} instead. */ createUniqueId(prefix?: string): string; /** * Iterates through the given widgets and toggles the 'first' and 'last' classes on the corresponding widgets if the widgets are visible and rendered. */ updateFirstLastMarker(widgets: Widget[]): void; /** * @param widgets the widgets to check. * @param container if specified, the function returns null if the container is not visible or not rendered. This allows for an early return without the need to check every given widget. * @param checkTabbable if true, the resulting widget has to be tabbable, not only focusable. Default is true. * @returns the first widget of the given list which is focusable (and tabbable, unless checkTabbable is set to false). */ findFirstFocusableWidget(widgets: Widget[], container?: Widget, checkTabbable?: boolean): Widget; /** * Sets a property using the given setter after reading the value using the getter and preserving it on the preserver using the preserverName. * The preserved property can be reset using {@link resetProperty}. */ preserveAndSetProperty(setter: () => void, getter: () => any, preserver: object, preserverName: string): void; /** * Resets a property that has been preserved on the preserver by {@link preserveAndSetProperty} using the given setter. Sets the preserved property to null afterward. * @param setter * @param preserver * @param preserverName */ resetProperty(setter: (value) => void, preserver: object, preserverName: string): void; }; //# sourceMappingURL=widgets.d.ts.map