/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Martin Gleiß
* @copyright 2012 - 2022
* @license GPL [http://www.gnu.de]
* -----------------------------------------------------------------------------
*/
/**
* A widget to display messages received in json format
*
* @param {id=} unique id for this widget (optional)
* @param {item(dict,list)} an item contaning messages in json Format
* @param {text=title} a parameter name for the title (optional, default ='title')
* @param {text=subtitle} a parameter name for the subtitle (optional, default ='subtitle')
* @param {text=content} a parameter name for the message (optional, default ='content')
* @param {text=level} a parameter name for the severity level (optional, default ='level') - corresponds to an icon and color to be defined in the language file
*
* @author Wolfram v. Hülsen based on a widget from Bonze
*/
{% macro activelist(id, item_messages, title, subtitle, content, level) %}
{% endmacro %}
/**
* Displays a notification badge
*
* @param {id=} unique id for this widget (optional)
* @param {item(bool,num)} the item providing the value to show in badge
* @param {value[?]=} array of upper thresholds; the color according to greatest reached threshold is applied (optional)
* @param {color[?](hidden)=red} array of colors or 'hidden' to not diplay (optional, default red)
the first one is the base color for values below first threshold, so pass one color more than thresholds.
*
* @author Christian aka hhhc and Stefan Widmer
*/
{% macro badge(id, item, threshold, color) %}
{% endmacro %}
/**
* Show and hide a div or popup or collapse a section by a trigger item.
*
* @param {id} unique id for this widget. Use this id in a div in the data-bind attribute to bind it to that widget (mandatory)
* @param {item(bool,num)} an item which triggers the collapse
* @param {value[?]=0} the values on which the target will be collapsed (optional, default 0)
* @param {text(hide,show)=hide} inverts the widget's behaviour, i.e. 'show' opens a popup instead of closing it if the trigger value is matched (optional, default = hide)
*/
{% macro collapse(id, item_trigger, value, action) %}
{% set value = (value|default([0]) is iterable ? value|default([0]) : [value]) %}
{% endmacro %}
/**
* Displays a list of logging-information
*
* @param {id} unique id for this widget
* @param {text} the name of the log
* @param {value(1..50)} maximal number of entries (1 - 50)
*/
{% macro log(id, item, count) %}
{% endmacro %}
/**
* Displays a notification popup window with a message
*
* @param {id} unique id for this widget
* @param {item(bool,num)} an item witch triggers the popup: NOT 0 open it, 0 close it
* @param {item(str)=} an item with the dynamic message
* @param {item(num,str)=} an item with a timestamp (e.g. 2020-01-01T12:00:00.000000+01:00 or a Unix timestamp in Milliseconds)
* @param {text} a title of the messagebox
* @param {text=} an additional static text
* @param {text(info,error)=info} the mode: 'info', 'error' (optional, default 'info')
*/
{% macro message(id, item_trigger, item_message, item_timestamp, title, text, mode) %}
{% endmacro %}
/**
* Displays a notification edge window
*
* @param {id} unique id for this widget
* @param {item(bool,num)} an item witch triggers the notification
* @param {item(str)=} an item with the dynamic message
* @param {text=INFO} a word for the signal corner (optional, default 'INFO')
* @param {text} a title of the messagebox
* @param {text=} an additional static text
* @param {text(info,warning,error)=info} the level: 'info', 'warning', 'error' (optional, default 'info')
* @param {item(bool,num,str)=} an item to send an acknowledge message to (optional)
* @param {text=} the value which will be sent when the message gets acknowledged (optional, default 0 if item_ack is equal to item_trigger, otherwise 1).
* @param {item(str)=} an item to set the word in the signal corner. The value overrides the parameter "signal" (optional)
Caution: If this is set, the notification gets not shown until the item has sent a value.
* @param {item(str)=} an item to set the title of the message box. The value overrides the parameter "title" (optional)
Caution: If this is set, the notification gets not shown until the item has sent a value.
* @param {item(str)=} an item to set the level. The value overrides the parameter "level" (optional)
Caution: If this is set, the notification gets not shown until the item has sent a value.
*
* @author Martin Gleiss, Stefan Widmer
* @info enhancements inspired by Frank Benicke
*/
{% macro notify(id, item_trigger, item_message, signal, title, text, level, item_ack, ack_value, item_signal, item_title, item_level) %}
{{ title }}
{{ text }}
{% endmacro %}
/**
* Displays a notification toast
*
* @param {id=} unique id for this widget(optional) If set, id is also used as class name for the dynamic toast and can be used for css styling.
* @param {item(bool)} a trigger item (true to open, false to close)
* @param {item(str)=} an item containing the title(optional)
* @param {item(str)=} an item containing content (optional)
* @param {item(str)=} an item containing an icon (optional)
* @param {text=} title (optional)
* @param {text=} plain text or html code as content (optional, default = '')
* @param {text=} smartvisu icon to be used instead of the standard icons (info, warning, success, error). (optional, default = '')
* @param {text=} standard template to be used (success, error, warning, info) (optional, default = '')
* @param {item(bool, num, str, list)=} an item to send a value on button-press (optional, default = '')
* @param {text=} button text (optional, default = '') button will show only if text is specified
* @param {text=0} value to be sent when the button is pressed (optional, default = '0')
* @param {text(false,true)=true} an option to close the toast manually (true, false) (optional, default = 'true')
* @param {text=5000} time in miliseconds until toast will hide (optional, default = '5000'). 'false' makes it sticky
* @param {text(plain,fade,slide)=slide} fade-in effect to show the toast (plain, fade, slide) (optional, default = 'slide')
* @param {text(false,true)=true} option to display a bargraph loader (true, false) (optional, default = 'true')
* @param {color=#9EC600} font color, not to be defined if a template is used (optional, default = '')
* @param {color=gray} background color, not to be defined if a template is used (optional, default = 'gray')
* @param {text=5} number of stacked toasts. 'false' to show one stack at a time / count showing the number of stacked toasts (optional, default = '5')
* @param {text(left,center,right)=left} Alignment of text in the toast i.e. left, right, center (optional, default = 'left')
* @param {text=} Toast position on display (optional, bottom-left, bottom-right, top-left, top-right....) (optional, default = 'bottom-left')
*
* @author bonze
*/
{% macro toast(id, item_trigger, item_title, item_content, item_icon, text_title, text_content, text_icon, param_template, item_button, text_button, value_button, param_allowclose, param_hideafter, param_showhide, param_showloader, param_color, param_bgColor, param_stack, param_align, param_position ) %}
{% endmacro %}