lexgui 8.1.1 → 8.2.0
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.
- package/build/components/Avatar.d.ts +15 -0
- package/build/components/NodeTree.d.ts +51 -26
- package/build/components/Vector.d.ts +10 -9
- package/build/core/Event.d.ts +6 -26
- package/build/core/Namespace.js +1 -1
- package/build/core/Namespace.js.map +1 -1
- package/build/core/Panel.d.ts +538 -538
- package/build/extensions/AssetView.d.ts +7 -6
- package/build/extensions/AssetView.js +194 -155
- package/build/extensions/AssetView.js.map +1 -1
- package/build/extensions/Audio.js.map +1 -1
- package/build/extensions/CodeEditor.d.ts +358 -350
- package/build/extensions/CodeEditor.js +5054 -5022
- package/build/extensions/CodeEditor.js.map +1 -1
- package/build/extensions/DocMaker.js +330 -327
- package/build/extensions/DocMaker.js.map +1 -1
- package/build/extensions/GraphEditor.js +2754 -2760
- package/build/extensions/GraphEditor.js.map +1 -1
- package/build/extensions/Timeline.d.ts +668 -670
- package/build/extensions/Timeline.js +3948 -3955
- package/build/extensions/Timeline.js.map +1 -1
- package/build/extensions/VideoEditor.d.ts +128 -128
- package/build/extensions/VideoEditor.js +893 -898
- package/build/extensions/VideoEditor.js.map +1 -1
- package/build/index.css.d.ts +3 -4
- package/build/index.d.ts +57 -56
- package/build/lexgui.all.js +1587 -1369
- package/build/lexgui.all.js.map +1 -1
- package/build/lexgui.all.min.js +1 -1
- package/build/lexgui.all.module.js +1584 -1364
- package/build/lexgui.all.module.js.map +1 -1
- package/build/lexgui.all.module.min.js +1 -1
- package/build/lexgui.css +6157 -5583
- package/build/lexgui.js +977 -815
- package/build/lexgui.js.map +1 -1
- package/build/lexgui.min.css +2 -3
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +975 -811
- package/build/lexgui.module.js.map +1 -1
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +52 -1
- package/demo.js +167 -65
- package/examples/all-components.html +38 -52
- package/examples/asset-view.html +27 -0
- package/examples/code-editor.html +1 -1
- package/examples/editor.html +10 -95
- package/examples/index.html +2 -2
- package/examples/side-bar.html +1 -1
- package/examples/timeline.html +2 -2
- package/examples/video-editor.html +1 -1
- package/examples/video-editor2.html +2 -2
- package/package.json +7 -4
package/build/core/Panel.d.ts
CHANGED
|
@@ -1,538 +1,538 @@
|
|
|
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 addButton
|
|
144
|
-
* @param {String} name Component name
|
|
145
|
-
* @param {String} value Button name
|
|
146
|
-
* @param {Function} callback Callback function on click
|
|
147
|
-
* @param {Object} options:
|
|
148
|
-
* hideName: Don't use name as label [false]
|
|
149
|
-
* disabled: Make the component disabled [false]
|
|
150
|
-
* icon: Icon class to show as button value
|
|
151
|
-
* iconPosition: Icon position (cover|start|end)
|
|
152
|
-
* fileInput: Button click requests a file
|
|
153
|
-
* fileInputType: Type of the requested file
|
|
154
|
-
* img: Path to image to show as button value
|
|
155
|
-
* title: Text to show in native Element title
|
|
156
|
-
* buttonClass: Class to add to the native button element
|
|
157
|
-
* mustConfirm: User must confirm trigger in a popover
|
|
158
|
-
*/
|
|
159
|
-
addButton(name: string | null, value: string, callback: any, options?: any): any;
|
|
160
|
-
/**
|
|
161
|
-
* @method addComboButtons
|
|
162
|
-
* @param {String} name Component name
|
|
163
|
-
* @param {Array} values Each of the {value, callback, selected, disabled} items
|
|
164
|
-
* @param {Object} options:
|
|
165
|
-
* hideName: Don't use name as label [false]
|
|
166
|
-
* float: Justify content (left, center, right) [center]
|
|
167
|
-
* selected: Selected button by default (String|Array)
|
|
168
|
-
* noSelection: Buttons can be clicked, but they are not selectable
|
|
169
|
-
* toggle: Buttons can be toggled insted of selecting only one
|
|
170
|
-
*/
|
|
171
|
-
addComboButtons(name: string, values: any[], options?: any): any;
|
|
172
|
-
/**
|
|
173
|
-
* @method addCard
|
|
174
|
-
* @param {String} name Card Name
|
|
175
|
-
* @param {Object} options:
|
|
176
|
-
* text: Card text
|
|
177
|
-
* link: Card link
|
|
178
|
-
* title: Card dom title
|
|
179
|
-
* src: url of the image
|
|
180
|
-
* callback (Function): function to call on click
|
|
181
|
-
*/
|
|
182
|
-
addCard(name: string, options?: any): any;
|
|
183
|
-
/**
|
|
184
|
-
* @method addForm
|
|
185
|
-
* @param {String} name Component name
|
|
186
|
-
* @param {Object} data Form data
|
|
187
|
-
* @param {Function} callback Callback function on submit form
|
|
188
|
-
* @param {Object} options:
|
|
189
|
-
* primaryActionName: Text to be shown in the primary action button ['Submit']
|
|
190
|
-
* primaryButtonClass: Button class for primary action button ['
|
|
191
|
-
* secondaryActionName: Text to be shown in the secondary action button ['Cancel']
|
|
192
|
-
* secondaryActionCallback: Callback function on press secondary button
|
|
193
|
-
* secondaryButtonClass: Button class for secondary action button ['primary']
|
|
194
|
-
* skipLabels: Do not show input field labels [false]
|
|
195
|
-
*/
|
|
196
|
-
addForm(name: string, data: any, callback: any, options?: any): any;
|
|
197
|
-
/**
|
|
198
|
-
* @method addContent
|
|
199
|
-
* @param {String} name Component name
|
|
200
|
-
* @param {HTMLElement/String} element
|
|
201
|
-
* @param {Object} options
|
|
202
|
-
*/
|
|
203
|
-
addContent(name: string, element: any, options?: any): any;
|
|
204
|
-
/**
|
|
205
|
-
* @method addImage
|
|
206
|
-
* @param {String} name Component name
|
|
207
|
-
* @param {String} url Image Url
|
|
208
|
-
* @param {Object} options
|
|
209
|
-
* hideName: Don't use name as label [false]
|
|
210
|
-
*/
|
|
211
|
-
addImage(name: string, url: string, options?: any): Promise<any>;
|
|
212
|
-
/**
|
|
213
|
-
* @method addSelect
|
|
214
|
-
* @param {String} name Component name
|
|
215
|
-
* @param {Array} values Posible options of the select component -> String (for default select) or Object = {value, url} (for images, gifs..)
|
|
216
|
-
* @param {String} value Select by default option
|
|
217
|
-
* @param {Function} callback Callback function on change
|
|
218
|
-
* @param {Object} options:
|
|
219
|
-
* hideName: Don't use name as label [false]
|
|
220
|
-
* filter: Add a search bar to the component [false]
|
|
221
|
-
* disabled: Make the component disabled [false]
|
|
222
|
-
* skipReset: Don't add the reset value button when value changes
|
|
223
|
-
* placeholder: Placeholder for the filter input
|
|
224
|
-
* emptyMsg: Custom message to show when no filtered results
|
|
225
|
-
*/
|
|
226
|
-
addSelect(name: string | null, values: any[], value: string, callback: any, options?: any): any;
|
|
227
|
-
/**
|
|
228
|
-
* @method addCurve
|
|
229
|
-
* @param {String} name Component name
|
|
230
|
-
* @param {Array of Array} values Array of 2N Arrays of each value of the curve
|
|
231
|
-
* @param {Function} callback Callback function on change
|
|
232
|
-
* @param {Object} options:
|
|
233
|
-
* skipReset: Don't add the reset value button when value changes
|
|
234
|
-
* bgColor: Component background color
|
|
235
|
-
* pointsColor: Curve points color
|
|
236
|
-
* lineColor: Curve line color
|
|
237
|
-
* noOverlap: Points do not overlap, replacing themselves if necessary
|
|
238
|
-
* allowAddValues: Support adding values on click
|
|
239
|
-
* smooth: Curve smoothness
|
|
240
|
-
* moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
|
|
241
|
-
*/
|
|
242
|
-
addCurve(name: string, values: any[], callback: any, options?: any): any;
|
|
243
|
-
/**
|
|
244
|
-
* @method addDial
|
|
245
|
-
* @param {String} name Component name
|
|
246
|
-
* @param {Array of Array} values Array of 2N Arrays of each value of the dial
|
|
247
|
-
* @param {Function} callback Callback function on change
|
|
248
|
-
* @param {Object} options:
|
|
249
|
-
* skipReset: Don't add the reset value button when value changes
|
|
250
|
-
* bgColor: Component background color
|
|
251
|
-
* pointsColor: Curve points color
|
|
252
|
-
* lineColor: Curve line color
|
|
253
|
-
* noOverlap: Points do not overlap, replacing themselves if necessary
|
|
254
|
-
* allowAddValues: Support adding values on click
|
|
255
|
-
* smooth: Curve smoothness
|
|
256
|
-
* moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
|
|
257
|
-
*/
|
|
258
|
-
addDial(name: string, values: any[], callback: any, options?: any): any;
|
|
259
|
-
/**
|
|
260
|
-
* @method addLayers
|
|
261
|
-
* @param {String} name Component name
|
|
262
|
-
* @param {Number} value Flag value by default option
|
|
263
|
-
* @param {Function} callback Callback function on change
|
|
264
|
-
* @param {Object} options:
|
|
265
|
-
*/
|
|
266
|
-
addLayers(name: string, value: number, callback: any, options?: any): any;
|
|
267
|
-
/**
|
|
268
|
-
* @method addArray
|
|
269
|
-
* @param {String} name Component name
|
|
270
|
-
* @param {Array} values By default values in the array
|
|
271
|
-
* @param {Function} callback Callback function on change
|
|
272
|
-
* @param {Object} options:
|
|
273
|
-
* innerValues (Array): Use select mode and use values as options
|
|
274
|
-
*/
|
|
275
|
-
addArray(name: string, values: any[] | undefined, callback: any, options?: any): any;
|
|
276
|
-
/**
|
|
277
|
-
* @method addList
|
|
278
|
-
* @param {String} name Component name
|
|
279
|
-
* @param {Array} values List values
|
|
280
|
-
* @param {String} value Selected list value
|
|
281
|
-
* @param {Function} callback Callback function on change
|
|
282
|
-
* @param {Object} options:
|
|
283
|
-
* hideName: Don't use name as label [false]
|
|
284
|
-
*/
|
|
285
|
-
addList(name: string, values: any[], value: any, callback: any, options?: any): any;
|
|
286
|
-
/**
|
|
287
|
-
* @method addTags
|
|
288
|
-
* @param {String} name Component name
|
|
289
|
-
* @param {String} value Comma separated tags
|
|
290
|
-
* @param {Function} callback Callback function on change
|
|
291
|
-
* @param {Object} options:
|
|
292
|
-
* hideName: Don't use name as label [false]
|
|
293
|
-
*/
|
|
294
|
-
addTags(name: string, value: string, callback: any, options?: any): any;
|
|
295
|
-
/**
|
|
296
|
-
* @method addCheckbox
|
|
297
|
-
* @param {String} name Component name
|
|
298
|
-
* @param {Boolean} value Value of the checkbox
|
|
299
|
-
* @param {Function} callback Callback function on change
|
|
300
|
-
* @param {Object} options:
|
|
301
|
-
* disabled: Make the component disabled [false]
|
|
302
|
-
* label: Checkbox label
|
|
303
|
-
* suboptions: Callback to add components in case of TRUE value
|
|
304
|
-
* className: Extra classes to customize style
|
|
305
|
-
*/
|
|
306
|
-
addCheckbox(name: string | null, value: boolean, callback: any, options?: any): any;
|
|
307
|
-
/**
|
|
308
|
-
* @method addToggle
|
|
309
|
-
* @param {String} name Component name
|
|
310
|
-
* @param {Boolean} value Value of the checkbox
|
|
311
|
-
* @param {Function} callback Callback function on change
|
|
312
|
-
* @param {Object} options:
|
|
313
|
-
* disabled: Make the component disabled [false]
|
|
314
|
-
* label: Toggle label
|
|
315
|
-
* suboptions: Callback to add components in case of TRUE value
|
|
316
|
-
* className: Customize colors
|
|
317
|
-
*/
|
|
318
|
-
addToggle(name: string, value: boolean, callback: any, options?: any): any;
|
|
319
|
-
/**
|
|
320
|
-
* @method addRadioGroup
|
|
321
|
-
* @param {String} name Component name
|
|
322
|
-
* @param {String} label Radio label
|
|
323
|
-
* @param {Array} values Radio options
|
|
324
|
-
* @param {Function} callback Callback function on change
|
|
325
|
-
* @param {Object} options:
|
|
326
|
-
* disabled: Make the component disabled [false]
|
|
327
|
-
* className: Customize colors
|
|
328
|
-
* selected: Index of the default selected option
|
|
329
|
-
*/
|
|
330
|
-
addRadioGroup(name: string, label: string, values: any[], callback: any, options?: any): any;
|
|
331
|
-
/**
|
|
332
|
-
* @method addColor
|
|
333
|
-
* @param {String} name Component name
|
|
334
|
-
* @param {String} value Default color (hex)
|
|
335
|
-
* @param {Function} callback Callback function on change
|
|
336
|
-
* @param {Object} options:
|
|
337
|
-
* disabled: Make the component disabled [false]
|
|
338
|
-
* useRGB: The callback returns color as Array (r, g, b) and not hex [false]
|
|
339
|
-
*/
|
|
340
|
-
addColor(name: string, value: any, callback: any, options?: any): any;
|
|
341
|
-
/**
|
|
342
|
-
* @method addRange
|
|
343
|
-
* @param {String} name Component name
|
|
344
|
-
* @param {Number} value Default number value
|
|
345
|
-
* @param {Function} callback Callback function on change
|
|
346
|
-
* @param {Object} options:
|
|
347
|
-
* hideName: Don't use name as label [false]
|
|
348
|
-
* className: Extra classes to customize style
|
|
349
|
-
* disabled: Make the component disabled [false]
|
|
350
|
-
* left: The slider goes to the left instead of the right
|
|
351
|
-
* fill: Fill slider progress [true]
|
|
352
|
-
* step: Step of the input
|
|
353
|
-
* min, max: Min and Max values for the input
|
|
354
|
-
*/
|
|
355
|
-
addRange(name: string, value: number, callback: any, options?: any): any;
|
|
356
|
-
/**
|
|
357
|
-
* @method addNumber
|
|
358
|
-
* @param {String} name Component name
|
|
359
|
-
* @param {Number} value Default number value
|
|
360
|
-
* @param {Function} callback Callback function on change
|
|
361
|
-
* @param {Object} options:
|
|
362
|
-
* hideName: Don't use name as label [false]
|
|
363
|
-
* disabled: Make the component disabled [false]
|
|
364
|
-
* step: Step of the input
|
|
365
|
-
* precision: The number of digits to appear after the decimal point
|
|
366
|
-
* min, max: Min and Max values for the input
|
|
367
|
-
* skipSlider: If there are min and max values, skip the slider
|
|
368
|
-
* units: Unit as string added to the end of the value
|
|
369
|
-
* onPress: Callback function on mouse down
|
|
370
|
-
* onRelease: Callback function on mouse up
|
|
371
|
-
*/
|
|
372
|
-
addNumber(name: string | null, value: number, callback: any, options?: any): any;
|
|
373
|
-
static VECTOR_COMPONENTS: {
|
|
374
|
-
0: string;
|
|
375
|
-
1: string;
|
|
376
|
-
2: string;
|
|
377
|
-
3: string;
|
|
378
|
-
};
|
|
379
|
-
_addVector(numComponents: number, name: string, value: any[], callback: any, options?: any): any;
|
|
380
|
-
/**
|
|
381
|
-
* @method addVector N (2, 3, 4)
|
|
382
|
-
* @param {String} name Component name
|
|
383
|
-
* @param {Array} value Array of N components
|
|
384
|
-
* @param {Function} callback Callback function on change
|
|
385
|
-
* @param {Object} options:
|
|
386
|
-
* disabled: Make the component disabled [false]
|
|
387
|
-
* step: Step of the inputs
|
|
388
|
-
* min, max: Min and Max values for the inputs
|
|
389
|
-
* onPress: Callback function on mouse down
|
|
390
|
-
* onRelease: Callback function on mouse is released
|
|
391
|
-
*/
|
|
392
|
-
addVector2(name: string, value: any[], callback: any, options: any): any;
|
|
393
|
-
addVector3(name: string, value: any[], callback: any, options: any): any;
|
|
394
|
-
addVector4(name: string, value: any[], callback: any, options: any): any;
|
|
395
|
-
/**
|
|
396
|
-
* @method addSize
|
|
397
|
-
* @param {String} name Component name
|
|
398
|
-
* @param {Number} value Default number value
|
|
399
|
-
* @param {Function} callback Callback function on change
|
|
400
|
-
* @param {Object} options:
|
|
401
|
-
* hideName: Don't use name as label [false]
|
|
402
|
-
* disabled: Make the component disabled [false]
|
|
403
|
-
* units: Unit as string added to the end of the value
|
|
404
|
-
*/
|
|
405
|
-
addSize(name: string, value: any, callback: any, options?: any): any;
|
|
406
|
-
/**
|
|
407
|
-
* @method addOTP
|
|
408
|
-
* @param {String} name Component name
|
|
409
|
-
* @param {String} value Default numeric value in string format
|
|
410
|
-
* @param {Function} callback Callback function on change
|
|
411
|
-
* @param {Object} options:
|
|
412
|
-
* hideName: Don't use name as label [false]
|
|
413
|
-
* disabled: Make the component disabled [false]
|
|
414
|
-
* pattern: OTP numeric pattern
|
|
415
|
-
*/
|
|
416
|
-
addOTP(name: string, value: string, callback: any, options?: any): any;
|
|
417
|
-
/**
|
|
418
|
-
* @method addPad
|
|
419
|
-
* @param {String} name Component name
|
|
420
|
-
* @param {Array} value Pad value
|
|
421
|
-
* @param {Function} callback Callback function on change
|
|
422
|
-
* @param {Object} options:
|
|
423
|
-
* disabled: Make the component disabled [false]
|
|
424
|
-
* min, max: Min and Max values
|
|
425
|
-
* padSize: Size of the pad (css)
|
|
426
|
-
* onPress: Callback function on mouse down
|
|
427
|
-
* onRelease: Callback function on mouse up
|
|
428
|
-
*/
|
|
429
|
-
addPad(name: string, value: any[], callback: any, options?: any): any;
|
|
430
|
-
/**
|
|
431
|
-
* @method addProgress
|
|
432
|
-
* @param {String} name Component name
|
|
433
|
-
* @param {Number} value Progress value
|
|
434
|
-
* @param {Object} options:
|
|
435
|
-
* min, max: Min and Max values
|
|
436
|
-
* low, optimum, high: Low and High boundary values, Optimum point in the range
|
|
437
|
-
* showValue: Show current value
|
|
438
|
-
* editable: Allow edit value
|
|
439
|
-
* callback: Function called on change value
|
|
440
|
-
*/
|
|
441
|
-
addProgress(name: string, value: number, options?: any): any;
|
|
442
|
-
/**
|
|
443
|
-
* @method addFile
|
|
444
|
-
* @param {String} name Component name
|
|
445
|
-
* @param {Function} callback Callback function on change
|
|
446
|
-
* @param {Object} options:
|
|
447
|
-
* local: Ask for local file
|
|
448
|
-
* disabled: Make the component disabled [false]
|
|
449
|
-
* read: Return the file itself (False) or the contents (True)
|
|
450
|
-
* type: type to read as [text (Default), buffer, bin, url]
|
|
451
|
-
*/
|
|
452
|
-
addFile(name: string, callback: any, options?: any): any;
|
|
453
|
-
/**
|
|
454
|
-
* @method addTree
|
|
455
|
-
* @param {String} name Component name
|
|
456
|
-
* @param {Object} data Data of the tree
|
|
457
|
-
* @param {Object} options:
|
|
458
|
-
* icons: Array of objects with icon button information {name, icon, callback}
|
|
459
|
-
* filter: Add nodes filter [true]
|
|
460
|
-
* rename: Boolean to allow rename [true]
|
|
461
|
-
* onevent(tree_event): Called when node is selected, dbl clicked, contextmenu opened, changed visibility, parent or name
|
|
462
|
-
*/
|
|
463
|
-
addTree(name: string, data: any, options?: any): any;
|
|
464
|
-
/**
|
|
465
|
-
* @method addTabSections
|
|
466
|
-
* @param {String} name Component name
|
|
467
|
-
* @param {Array} tabs Contains objects with {
|
|
468
|
-
* name: Name of the tab (if icon, use as title)
|
|
469
|
-
* icon: Icon to be used as the tab icon (optional)
|
|
470
|
-
* iconClass: Class to be added to the icon (optional)
|
|
471
|
-
* svgClass: Class to be added to the inner SVG of the icon (optional)
|
|
472
|
-
* onCreate: Func to be called at tab creation
|
|
473
|
-
* onSelect: Func to be called on select tab (optional)
|
|
474
|
-
* }
|
|
475
|
-
* @param {Object} options
|
|
476
|
-
* vertical: Use vertical or horizontal tabs (vertical by default)
|
|
477
|
-
* showNames: Show tab name only in horizontal tabs
|
|
478
|
-
*/
|
|
479
|
-
addTabSections(name: string, tabs: any[], options?: any): any;
|
|
480
|
-
/**
|
|
481
|
-
* @method addCounter
|
|
482
|
-
* @param {String} name Component name
|
|
483
|
-
* @param {Number} value Counter value
|
|
484
|
-
* @param {Function} callback Callback function on change
|
|
485
|
-
* @param {Object} options:
|
|
486
|
-
* disabled: Make the component disabled [false]
|
|
487
|
-
* min, max: Min and Max values
|
|
488
|
-
* step: Step for adding/substracting
|
|
489
|
-
*/
|
|
490
|
-
addCounter(name: string, value: number, callback: any, options?: any): any;
|
|
491
|
-
/**
|
|
492
|
-
* @method addTable
|
|
493
|
-
* @param {String} name Component name
|
|
494
|
-
* @param {Number} data Table data
|
|
495
|
-
* @param {Object} options:
|
|
496
|
-
* hideName: Don't use name as label [false]
|
|
497
|
-
* head: Table headers (each of the headers per column)
|
|
498
|
-
* body: Table body (data per row for each column)
|
|
499
|
-
* rowActions: Allow to add actions per row
|
|
500
|
-
* onMenuAction: Function callback to fill the "menu" context
|
|
501
|
-
* selectable: Each row can be selected
|
|
502
|
-
* sortable: Rows can be sorted by the user manually
|
|
503
|
-
* centered: Center text within columns. true for all, Array for center selected cols
|
|
504
|
-
* toggleColumns: Columns visibility can be toggled
|
|
505
|
-
* filter: Name of the column to filter by text input (if any)
|
|
506
|
-
* filterValue: Initial filter value
|
|
507
|
-
* customFilters: Add selectors to filter by specific option values
|
|
508
|
-
*/
|
|
509
|
-
addTable(name: string, data: any, options?: any): any;
|
|
510
|
-
/**
|
|
511
|
-
* @method addDate
|
|
512
|
-
* @param {String} name Component name
|
|
513
|
-
* @param {String} dateValue
|
|
514
|
-
* @param {Function} callback
|
|
515
|
-
* @param {Object} options:
|
|
516
|
-
* hideName: Don't use name as label [false]
|
|
517
|
-
* today: Set current day as selected by default
|
|
518
|
-
* untilToday: Allow dates only until current day
|
|
519
|
-
* fromToday: Allow dates only from current day
|
|
520
|
-
*/
|
|
521
|
-
addDate(name: string, dateValue: string, callback: any, options?: any): any;
|
|
522
|
-
/**
|
|
523
|
-
* @method addMap2D
|
|
524
|
-
* @param {String} name Component name
|
|
525
|
-
* @param {Array} points
|
|
526
|
-
* @param {Function} callback
|
|
527
|
-
* @param {Object} options:
|
|
528
|
-
*/
|
|
529
|
-
addMap2D(name: string, points: any[], callback: any, options?: any): any;
|
|
530
|
-
/**
|
|
531
|
-
* @method addRate
|
|
532
|
-
* @param {String} name Component name
|
|
533
|
-
* @param {Number} value
|
|
534
|
-
* @param {Function} callback
|
|
535
|
-
* @param {Object} options:
|
|
536
|
-
*/
|
|
537
|
-
addRate(name: string, value: number, callback: any, options?: any): any;
|
|
538
|
-
}
|
|
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 addButton
|
|
144
|
+
* @param {String} name Component name
|
|
145
|
+
* @param {String} value Button name
|
|
146
|
+
* @param {Function} callback Callback function on click
|
|
147
|
+
* @param {Object} options:
|
|
148
|
+
* hideName: Don't use name as label [false]
|
|
149
|
+
* disabled: Make the component disabled [false]
|
|
150
|
+
* icon: Icon class to show as button value
|
|
151
|
+
* iconPosition: Icon position (cover|start|end)
|
|
152
|
+
* fileInput: Button click requests a file
|
|
153
|
+
* fileInputType: Type of the requested file
|
|
154
|
+
* img: Path to image to show as button value
|
|
155
|
+
* title: Text to show in native Element title
|
|
156
|
+
* buttonClass: Class to add to the native button element
|
|
157
|
+
* mustConfirm: User must confirm trigger in a popover
|
|
158
|
+
*/
|
|
159
|
+
addButton(name: string | null, value: string, callback: any, options?: any): any;
|
|
160
|
+
/**
|
|
161
|
+
* @method addComboButtons
|
|
162
|
+
* @param {String} name Component name
|
|
163
|
+
* @param {Array} values Each of the {value, callback, selected, disabled} items
|
|
164
|
+
* @param {Object} options:
|
|
165
|
+
* hideName: Don't use name as label [false]
|
|
166
|
+
* float: Justify content (left, center, right) [center]
|
|
167
|
+
* selected: Selected button by default (String|Array)
|
|
168
|
+
* noSelection: Buttons can be clicked, but they are not selectable
|
|
169
|
+
* toggle: Buttons can be toggled insted of selecting only one
|
|
170
|
+
*/
|
|
171
|
+
addComboButtons(name: string, values: any[], options?: any): any;
|
|
172
|
+
/**
|
|
173
|
+
* @method addCard
|
|
174
|
+
* @param {String} name Card Name
|
|
175
|
+
* @param {Object} options:
|
|
176
|
+
* text: Card text
|
|
177
|
+
* link: Card link
|
|
178
|
+
* title: Card dom title
|
|
179
|
+
* src: url of the image
|
|
180
|
+
* callback (Function): function to call on click
|
|
181
|
+
*/
|
|
182
|
+
addCard(name: string, options?: any): any;
|
|
183
|
+
/**
|
|
184
|
+
* @method addForm
|
|
185
|
+
* @param {String} name Component name
|
|
186
|
+
* @param {Object} data Form data
|
|
187
|
+
* @param {Function} callback Callback function on submit form
|
|
188
|
+
* @param {Object} options:
|
|
189
|
+
* primaryActionName: Text to be shown in the primary action button ['Submit']
|
|
190
|
+
* primaryButtonClass: Button class for primary action button ['primary']
|
|
191
|
+
* secondaryActionName: Text to be shown in the secondary action button ['Cancel']
|
|
192
|
+
* secondaryActionCallback: Callback function on press secondary button
|
|
193
|
+
* secondaryButtonClass: Button class for secondary action button ['primary']
|
|
194
|
+
* skipLabels: Do not show input field labels [false]
|
|
195
|
+
*/
|
|
196
|
+
addForm(name: string, data: any, callback: any, options?: any): any;
|
|
197
|
+
/**
|
|
198
|
+
* @method addContent
|
|
199
|
+
* @param {String} name Component name
|
|
200
|
+
* @param {HTMLElement/String} element
|
|
201
|
+
* @param {Object} options
|
|
202
|
+
*/
|
|
203
|
+
addContent(name: string, element: any, options?: any): any;
|
|
204
|
+
/**
|
|
205
|
+
* @method addImage
|
|
206
|
+
* @param {String} name Component name
|
|
207
|
+
* @param {String} url Image Url
|
|
208
|
+
* @param {Object} options
|
|
209
|
+
* hideName: Don't use name as label [false]
|
|
210
|
+
*/
|
|
211
|
+
addImage(name: string, url: string, options?: any): Promise<any>;
|
|
212
|
+
/**
|
|
213
|
+
* @method addSelect
|
|
214
|
+
* @param {String} name Component name
|
|
215
|
+
* @param {Array} values Posible options of the select component -> String (for default select) or Object = {value, url} (for images, gifs..)
|
|
216
|
+
* @param {String} value Select by default option
|
|
217
|
+
* @param {Function} callback Callback function on change
|
|
218
|
+
* @param {Object} options:
|
|
219
|
+
* hideName: Don't use name as label [false]
|
|
220
|
+
* filter: Add a search bar to the component [false]
|
|
221
|
+
* disabled: Make the component disabled [false]
|
|
222
|
+
* skipReset: Don't add the reset value button when value changes
|
|
223
|
+
* placeholder: Placeholder for the filter input
|
|
224
|
+
* emptyMsg: Custom message to show when no filtered results
|
|
225
|
+
*/
|
|
226
|
+
addSelect(name: string | null, values: any[], value: string, callback: any, options?: any): any;
|
|
227
|
+
/**
|
|
228
|
+
* @method addCurve
|
|
229
|
+
* @param {String} name Component name
|
|
230
|
+
* @param {Array of Array} values Array of 2N Arrays of each value of the curve
|
|
231
|
+
* @param {Function} callback Callback function on change
|
|
232
|
+
* @param {Object} options:
|
|
233
|
+
* skipReset: Don't add the reset value button when value changes
|
|
234
|
+
* bgColor: Component background color
|
|
235
|
+
* pointsColor: Curve points color
|
|
236
|
+
* lineColor: Curve line color
|
|
237
|
+
* noOverlap: Points do not overlap, replacing themselves if necessary
|
|
238
|
+
* allowAddValues: Support adding values on click
|
|
239
|
+
* smooth: Curve smoothness
|
|
240
|
+
* moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
|
|
241
|
+
*/
|
|
242
|
+
addCurve(name: string, values: any[], callback: any, options?: any): any;
|
|
243
|
+
/**
|
|
244
|
+
* @method addDial
|
|
245
|
+
* @param {String} name Component name
|
|
246
|
+
* @param {Array of Array} values Array of 2N Arrays of each value of the dial
|
|
247
|
+
* @param {Function} callback Callback function on change
|
|
248
|
+
* @param {Object} options:
|
|
249
|
+
* skipReset: Don't add the reset value button when value changes
|
|
250
|
+
* bgColor: Component background color
|
|
251
|
+
* pointsColor: Curve points color
|
|
252
|
+
* lineColor: Curve line color
|
|
253
|
+
* noOverlap: Points do not overlap, replacing themselves if necessary
|
|
254
|
+
* allowAddValues: Support adding values on click
|
|
255
|
+
* smooth: Curve smoothness
|
|
256
|
+
* moveOutAction: Clamp or delete points moved out of the curve (LX.CURVE_MOVEOUT_CLAMP, LX.CURVE_MOVEOUT_DELETE)
|
|
257
|
+
*/
|
|
258
|
+
addDial(name: string, values: any[], callback: any, options?: any): any;
|
|
259
|
+
/**
|
|
260
|
+
* @method addLayers
|
|
261
|
+
* @param {String} name Component name
|
|
262
|
+
* @param {Number} value Flag value by default option
|
|
263
|
+
* @param {Function} callback Callback function on change
|
|
264
|
+
* @param {Object} options:
|
|
265
|
+
*/
|
|
266
|
+
addLayers(name: string, value: number, callback: any, options?: any): any;
|
|
267
|
+
/**
|
|
268
|
+
* @method addArray
|
|
269
|
+
* @param {String} name Component name
|
|
270
|
+
* @param {Array} values By default values in the array
|
|
271
|
+
* @param {Function} callback Callback function on change
|
|
272
|
+
* @param {Object} options:
|
|
273
|
+
* innerValues (Array): Use select mode and use values as options
|
|
274
|
+
*/
|
|
275
|
+
addArray(name: string, values: any[] | undefined, callback: any, options?: any): any;
|
|
276
|
+
/**
|
|
277
|
+
* @method addList
|
|
278
|
+
* @param {String} name Component name
|
|
279
|
+
* @param {Array} values List values
|
|
280
|
+
* @param {String} value Selected list value
|
|
281
|
+
* @param {Function} callback Callback function on change
|
|
282
|
+
* @param {Object} options:
|
|
283
|
+
* hideName: Don't use name as label [false]
|
|
284
|
+
*/
|
|
285
|
+
addList(name: string, values: any[], value: any, callback: any, options?: any): any;
|
|
286
|
+
/**
|
|
287
|
+
* @method addTags
|
|
288
|
+
* @param {String} name Component name
|
|
289
|
+
* @param {String} value Comma separated tags
|
|
290
|
+
* @param {Function} callback Callback function on change
|
|
291
|
+
* @param {Object} options:
|
|
292
|
+
* hideName: Don't use name as label [false]
|
|
293
|
+
*/
|
|
294
|
+
addTags(name: string, value: string, callback: any, options?: any): any;
|
|
295
|
+
/**
|
|
296
|
+
* @method addCheckbox
|
|
297
|
+
* @param {String} name Component name
|
|
298
|
+
* @param {Boolean} value Value of the checkbox
|
|
299
|
+
* @param {Function} callback Callback function on change
|
|
300
|
+
* @param {Object} options:
|
|
301
|
+
* disabled: Make the component disabled [false]
|
|
302
|
+
* label: Checkbox label
|
|
303
|
+
* suboptions: Callback to add components in case of TRUE value
|
|
304
|
+
* className: Extra classes to customize style
|
|
305
|
+
*/
|
|
306
|
+
addCheckbox(name: string | null, value: boolean, callback: any, options?: any): any;
|
|
307
|
+
/**
|
|
308
|
+
* @method addToggle
|
|
309
|
+
* @param {String} name Component name
|
|
310
|
+
* @param {Boolean} value Value of the checkbox
|
|
311
|
+
* @param {Function} callback Callback function on change
|
|
312
|
+
* @param {Object} options:
|
|
313
|
+
* disabled: Make the component disabled [false]
|
|
314
|
+
* label: Toggle label
|
|
315
|
+
* suboptions: Callback to add components in case of TRUE value
|
|
316
|
+
* className: Customize colors
|
|
317
|
+
*/
|
|
318
|
+
addToggle(name: string, value: boolean, callback: any, options?: any): any;
|
|
319
|
+
/**
|
|
320
|
+
* @method addRadioGroup
|
|
321
|
+
* @param {String} name Component name
|
|
322
|
+
* @param {String} label Radio label
|
|
323
|
+
* @param {Array} values Radio options
|
|
324
|
+
* @param {Function} callback Callback function on change
|
|
325
|
+
* @param {Object} options:
|
|
326
|
+
* disabled: Make the component disabled [false]
|
|
327
|
+
* className: Customize colors
|
|
328
|
+
* selected: Index of the default selected option
|
|
329
|
+
*/
|
|
330
|
+
addRadioGroup(name: string, label: string, values: any[], callback: any, options?: any): any;
|
|
331
|
+
/**
|
|
332
|
+
* @method addColor
|
|
333
|
+
* @param {String} name Component name
|
|
334
|
+
* @param {String} value Default color (hex)
|
|
335
|
+
* @param {Function} callback Callback function on change
|
|
336
|
+
* @param {Object} options:
|
|
337
|
+
* disabled: Make the component disabled [false]
|
|
338
|
+
* useRGB: The callback returns color as Array (r, g, b) and not hex [false]
|
|
339
|
+
*/
|
|
340
|
+
addColor(name: string, value: any, callback: any, options?: any): any;
|
|
341
|
+
/**
|
|
342
|
+
* @method addRange
|
|
343
|
+
* @param {String} name Component name
|
|
344
|
+
* @param {Number} value Default number value
|
|
345
|
+
* @param {Function} callback Callback function on change
|
|
346
|
+
* @param {Object} options:
|
|
347
|
+
* hideName: Don't use name as label [false]
|
|
348
|
+
* className: Extra classes to customize style
|
|
349
|
+
* disabled: Make the component disabled [false]
|
|
350
|
+
* left: The slider goes to the left instead of the right
|
|
351
|
+
* fill: Fill slider progress [true]
|
|
352
|
+
* step: Step of the input
|
|
353
|
+
* min, max: Min and Max values for the input
|
|
354
|
+
*/
|
|
355
|
+
addRange(name: string, value: number, callback: any, options?: any): any;
|
|
356
|
+
/**
|
|
357
|
+
* @method addNumber
|
|
358
|
+
* @param {String} name Component name
|
|
359
|
+
* @param {Number} value Default number value
|
|
360
|
+
* @param {Function} callback Callback function on change
|
|
361
|
+
* @param {Object} options:
|
|
362
|
+
* hideName: Don't use name as label [false]
|
|
363
|
+
* disabled: Make the component disabled [false]
|
|
364
|
+
* step: Step of the input
|
|
365
|
+
* precision: The number of digits to appear after the decimal point
|
|
366
|
+
* min, max: Min and Max values for the input
|
|
367
|
+
* skipSlider: If there are min and max values, skip the slider
|
|
368
|
+
* units: Unit as string added to the end of the value
|
|
369
|
+
* onPress: Callback function on mouse down
|
|
370
|
+
* onRelease: Callback function on mouse up
|
|
371
|
+
*/
|
|
372
|
+
addNumber(name: string | null, value: number, callback: any, options?: any): any;
|
|
373
|
+
static VECTOR_COMPONENTS: {
|
|
374
|
+
0: string;
|
|
375
|
+
1: string;
|
|
376
|
+
2: string;
|
|
377
|
+
3: string;
|
|
378
|
+
};
|
|
379
|
+
_addVector(numComponents: number, name: string, value: any[], callback: any, options?: any): any;
|
|
380
|
+
/**
|
|
381
|
+
* @method addVector N (2, 3, 4)
|
|
382
|
+
* @param {String} name Component name
|
|
383
|
+
* @param {Array} value Array of N components
|
|
384
|
+
* @param {Function} callback Callback function on change
|
|
385
|
+
* @param {Object} options:
|
|
386
|
+
* disabled: Make the component disabled [false]
|
|
387
|
+
* step: Step of the inputs
|
|
388
|
+
* min, max: Min and Max values for the inputs
|
|
389
|
+
* onPress: Callback function on mouse down
|
|
390
|
+
* onRelease: Callback function on mouse is released
|
|
391
|
+
*/
|
|
392
|
+
addVector2(name: string, value: any[], callback: any, options: any): any;
|
|
393
|
+
addVector3(name: string, value: any[], callback: any, options: any): any;
|
|
394
|
+
addVector4(name: string, value: any[], callback: any, options: any): any;
|
|
395
|
+
/**
|
|
396
|
+
* @method addSize
|
|
397
|
+
* @param {String} name Component name
|
|
398
|
+
* @param {Number} value Default number value
|
|
399
|
+
* @param {Function} callback Callback function on change
|
|
400
|
+
* @param {Object} options:
|
|
401
|
+
* hideName: Don't use name as label [false]
|
|
402
|
+
* disabled: Make the component disabled [false]
|
|
403
|
+
* units: Unit as string added to the end of the value
|
|
404
|
+
*/
|
|
405
|
+
addSize(name: string, value: any, callback: any, options?: any): any;
|
|
406
|
+
/**
|
|
407
|
+
* @method addOTP
|
|
408
|
+
* @param {String} name Component name
|
|
409
|
+
* @param {String} value Default numeric value in string format
|
|
410
|
+
* @param {Function} callback Callback function on change
|
|
411
|
+
* @param {Object} options:
|
|
412
|
+
* hideName: Don't use name as label [false]
|
|
413
|
+
* disabled: Make the component disabled [false]
|
|
414
|
+
* pattern: OTP numeric pattern
|
|
415
|
+
*/
|
|
416
|
+
addOTP(name: string, value: string, callback: any, options?: any): any;
|
|
417
|
+
/**
|
|
418
|
+
* @method addPad
|
|
419
|
+
* @param {String} name Component name
|
|
420
|
+
* @param {Array} value Pad value
|
|
421
|
+
* @param {Function} callback Callback function on change
|
|
422
|
+
* @param {Object} options:
|
|
423
|
+
* disabled: Make the component disabled [false]
|
|
424
|
+
* min, max: Min and Max values
|
|
425
|
+
* padSize: Size of the pad (css)
|
|
426
|
+
* onPress: Callback function on mouse down
|
|
427
|
+
* onRelease: Callback function on mouse up
|
|
428
|
+
*/
|
|
429
|
+
addPad(name: string, value: any[], callback: any, options?: any): any;
|
|
430
|
+
/**
|
|
431
|
+
* @method addProgress
|
|
432
|
+
* @param {String} name Component name
|
|
433
|
+
* @param {Number} value Progress value
|
|
434
|
+
* @param {Object} options:
|
|
435
|
+
* min, max: Min and Max values
|
|
436
|
+
* low, optimum, high: Low and High boundary values, Optimum point in the range
|
|
437
|
+
* showValue: Show current value
|
|
438
|
+
* editable: Allow edit value
|
|
439
|
+
* callback: Function called on change value
|
|
440
|
+
*/
|
|
441
|
+
addProgress(name: string, value: number, options?: any): any;
|
|
442
|
+
/**
|
|
443
|
+
* @method addFile
|
|
444
|
+
* @param {String} name Component name
|
|
445
|
+
* @param {Function} callback Callback function on change
|
|
446
|
+
* @param {Object} options:
|
|
447
|
+
* local: Ask for local file
|
|
448
|
+
* disabled: Make the component disabled [false]
|
|
449
|
+
* read: Return the file itself (False) or the contents (True)
|
|
450
|
+
* type: type to read as [text (Default), buffer, bin, url]
|
|
451
|
+
*/
|
|
452
|
+
addFile(name: string, callback: any, options?: any): any;
|
|
453
|
+
/**
|
|
454
|
+
* @method addTree
|
|
455
|
+
* @param {String} name Component name
|
|
456
|
+
* @param {Object} data Data of the tree
|
|
457
|
+
* @param {Object} options:
|
|
458
|
+
* icons: Array of objects with icon button information {name, icon, callback}
|
|
459
|
+
* filter: Add nodes filter [true]
|
|
460
|
+
* rename: Boolean to allow rename [true]
|
|
461
|
+
* onevent(tree_event): Called when node is selected, dbl clicked, contextmenu opened, changed visibility, parent or name
|
|
462
|
+
*/
|
|
463
|
+
addTree(name: string, data: any, options?: any): any;
|
|
464
|
+
/**
|
|
465
|
+
* @method addTabSections
|
|
466
|
+
* @param {String} name Component name
|
|
467
|
+
* @param {Array} tabs Contains objects with {
|
|
468
|
+
* name: Name of the tab (if icon, use as title)
|
|
469
|
+
* icon: Icon to be used as the tab icon (optional)
|
|
470
|
+
* iconClass: Class to be added to the icon (optional)
|
|
471
|
+
* svgClass: Class to be added to the inner SVG of the icon (optional)
|
|
472
|
+
* onCreate: Func to be called at tab creation
|
|
473
|
+
* onSelect: Func to be called on select tab (optional)
|
|
474
|
+
* }
|
|
475
|
+
* @param {Object} options
|
|
476
|
+
* vertical: Use vertical or horizontal tabs (vertical by default)
|
|
477
|
+
* showNames: Show tab name only in horizontal tabs
|
|
478
|
+
*/
|
|
479
|
+
addTabSections(name: string, tabs: any[], options?: any): any;
|
|
480
|
+
/**
|
|
481
|
+
* @method addCounter
|
|
482
|
+
* @param {String} name Component name
|
|
483
|
+
* @param {Number} value Counter value
|
|
484
|
+
* @param {Function} callback Callback function on change
|
|
485
|
+
* @param {Object} options:
|
|
486
|
+
* disabled: Make the component disabled [false]
|
|
487
|
+
* min, max: Min and Max values
|
|
488
|
+
* step: Step for adding/substracting
|
|
489
|
+
*/
|
|
490
|
+
addCounter(name: string, value: number, callback: any, options?: any): any;
|
|
491
|
+
/**
|
|
492
|
+
* @method addTable
|
|
493
|
+
* @param {String} name Component name
|
|
494
|
+
* @param {Number} data Table data
|
|
495
|
+
* @param {Object} options:
|
|
496
|
+
* hideName: Don't use name as label [false]
|
|
497
|
+
* head: Table headers (each of the headers per column)
|
|
498
|
+
* body: Table body (data per row for each column)
|
|
499
|
+
* rowActions: Allow to add actions per row
|
|
500
|
+
* onMenuAction: Function callback to fill the "menu" context
|
|
501
|
+
* selectable: Each row can be selected
|
|
502
|
+
* sortable: Rows can be sorted by the user manually
|
|
503
|
+
* centered: Center text within columns. true for all, Array for center selected cols
|
|
504
|
+
* toggleColumns: Columns visibility can be toggled
|
|
505
|
+
* filter: Name of the column to filter by text input (if any)
|
|
506
|
+
* filterValue: Initial filter value
|
|
507
|
+
* customFilters: Add selectors to filter by specific option values
|
|
508
|
+
*/
|
|
509
|
+
addTable(name: string, data: any, options?: any): any;
|
|
510
|
+
/**
|
|
511
|
+
* @method addDate
|
|
512
|
+
* @param {String} name Component name
|
|
513
|
+
* @param {String} dateValue
|
|
514
|
+
* @param {Function} callback
|
|
515
|
+
* @param {Object} options:
|
|
516
|
+
* hideName: Don't use name as label [false]
|
|
517
|
+
* today: Set current day as selected by default
|
|
518
|
+
* untilToday: Allow dates only until current day
|
|
519
|
+
* fromToday: Allow dates only from current day
|
|
520
|
+
*/
|
|
521
|
+
addDate(name: string, dateValue: string, callback: any, options?: any): any;
|
|
522
|
+
/**
|
|
523
|
+
* @method addMap2D
|
|
524
|
+
* @param {String} name Component name
|
|
525
|
+
* @param {Array} points
|
|
526
|
+
* @param {Function} callback
|
|
527
|
+
* @param {Object} options:
|
|
528
|
+
*/
|
|
529
|
+
addMap2D(name: string, points: any[], callback: any, options?: any): any;
|
|
530
|
+
/**
|
|
531
|
+
* @method addRate
|
|
532
|
+
* @param {String} name Component name
|
|
533
|
+
* @param {Number} value
|
|
534
|
+
* @param {Function} callback
|
|
535
|
+
* @param {Object} options:
|
|
536
|
+
*/
|
|
537
|
+
addRate(name: string, value: number, callback: any, options?: any): any;
|
|
538
|
+
}
|