lexgui 8.4.0 → 8.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,545 +1,545 @@
1
- import { Branch } from './Branch';
2
- /**
3
- * @class Panel
4
- */
5
- export declare class Panel {
6
- root: any;
7
- branches: Branch[];
8
- components: Record<string, any>;
9
- signals: any[];
10
- queuedContainer: any;
11
- _branchOpen: boolean;
12
- _currentBranch: any;
13
- _queue: any[];
14
- _inlineComponentsLeft: number;
15
- _inlineQueuedContainer: any;
16
- _inlineExtraClass: string | null;
17
- _inlineContainer: any;
18
- _inlineComponents: any[];
19
- /**
20
- * @param {Object} options
21
- * id: Id of the element
22
- * className: Add class to the element
23
- * width: Width of the panel element [fit space]
24
- * height: Height of the panel element [fit space]
25
- * style: CSS Style object to be applied to the panel
26
- */
27
- constructor(options?: any);
28
- get(name: string): any;
29
- getValue(name: string): any;
30
- setValue(name: string, value: any, skipCallback?: boolean): any;
31
- /**
32
- * @method attach
33
- * @param {Element} content child element to append to panel
34
- */
35
- attach(content: any): void;
36
- /**
37
- * @method clear
38
- */
39
- clear(): void;
40
- /**
41
- * @method sameLine
42
- * @param {Number} numberOfComponents Of components that will be placed in the same line
43
- * @param {String} className Extra class to customize inline components parent container
44
- * @description Next N components will be in the same line. If no number, it will inline all until calling nextLine()
45
- */
46
- sameLine(numberOfComponents: number, className?: string): void;
47
- /**
48
- * @method endLine
49
- * @param {String} className Extra class to customize inline components parent container
50
- * @description Stop inlining components. Use it only if the number of components to be inlined is NOT specified.
51
- */
52
- endLine(className?: string | null): void;
53
- /**
54
- * @method branch
55
- * @param {String} name Name of the branch/section
56
- * @param {Object} options
57
- * id: Id of the branch
58
- * className: Add class to the branch
59
- * closed: Set branch collapsed/opened [false]
60
- * icon: Set branch icon (LX.ICONS)
61
- * filter: Allow filter components in branch by name [false]
62
- */
63
- branch(name: string, options?: any): Branch;
64
- merge(): void;
65
- _pick(arg: any, def: any): any;
66
- _attachComponent(component: any, options?: any): any;
67
- _addFilter(placeholder: string, options?: any): any;
68
- _searchComponents(branchName: string, value: string): void;
69
- /**
70
- * @method getBranch
71
- * @param {String} name if null, return current branch
72
- */
73
- getBranch(name: string): any;
74
- /**
75
- * @method queue
76
- * @param {HTMLElement} domEl container to append elements to
77
- */
78
- queue(domEl: any): void;
79
- /**
80
- * @method clearQueue
81
- */
82
- clearQueue(): void;
83
- /**
84
- * @method addSeparator
85
- */
86
- addSeparator(): void;
87
- /**
88
- * @method addTitle
89
- * @param {String} name Title name
90
- * @param {Object} options:
91
- * link: Href in case title is an hyperlink
92
- * target: Target name of the iframe (if any)
93
- * icon: Name of the icon (if any)
94
- * iconColor: Color of title icon (if any)
95
- * style: CSS to override
96
- */
97
- addTitle(name: string, options?: any): any;
98
- /**
99
- * @method addText
100
- * @param {String} name Component name
101
- * @param {String} value Text value
102
- * @param {Function} callback Callback function on change
103
- * @param {Object} options:
104
- * hideName: Don't use name as label [false]
105
- * disabled: Make the component disabled [false]
106
- * required: Make the input required
107
- * placeholder: Add input placeholder
108
- * icon: Icon (if any) to append at the input start
109
- * pattern: Regular expression that value must match
110
- * trigger: Choose onchange trigger (default, input) [default]
111
- * inputWidth: Width of the text input
112
- * fit: Input widts fits content [false]
113
- * inputClass: Class to add to the native input element
114
- * skipReset: Don't add the reset value button when value changes
115
- * float: Justify input text content
116
- * justifyName: Justify name content
117
- */
118
- addText(name: string | null, value: string, callback: any, options?: any): any;
119
- /**
120
- * @method addTextArea
121
- * @param {String} name Component name
122
- * @param {String} value Text Area value
123
- * @param {Function} callback Callback function on change
124
- * @param {Object} options:
125
- * hideName: Don't use name as label [false]
126
- * disabled: Make the component disabled [false]
127
- * placeholder: Add input placeholder
128
- * resize: Allow resize [true]
129
- * trigger: Choose onchange trigger (default, input) [default]
130
- * inputWidth: Width of the text input
131
- * float: Justify input text content
132
- * justifyName: Justify name content
133
- * fitHeight: Height adapts to text
134
- */
135
- addTextArea(name: string | null, value: string, callback: any, options?: any): any;
136
- /**
137
- * @method addLabel
138
- * @param {String} value Information string
139
- * @param {Object} options Text options
140
- */
141
- addLabel(value: string, options?: any): any;
142
- /**
143
- * @method addDescription
144
- * @param {String} value Information string
145
- * @param {Object} options Text options
146
- */
147
- addDescription(value: string, options?: any): any;
148
- /**
149
- * @method addButton
150
- * @param {String} name Component name
151
- * @param {String} value Button name
152
- * @param {Function} callback Callback function on click
153
- * @param {Object} options:
154
- * hideName: Don't use name as label [false]
155
- * disabled: Make the component disabled [false]
156
- * icon: Icon class to show as button value
157
- * iconPosition: Icon position (cover|start|end)
158
- * fileInput: Button click requests a file
159
- * fileInputType: Type of the requested file
160
- * img: Path to image to show as button value
161
- * title: Text to show in native Element title
162
- * buttonClass: Class to add to the native button element
163
- * mustConfirm: User must confirm trigger in a popover
164
- */
165
- addButton(name: string | null, value: string, callback: any, options?: any): any;
166
- /**
167
- * @method addComboButtons
168
- * @param {String} name Component name
169
- * @param {Array} values Each of the {value, callback, selected, disabled} items
170
- * @param {Object} options:
171
- * hideName: Don't use name as label [false]
172
- * float: Justify content (left, center, right) [center]
173
- * selected: Selected button by default (String|Array)
174
- * noSelection: Buttons can be clicked, but they are not selectable
175
- * toggle: Buttons can be toggled insted of selecting only one
176
- */
177
- addComboButtons(name: string, values: any[], options?: any): any;
178
- /**
179
- * @method addCard
180
- * @param {String} name
181
- * @param {Object} options
182
- */
183
- addCard(name: string, options?: any): any;
184
- /**
185
- * @method addEmpty
186
- * @param {String} name
187
- * @param {Object} options
188
- */
189
- addEmpty(name: string, options?: any): any;
190
- /**
191
- * @method addForm
192
- * @param {String} name Component name
193
- * @param {Object} data Form data
194
- * @param {Function} callback Callback function on submit form
195
- * @param {Object} options:
196
- * primaryActionName: Text to be shown in the primary action button ['Submit']
197
- * primaryButtonClass: Button class for primary action button ['primary']
198
- * secondaryActionName: Text to be shown in the secondary action button ['Cancel']
199
- * secondaryActionCallback: Callback function on press secondary button
200
- * secondaryButtonClass: Button class for secondary action button ['primary']
201
- * skipLabels: Do not show input field labels [false]
202
- */
203
- addForm(name: string, data: any, callback: any, options?: any): any;
204
- /**
205
- * @method addContent
206
- * @param {String} name Component name
207
- * @param {HTMLElement/String} element
208
- * @param {Object} options
209
- */
210
- addContent(name: string, element: any, options?: any): any;
211
- /**
212
- * @method addImage
213
- * @param {String} name Component name
214
- * @param {String} url Image Url
215
- * @param {Object} options
216
- * hideName: Don't use name as label [false]
217
- */
218
- addImage(name: string, url: string, options?: any): Promise<any>;
219
- /**
220
- * @method addSelect
221
- * @param {String} name Component name
222
- * @param {Array} values Posible options of the select component -> String (for default select) or Object = {value, url} (for images, gifs..)
223
- * @param {String} value Select by default option
224
- * @param {Function} callback Callback function on change
225
- * @param {Object} options:
226
- * hideName: Don't use name as label [false]
227
- * filter: Add a search bar to the component [false]
228
- * disabled: Make the component disabled [false]
229
- * skipReset: Don't add the reset value button when value changes
230
- * placeholder: Placeholder for the filter input
231
- * emptyMsg: Custom message to show when no filtered results
232
- */
233
- addSelect(name: string | null, values: any[], value: string, callback: any, options?: any): any;
234
- /**
235
- * @method addCurve
236
- * @param {String} name Component name
237
- * @param {Array of Array} values Array of 2N Arrays of each value of the curve
238
- * @param {Function} callback Callback function on change
239
- * @param {Object} options:
240
- * skipReset: Don't add the reset value button when value changes
241
- * bgColor: Component background color
242
- * pointsColor: Curve points color
243
- * lineColor: Curve line color
244
- * noOverlap: Points do not overlap, replacing themselves if necessary
245
- * allowAddValues: Support adding values on click
246
- * smooth: Curve smoothness
247
- * moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
248
- */
249
- addCurve(name: string, values: any[], callback: any, options?: any): any;
250
- /**
251
- * @method addDial
252
- * @param {String} name Component name
253
- * @param {Array of Array} values Array of 2N Arrays of each value of the dial
254
- * @param {Function} callback Callback function on change
255
- * @param {Object} options:
256
- * skipReset: Don't add the reset value button when value changes
257
- * bgColor: Component background color
258
- * pointsColor: Curve points color
259
- * lineColor: Curve line color
260
- * noOverlap: Points do not overlap, replacing themselves if necessary
261
- * allowAddValues: Support adding values on click
262
- * smooth: Curve smoothness
263
- * moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
264
- */
265
- addDial(name: string, values: any[], callback: any, options?: any): any;
266
- /**
267
- * @method addLayers
268
- * @param {String} name Component name
269
- * @param {Number} value Flag value by default option
270
- * @param {Function} callback Callback function on change
271
- * @param {Object} options:
272
- */
273
- addLayers(name: string, value: number, callback: any, options?: any): any;
274
- /**
275
- * @method addArray
276
- * @param {String} name Component name
277
- * @param {Array} values By default values in the array
278
- * @param {Function} callback Callback function on change
279
- * @param {Object} options:
280
- * innerValues (Array): Use select mode and use values as options
281
- */
282
- addArray(name: string, values: any[] | undefined, callback: any, options?: any): any;
283
- /**
284
- * @method addList
285
- * @param {String} name Component name
286
- * @param {Array} values List values
287
- * @param {String} value Selected list value
288
- * @param {Function} callback Callback function on change
289
- * @param {Object} options:
290
- * hideName: Don't use name as label [false]
291
- */
292
- addList(name: string, values: any[], value: any, callback: any, options?: any): any;
293
- /**
294
- * @method addTags
295
- * @param {String} name Component name
296
- * @param {String} value Comma separated tags
297
- * @param {Function} callback Callback function on change
298
- * @param {Object} options:
299
- * hideName: Don't use name as label [false]
300
- */
301
- addTags(name: string, value: string, callback: any, options?: any): any;
302
- /**
303
- * @method addCheckbox
304
- * @param {String} name Component name
305
- * @param {Boolean} value Value of the checkbox
306
- * @param {Function} callback Callback function on change
307
- * @param {Object} options:
308
- * disabled: Make the component disabled [false]
309
- * label: Checkbox label
310
- * suboptions: Callback to add components in case of TRUE value
311
- * className: Extra classes to customize style
312
- */
313
- addCheckbox(name: string | null, value: boolean, callback: any, options?: any): any;
314
- /**
315
- * @method addToggle
316
- * @param {String} name Component name
317
- * @param {Boolean} value Value of the checkbox
318
- * @param {Function} callback Callback function on change
319
- * @param {Object} options:
320
- * disabled: Make the component disabled [false]
321
- * label: Toggle label
322
- * suboptions: Callback to add components in case of TRUE value
323
- * className: Customize colors
324
- */
325
- addToggle(name: string, value: boolean, callback: any, options?: any): any;
326
- /**
327
- * @method addRadioGroup
328
- * @param {String} name Component name
329
- * @param {String} label Radio label
330
- * @param {Array} values Radio options
331
- * @param {Function} callback Callback function on change
332
- * @param {Object} options:
333
- * disabled: Make the component disabled [false]
334
- * className: Customize colors
335
- * selected: Index of the default selected option
336
- */
337
- addRadioGroup(name: string, label: string, values: any[], callback: any, options?: any): any;
338
- /**
339
- * @method addColor
340
- * @param {String} name Component name
341
- * @param {String} value Default color (hex)
342
- * @param {Function} callback Callback function on change
343
- * @param {Object} options:
344
- * disabled: Make the component disabled [false]
345
- * useRGB: The callback returns color as Array (r, g, b) and not hex [false]
346
- */
347
- addColor(name: string, value: any, callback: any, options?: any): any;
348
- /**
349
- * @method addRange
350
- * @param {String} name Component name
351
- * @param {Number} value Default number value
352
- * @param {Function} callback Callback function on change
353
- * @param {Object} options:
354
- * hideName: Don't use name as label [false]
355
- * className: Extra classes to customize style
356
- * disabled: Make the component disabled [false]
357
- * left: The slider goes to the left instead of the right
358
- * fill: Fill slider progress [true]
359
- * step: Step of the input
360
- * min, max: Min and Max values for the input
361
- */
362
- addRange(name: string, value: number, callback: any, options?: any): any;
363
- /**
364
- * @method addNumber
365
- * @param {String} name Component name
366
- * @param {Number} value Default number value
367
- * @param {Function} callback Callback function on change
368
- * @param {Object} options:
369
- * hideName: Don't use name as label [false]
370
- * disabled: Make the component disabled [false]
371
- * step: Step of the input
372
- * precision: The number of digits to appear after the decimal point
373
- * min, max: Min and Max values for the input
374
- * skipSlider: If there are min and max values, skip the slider
375
- * units: Unit as string added to the end of the value
376
- * onPress: Callback function on mouse down
377
- * onRelease: Callback function on mouse up
378
- */
379
- addNumber(name: string | null, value: number, callback: any, options?: any): any;
380
- static VECTOR_COMPONENTS: {
381
- 0: string;
382
- 1: string;
383
- 2: string;
384
- 3: string;
385
- };
386
- _addVector(numComponents: number, name: string, value: any[], callback: any, options?: any): any;
387
- /**
388
- * @method addVector N (2, 3, 4)
389
- * @param {String} name Component name
390
- * @param {Array} value Array of N components
391
- * @param {Function} callback Callback function on change
392
- * @param {Object} options:
393
- * disabled: Make the component disabled [false]
394
- * step: Step of the inputs
395
- * min, max: Min and Max values for the inputs
396
- * onPress: Callback function on mouse down
397
- * onRelease: Callback function on mouse is released
398
- */
399
- addVector2(name: string, value: any[], callback: any, options: any): any;
400
- addVector3(name: string, value: any[], callback: any, options: any): any;
401
- addVector4(name: string, value: any[], callback: any, options: any): any;
402
- /**
403
- * @method addSize
404
- * @param {String} name Component name
405
- * @param {Number} value Default number value
406
- * @param {Function} callback Callback function on change
407
- * @param {Object} options:
408
- * hideName: Don't use name as label [false]
409
- * disabled: Make the component disabled [false]
410
- * units: Unit as string added to the end of the value
411
- */
412
- addSize(name: string, value: any, callback: any, options?: any): any;
413
- /**
414
- * @method addOTP
415
- * @param {String} name Component name
416
- * @param {String} value Default numeric value in string format
417
- * @param {Function} callback Callback function on change
418
- * @param {Object} options:
419
- * hideName: Don't use name as label [false]
420
- * disabled: Make the component disabled [false]
421
- * pattern: OTP numeric pattern
422
- */
423
- addOTP(name: string, value: string, callback: any, options?: any): any;
424
- /**
425
- * @method addPad
426
- * @param {String} name Component name
427
- * @param {Array} value Pad value
428
- * @param {Function} callback Callback function on change
429
- * @param {Object} options:
430
- * disabled: Make the component disabled [false]
431
- * min, max: Min and Max values
432
- * padSize: Size of the pad (css)
433
- * onPress: Callback function on mouse down
434
- * onRelease: Callback function on mouse up
435
- */
436
- addPad(name: string, value: any[], callback: any, options?: any): any;
437
- /**
438
- * @method addProgress
439
- * @param {String} name Component name
440
- * @param {Number} value Progress value
441
- * @param {Object} options:
442
- * min, max: Min and Max values
443
- * low, optimum, high: Low and High boundary values, Optimum point in the range
444
- * showValue: Show current value
445
- * editable: Allow edit value
446
- * callback: Function called on change value
447
- */
448
- addProgress(name: string, value: number, options?: any): any;
449
- /**
450
- * @method addFile
451
- * @param {String} name Component name
452
- * @param {Function} callback Callback function on change
453
- * @param {Object} options:
454
- * local: Ask for local file
455
- * disabled: Make the component disabled [false]
456
- * read: Return the file itself (False) or the contents (True)
457
- * type: type to read as [text (Default), buffer, bin, url]
458
- */
459
- addFile(name: string, callback: any, options?: any): any;
460
- /**
461
- * @method addTree
462
- * @param {String} name Component name
463
- * @param {Object} data Data of the tree
464
- * @param {Object} options:
465
- * icons: Array of objects with icon button information {name, icon, callback}
466
- * filter: Add nodes filter [true]
467
- * rename: Boolean to allow rename [true]
468
- * onevent(tree_event): Called when node is selected, dbl clicked, contextmenu opened, changed visibility, parent or name
469
- */
470
- addTree(name: string, data: any, options?: any): any;
471
- /**
472
- * @method addTabSections
473
- * @param {String} name Component name
474
- * @param {Array} tabs Contains objects with {
475
- * name: Name of the tab (if icon, use as title)
476
- * icon: Icon to be used as the tab icon (optional)
477
- * iconClass: Class to be added to the icon (optional)
478
- * svgClass: Class to be added to the inner SVG of the icon (optional)
479
- * onCreate: Func to be called at tab creation
480
- * onSelect: Func to be called on select tab (optional)
481
- * }
482
- * @param {Object} options
483
- * vertical: Use vertical or horizontal tabs (vertical by default)
484
- * showNames: Show tab name only in horizontal tabs
485
- */
486
- addTabSections(name: string, tabs: any[], options?: any): any;
487
- /**
488
- * @method addCounter
489
- * @param {String} name Component name
490
- * @param {Number} value Counter value
491
- * @param {Function} callback Callback function on change
492
- * @param {Object} options:
493
- * disabled: Make the component disabled [false]
494
- * min, max: Min and Max values
495
- * step: Step for adding/substracting
496
- */
497
- addCounter(name: string, value: number, callback: any, options?: any): any;
498
- /**
499
- * @method addTable
500
- * @param {String} name Component name
501
- * @param {Number} data Table data
502
- * @param {Object} options:
503
- * hideName: Don't use name as label [false]
504
- * head: Table headers (each of the headers per column)
505
- * body: Table body (data per row for each column)
506
- * rowActions: Allow to add actions per row
507
- * onMenuAction: Function callback to fill the "menu" context
508
- * selectable: Each row can be selected
509
- * sortable: Rows can be sorted by the user manually
510
- * centered: Center text within columns. true for all, Array for center selected cols
511
- * toggleColumns: Columns visibility can be toggled
512
- * filter: Name of the column to filter by text input (if any)
513
- * filterValue: Initial filter value
514
- * customFilters: Add selectors to filter by specific option values
515
- */
516
- addTable(name: string, data: any, options?: any): any;
517
- /**
518
- * @method addDate
519
- * @param {String} name Component name
520
- * @param {String} dateValue
521
- * @param {Function} callback
522
- * @param {Object} options:
523
- * hideName: Don't use name as label [false]
524
- * today: Set current day as selected by default
525
- * untilToday: Allow dates only until current day
526
- * fromToday: Allow dates only from current day
527
- */
528
- addDate(name: string, dateValue: string, callback: any, options?: any): any;
529
- /**
530
- * @method addMap2D
531
- * @param {String} name Component name
532
- * @param {Array} points
533
- * @param {Function} callback
534
- * @param {Object} options:
535
- */
536
- addMap2D(name: string, points: any[], callback: any, options?: any): any;
537
- /**
538
- * @method addRate
539
- * @param {String} name Component name
540
- * @param {Number} value
541
- * @param {Function} callback
542
- * @param {Object} options:
543
- */
544
- addRate(name: string, value: number, callback: any, options?: any): any;
545
- }
1
+ import { Branch } from './Branch';
2
+ /**
3
+ * @class Panel
4
+ */
5
+ export declare class Panel {
6
+ root: any;
7
+ branches: Branch[];
8
+ components: Record<string, any>;
9
+ signals: any[];
10
+ queuedContainer: any;
11
+ _branchOpen: boolean;
12
+ _currentBranch: any;
13
+ _queue: any[];
14
+ _inlineComponentsLeft: number;
15
+ _inlineQueuedContainer: any;
16
+ _inlineExtraClass: string | null;
17
+ _inlineContainer: any;
18
+ _inlineComponents: any[];
19
+ /**
20
+ * @param {Object} options
21
+ * id: Id of the element
22
+ * className: Add class to the element
23
+ * width: Width of the panel element [fit space]
24
+ * height: Height of the panel element [fit space]
25
+ * style: CSS Style object to be applied to the panel
26
+ */
27
+ constructor(options?: any);
28
+ get(name: string): any;
29
+ getValue(name: string): any;
30
+ setValue(name: string, value: any, skipCallback?: boolean): any;
31
+ /**
32
+ * @method attach
33
+ * @param {Element} content child element to append to panel
34
+ */
35
+ attach(content: any): void;
36
+ /**
37
+ * @method clear
38
+ */
39
+ clear(): void;
40
+ /**
41
+ * @method sameLine
42
+ * @param {Number} numberOfComponents Of components that will be placed in the same line
43
+ * @param {String} className Extra class to customize inline components parent container
44
+ * @description Next N components will be in the same line. If no number, it will inline all until calling nextLine()
45
+ */
46
+ sameLine(numberOfComponents: number, className?: string): void;
47
+ /**
48
+ * @method endLine
49
+ * @param {String} className Extra class to customize inline components parent container
50
+ * @description Stop inlining components. Use it only if the number of components to be inlined is NOT specified.
51
+ */
52
+ endLine(className?: string | null): void;
53
+ /**
54
+ * @method branch
55
+ * @param {String} name Name of the branch/section
56
+ * @param {Object} options
57
+ * id: Id of the branch
58
+ * className: Add class to the branch
59
+ * closed: Set branch collapsed/opened [false]
60
+ * icon: Set branch icon (LX.ICONS)
61
+ * filter: Allow filter components in branch by name [false]
62
+ */
63
+ branch(name: string, options?: any): Branch;
64
+ merge(): void;
65
+ _pick(arg: any, def: any): any;
66
+ _attachComponent(component: any, options?: any): any;
67
+ _addFilter(placeholder: string, options?: any): any;
68
+ _searchComponents(branchName: string, value: string): void;
69
+ /**
70
+ * @method getBranch
71
+ * @param {String} name if null, return current branch
72
+ */
73
+ getBranch(name: string): any;
74
+ /**
75
+ * @method queue
76
+ * @param {HTMLElement} domEl container to append elements to
77
+ */
78
+ queue(domEl: any): void;
79
+ /**
80
+ * @method clearQueue
81
+ */
82
+ clearQueue(): void;
83
+ /**
84
+ * @method addSeparator
85
+ */
86
+ addSeparator(): void;
87
+ /**
88
+ * @method addTitle
89
+ * @param {String} name Title name
90
+ * @param {Object} options:
91
+ * link: Href in case title is an hyperlink
92
+ * target: Target name of the iframe (if any)
93
+ * icon: Name of the icon (if any)
94
+ * iconColor: Color of title icon (if any)
95
+ * style: CSS to override
96
+ */
97
+ addTitle(name: string, options?: any): any;
98
+ /**
99
+ * @method addText
100
+ * @param {String} name Component name
101
+ * @param {String} value Text value
102
+ * @param {Function} callback Callback function on change
103
+ * @param {Object} options:
104
+ * hideName: Don't use name as label [false]
105
+ * disabled: Make the component disabled [false]
106
+ * required: Make the input required
107
+ * placeholder: Add input placeholder
108
+ * icon: Icon (if any) to append at the input start
109
+ * pattern: Regular expression that value must match
110
+ * trigger: Choose onchange trigger (default, input) [default]
111
+ * inputWidth: Width of the text input
112
+ * fit: Input widts fits content [false]
113
+ * inputClass: Class to add to the native input element
114
+ * skipReset: Don't add the reset value button when value changes
115
+ * float: Justify input text content
116
+ * justifyName: Justify name content
117
+ */
118
+ addText(name: string | null, value: string, callback: any, options?: any): any;
119
+ /**
120
+ * @method addTextArea
121
+ * @param {String} name Component name
122
+ * @param {String} value Text Area value
123
+ * @param {Function} callback Callback function on change
124
+ * @param {Object} options:
125
+ * hideName: Don't use name as label [false]
126
+ * disabled: Make the component disabled [false]
127
+ * placeholder: Add input placeholder
128
+ * resize: Allow resize [true]
129
+ * trigger: Choose onchange trigger (default, input) [default]
130
+ * inputWidth: Width of the text input
131
+ * float: Justify input text content
132
+ * justifyName: Justify name content
133
+ * fitHeight: Height adapts to text
134
+ */
135
+ addTextArea(name: string | null, value: string, callback: any, options?: any): any;
136
+ /**
137
+ * @method addLabel
138
+ * @param {String} value Information string
139
+ * @param {Object} options Text options
140
+ */
141
+ addLabel(value: string, options?: any): any;
142
+ /**
143
+ * @method addDescription
144
+ * @param {String} value Information string
145
+ * @param {Object} options Text options
146
+ */
147
+ addDescription(value: string, options?: any): any;
148
+ /**
149
+ * @method addButton
150
+ * @param {String} name Component name
151
+ * @param {String} value Button name
152
+ * @param {Function} callback Callback function on click
153
+ * @param {Object} options:
154
+ * hideName: Don't use name as label [false]
155
+ * disabled: Make the component disabled [false]
156
+ * icon: Icon class to show as button value
157
+ * iconPosition: Icon position (cover|start|end)
158
+ * fileInput: Button click requests a file
159
+ * fileInputType: Type of the requested file
160
+ * img: Path to image to show as button value
161
+ * title: Text to show in native Element title
162
+ * buttonClass: Class to add to the native button element
163
+ * mustConfirm: User must confirm trigger in a popover
164
+ */
165
+ addButton(name: string | null, value: string, callback: any, options?: any): any;
166
+ /**
167
+ * @method addComboButtons
168
+ * @param {String} name Component name
169
+ * @param {Array} values Each of the {value, callback, selected, disabled} items
170
+ * @param {Object} options:
171
+ * hideName: Don't use name as label [false]
172
+ * float: Justify content (left, center, right) [center]
173
+ * selected: Selected button by default (String|Array)
174
+ * noSelection: Buttons can be clicked, but they are not selectable
175
+ * toggle: Buttons can be toggled insted of selecting only one
176
+ */
177
+ addComboButtons(name: string, values: any[], options?: any): any;
178
+ /**
179
+ * @method addCard
180
+ * @param {String} name
181
+ * @param {Object} options
182
+ */
183
+ addCard(name: string, options?: any): any;
184
+ /**
185
+ * @method addEmpty
186
+ * @param {String} name
187
+ * @param {Object} options
188
+ */
189
+ addEmpty(name: string, options?: any): any;
190
+ /**
191
+ * @method addForm
192
+ * @param {String} name Component name
193
+ * @param {Object} data Form data
194
+ * @param {Function} callback Callback function on submit form
195
+ * @param {Object} options:
196
+ * primaryActionName: Text to be shown in the primary action button ['Submit']
197
+ * primaryButtonClass: Button class for primary action button ['primary']
198
+ * secondaryActionName: Text to be shown in the secondary action button ['Cancel']
199
+ * secondaryActionCallback: Callback function on press secondary button
200
+ * secondaryButtonClass: Button class for secondary action button ['primary']
201
+ * skipLabels: Do not show input field labels [false]
202
+ */
203
+ addForm(name: string, data: any, callback: any, options?: any): any;
204
+ /**
205
+ * @method addContent
206
+ * @param {String} name Component name
207
+ * @param {HTMLElement/String} element
208
+ * @param {Object} options
209
+ */
210
+ addContent(name: string, element: any, options?: any): any;
211
+ /**
212
+ * @method addImage
213
+ * @param {String} name Component name
214
+ * @param {String} url Image Url
215
+ * @param {Object} options
216
+ * hideName: Don't use name as label [false]
217
+ */
218
+ addImage(name: string, url: string, options?: any): Promise<any>;
219
+ /**
220
+ * @method addSelect
221
+ * @param {String} name Component name
222
+ * @param {Array} values Posible options of the select component -> String (for default select) or Object = {value, url} (for images, gifs..)
223
+ * @param {String} value Select by default option
224
+ * @param {Function} callback Callback function on change
225
+ * @param {Object} options:
226
+ * hideName: Don't use name as label [false]
227
+ * filter: Add a search bar to the component [false]
228
+ * disabled: Make the component disabled [false]
229
+ * skipReset: Don't add the reset value button when value changes
230
+ * placeholder: Placeholder for the filter input
231
+ * emptyMsg: Custom message to show when no filtered results
232
+ */
233
+ addSelect(name: string | null, values: any[], value: string, callback: any, options?: any): any;
234
+ /**
235
+ * @method addCurve
236
+ * @param {String} name Component name
237
+ * @param {Array of Array} values Array of 2N Arrays of each value of the curve
238
+ * @param {Function} callback Callback function on change
239
+ * @param {Object} options:
240
+ * skipReset: Don't add the reset value button when value changes
241
+ * bgColor: Component background color
242
+ * pointsColor: Curve points color
243
+ * lineColor: Curve line color
244
+ * noOverlap: Points do not overlap, replacing themselves if necessary
245
+ * allowAddValues: Support adding values on click
246
+ * smooth: Curve smoothness
247
+ * moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
248
+ */
249
+ addCurve(name: string, values: any[], callback: any, options?: any): any;
250
+ /**
251
+ * @method addDial
252
+ * @param {String} name Component name
253
+ * @param {Array of Array} values Array of 2N Arrays of each value of the dial
254
+ * @param {Function} callback Callback function on change
255
+ * @param {Object} options:
256
+ * skipReset: Don't add the reset value button when value changes
257
+ * bgColor: Component background color
258
+ * pointsColor: Curve points color
259
+ * lineColor: Curve line color
260
+ * noOverlap: Points do not overlap, replacing themselves if necessary
261
+ * allowAddValues: Support adding values on click
262
+ * smooth: Curve smoothness
263
+ * moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
264
+ */
265
+ addDial(name: string, values: any[], callback: any, options?: any): any;
266
+ /**
267
+ * @method addLayers
268
+ * @param {String} name Component name
269
+ * @param {Number} value Flag value by default option
270
+ * @param {Function} callback Callback function on change
271
+ * @param {Object} options:
272
+ */
273
+ addLayers(name: string, value: number, callback: any, options?: any): any;
274
+ /**
275
+ * @method addArray
276
+ * @param {String} name Component name
277
+ * @param {Array} values By default values in the array
278
+ * @param {Function} callback Callback function on change
279
+ * @param {Object} options:
280
+ * innerValues (Array): Use select mode and use values as options
281
+ */
282
+ addArray(name: string, values: any[] | undefined, callback: any, options?: any): any;
283
+ /**
284
+ * @method addList
285
+ * @param {String} name Component name
286
+ * @param {Array} values List values
287
+ * @param {String} value Selected list value
288
+ * @param {Function} callback Callback function on change
289
+ * @param {Object} options:
290
+ * hideName: Don't use name as label [false]
291
+ */
292
+ addList(name: string, values: any[], value: any, callback: any, options?: any): any;
293
+ /**
294
+ * @method addTags
295
+ * @param {String} name Component name
296
+ * @param {String} value Comma separated tags
297
+ * @param {Function} callback Callback function on change
298
+ * @param {Object} options:
299
+ * hideName: Don't use name as label [false]
300
+ */
301
+ addTags(name: string, value: string, callback: any, options?: any): any;
302
+ /**
303
+ * @method addCheckbox
304
+ * @param {String} name Component name
305
+ * @param {Boolean} value Value of the checkbox
306
+ * @param {Function} callback Callback function on change
307
+ * @param {Object} options:
308
+ * disabled: Make the component disabled [false]
309
+ * label: Checkbox label
310
+ * suboptions: Callback to add components in case of TRUE value
311
+ * className: Extra classes to customize style
312
+ */
313
+ addCheckbox(name: string | null, value: boolean, callback: any, options?: any): any;
314
+ /**
315
+ * @method addToggle
316
+ * @param {String} name Component name
317
+ * @param {Boolean} value Value of the checkbox
318
+ * @param {Function} callback Callback function on change
319
+ * @param {Object} options:
320
+ * disabled: Make the component disabled [false]
321
+ * label: Toggle label
322
+ * suboptions: Callback to add components in case of TRUE value
323
+ * className: Customize colors
324
+ */
325
+ addToggle(name: string, value: boolean, callback: any, options?: any): any;
326
+ /**
327
+ * @method addRadioGroup
328
+ * @param {String} name Component name
329
+ * @param {String} label Radio label
330
+ * @param {Array} values Radio options
331
+ * @param {Function} callback Callback function on change
332
+ * @param {Object} options:
333
+ * disabled: Make the component disabled [false]
334
+ * className: Customize colors
335
+ * selected: Index of the default selected option
336
+ */
337
+ addRadioGroup(name: string, label: string, values: any[], callback: any, options?: any): any;
338
+ /**
339
+ * @method addColor
340
+ * @param {String} name Component name
341
+ * @param {String} value Default color (hex)
342
+ * @param {Function} callback Callback function on change
343
+ * @param {Object} options:
344
+ * disabled: Make the component disabled [false]
345
+ * useRGB: The callback returns color as Array (r, g, b) and not hex [false]
346
+ */
347
+ addColor(name: string, value: any, callback: any, options?: any): any;
348
+ /**
349
+ * @method addRange
350
+ * @param {String} name Component name
351
+ * @param {Number} value Default number value
352
+ * @param {Function} callback Callback function on change
353
+ * @param {Object} options:
354
+ * hideName: Don't use name as label [false]
355
+ * className: Extra classes to customize style
356
+ * disabled: Make the component disabled [false]
357
+ * left: The slider goes to the left instead of the right
358
+ * fill: Fill slider progress [true]
359
+ * step: Step of the input
360
+ * min, max: Min and Max values for the input
361
+ */
362
+ addRange(name: string, value: number, callback: any, options?: any): any;
363
+ /**
364
+ * @method addNumber
365
+ * @param {String} name Component name
366
+ * @param {Number} value Default number value
367
+ * @param {Function} callback Callback function on change
368
+ * @param {Object} options:
369
+ * hideName: Don't use name as label [false]
370
+ * disabled: Make the component disabled [false]
371
+ * step: Step of the input
372
+ * precision: The number of digits to appear after the decimal point
373
+ * min, max: Min and Max values for the input
374
+ * skipSlider: If there are min and max values, skip the slider
375
+ * units: Unit as string added to the end of the value
376
+ * onPress: Callback function on mouse down
377
+ * onRelease: Callback function on mouse up
378
+ */
379
+ addNumber(name: string | null, value: number, callback: any, options?: any): any;
380
+ static VECTOR_COMPONENTS: {
381
+ 0: string;
382
+ 1: string;
383
+ 2: string;
384
+ 3: string;
385
+ };
386
+ _addVector(numComponents: number, name: string, value: any[], callback: any, options?: any): any;
387
+ /**
388
+ * @method addVector N (2, 3, 4)
389
+ * @param {String} name Component name
390
+ * @param {Array} value Array of N components
391
+ * @param {Function} callback Callback function on change
392
+ * @param {Object} options:
393
+ * disabled: Make the component disabled [false]
394
+ * step: Step of the inputs
395
+ * min, max: Min and Max values for the inputs
396
+ * onPress: Callback function on mouse down
397
+ * onRelease: Callback function on mouse is released
398
+ */
399
+ addVector2(name: string, value: any[], callback: any, options: any): any;
400
+ addVector3(name: string, value: any[], callback: any, options: any): any;
401
+ addVector4(name: string, value: any[], callback: any, options: any): any;
402
+ /**
403
+ * @method addSize
404
+ * @param {String} name Component name
405
+ * @param {Number} value Default number value
406
+ * @param {Function} callback Callback function on change
407
+ * @param {Object} options:
408
+ * hideName: Don't use name as label [false]
409
+ * disabled: Make the component disabled [false]
410
+ * units: Unit as string added to the end of the value
411
+ */
412
+ addSize(name: string, value: any, callback: any, options?: any): any;
413
+ /**
414
+ * @method addOTP
415
+ * @param {String} name Component name
416
+ * @param {String} value Default numeric value in string format
417
+ * @param {Function} callback Callback function on change
418
+ * @param {Object} options:
419
+ * hideName: Don't use name as label [false]
420
+ * disabled: Make the component disabled [false]
421
+ * pattern: OTP numeric pattern
422
+ */
423
+ addOTP(name: string, value: string, callback: any, options?: any): any;
424
+ /**
425
+ * @method addPad
426
+ * @param {String} name Component name
427
+ * @param {Array} value Pad value
428
+ * @param {Function} callback Callback function on change
429
+ * @param {Object} options:
430
+ * disabled: Make the component disabled [false]
431
+ * min, max: Min and Max values
432
+ * padSize: Size of the pad (css)
433
+ * onPress: Callback function on mouse down
434
+ * onRelease: Callback function on mouse up
435
+ */
436
+ addPad(name: string, value: any[], callback: any, options?: any): any;
437
+ /**
438
+ * @method addProgress
439
+ * @param {String} name Component name
440
+ * @param {Number} value Progress value
441
+ * @param {Object} options:
442
+ * min, max: Min and Max values
443
+ * low, optimum, high: Low and High boundary values, Optimum point in the range
444
+ * showValue: Show current value
445
+ * editable: Allow edit value
446
+ * callback: Function called on change value
447
+ */
448
+ addProgress(name: string, value: number, options?: any): any;
449
+ /**
450
+ * @method addFile
451
+ * @param {String} name Component name
452
+ * @param {Function} callback Callback function on change
453
+ * @param {Object} options:
454
+ * local: Ask for local file
455
+ * disabled: Make the component disabled [false]
456
+ * read: Return the file itself (False) or the contents (True)
457
+ * type: type to read as [text (Default), buffer, bin, url]
458
+ */
459
+ addFile(name: string, callback: any, options?: any): any;
460
+ /**
461
+ * @method addTree
462
+ * @param {String} name Component name
463
+ * @param {Object} data Data of the tree
464
+ * @param {Object} options:
465
+ * icons: Array of objects with icon button information {name, icon, callback}
466
+ * filter: Add nodes filter [true]
467
+ * rename: Boolean to allow rename [true]
468
+ * onevent(tree_event): Called when node is selected, dbl clicked, contextmenu opened, changed visibility, parent or name
469
+ */
470
+ addTree(name: string, data: any, options?: any): any;
471
+ /**
472
+ * @method addTabSections
473
+ * @param {String} name Component name
474
+ * @param {Array} tabs Contains objects with {
475
+ * name: Name of the tab (if icon, use as title)
476
+ * icon: Icon to be used as the tab icon (optional)
477
+ * iconClass: Class to be added to the icon (optional)
478
+ * svgClass: Class to be added to the inner SVG of the icon (optional)
479
+ * onCreate: Func to be called at tab creation
480
+ * onSelect: Func to be called on select tab (optional)
481
+ * }
482
+ * @param {Object} options
483
+ * vertical: Use vertical or horizontal tabs (vertical by default)
484
+ * showNames: Show tab name only in horizontal tabs
485
+ */
486
+ addTabSections(name: string, tabs: any[], options?: any): any;
487
+ /**
488
+ * @method addCounter
489
+ * @param {String} name Component name
490
+ * @param {Number} value Counter value
491
+ * @param {Function} callback Callback function on change
492
+ * @param {Object} options:
493
+ * disabled: Make the component disabled [false]
494
+ * min, max: Min and Max values
495
+ * step: Step for adding/substracting
496
+ */
497
+ addCounter(name: string, value: number, callback: any, options?: any): any;
498
+ /**
499
+ * @method addTable
500
+ * @param {String} name Component name
501
+ * @param {Number} data Table data
502
+ * @param {Object} options:
503
+ * hideName: Don't use name as label [false]
504
+ * head: Table headers (each of the headers per column)
505
+ * body: Table body (data per row for each column)
506
+ * rowActions: Allow to add actions per row
507
+ * onMenuAction: Function callback to fill the "menu" context
508
+ * selectable: Each row can be selected
509
+ * sortable: Rows can be sorted by the user manually
510
+ * centered: Center text within columns. true for all, Array for center selected cols
511
+ * toggleColumns: Columns visibility can be toggled
512
+ * filter: Name of the column to filter by text input (if any)
513
+ * filterValue: Initial filter value
514
+ * customFilters: Add selectors to filter by specific option values
515
+ */
516
+ addTable(name: string, data: any, options?: any): any;
517
+ /**
518
+ * @method addDate
519
+ * @param {String} name Component name
520
+ * @param {String} dateValue
521
+ * @param {Function} callback
522
+ * @param {Object} options:
523
+ * hideName: Don't use name as label [false]
524
+ * today: Set current day as selected by default
525
+ * untilToday: Allow dates only until current day
526
+ * fromToday: Allow dates only from current day
527
+ */
528
+ addDate(name: string, dateValue: string, callback: any, options?: any): any;
529
+ /**
530
+ * @method addMap2D
531
+ * @param {String} name Component name
532
+ * @param {Array} points
533
+ * @param {Function} callback
534
+ * @param {Object} options:
535
+ */
536
+ addMap2D(name: string, points: any[], callback: any, options?: any): any;
537
+ /**
538
+ * @method addRate
539
+ * @param {String} name Component name
540
+ * @param {Number} value
541
+ * @param {Function} callback
542
+ * @param {Object} options:
543
+ */
544
+ addRate(name: string, value: number, callback: any, options?: any): any;
545
+ }