Commit 63296f701dd2f3bf2fadd5828ae1aab5f9d5eaee
1 parent
a70a4b72
Update widget autocompletion models
Showing
1 changed file
with
29 additions
and
1 deletions
... | ... | @@ -365,6 +365,21 @@ export const widgetContextCompletions: TbEditorCompletions = { |
365 | 365 | meta: 'property', |
366 | 366 | type: 'object' |
367 | 367 | }, |
368 | + datasources: { | |
369 | + description: 'Array of resolved widget datasources.', | |
370 | + meta: 'property', | |
371 | + type: 'Array<<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/widget.models.ts#L250">Datasource</a>>' | |
372 | + }, | |
373 | + data: { | |
374 | + description: 'Array of latest datasources data.', | |
375 | + meta: 'property', | |
376 | + type: 'Array<<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/widget.models.ts#L275">DatasourceData</a>>' | |
377 | + }, | |
378 | + timeWindow: { | |
379 | + description: 'Current widget timewindow (applicable for timeseries widgets).', | |
380 | + meta: 'property', | |
381 | + type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/time/time.models.ts#L104">WidgetTimewindow</a>' | |
382 | + }, | |
368 | 383 | units: { |
369 | 384 | description: 'Optional property defining units text of values displayed by widget. Useful for simple widgets like cards or gauges.', |
370 | 385 | meta: 'property', |
... | ... | @@ -376,10 +391,23 @@ export const widgetContextCompletions: TbEditorCompletions = { |
376 | 391 | type: 'number' |
377 | 392 | }, |
378 | 393 | hideTitlePanel: { |
379 | - description: 'Manages visibility of widget title panel. Useful for widget with custom title panels or different states.', | |
394 | + description: 'Manages visibility of widget title panel. Useful for widget with custom title panels or different states. <b>updateWidgetParams()</b> function must be called after this property change.', | |
380 | 395 | meta: 'property', |
381 | 396 | type: 'boolean' |
382 | 397 | }, |
398 | + widgetTitle: { | |
399 | + description: 'If set, will override configured widget title text. <b>updateWidgetParams()</b> function must be called after this property change.', | |
400 | + meta: 'property', | |
401 | + type: 'string' | |
402 | + }, | |
403 | + detectChanges: { | |
404 | + description: 'Trigger change detection for current widget. Must be invoked when widget HTML template bindings should be updated due to widget data changes.', | |
405 | + meta: 'function' | |
406 | + }, | |
407 | + updateWidgetParams: { | |
408 | + description: 'Updates widget with runtime set properties such as <b>widgetTitle</b>, <b>hideTitlePanel</b>, etc. Must be invoked in order these properties changes take effect.', | |
409 | + meta: 'function' | |
410 | + }, | |
383 | 411 | defaultSubscription: { |
384 | 412 | description: 'Default widget subscription object contains all subscription information,<br>including current data, according to the widget type.', |
385 | 413 | meta: 'property', | ... | ... |