import { Branch } from './Branch'; /** * @class Panel */ export declare class Panel { root: any; branches: Branch[]; components: Record; signals: any[]; queuedContainer: any; _branchOpen: boolean; _currentBranch: any; _queue: any[]; _inlineComponentsLeft: number; _inlineQueuedContainer: any; _inlineExtraClass: string | null; _inlineContainer: any; _inlineComponents: any[]; /** * @param {Object} options * id: Id of the element * className: Add class to the element * width: Width of the panel element [fit space] * height: Height of the panel element [fit space] * style: CSS Style object to be applied to the panel */ constructor(options?: any); get(name: string): any; getValue(name: string): any; setValue(name: string, value: any, skipCallback?: boolean): any; /** * @method attach * @param {Element} content child element to append to panel */ attach(content: any): void; /** * @method clear */ clear(): void; /** * @method sameLine * @param {Number} numberOfComponents Of components that will be placed in the same line * @param {String} className Extra class to customize inline components parent container * @description Next N components will be in the same line. If no number, it will inline all until calling nextLine() */ sameLine(numberOfComponents: number, className?: string): void; /** * @method endLine * @param {String} className Extra class to customize inline components parent container * @description Stop inlining components. Use it only if the number of components to be inlined is NOT specified. */ endLine(className?: string | null): void; /** * @method branch * @param {String} name Name of the branch/section * @param {Object} options * id: Id of the branch * className: Add class to the branch * closed: Set branch collapsed/opened [false] * icon: Set branch icon (LX.ICONS) * filter: Allow filter components in branch by name [false] */ branch(name: string, options?: any): Branch; merge(): void; _pick(arg: any, def: any): any; _attachComponent(component: any, options?: any): any; _addFilter(placeholder: string, options?: any): any; _searchComponents(branchName: string, value: string): void; /** * @method getBranch * @param {String} name if null, return current branch */ getBranch(name: string): any; /** * @method queue * @param {HTMLElement} domEl container to append elements to */ queue(domEl: any): void; /** * @method clearQueue */ clearQueue(): void; /** * @method addSeparator */ addSeparator(): void; /** * @method addTitle * @param {String} name Title name * @param {Object} options: * link: Href in case title is an hyperlink * target: Target name of the iframe (if any) * icon: Name of the icon (if any) * iconColor: Color of title icon (if any) * style: CSS to override */ addTitle(name: string, options?: any): any; /** * @method addText * @param {String} name Component name * @param {String} value Text value * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * disabled: Make the component disabled [false] * required: Make the input required * placeholder: Add input placeholder * icon: Icon (if any) to append at the input start * pattern: Regular expression that value must match * trigger: Choose onchange trigger (default, input) [default] * inputWidth: Width of the text input * fit: Input widts fits content [false] * inputClass: Class to add to the native input element * skipReset: Don't add the reset value button when value changes * float: Justify input text content * justifyName: Justify name content */ addText(name: string | null, value: string, callback: any, options?: any): any; /** * @method addTextArea * @param {String} name Component name * @param {String} value Text Area value * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * disabled: Make the component disabled [false] * placeholder: Add input placeholder * resize: Allow resize [true] * trigger: Choose onchange trigger (default, input) [default] * inputWidth: Width of the text input * float: Justify input text content * justifyName: Justify name content * fitHeight: Height adapts to text */ addTextArea(name: string | null, value: string, callback: any, options?: any): any; /** * @method addLabel * @param {String} value Information string * @param {Object} options Text options */ addLabel(value: string, options?: any): any; /** * @method addDescription * @param {String} value Information string * @param {Object} options Text options */ addDescription(value: string, options?: any): any; /** * @method addButton * @param {String} name Component name * @param {String} value Button name * @param {Function} callback Callback function on click * @param {Object} options: * hideName: Don't use name as label [false] * disabled: Make the component disabled [false] * icon: Icon class to show as button value * iconPosition: Icon position (cover|start|end) * fileInput: Button click requests a file * fileInputType: Type of the requested file * img: Path to image to show as button value * title: Text to show in native Element title * buttonClass: Class to add to the native button element * mustConfirm: User must confirm trigger in a popover */ addButton(name: string | null, value: string, callback: any, options?: any): any; /** * @method addComboButtons * @param {String} name Component name * @param {Array} values Each of the {value, callback, selected, disabled} items * @param {Object} options: * hideName: Don't use name as label [false] * float: Justify content (left, center, right) [center] * selected: Selected button by default (String|Array) * noSelection: Buttons can be clicked, but they are not selectable * toggle: Buttons can be toggled insted of selecting only one */ addComboButtons(name: string, values: any[], options?: any): any; /** * @method addCard * @param {String} name * @param {Object} options */ addCard(name: string, options?: any): any; /** * @method addEmpty * @param {String} name * @param {Object} options */ addEmpty(name: string, options?: any): any; /** * @method addForm * @param {String} name Component name * @param {Object} data Form data * @param {Function} callback Callback function on submit form * @param {Object} options: * primaryActionName: Text to be shown in the primary action button ['Submit'] * primaryButtonClass: Button class for primary action button ['primary'] * secondaryActionName: Text to be shown in the secondary action button ['Cancel'] * secondaryActionCallback: Callback function on press secondary button * secondaryButtonClass: Button class for secondary action button ['primary'] * skipLabels: Do not show input field labels [false] */ addForm(name: string, data: any, callback: any, options?: any): any; /** * @method addContent * @param {String} name Component name * @param {HTMLElement/String} element * @param {Object} options */ addContent(name: string, element: any, options?: any): any; /** * @method addImage * @param {String} name Component name * @param {String} url Image Url * @param {Object} options * hideName: Don't use name as label [false] */ addImage(name: string, url: string, options?: any): Promise; /** * @method addSelect * @param {String} name Component name * @param {Array} values Posible options of the select component -> String (for default select) or Object = {value, url} (for images, gifs..) * @param {String} value Select by default option * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * filter: Add a search bar to the component [false] * disabled: Make the component disabled [false] * skipReset: Don't add the reset value button when value changes * placeholder: Placeholder for the filter input * emptyMsg: Custom message to show when no filtered results */ addSelect(name: string | null, values: any[], value: string, callback: any, options?: any): any; /** * @method addCurve * @param {String} name Component name * @param {Array of Array} values Array of 2N Arrays of each value of the curve * @param {Function} callback Callback function on change * @param {Object} options: * skipReset: Don't add the reset value button when value changes * bgColor: Component background color * pointsColor: Curve points color * lineColor: Curve line color * noOverlap: Points do not overlap, replacing themselves if necessary * allowAddValues: Support adding values on click * smooth: Curve smoothness * moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE) */ addCurve(name: string, values: any[], callback: any, options?: any): any; /** * @method addDial * @param {String} name Component name * @param {Array of Array} values Array of 2N Arrays of each value of the dial * @param {Function} callback Callback function on change * @param {Object} options: * skipReset: Don't add the reset value button when value changes * bgColor: Component background color * pointsColor: Curve points color * lineColor: Curve line color * noOverlap: Points do not overlap, replacing themselves if necessary * allowAddValues: Support adding values on click * smooth: Curve smoothness * moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE) */ addDial(name: string, values: any[], callback: any, options?: any): any; /** * @method addLayers * @param {String} name Component name * @param {Number} value Flag value by default option * @param {Function} callback Callback function on change * @param {Object} options: */ addLayers(name: string, value: number, callback: any, options?: any): any; /** * @method addArray * @param {String} name Component name * @param {Array} values By default values in the array * @param {Function} callback Callback function on change * @param {Object} options: * innerValues (Array): Use select mode and use values as options */ addArray(name: string, values: any[] | undefined, callback: any, options?: any): any; /** * @method addList * @param {String} name Component name * @param {Array} values List values * @param {String} value Selected list value * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] */ addList(name: string, values: any[], value: any, callback: any, options?: any): any; /** * @method addTags * @param {String} name Component name * @param {String} value Comma separated tags * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] */ addTags(name: string, value: string, callback: any, options?: any): any; /** * @method addCheckbox * @param {String} name Component name * @param {Boolean} value Value of the checkbox * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * label: Checkbox label * suboptions: Callback to add components in case of TRUE value * className: Extra classes to customize style */ addCheckbox(name: string | null, value: boolean, callback: any, options?: any): any; /** * @method addToggle * @param {String} name Component name * @param {Boolean} value Value of the checkbox * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * label: Toggle label * suboptions: Callback to add components in case of TRUE value * className: Customize colors */ addToggle(name: string, value: boolean, callback: any, options?: any): any; /** * @method addRadioGroup * @param {String} name Component name * @param {String} label Radio label * @param {Array} values Radio options * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * className: Customize colors * selected: Index of the default selected option */ addRadioGroup(name: string, label: string, values: any[], callback: any, options?: any): any; /** * @method addColor * @param {String} name Component name * @param {String} value Default color (hex) * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * useRGB: The callback returns color as Array (r, g, b) and not hex [false] */ addColor(name: string, value: any, callback: any, options?: any): any; /** * @method addRange * @param {String} name Component name * @param {Number} value Default number value * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * className: Extra classes to customize style * disabled: Make the component disabled [false] * left: The slider goes to the left instead of the right * fill: Fill slider progress [true] * step: Step of the input * min, max: Min and Max values for the input */ addRange(name: string, value: number, callback: any, options?: any): any; /** * @method addNumber * @param {String} name Component name * @param {Number} value Default number value * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * disabled: Make the component disabled [false] * step: Step of the input * precision: The number of digits to appear after the decimal point * min, max: Min and Max values for the input * skipSlider: If there are min and max values, skip the slider * units: Unit as string added to the end of the value * onPress: Callback function on mouse down * onRelease: Callback function on mouse up */ addNumber(name: string | null, value: number, callback: any, options?: any): any; static VECTOR_COMPONENTS: { 0: string; 1: string; 2: string; 3: string; }; _addVector(numComponents: number, name: string, value: any[], callback: any, options?: any): any; /** * @method addVector N (2, 3, 4) * @param {String} name Component name * @param {Array} value Array of N components * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * step: Step of the inputs * min, max: Min and Max values for the inputs * onPress: Callback function on mouse down * onRelease: Callback function on mouse is released */ addVector2(name: string, value: any[], callback: any, options: any): any; addVector3(name: string, value: any[], callback: any, options: any): any; addVector4(name: string, value: any[], callback: any, options: any): any; /** * @method addSize * @param {String} name Component name * @param {Number} value Default number value * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * disabled: Make the component disabled [false] * units: Unit as string added to the end of the value */ addSize(name: string, value: any, callback: any, options?: any): any; /** * @method addOTP * @param {String} name Component name * @param {String} value Default numeric value in string format * @param {Function} callback Callback function on change * @param {Object} options: * hideName: Don't use name as label [false] * disabled: Make the component disabled [false] * pattern: OTP numeric pattern */ addOTP(name: string, value: string, callback: any, options?: any): any; /** * @method addPad * @param {String} name Component name * @param {Array} value Pad value * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * min, max: Min and Max values * padSize: Size of the pad (css) * onPress: Callback function on mouse down * onRelease: Callback function on mouse up */ addPad(name: string, value: any[], callback: any, options?: any): any; /** * @method addProgress * @param {String} name Component name * @param {Number} value Progress value * @param {Object} options: * min, max: Min and Max values * low, optimum, high: Low and High boundary values, Optimum point in the range * showValue: Show current value * editable: Allow edit value * callback: Function called on change value */ addProgress(name: string, value: number, options?: any): any; /** * @method addFile * @param {String} name Component name * @param {Function} callback Callback function on change * @param {Object} options: * local: Ask for local file * disabled: Make the component disabled [false] * read: Return the file itself (False) or the contents (True) * type: type to read as [text (Default), buffer, bin, url] */ addFile(name: string, callback: any, options?: any): any; /** * @method addTree * @param {String} name Component name * @param {Object} data Data of the tree * @param {Object} options: * icons: Array of objects with icon button information {name, icon, callback} * filter: Add nodes filter [true] * rename: Boolean to allow rename [true] * onevent(tree_event): Called when node is selected, dbl clicked, contextmenu opened, changed visibility, parent or name */ addTree(name: string, data: any, options?: any): any; /** * @method addTabSections * @param {String} name Component name * @param {Array} tabs Contains objects with { * name: Name of the tab (if icon, use as title) * icon: Icon to be used as the tab icon (optional) * iconClass: Class to be added to the icon (optional) * svgClass: Class to be added to the inner SVG of the icon (optional) * onCreate: Func to be called at tab creation * onSelect: Func to be called on select tab (optional) * } * @param {Object} options * vertical: Use vertical or horizontal tabs (vertical by default) * showNames: Show tab name only in horizontal tabs */ addTabSections(name: string, tabs: any[], options?: any): any; /** * @method addCounter * @param {String} name Component name * @param {Number} value Counter value * @param {Function} callback Callback function on change * @param {Object} options: * disabled: Make the component disabled [false] * min, max: Min and Max values * step: Step for adding/substracting */ addCounter(name: string, value: number, callback: any, options?: any): any; /** * @method addTable * @param {String} name Component name * @param {Number} data Table data * @param {Object} options: * hideName: Don't use name as label [false] * head: Table headers (each of the headers per column) * body: Table body (data per row for each column) * rowActions: Allow to add actions per row * onMenuAction: Function callback to fill the "menu" context * selectable: Each row can be selected * sortable: Rows can be sorted by the user manually * centered: Center text within columns. true for all, Array for center selected cols * toggleColumns: Columns visibility can be toggled * filter: Name of the column to filter by text input (if any) * filterValue: Initial filter value * customFilters: Add selectors to filter by specific option values */ addTable(name: string, data: any, options?: any): any; /** * @method addDate * @param {String} name Component name * @param {String} dateValue * @param {Function} callback * @param {Object} options: * hideName: Don't use name as label [false] * today: Set current day as selected by default * untilToday: Allow dates only until current day * fromToday: Allow dates only from current day */ addDate(name: string, dateValue: string, callback: any, options?: any): any; /** * @method addMap2D * @param {String} name Component name * @param {Array} points * @param {Function} callback * @param {Object} options: */ addMap2D(name: string, points: any[], callback: any, options?: any): any; /** * @method addRate * @param {String} name Component name * @param {Number} value * @param {Function} callback * @param {Object} options: */ addRate(name: string, value: number, callback: any, options?: any): any; }