outsystems-ui
Version:
OutSystems UI Framework
1,354 lines • 237 kB
TypeScript
/*!
OutSystems UI 2.22.0 • ODC Platform
Website:
• https://www.outsystems.com/outsystems-ui
GitHub:
• https://github.com/OutSystems/outsystems-ui
*/
declare namespace osui {
function GetVersion(): string;
function ToggleClass(el: HTMLElement, state: unknown, className: string): void;
function GetClosest(elem: HTMLElement, selector: string): unknown;
function FixInputs(): void;
function HasMasterDetail(): boolean;
function HideOnScroll(): unknown;
}
declare namespace OutSystems.OSUI.Utils.Menu {
function AddMenuOnOrientationChange(callback: OSFramework.OSUI.GlobalCallbacks.Generic): void;
function RemoveMenuOnOrientationChange(): void;
}
declare namespace OSFramework.OSUI.Constants {
const A11YAttributes: {
Aria: {
Atomic: string;
Busy: string;
Controls: string;
Describedby: string;
Disabled: string;
Expanded: string;
Haspopup: {
prop: string;
value: {
False: string;
True: string;
Menu: string;
Listbox: string;
Tree: string;
Grid: string;
Dialog: string;
};
};
Hidden: string;
Label: string;
Labelledby: string;
Multiselectable: string;
Selected: string;
ValueMax: string;
ValueMin: string;
};
AriaLive: {
AttrName: string;
Assertive: string;
Polite: string;
Off: string;
};
Role: {
Alert: string;
AlertDialog: string;
AttrName: string;
Button: string;
Complementary: string;
Listbox: string;
Menu: string;
MenuItem: string;
Option: string;
Presentation: string;
Progressbar: string;
Region: string;
Search: string;
Tab: string;
TabList: string;
TabPanel: string;
Tooltip: string;
};
TabIndex: string;
States: {
Empty: string;
False: string;
TabIndexHidden: string;
TabIndexShow: string;
True: string;
};
};
const AccessibilityHideElementClass = "wcag-hide-text";
const AllowPropagationAttr = "[data-allow-event-propagation]";
const Comma = ",";
const Dot = ".";
const EmptyString = "";
const EnableLogMessages = false;
const FocusableElems = "a[href]:not([disabled]), [tabindex=\"0\"], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])";
const FocusableTabIndexDefault = "default-tabindex-element";
const FocusableTabIndexHidden = "[tabindex=\"-1\"][default-tabindex-element]";
const FocusTrapIgnoreAttr = "ignore-focus-trap";
const HasAccessibilityClass = "has-accessible-features";
const InvalidNumber = -1;
const IsRTLClass = "is-rtl";
const IsRTLDeviceType = "is-rtl-device";
const JavaScriptTypes: {
Undefined: string;
Boolean: string;
Number: string;
String: string;
Symbol: string;
Function: string;
Object: string;
};
const JustInputs = "input:not([type=button]):not([type=checkbox]):not([type=color]):not([type=file]):not([type=hidden]):not([type=image]):not([type=image]):not([type=radio]):not([type=range]):not([type=reset]):not([type=submit]), textarea";
const Language: {
code: string;
short: string;
};
const Months: string[];
const NoTransition = "no-transition";
const OSPlatform = "ODC";
const OSUIVersion = "2.22.0";
const ZeroValue = 0;
}
declare namespace OSFramework.OSUI.ErrorCodes {
const AbstractChild: {
FailParentNotFound: string;
};
const Accordion: {
FailChildItemClicked: string;
FailSetNewChildItem: string;
FailToSetChildItemAction: string;
FailUnsetNewChildItem: string;
};
const Dropdown: {
FailOptionItemClicked: string;
FailOptionItemKeyPressed: string;
FailSetNewOptionItem: string;
FailToSetOptionItemAction: string;
FailUnsetNewOptionItem: string;
HasNoImplementation: {
code: string;
message: string;
};
};
const DropdownServerSide: {
FailOnSetIntersectionObserver: string;
};
const RangeSlider: {
FailSetValue: string;
};
const SectionIndex: {
FailChildItemClicked: string;
FailSetNewChildItem: string;
FailToSetChildItemAction: string;
FailUnsetNewChildItem: string;
};
const SectionIndexItem: {
FailToSetTargetElement: string;
};
const Tooltip: {
FailOnSetIntersectionObserver: string;
};
const Tabs: {
FailChildItemClicked: string;
FailSetNewChildContentItem: string;
FailSetNewChildHeaderItem: string;
FailToSetChildItemAction: string;
FailUnsetNewChildContentItem: string;
FailUnsetNewChildHeaderItem: string;
};
const AbstractParent: {
FailChildNotFound: string;
FailChildsNotFound: string;
FailTypeNotFound: string;
};
const AbstractProviderPattern: {
FailProviderEventHandler: string;
FailProviderEventRemoval: {
code: string;
message: string;
};
FailProviderEventSet: {
code: string;
message: string;
};
};
const ProviderEventsManager: {
FailPendingEventRemoval: string;
FailSavingPendingEvent: string;
FailSavedEventRemoval: string;
FailSavingEvent: string;
};
}
declare namespace OSFramework.OSUI.GlobalCallbacks {
type Generic = {
(...args: unknown[]): unknown;
};
type OSGeneric = {
(patternId: string, ...args: unknown[]): void;
};
}
declare namespace OSFramework.OSUI.GlobalEnum {
enum CommonPatternsProperties {
ExtendedClass = "ExtendedClass"
}
enum CssClassElements {
AcessibilityStyleTag = "acessibility-style-tag",
ActiveScreen = "active-screen",
AsideExpandable = "aside-expandable",
Container = "screen-container",
Content = "content",
DarkMode = "os-dark-mode",
DeprecatedSubmenu = "submenu",
Footer = "footer",
Header = "header",
HeaderHideOnScroll = "hide-header-on-scroll",
HeaderIsFixed = "fixed-header",
HeaderIsVisible = "header-is--visible",
HeaderTopContent = "header-top-content",
HighContrast = "os-high-contrast",
InputNotValid = "not-valid",
IsTouch = "is--touch",
Layout = "layout",
LayoutNative = "layout-native",
LayoutSide = "layout-side",
LayoutTop = "layout-top",
List = "list",
LoginPassword = "login-password",
MainContent = "main-content",
MenuLinks = "app-menu-links",
Placeholder = "ph",
Popup = "popup-dialog",
SkipContent = "skip-nav"
}
enum CSSSelectors {
InputFormControl = "input.form-control",
IosBounceScroll = "ios .ios-bounce:not(.hide-header-on-scroll) .content",
LayoutNativeHeader = "layout-native:not(.hide-header-on-scroll) .header"
}
enum CSSVariables {
FooterHeight = "--footer-height",
HeaderContentHeight = "--header-size-content",
OverlayOpacity = "--overlay-opacity",
ViewportHeight = "--viewport-height"
}
enum Position {
Bottom = "bottom",
BottomLeft = "bottom-left",
BottomRight = "bottom-right",
Center = "center",
Left = "left",
Right = "right",
Top = "top",
TopLeft = "top-left",
TopRight = "top-right"
}
enum FloatingAlignment {
Center = "center",
End = "end",
Start = "start"
}
enum FloatingPosition {
Auto = "auto",
Bottom = "bottom",
BottomEnd = "bottom-end",
BottomStart = "bottom-start",
Center = "center",
Left = "left",
LeftEnd = "left-end",
LeftStart = "left-start",
Right = "right",
RightEnd = "right-end",
RightStart = "right-start",
Top = "top",
TopEnd = "top-end",
TopStart = "top-start"
}
enum CssProperties {
Auto = "auto",
Initial = "initial",
MaxContent = "max-content",
None = "none",
PaddingTop = "padding-top"
}
enum DataBlocksTag {
DataBlock = "[data-block]",
Input = "[data-input]",
Label = "[data-label]",
TextArea = "[data-textarea]"
}
enum DateFormat {
D = "D",
d = "d",
DD = "DD",
DDD = "DDD",
M = "M",
m = "m",
MM = "MM",
MMM = "MMM",
Y = "Y",
y = "y",
YY = "YY",
YYY = "YYY",
YYYY = "YYYY"
}
enum Direction {
Bottom = "bottom",
Down = "down",
Left = "left",
LTR = "ltr",
None = "",
Right = "right",
RTL = "rtl",
Top = "top",
TTB = "ttb",
Up = "up"
}
enum ScrollBehavior {
Auto = "auto",
Instant = "instant",
Smooth = "smooth"
}
enum ScrollPositionBehavior {
Start = "start",
Center = "center",
End = "end",
Nearest = "nearest"
}
enum HTMLAttributes {
AllowEventPropagation = "[data-allow-event-propagation=true], [data-allow-event-propagation=True]",
Class = "class",
DataInput = "data-input",
Disabled = "disabled",
Href = "href",
Id = "id",
Name = "name",
StatusBar = "data-status-bar-height",
Style = "style",
Type = "type",
Value = "value"
}
enum HTMLElement {
Body = "body",
Button = "button",
Div = "div",
FieldSet = "fieldset",
Input = "input",
Link = "a",
Radio = "radio",
Span = "span"
}
enum HTMLEvent {
AnimationEnd = "animationend",
AnimationStart = "animationstart",
Blur = "blur",
Change = "change",
Click = "click",
Focus = "focus",
keyDown = "keydown",
MouseDown = "mousedown",
MouseEnter = "mouseenter",
MouseLeave = "mouseleave",
MouseUp = "mouseup",
OrientationChange = "orientationchange",
Prefix = "on",
Resize = "resize",
Scroll = "scroll",
ScrollEnd = "scrollend",
TouchEnd = "touchend",
TouchMove = "touchmove",
TouchStart = "touchstart",
TransitionEnd = "transitionend",
Message = "message"
}
enum CustomEvent {
BalloonOnToggle = "balloon.onToggle"
}
enum InlineStyle {
Display = "display",
Height = "height",
Left = "left",
Opacity = "opacity",
PointerEvents = "pointerEvents",
Top = "top",
Transform = "transform",
Width = "width"
}
const InlineStyleValue: {
Display: {
block: string;
contents: string;
inline: string;
none: string;
unset: string;
};
};
enum Keycodes {
ArrowDown = "ArrowDown",
ArrowLeft = "ArrowLeft",
ArrowRight = "ArrowRight",
ArrowUp = "ArrowUp",
End = "End",
Enter = "Enter",
Escape = "Escape",
Home = "Home",
PageDown = "PageDown",
PageUp = "PageUp",
Shift = "Shift",
ShiftTab = "ShiftTab",
Space = " ",
Tab = "Tab"
}
enum KeyframesEffectOptions {
EasingLinear = "linear",
FillBoth = "both"
}
enum MobileOS {
Android = "android",
IOS = "ios",
MacOS = "osx",
Unknown = "unknown",
Windows = "windows"
}
enum Orientation {
Horizontal = "horizontal",
None = "",
Vertical = "vertical"
}
enum PatternName {
Accordion = "Accordion",
AccordionItem = "Accordion Item",
AnimatedLabel = "Animated Label",
Balloon = "Balloon",
BottomSheet = "Bottom Sheet",
ButtonLoading = "ButtonLoading",
Carousel = "Carousel",
Datepicker = "Datepicker",
Dropdown = "Dropdown",
DropdownServerSideItem = "DropdownServerSideItem",
FlipContent = "Flip Content",
FloatingActions = "Floating Actions",
FloatingActionsItem = "Floating Actions Item",
Gallery = "Gallery",
InlineSvg = "InlineSVG",
MonthPicker = "MonthPicker",
Notification = "Notification",
OverflowMenu = "OverflowMenu",
ProgressBar = "Progress Bar",
ProgressCircle = "Progress Circle",
RangeSlider = "Range Slider",
RangeSliderInterval = "Range Slider Interval",
Rating = "Rating",
Search = "Search",
SectionIndex = "Section Index",
SectionIndexItem = "Section Index Item",
Sidebar = "Sidebar",
Submenu = "Submenu",
SwipeEvents = "SwipeEvents",
Tabs = "Tabs",
TabsContentItem = "TabsContentItem",
TabsHeaderItem = "TabsHeaderItem",
Timepicker = "Timepicker",
Tooltip = "Tooltip",
TouchEvents = "TouchEvents",
Video = "Video"
}
enum ShapeTypes {
Rounded = "rounded",
Sharp = "none",
SoftRounded = "soft"
}
enum InputClassTypes {
InputLarge = "input-large",
InputSmall = "input-small"
}
enum InputTypeAttr {
Date = "date",
DateTime = "date-time-edit",
Password = "password",
Text = "text",
Time = "time"
}
enum Units {
Percentage = "%",
Pixel = "px",
Em = "em"
}
enum Browser {
chrome = "chrome",
edge = "edge",
firefox = "firefox",
ie = "ie",
kindle = "kindle",
miui = "miui",
opera = "opera",
safari = "safari",
samsung = "samsung",
uc = "uc",
unknown = "unknown",
yandex = "yandex"
}
enum DeviceOrientation {
landscape = "landscape",
portrait = "portrait",
unknown = "unknown"
}
enum DeviceType {
desktop = "desktop",
phone = "phone",
tablet = "tablet"
}
enum NotchClasses {
IPhoneX = "iphonex"
}
enum FocusTrapClasses {
FocusTrapBottom = "focus-trap-bottom",
FocusTrapTop = "focus-trap-top"
}
enum WarningMessages {
FeatureNotImplemented = "This feature is not yet implemented!",
MethodNotImplemented = "This Method has no implementation on the context of this pattern."
}
enum NullValues {
Time = "00:00:00"
}
enum ProviderEvents {
Initialized = "Initialized",
OnProviderConfigsApplied = "OnProviderConfigsApplied"
}
enum SVGHelperConstants {
DOMType = "image/svg+xml",
ParserError = "parsererror",
SVG = "svg"
}
enum Time {
HourInSeconds = 3600,
MinuteInSeconds = 60
}
}
declare namespace OSFramework.OSUI.Behaviors {
type SpringAnimationProperties = {
friction: number;
mass: number;
tension: number;
};
type SpringAnimationConfigs = {
addSpringAnimation: boolean;
springAnimationProperties: SpringAnimationProperties;
};
class DragParams {
DragOrientation: GlobalEnum.Orientation;
ExpectedDirection: GlobalEnum.Direction;
InvalidDrag: boolean;
IsMoving: boolean;
IsOpen: boolean;
IsReadyToTriggerCallback: boolean;
LastX: number;
LastY: number;
MoveX: number;
MoveY: number;
Size: any;
SpringAnimation: Animation;
VerticalDrag: boolean;
}
export class AnimateOnDrag {
private _dragParams;
private readonly _swipeTriggerSpeed;
private _targetElement;
constructor(target: HTMLElement);
private _checkIsDraggingInsideBounds;
private _updateLastPositions;
private _updateUI;
get dragParams(): DragParams;
onDragEnd(offsetX: number, offsetY: number, timeTaken: number, callback: GlobalCallbacks.Generic, springProperties?: SpringAnimationConfigs): void;
onDragMove(offsetX: number, offsetY: number, currentX: number, currentY: number, event: TouchEvent): void;
onDragStart(verticalDrag: boolean, expectedDirection: GlobalEnum.Direction, currentX: number, currentY: number, isOpen: boolean, size: string): void;
}
export abstract class OverlayTransitionOnDrag {
static Set(target: HTMLElement, currentDragValue: number, direction: GlobalEnum.Direction, size: string): void;
static UnSet(target: HTMLElement): void;
}
export abstract class SpringAnimation {
private static _createSpringEffect;
static CreateSpringAnimation(target: HTMLElement, offsetX: number, offsetY: number, orientation: GlobalEnum.Orientation, springProperties: SpringAnimationProperties): Animation;
}
export {};
}
declare namespace OSFramework.OSUI.Behaviors {
class FocusManager {
private _lastFocusedElem;
constructor();
setFocusToStoredElement(): void;
storeLastFocusedElement(): void;
}
}
declare namespace OSFramework.OSUI.Behaviors {
type FocusTrapParams = {
canContainOtherPatterns?: boolean;
focusBottomCallback?: GlobalCallbacks.Generic;
focusTargetElement: HTMLElement;
focusTopCallback?: GlobalCallbacks.Generic;
};
class FocusTrap {
private _canTargetContainOtherPatts;
private _firstFocusableElement;
private _focusBottomCallback;
private _focusTopCallback;
private _focusableElements;
private _hasBeenPassThoughFirstOne;
private _lastFocusableElement;
private _predictableBottomElement;
private _predictableTopElement;
private _targetElement;
constructor(opts: FocusTrapParams);
private _buildPredictableElements;
private _focusBottomHandler;
private _focusHandler;
private _focusTopHandler;
private _removeEventListeners;
private _setEventListeners;
private _setFocusableElements;
private _setFocusableProperties;
private _unsetCallbacks;
disableForA11y(): void;
dispose(): void;
enableForA11y(): void;
get bottomElement(): HTMLElement;
get topElement(): HTMLElement;
get focusableElements(): HTMLElement[];
}
}
declare namespace OSFramework.OSUI.Behaviors {
function Scroll(element: HTMLElement, options: ScrollIntoViewOptions): void;
function ScrollVerticalPosition(scrollableElement?: HTMLElement): ScrollPosition;
}
declare namespace OSFramework.OSUI.Event.DOMEvents {
abstract class AbstractEvent<T> implements IEvent<T> {
private _handlers;
get handlers(): GlobalCallbacks.OSGeneric[];
addHandler(handler: GlobalCallbacks.OSGeneric): void;
hasHandlers(): boolean;
removeHandler(handler: GlobalCallbacks.OSGeneric): void;
trigger(data?: T, ...args: unknown[]): void;
abstract addEvent(): void;
abstract removeEvent(): void;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents {
abstract class AbstractEventsManager<ET, D> {
private _events;
constructor();
addHandler(eventType: ET, handler: GlobalCallbacks.Generic): void;
hasHandlers(eventType: ET): boolean;
removeHandler(eventType: ET, handler: GlobalCallbacks.Generic): void;
trigger(eventType: ET, data?: D, ...args: unknown[]): void;
get events(): Map<ET, IEvent<D>>;
protected abstract getInstanceOfEventType(eventType: ET): IEvent<D>;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents {
interface IEvent<D> {
handlers: GlobalCallbacks.OSGeneric[];
addEvent(): void;
addHandler(handler: GlobalCallbacks.OSGeneric, ...args: any[]): void;
hasHandlers(): boolean;
removeEvent(): void;
removeHandler(handler: GlobalCallbacks.OSGeneric): void;
trigger(data: D, ...args: unknown[]): unknown;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
abstract class AbstractListener<T> extends AbstractEvent<T> implements IListener {
private _eventName;
private _eventTarget;
private _eventType;
protected eventCallback: EventListenerObject;
protected useCapture: boolean;
constructor(eventTarget: HTMLElement | Document | Window, eventType: GlobalEnum.HTMLEvent | GlobalEnum.CustomEvent, isCustomEvent?: boolean);
addEvent(): void;
removeEvent(): void;
get eventTarget(): HTMLElement | Document | Window;
set eventTarget(el: HTMLElement | Document | Window);
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class BalloonOnToggle extends AbstractListener<string> {
constructor();
private _onToggleTrigger;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class BodyOnClick extends AbstractListener<string> {
private _enableBodyClick;
constructor();
private _bodyTrigger;
disableBodyClickEvent(): void;
enableBodyClickEvent(): void;
get getBodyClickStatus(): boolean;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class BodyOnMouseDown extends AbstractListener<string> {
constructor();
private _bodyTrigger;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
interface IListener extends IEvent<unknown> {
disableBodyClickEvent?(): void;
enableBodyClickEvent?(): void;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
enum Type {
BalloonOnToggle = "balloon.onToggle",
BodyOnClick = "body.onclick",
BodyOnMouseDown = "body.mousedown",
OrientationChange = "window.onorientationchange",
ScreenOnScroll = "screen.onscroll",
WindowResize = "window.onresize",
WindowMessage = "window.message"
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class ListenerManager extends AbstractEventsManager<Type, string> {
protected getInstanceOfEventType(listenerType: Type): IListener;
}
class GlobalListenerManager {
private static _listenerManager;
static get Instance(): ListenerManager;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class OrientationChange extends AbstractListener<string> {
constructor();
private _orientationTrigger;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class ScreenOnScroll extends AbstractListener<string> {
constructor();
private _screenTrigger;
addHandler(handler: GlobalCallbacks.OSGeneric): void;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class WindowMessage extends AbstractListener<string> {
constructor();
private _windowTrigger;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class WindowResize extends AbstractListener<string> {
private _timeout;
constructor();
private _windowTrigger;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers {
abstract class AbstractObserver<O> extends AbstractEvent<string> implements IObserver<O, string> {
private _observerOptions;
private _observerTarget;
protected observer: ResizeObserver | MutationObserver;
constructor(observerOptions: O, observerTarget: HTMLElement);
protected startObserver(): void;
removeEvent(): void;
get observerOptions(): O;
get observerTarget(): HTMLElement;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers {
interface IObserver<O, D> extends IEvent<D> {
observerOptions: O;
observerTarget: HTMLElement;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers {
enum ObserverEvent {
RTL = "RTL"
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers {
class ObserverManager extends AbstractEventsManager<unknown, string> {
protected getInstanceOfEventType(observerType: Observers.ObserverEvent): Observers.IObserver<unknown, unknown>;
}
class GlobalObserverManager {
private static _observerManager;
static get Instance(): ObserverManager;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers.MutationObservers {
abstract class AbstractMutationObserver extends AbstractObserver<MutationObserverInit> implements IObserver<MutationObserverInit, string> {
constructor(observerOptions: MutationObserverInit, observerTarget: HTMLElement);
addEvent(): void;
protected abstract observerHandler(mutationList: MutationRecord[]): void;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers.MutationObservers.RTL {
class RTLObserver extends AbstractMutationObserver {
private _hasAlreadyRTL;
constructor();
observerHandler(mutationList: MutationRecord[]): void;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Observers.MutationObservers.RTL {
class RTLObserverConfigs implements MutationObserverInit {
attributeFilter: Array<string>;
attributeOldValue: boolean;
subtree: boolean;
constructor();
}
}
declare namespace OSFramework.OSUI.Event {
abstract class AbstractGestureEvent implements GestureEvent.IGestureEvent {
private _endEvent;
private _endTriggerCallback;
private _gestureParams;
private _moveEvent;
private _moveTriggerCallback;
private _startEvent;
private _startTriggerCallback;
private _targetElement;
constructor(target: HTMLElement);
private _eventTouchEnd;
private _eventTouchMove;
private _eventTouchStart;
private _removeEventListeners;
private _unsetCallbacks;
protected setCallbacks(onStartCallback?: GlobalCallbacks.Generic, onMoveCallback?: GlobalCallbacks.Generic, onEndCallback?: GlobalCallbacks.Generic): void;
protected setEventListeners(): void;
get targetElement(): HTMLElement;
unsetTouchEvents(): void;
protected abstract setSwipeEvents(...args: GlobalCallbacks.Generic[]): void;
}
}
declare namespace OSFramework.OSUI.Event.GestureEvent.Callbacks {
type GestureStart = {
(x: number, y: number): void;
};
type GestureMove = {
(x: number, y: number, offsetX: number, offsetY: number, evt: TouchEvent): void;
};
type GestureEnd = {
(offsetX: number, offsetY: number, timeTaken: number): void;
};
type SwipeDown = {
(): void;
};
type SwipeLeft = {
(): void;
};
type SwipeRight = {
(): void;
};
type SwipeUp = {
(): void;
};
}
declare namespace OSFramework.OSUI.Event.GestureEvent {
class DragEvent extends AbstractGestureEvent {
constructor(target: HTMLElement);
setSwipeEvents(onStartCallback: Event.GestureEvent.Callbacks.GestureStart, onMoveCallback: Event.GestureEvent.Callbacks.GestureMove, onEndCallback?: Event.GestureEvent.Callbacks.GestureEnd): void;
}
}
declare namespace OSFramework.OSUI.Event.GestureEvent {
interface IGestureEvent {
targetElement: HTMLElement;
unsetTouchEvents(): void;
}
}
declare namespace OSFramework.OSUI.Event.GestureEvent {
class SwipeEvent extends AbstractGestureEvent {
private _swipeDownCallback;
private _swipeLeftCallback;
private _swipeRightCallback;
private _swipeUpCallback;
private _threshold;
private _velocity;
constructor(target: HTMLElement);
private _onGestureEnd;
protected setSwipeCallbacks(swipeDownCallback: GlobalCallbacks.Generic, swipeLeftCallback: GlobalCallbacks.Generic, swipeRightCallback: GlobalCallbacks.Generic, swipeUpCallback: GlobalCallbacks.Generic): void;
setSwipeEvents(swipeDownCallback: Event.GestureEvent.Callbacks.SwipeDown, swipeLeftCallback: Event.GestureEvent.Callbacks.SwipeLeft, swipeRightCallback: Event.GestureEvent.Callbacks.SwipeRight, swipeUpCallback: Event.GestureEvent.Callbacks.SwipeUp): void;
}
}
declare namespace OSFramework.OSUI.Event.ProviderEvents {
interface IProviderEvent {
callback: GlobalCallbacks.Generic;
eventName: string;
eventUniqueId: string;
}
}
declare namespace OSFramework.OSUI.Event.ProviderEvents {
interface IProviderEventManager {
addPendingEvent(eventName: string, callback: GlobalCallbacks.Generic, eventUniqueId: string): void;
get events(): Map<string, IProviderEvent>;
get hasEvents(): boolean;
get hasPendingEvents(): boolean;
get pendingEvents(): Map<string, IProviderEvent>;
removePendingEvent(eventUniqueId: string): void;
removeSavedEvent(eventUniqueId: string): void;
saveEvent(eventName: string, callback: GlobalCallbacks.Generic, eventUniqueId: string): void;
}
}
declare namespace OSFramework.OSUI.Event.ProviderEvents {
class ProviderEvent implements IProviderEvent {
callback: GlobalCallbacks.Generic;
eventName: string;
eventUniqueId: string;
constructor(callback: GlobalCallbacks.Generic, eventName: string, eventUniqueId: string);
}
}
declare namespace OSFramework.OSUI.Event.ProviderEvents {
class ProviderEventsManager implements IProviderEventManager {
private _eventsMap;
private _pendingEventsMap;
addPendingEvent(eventName: string, callback: GlobalCallbacks.Generic, eventUniqueId: string): void;
removePendingEvent(eventUniqueId: string): void;
removeSavedEvent(eventUniqueId: string): void;
saveEvent(eventName: string, callback: GlobalCallbacks.Generic, eventUniqueId: string): void;
get events(): Map<string, IProviderEvent>;
get pendingEvents(): Map<string, IProviderEvent>;
get hasEvents(): boolean;
get hasPendingEvents(): boolean;
}
}
declare namespace OSFramework.OSUI.Feature {
abstract class AbstractFeature<PT, O> implements IFeature {
private _featureElem;
private _featureOptions;
private _featurePattern;
constructor(featurePattern: PT, featureElem: HTMLElement, options: O);
dispose(): void;
get featureElem(): HTMLElement;
get featureOptions(): O;
get featurePattern(): PT;
}
}
declare namespace OSFramework.OSUI.Feature {
interface IFeature extends Interface.IDisposable {
}
}
declare namespace OSFramework.OSUI.Feature.Balloon {
type BalloonOptions = {
alignment: GlobalEnum.FloatingAlignment;
allowedPlacements?: Array<GlobalEnum.FloatingPosition>;
anchorElem: HTMLElement;
arrowElem?: HTMLElement;
focusOptions?: FocusOptions;
position: GlobalEnum.FloatingPosition | GlobalEnum.Position;
shape: GlobalEnum.ShapeTypes;
useTriggerWidth?: boolean;
};
type FocusOptions = {
elemToFocusOnOpen?: HTMLElement;
focusTrapParams?: Behaviors.FocusTrapParams;
useFocus: boolean;
};
class Balloon<PT> extends AbstractFeature<PT, BalloonOptions> implements IBalloon {
private _currentFocusedElementIndex;
private _eventBodyClick;
private _eventOnKeypress;
private _eventOnWindowResize;
private _floatingInstance;
private _floatingOptions;
private _focusManagerInstance;
private _focusTrapInstance;
private _focusableBalloonElements;
private _isOpenedByApi;
private _onToggleEvent;
isOpen: boolean;
constructor(featurePattern: PT, featureElem: HTMLElement, options: BalloonOptions);
private _bodyClickCallback;
private _handleFocusBehavior;
private _manageFocusInsideBalloon;
private _onKeypressCallback;
private _onWindowResize;
private _removeEventListeners;
private _setA11YProperties;
private _setBalloonWidth;
private _setCallbacks;
private _setEventListeners;
private _toggleBalloon;
private _unsetCallbacks;
build(): void;
close(): void;
dispose(): void;
open(isOpenedByApi: boolean, arrowKeyPressed?: GlobalEnum.Keycodes.ArrowDown | GlobalEnum.Keycodes.ArrowUp): void;
setBalloonShape(shape?: GlobalEnum.ShapeTypes): void;
setFloatingBehaviour(isUpdate?: boolean): void;
setFloatingConfigs(): void;
updateFloatingConfigs(floatingConfigs?: Utils.FloatingPosition.FloatingPositionConfig): void;
updatePositionOption(position: GlobalEnum.FloatingPosition): void;
}
}
declare namespace OSFramework.OSUI.Feature.Balloon.Enum {
enum CssClasses {
IsOpen = "osui-balloon--is-open",
Pattern = "osui-balloon"
}
enum CssCustomProperties {
Shape = "--osui-balloon-shape",
Width = "--osui-balloon-width"
}
enum Properties {
AnchorId = "AnchorId",
BalloonPosition = "BalloonPosition",
BalloonShape = "BalloonShape"
}
}
declare namespace OSFramework.OSUI.Feature.Balloon {
interface IBalloon extends Feature.IFeature, Interface.IOpenable {
open(isOpenedByApi?: boolean, arrowKeyPressed?: GlobalEnum.Keycodes.ArrowDown | GlobalEnum.Keycodes.ArrowUp): void;
setBalloonShape(shape?: GlobalEnum.ShapeTypes): void;
updatePositionOption(position: GlobalEnum.FloatingPosition): void;
}
}
declare namespace OSFramework.OSUI.Helper {
function AsyncInvocation(callback: GlobalCallbacks.Generic, ...args: unknown[]): number;
function ApplySetTimeOut(callback: GlobalCallbacks.Generic, time: number, ...args: unknown[]): number;
}
declare namespace OSFramework.OSUI.Helper {
abstract class Dates {
private static _serverFormat;
static GetTimeFromDate(_date: Date): string;
static IsBeforeThan(date1: string, date2: string): boolean;
static IsNull(date: string | Date): boolean;
static IsValid(date: string): boolean;
static NormalizeDate(date: string): Date;
static NormalizeDateTime(date: string | Date, normalizeToMax: any): Date;
static SetServerDateFormat(date: string): void;
static get ServerFormat(): string;
}
}
declare namespace OSFramework.OSUI.Helper {
abstract class DeviceInfo {
private static _browser;
private static _iphoneDetails;
private static _isAndroid;
private static _isIos;
private static _isIphoneWithNotch;
private static _isNativeApp;
private static _isPwa;
private static _isTouch;
private static _operatingSystem;
private static _getOperatingSystem;
private static _getUserAgent;
private static _isChrome;
private static _isEdge;
private static _isFirefox;
private static _isIE;
private static _isKindle;
private static _isMiui;
private static _isOpera;
private static _isRtlLanguage;
private static _isSafari;
private static _isSamsung;
private static _isUC;
private static _isYandex;
static get HasAccessibilityEnabled(): boolean;
static get IsDesktop(): boolean;
static get IsPhone(): boolean;
static get IsIphoneWithNotch(): boolean;
static get IsRtlLang(): boolean;
static get IsTablet(): boolean;
static get IsPwa(): boolean;
static get IsNative(): boolean;
static get IsAndroid(): boolean;
static get IsIos(): boolean;
static get IsTouch(): boolean;
static get IsMobileDevice(): boolean;
static get NotchPosition(): GlobalEnum.Position;
static GetBrowser(userAgent?: string): GlobalEnum.Browser;
static GetDeviceOrientation(): GlobalEnum.DeviceOrientation;
static GetDeviceType(): GlobalEnum.DeviceType;
static GetOperatingSystem(userAgent?: string): GlobalEnum.MobileOS;
static RefreshOperatingSystem(): void;
}
}
declare namespace OSFramework.OSUI.Helper {
abstract class AttributeManipulation {
static Get(element: HTMLElement, attrName: string): string | undefined;
static Has(element: HTMLElement, attrName: string): boolean;
static Id(element: HTMLElement): string | undefined;
static Remove(element: HTMLElement, attrName: string): void;
static Set(element: HTMLElement, attrName: string, attrValue: boolean | number | string): void;
}
abstract class StyleManipulation {
static AddClass(element: HTMLElement, cssClass: string): void;
static ContainsClass(element: HTMLElement, cssClass: string): boolean;
static ExtendedClass(element: HTMLElement, currentCssClasses: string, newCssClass: string): void;
static GetBorderRadiusValueFromShapeType(shapeName: string): string;
static GetColorValueFromColorType(colorName: string): string;
static GetCssClasses(element: HTMLElement): Set<string>;
static GetCustomProperty(element: HTMLElement, propertyName: string): string;
static RemoveClass(element: HTMLElement, cssClass: string): void;
static RemoveStyleAttribute(element: HTMLElement, cssProperty: string): void;
static SetStyleAttribute(element: HTMLElement, cssProperty: string, ruleValue: number | string): void;
static ToggleClass(element: HTMLElement, cssClass: string): void;
}
export abstract class Dom {
static get Attribute(): typeof AttributeManipulation;
static get Styles(): typeof StyleManipulation;
static ClassSelector(element: HTMLElement | Document, cssClass: string): HTMLElement | undefined;
static Disable(element: HTMLElement): void;
static Enable(element: HTMLElement): void;
static GenerateUniqueId(): string;
static GetElementById(id: string): HTMLElement;
static GetElementByUniqueId(uniqueId: string): HTMLElement;
static GetFocusableElements(element: HTMLElement, includeTabIndexHidden?: boolean): HTMLElement[];
static IsInsidePopupWidget(element: HTMLElement): boolean;
static Move(element: HTMLElement, target: HTMLElement): void;
static SetInputValue(inputElem: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement, value: string): void;
static TagSelector(element: HTMLElement, htmlTag: string): HTMLElement | undefined;
static TagSelectorAll(element: HTMLElement | Document, htmlTag: string): HTMLElement[] | undefined;
}
export {};
}
declare namespace OSFramework.OSUI.Helper {
abstract class InvalidInputs {
private static _checkInvalidInputs;
private static _scrollToInvalidInput;
private static _searchElementId;
static FocusFirstInvalidInput(elementId: string, isSmooth: boolean, elementParentClass: string): string;
}
}
declare namespace OSFramework.OSUI.Helper {
abstract class Language {
private static _lang;
static get Lang(): string;
static get ShortLang(): string;
static Set(language: string): void;
}
}
declare namespace OSFramework.OSUI.Helper {
function LogMessage(message: string): string;
}
declare namespace OSFramework.OSUI.Helper {
abstract class A11Y {
static AriaAtomicFalse(element: HTMLElement): void;
static AriaAtomicTrue(element: HTMLElement): void;
static AriaBusyFalse(element: HTMLElement): void;
static AriaBusyTrue(element: HTMLElement): void;
static AriaControls(element: HTMLElement, targetId: string): void;
static AriaDescribedBy(element: HTMLElement, targetId: string): void;
static AriaDisabled(element: HTMLElement, isDisabled: boolean): void;
static AriaDisabledFalse(element: HTMLElement): void;
static AriaDisabledTrue(element: HTMLElement): void;
static AriaExpanded(element: HTMLElement, value: string): void;
static AriaExpandedFalse(element: HTMLElement): void;
static AriaExpandedTrue(element: HTMLElement): void;
static AriaHasPopup(element: HTMLElement, value: string): void;
static AriaHasPopupFalse(element: HTMLElement): void;
static AriaHasPopupTrue(element: HTMLElement): void;
static AriaHidden(element: HTMLElement, value: string): void;
static AriaHiddenFalse(element: HTMLElement): void;
static AriaHiddenTrue(element: HTMLElement): void;
static AriaLabel(element: HTMLElement, value: string): void;
static AriaLabelledBy(element: HTMLElement, targetId: string): void;
static AriaLiveAssertive(element: HTMLElement): void;
static AriaLiveOff(element: HTMLElement): void;
static AriaLivePolite(element: HTMLElement): void;
static AriaSelectedFalse(element: HTMLElement): void;
static AriaSelectedTrue(element: HTMLElement): void;
static AriaValueMax(element: HTMLElement, value: number): void;
static AriaValueMin(element: HTMLElement, value: number): void;
static MultiselectableFalse(element: HTMLElement): void;
static MultiselectableTrue(element: HTMLElement): void;
static RoleAlert(element: HTMLElement): void;
static RoleButton(element: HTMLElement): void;
static RoleComplementary(element: HTMLElement): void;
static RoleListbox(element: HTMLElement): void;
static RoleMenu(element: HTMLElement): void;
static RoleMenuItem(element: HTMLElement): void;
static RoleOption(element: HTMLElement): void;
static RolePresentation(element: HTMLElement): void;
static RoleProgressBar(element: HTMLElement): void;
static RoleRegion(element: HTMLElement): void;
static RoleSearch(element: HTMLElement): void;
static RoleTab(element: HTMLElement): void;
static RoleTabList(element: HTMLElement): void;
static RoleTabPanel(element: HTMLElement): void;
static RoleTooltip(element: HTMLElement): void;
static SetElementsTabIndex(state: boolean, elements: HTMLElement[]): void;
static TabIndex(element: HTMLElement, value: string): void;
static TabIndexFalse(element: HTMLElement): void;
static TabIndexTrue(element: HTMLElement): void;
}
}
declare namespace OSFramework.OSUI.Helper.MapOperation {
function FindInMap(patternName: string, patternId: string, map: Map<string, Interface.IPattern>): Interface.IPattern;
function ExportKeys(map: Map<string, Interface.IPattern>): Array<string>;
}
declare namespace OSFramework.OSUI.Helper {
abstract class SVG {
static IsValid(svgString: string): boolean;
}
}
declare namespace OSFramework.OSUI.Helper {
function Sanitize(value: string): string;
}
declare namespace OSFramework.OSUI.Helper {
abstract class Times {
static ConvertInSeconds(time: Date): number;
static IsNull(time: string): boolean;
}
}
declare namespace OSFramework.OSUI.Helper {
abstract class URL {
static GetFileTypeFromURL(url: string): string | null;
static IsImage(url: string): boolean;
static IsValid(url: string): boolean;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IBuilder {
build(): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface ICallback {
registerCallback(callback: GlobalCallbacks.OSGeneric, eventName?: string): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IChild extends IPattern {
get isFirstChild(): boolean;
set isFirstChild(value: boolean);
get isLastChild(): boolean;
set isLastChild(value: boolean);
setBlur?(): void;
setFocus?(): void;
setTabindex?(): void;
unsetTabindex?(): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IDisposable {
dispose(): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IDragEvent extends IGestureEvent {
gestureEventInstance: Event.GestureEvent.DragEvent;
setGestureEvents(onGestureStart: Event.GestureEvent.Callbacks.GestureStart, onGestureMove: Event.GestureEvent.Callbacks.GestureMove, onGestureEnd: Event.GestureEvent.Callbacks.GestureEnd): any;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IFloatable extends IOpenable {
}
}
declare namespace OSFramework.OSUI.Interface {
interface IGestureEvent {
hasGestureEvents: boolean;
removeGestureEvents(): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IOpenable {
isOpen?: boolean;
close(): void;
open(isOpenedByApi?: boolean): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IParent extends IPattern {
beNotifiedByChild(childItem: IChild, notifiedTo: string): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IPattern extends IBuilder, IDisposable, ISearchById {
isBuilt: boolean;
selfElement: HTMLElement;
uniqueId: string;
widgetId: string;
changeProperty(propertyName: string, propertyValue: unknown): void;
registerCallback(eventName: string, callback: GlobalCallbacks.OSGeneric): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IProviderPattern<P> extends Interface.IPattern {
provider: P;
providerInfo: ProviderInfo;
setProviderConfigs(newConfigs: ProviderConfigs): void;
updateProviderEvents(providerInfo: ProviderInfo): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IRenderUpdate {
updateOnRender(): void;
}
}
declare namespace OSFramework.OSUI.Interface {
interface ISearchById {
equalsToID(id: string): boolean;
}
}
declare namespace OSFramework.OSUI.Interface {
interface ISwipeEvent extends IGestureEvent {
gestureEventInstance: Event.GestureEvent.SwipeEvent;
setGestureEvents(swipeDownCallback: Event.GestureEvent.Callbacks.SwipeDown, swipeLeftCallback: Event.GestureEvent.Callbacks.SwipeLeft, swipeRightCallback: Event.GestureEvent.Callbacks.SwipeRight, swipeUpCallback: Event.GestureEvent.Callbacks.SwipeUp): any;
}
}
declare namespace OSFramework.OSUI.Patterns {
abstract class AbstractPattern<C extends AbstractConfiguration> implements Interface.IPattern {
private _configs;
private _isBuilt;
private _platformEventInitialized;
private _selfElem;
private _uniqueId;
private _widgetId;
protected isProviderBased: boolean;
constructor(uniqueId: string, configs: C);
private _setCommonHtmlElements;
private _unsetCommonHtmlElements;
protected finishBuild(): void;
protected triggerPlatformEventCallback(platFormCallback: GlobalCallbacks.OSGeneric, ...args: unknown[]): void;
protected triggerPlatformInitializedEventCallback(): void;
protected unsetGlobalCallbacks(): void;
build(): void;
changeProperty(propertyName: string, propertyValue: unknown): void;
dispose(): void;
equalsToID(patternId: string): boolean;
registerCallback(eventName: string, callback: GlobalCallbacks.OSGeneric): void;
protected get _enableAccessibility(): boolean;
get selfElement(): HTMLElement;
get isBuilt(): boolean;
get configs(): C;
get uniqueId(): string;
get widgetId(): string;
protected abstract setA11YProperties(): void;
protected abstract setCallbacks(): void;
protected abstract setHtmlElements(): void;
protected abstract unsetCallbacks(): void;
protected abstract unsetHtmlElements(): void;
}
}
declare namespace OSFramework.OSUI.Patterns {
abstract class AbstractChild<C extends AbstractConfiguration, PT extends Interface.IParent> extends AbstractPattern<C> implements Interface.IChild {
private _isFirstChild;
private _isLastChild;
private _parentId;
private _parentObject;
protected notifyParent(actionType: string): void;
protected setParentInfo(parentSelector: string, getPatternByIdAPI: Function, canBeOrphan?: boolean): void;
get isFirstChild(): boolean;
set isFirstChild(value: boolean);
get isLastChild(): boolean;
set isLastChild(value: boolean);
get parentId(): string;
get parentObject(): PT;
}
}
declare namespace OSFramework.OSUI.Patterns {
abstract class AbstractConfiguration {
ExtendedClass: string;
constructor(config: JSON);
protected validateBoolean(value: boolean | undefined, defaultValue: boolean): boolean;
protected validateDate(value: string | Date, defaultValue: string): string | Date;
protected validateInRange(value: unknown, defaultValue: unknown, ...args: unknown[]): unknown;
protected validateNumber(value: number, defaultValue: number): number;
protected validateString(value: string | undefined, defaultValue: