UNPKG

smart-webcomponents-angular

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

376 lines (375 loc) 26.4 kB
import { Window } from './../index'; import { Animation, WindowAutoCapitalize, WindowDisplayMode, WindowDropPosition, WindowFooterPosition, TabPosition, WindowResizeMode, TabSelectionMode, WindowTabCloseButtonMode, Overflow, LayoutPosition, Orientation, WindowWrap } from './../index'; import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core'; import { BaseElement } from './smart.element'; import * as i0 from "@angular/core"; export { Animation, WindowAutoCapitalize, WindowDisplayMode, WindowDropPosition, WindowFooterPosition, TabPosition, WindowResizeMode, TabSelectionMode, WindowTabCloseButtonMode, Overflow, LayoutPosition, Orientation, WindowWrap, ElementRenderMode } from './../index'; export { Smart } from './smart.element'; export { Window } from './../index'; export declare class WindowComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges { constructor(ref: ElementRef<Window>); private eventHandlers; nativeElement: Window; /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties?: {}): any; /** @description Determines if 'Add New' Tab inside the Tabs element is visible. Applicable only to TabsWindow */ get addNewTab(): boolean; set addNewTab(value: boolean); /** @description Sets or gets the animation mode. Animation is disabled when the property is set to 'none' */ get animation(): Animation | string; set animation(value: Animation | string); /** @description Determines whether and how the value should be automatically capitalized as it is entered/edited by the user. Applicable only to MultilinePromptWindow. */ get autoCapitalize(): WindowAutoCapitalize | string; set autoCapitalize(value: WindowAutoCapitalize | string); /** @description Determines whether element will auto expand when the input overflows vertically. Applicable only to MultilinePromptWindow. */ get autoExpand(): boolean; set autoExpand(value: boolean); /** @description Determines the label for the 'cancel' button inside the Prompt Window. */ get cancelLabel(): string; set cancelLabel(value: string); /** @description Determines the label for the 'Complete' button insinde the Progress Window. */ get completeLabel(): string; set completeLabel(value: string); /** @description Determines the label for the 'Confirm' button insinde the Prompt Window. */ get confirmLabel(): string; set confirmLabel(value: string); /** @description Determines if the window is collapsed or not. When collapsed the only the header of the window is visible. */ get collapsed(): boolean; set collapsed(value: boolean); /** @description When a modal window is opened, thid property determines if clicking on the mask closes the window or not. */ get closeOnMaskClick(): boolean; set closeOnMaskClick(value: boolean); /** @description Determines the data source that will be loaded to the TabsWindow. Applicable only to TabsWindow. */ get dataSource(): { label: string; content: string; }[]; set dataSource(value: { label: string; content: string; }[]); /** @description Enables or disables the window. */ get disabled(): boolean; set disabled(value: boolean); /** @description Enables or disables the window snapping feature. */ get disableSnap(): boolean; set disableSnap(value: boolean); /** @description By default the window is closing after the 'Escape' key is pressed. Set this property to true, if you want to disable that. */ get disableEscape(): boolean; set disableEscape(value: boolean); /** @description By default the window is handling keyboard keys like 'Arrows', 'Escape', etc. Set this property to true, if you want to disable that. */ get disableKeyboard(): boolean; set disableKeyboard(value: boolean); /** @description Determines how the characters are displayed inside the input. Applicable to Prompt Window. */ get displayMode(): WindowDisplayMode | string; set displayMode(value: WindowDisplayMode | string); /** @description Applicable to TabsWindow when docked inside a DockingLayout Custom Element. Determines where the window(it's tab items as well) can be dropped inside the DockingLayout. The property is an array that accepts multiple positions. Note: Positions with prefix 'layout-' are applied to the Tab item children of the TabsWidnow owner that is being dragged. The rest of the positions indicate the allowed drop position inside the hovered target(TabsWindow). Used only by jqxDockingLayout custom elements. Determines the possible drop position inside the DockingLayout. The following values are allowed. */ get dropPosition(): WindowDropPosition | string; set dropPosition(value: WindowDropPosition | string); /** @description A callback function defining the new format for the label of the Progress Bar. Applicable only to ProgressWindow. */ get formatFunction(): any; set formatFunction(value: any); /** @description Determines the position of the footer of the window element. */ get footerPosition(): WindowFooterPosition | string; set footerPosition(value: WindowFooterPosition | string); /** @description Determines the template for the Dialog section of the window. By default footerTemplate is null. */ get footerTemplate(): any; set footerTemplate(value: any); /** @description Set's the buttons that will be visible in the header section. */ get headerButtons(): string[]; set headerButtons(value: string[]); /** @description Determines the template for the Dialog section of the window. By default headerTemplate is null. */ get headerTemplate(): any; set headerTemplate(value: any); /** @description Determines the position of the header of the window element. */ get headerPosition(): TabPosition | string; set headerPosition(value: TabPosition | string); /** @description Sets additional helper text below the text box. The hint is visible only when the text box is focued. Applicable to Prompt Window. */ get hint(): any; set hint(value: any); /** @description Sets the value of the Progress bar to indeterminate state(null) and starts the animation. Applicable only to ProgressWindow. */ get indeterminate(): boolean; set indeterminate(value: boolean); /** @description Sets the filling direction of the Progress Bar. Applicable only to ProgressWindow. */ get inverted(): boolean; set inverted(value: boolean); /** @description The label of the window that appears in the header area. */ get label(): string; set label(value: string); /** @description When enabled the resizing operation happens live. By default it's not enabled and during resizing a highlighter around the edges of the window appears to outline the current size of the element. */ get liveResize(): boolean; set liveResize(value: boolean); /** @description Applicable only to TabsWindow when used with a DockingLayout custom element.Used only by jqxDockingLayout. Determines the owner jqxDockingLayout that the window belongs to. When the tabsWindow has been removed from a DockingLayout element, the property is used to indicate that it belongs to that particular Dockinglayout. Accepts a string, representing the ID of a jqxDockingLayout on the page, or an instance of jqxDokcingLayout. */ get layout(): any; set layout(value: any); /** @description Sets or gets the unlockKey which unlocks the product. */ get unlockKey(): string; set unlockKey(value: string); /** @description Sets or gets the language. Used in conjunction with the property messages. */ get locale(): string; set locale(value: string); /** @description Applicable only to TabsWindow when docked inside a DockingLayout Custom Element.Determines of the item can be resized or not. */ get locked(): boolean; set locked(value: boolean); /** @description Callback, related to localization module. */ get localizeFormatFunction(): any; set localizeFormatFunction(value: any); /** @description Determines if the window is maximized or not. When maximized the window covers the whole viewport. */ get maximized(): boolean; set maximized(value: boolean); /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */ get messages(): any; set messages(value: any); /** @description Determines if the window is modal or not. If true the user can only interact with the window and nothing else on the page. */ get modal(): boolean; set modal(value: boolean); /** @description Applicable to TabsWindow when docked inside a DockingLayout Custom Element. Determines the max size of the item. Applicable to Progress Window by allowing the user to specify the maximum of the ProgressBar. */ get max(): string | number | null; set max(value: string | number | null); /** @description Applicable to TabsWindow when docked inside DockingLayout Custom Element. Determines the min size of the item. Applicable to Progress Window by allowing the user to specify the minimu of the ProgressBar. */ get min(): string | number | null; set min(value: string | number | null); /** @description Determines if the window is minimized or not. When minimized the window is docked at the bottom left corner of the viewport. */ get minimized(): boolean; set minimized(value: boolean); /** @description Sets or gets the maximum number of characters that the user can enter. Applicable to Prompt/MultilinePrompt Window. */ get maxLength(): number; set maxLength(value: number); /** @description Sets or gets the minimum number of characters that the user have to enter to trigger the auto complete functionality. Applicable to Prompt/MultilinePrompt Window. */ get minLength(): number; set minLength(value: number); /** @description Determines if the window is visible or not. */ get opened(): boolean; set opened(value: boolean); /** @description Determines if the window is pinned or not. Pinned window is a window that can't be dragged but can be resized. */ get pinned(): boolean; set pinned(value: boolean); /** @description Determines the input's placeholder. Applicable to Prompt Window. */ get placeholder(): string; set placeholder(value: string); /** @description Determines the label for the Input insinde the PromptWindow. */ get promptLabel(): string; set promptLabel(value: string); /** @description If the element is readonly, users cannot interact with it. */ get readonly(): boolean; set readonly(value: boolean); /** @description When applied a resize indicator is displayed in the bottom right corner of the window and resizing operation can be initiated only from its position. */ get resizeIndicator(): boolean; set resizeIndicator(value: boolean); /** @description Determines the resizing mode of the window. Several modes are available: none - resizing is disabled. vertical - vertical resizing is allowed. horizontal - horizontal resizing is allowed. both - horizontal and vertical resizing is allowed. top - the window can only be resized from the top side. bottom - the window is resizable only from the bottom side. left - the window can be resized only from the left side. right - the window can be resized only from the right side. */ get resizeMode(): WindowResizeMode | string; set resizeMode(value: WindowResizeMode | string); /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ get rightToLeft(): boolean; set rightToLeft(value: boolean); /** @description Specifies that the user must fill the input before submitting a form with the text box.Applicable to Prompt Window. */ get required(): boolean; set required(value: boolean); /** @description Specifies the message that will appear if required is set and no value is provided in the input. Applicable to Prompt Window. */ get requiredMessage(): string; set requiredMessage(value: string); /** @description Determines whether the content of the input will be selected on focus or not. Applicable to Prompt Window. */ get selectAllOnFocus(): boolean; set selectAllOnFocus(value: boolean); /** @description Sets or gets which tab is selected. Applicable only to TabsWindow. */ get selectedIndex(): number | null; set selectedIndex(value: number | null); /** @description Determines the way the user can switch between tabs. Applicable only to TabsWindow. */ get selectionMode(): TabSelectionMode | string; set selectionMode(value: TabSelectionMode | string); /** @description Indicates the index of the last character in the current selection. Applicable only to MultilinePromptWindow. */ get selectionEnd(): number; set selectionEnd(value: number); /** @description Indicates the index to the first character in the current selection. Applicable only to MultilinePromptWindow. */ get selectionStart(): number; set selectionStart(value: number); /** @description Enables/Disabled the label for the Progress Bar. Applicable only to Progress Window. */ get showProgressValue(): boolean; set showProgressValue(value: boolean); /** @description A getter that returns the siblings (that share the same parent) of a LayoutPanel item that is docked inside a DockingLayout. The siblings are also DockingLayout items ( LayoutPanels).Applicable only to TabsWindow when docked inside a DockingLayout. */ get siblings(): any; set siblings(value: any); /** @description Applicable to TabsWindow when nested inside a DockingLayout Custom Element. Determines the size of the item. */ get size(): string; set size(value: string); /** @description Specifies whether the element is to have its spelling and grammar checked or not. Applicable only to MultilinePromptWindow. */ get spellCheck(): boolean; set spellCheck(value: boolean); /** @description Sets or gets whether close buttons are displayed inside the Tab Strip of the TabsWindow. Applicable only to TabsWindow. */ get tabCloseButtons(): boolean; set tabCloseButtons(value: boolean); /** @description Determines if the close button is visible on select or always. Applicable only to TabsWindow. */ get tabCloseButtonMode(): WindowTabCloseButtonMode | string; set tabCloseButtonMode(value: WindowTabCloseButtonMode | string); /** @description Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'. Applicable only to TabsWindow. */ get tabOverflow(): Overflow | string; set tabOverflow(value: Overflow | string); /** @description Detetmines Tab Strip is positioned of the TabsWindow. Applicable only to TabsWindow. */ get tabPosition(): TabPosition | string; set tabPosition(value: TabPosition | string); /** @description Sets or gets the position of the scroll buttons inside the Tab header of the TabsWindow. Applicable only to TabsWindow. */ get tabScrollButtonsPosition(): LayoutPosition | string; set tabScrollButtonsPosition(value: LayoutPosition | string); /** @description Sets or gets the orientation of the text in the tabs labels of the TabsWindow. Applicable only to TabsWindow. */ get tabTextOrientation(): Orientation | string; set tabTextOrientation(value: Orientation | string); /** @description Determines the theme. Theme defines the look of the element */ get theme(): string; set theme(value: string); /** @description If is set to true, the element cannot be focused. */ get unfocusable(): boolean; set unfocusable(value: boolean); /** @description Determines the value of the TextBox/ProgressBar inside the Dialog/Prompt/Progress Window */ get value(): string | number; set value(value: string | number); /** @description Determines the actual parent of the element. The window can size and move only in the area of that element. */ get windowParent(): any; set windowParent(value: any); /** @description Indicates how the input wraps text. Applicable only to MultilinePromptWindow. */ get wrap(): WindowWrap | string; set wrap(value: WindowWrap | string); /** @description This event is triggered just before the window starts opening. * @param event. The custom event. */ onOpening: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is opened( visible ). * @param event. The custom event. */ onOpen: EventEmitter<CustomEvent>; /** @description This event is triggered just before the window starts closing. * @param event. The custom event. */ onClosing: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is closed( hidden ) * @param event. The custom event. */ onClose: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is collapsed. * @param event. The custom event. */ onCollapse: EventEmitter<CustomEvent>; /** @description This event is triggered when window's dragging is ended. * @param event. The custom event. */ onDragEnd: EventEmitter<CustomEvent>; /** @description This event is triggered when window's dragging is started. * @param event. The custom event. */ onDragStart: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is expanded. * @param event. The custom event. */ onExpand: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is maximized. * @param event. The custom event. */ onMaximize: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is minimized. * @param event. The custom event. */ onMinimize: EventEmitter<CustomEvent>; /** @description This event is triggered when window's resizing is ended. * @param event. The custom event. */ onResizeEnd: EventEmitter<CustomEvent>; /** @description This event is triggered when window's resizing is started. * @param event. The custom event. */ onResizeStart: EventEmitter<CustomEvent>; /** @description This event is triggered when the window is restored to it's previous state before maximization. * @param event. The custom event. */ onRestore: EventEmitter<CustomEvent>; /** @description Appends a tabitem to the end of the list of tab items inside element. * @param {Node} node. A TabItem element that should be added to the rest of the items as the last item. * @returns {Node} */ appendChild(node: any): Promise<any>; appendChildSync(node: any): Node; /** @description Sets the window to the top level so the user can interact with it. */ bringToFront(): void; /** @description Clears the content of the Window. */ clear(): void; /** @description Closes the window. */ close(): void; /** @description Collapses the window. * @returns {HTMLElement} */ collapse(): Promise<any>; collapseSync(): HTMLElement; /** @description Makes sure a tab item is visible by scrolling to it. Applicable only to TabsWindow. * @param {number} index. The index of the tab to scroll to. */ ensureVisible(index: number): void; /** @description Expands the window after being collapsed. * @returns {any[]} */ expand(): Promise<any>; expandSync(): any[]; /** @description Inserts a new tab and an associated content section. Applicable only to TabsWindow. * @param {number} index. The index to insert a new tab at. * @param {any} details. An Object with the fields "label", "labelSize", "content" and "group". */ insert(index: number, details: any): void; /** @description Inserts the specified "smart-tab-item" node before the reference "smart-tab-item" node. Applicable only to TabsWindow. * @param {Node} newNode. The "smart-tab-item" node to insert. * @param {Node | null} referenceNode?. The "smart-tab-item" node before which newNode is inserted. * @returns {Node} */ insertBefore(newNode: any, referenceNode?: any): Promise<any>; insertBeforeSync(newNode: any, referenceNode?: any): Node; /** @description Moves the window to a new position * @param {string | number} left. Left position. For example: '100px'. * @param {string | number} top. Top position. For example: '100px'. */ move(left: string | number, top: string | number): void; /** @description Maximizes the window to fill the area. */ maximize(): void; /** @description Minimizes the window. */ minimize(): void; /** @description Opens the window */ open(): void; /** @description Pins the window. Disables window dragging. */ pin(): void; /** @description Removes a tab and its associated content section. Applicable only to TabsWindow. * @param {number} index. The index of the tab to remove. */ removeAt(index: number): void; /** @description Removes a child "smart-tab-item" node. Applicable only to TabsWindow. * @param {Node} node. The "smart-tab-item" node to remove. * @returns {Node} */ removeChild(node: any): Promise<any>; removeChildSync(node: any): Node; /** @description Restores the window to it's previous size before maximization/minimization. */ restore(): void; /** @description Selects a tab. Applicalbe only to TabsWindow elements. * @param {number} index. The index of the tab to select. */ select(index: number): void; /** @description Unpins the window. Enables window dragging. */ unpin(): void; /** @description Updates the header label. * @param {string} label. The new label of the Header. */ updateLabel(label: string): void; /** @description Updates the content. * @param {string | HTMLElement} content. The new content of the window. */ updateContent(content: string | HTMLElement): void; /** @description Updates a TAB in TAB Window and its associated content section. Applies only to TabsWindow elements. * @param {number} index. The index of the tab to update. * @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement * @param {string | HTMLElement} content. The new content of the tab. */ update(index: number, label: string, content: string | HTMLElement): void; get isRendered(): boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; /** @description Add event listeners. */ private listen; /** @description Remove event listeners. */ private unlisten; static ɵfac: i0.ɵɵFactoryDeclaration<WindowComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<WindowComponent, "smart-window, [smart-window], smart-tabs-window, smart-prompt-window, smart-multiline-prompt-window, smart-dialog-window, smart-alert-window, smart-progress-window, smart-wait-window", ["smart-window"], { "addNewTab": "addNewTab"; "animation": "animation"; "autoCapitalize": "autoCapitalize"; "autoExpand": "autoExpand"; "cancelLabel": "cancelLabel"; "completeLabel": "completeLabel"; "confirmLabel": "confirmLabel"; "collapsed": "collapsed"; "closeOnMaskClick": "closeOnMaskClick"; "dataSource": "dataSource"; "disabled": "disabled"; "disableSnap": "disableSnap"; "disableEscape": "disableEscape"; "disableKeyboard": "disableKeyboard"; "displayMode": "displayMode"; "dropPosition": "dropPosition"; "formatFunction": "formatFunction"; "footerPosition": "footerPosition"; "footerTemplate": "footerTemplate"; "headerButtons": "headerButtons"; "headerTemplate": "headerTemplate"; "headerPosition": "headerPosition"; "hint": "hint"; "indeterminate": "indeterminate"; "inverted": "inverted"; "label": "label"; "liveResize": "liveResize"; "layout": "layout"; "unlockKey": "unlockKey"; "locale": "locale"; "locked": "locked"; "localizeFormatFunction": "localizeFormatFunction"; "maximized": "maximized"; "messages": "messages"; "modal": "modal"; "max": "max"; "min": "min"; "minimized": "minimized"; "maxLength": "maxLength"; "minLength": "minLength"; "opened": "opened"; "pinned": "pinned"; "placeholder": "placeholder"; "promptLabel": "promptLabel"; "readonly": "readonly"; "resizeIndicator": "resizeIndicator"; "resizeMode": "resizeMode"; "rightToLeft": "rightToLeft"; "required": "required"; "requiredMessage": "requiredMessage"; "selectAllOnFocus": "selectAllOnFocus"; "selectedIndex": "selectedIndex"; "selectionMode": "selectionMode"; "selectionEnd": "selectionEnd"; "selectionStart": "selectionStart"; "showProgressValue": "showProgressValue"; "siblings": "siblings"; "size": "size"; "spellCheck": "spellCheck"; "tabCloseButtons": "tabCloseButtons"; "tabCloseButtonMode": "tabCloseButtonMode"; "tabOverflow": "tabOverflow"; "tabPosition": "tabPosition"; "tabScrollButtonsPosition": "tabScrollButtonsPosition"; "tabTextOrientation": "tabTextOrientation"; "theme": "theme"; "unfocusable": "unfocusable"; "value": "value"; "windowParent": "windowParent"; "wrap": "wrap"; }, { "onOpening": "onOpening"; "onOpen": "onOpen"; "onClosing": "onClosing"; "onClose": "onClose"; "onCollapse": "onCollapse"; "onDragEnd": "onDragEnd"; "onDragStart": "onDragStart"; "onExpand": "onExpand"; "onMaximize": "onMaximize"; "onMinimize": "onMinimize"; "onResizeEnd": "onResizeEnd"; "onResizeStart": "onResizeStart"; "onRestore": "onRestore"; }, never>; }