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,6 +365,21 @@ export const widgetContextCompletions: TbEditorCompletions = { | ||
365 | meta: 'property', | 365 | meta: 'property', |
366 | type: 'object' | 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 | units: { | 383 | units: { |
369 | description: 'Optional property defining units text of values displayed by widget. Useful for simple widgets like cards or gauges.', | 384 | description: 'Optional property defining units text of values displayed by widget. Useful for simple widgets like cards or gauges.', |
370 | meta: 'property', | 385 | meta: 'property', |
@@ -376,10 +391,23 @@ export const widgetContextCompletions: TbEditorCompletions = { | @@ -376,10 +391,23 @@ export const widgetContextCompletions: TbEditorCompletions = { | ||
376 | type: 'number' | 391 | type: 'number' |
377 | }, | 392 | }, |
378 | hideTitlePanel: { | 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 | meta: 'property', | 395 | meta: 'property', |
381 | type: 'boolean' | 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 | defaultSubscription: { | 411 | defaultSubscription: { |
384 | description: 'Default widget subscription object contains all subscription information,<br>including current data, according to the widget type.', | 412 | description: 'Default widget subscription object contains all subscription information,<br>including current data, according to the widget type.', |
385 | meta: 'property', | 413 | meta: 'property', |