<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>notifications JavaScript API Module</title><link>https://community.telligent.com/community/13/w/api-documentation/75723/notifications-javascript-api-module</link><description>&lt;p&gt;&lt;span&gt;Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.&lt;/span&gt;&lt;/p&gt;</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>notifications JavaScript API Module</title><link>https://community.telligent.com/community/13/w/api-documentation/75723/notifications-javascript-api-module</link><pubDate>Fri, 08 Mar 2024 17:51:09 GMT</pubDate><guid isPermaLink="false">5eae09cb-2fd2-4566-95c5-92aaff224bb3</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/13/w/api-documentation/75723/notifications-javascript-api-module#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 03/08/2024 17:51:09&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;jQuery.telligent.evolution.notifications&lt;/h3&gt;
&lt;p&gt;This module adds support for showing temporary notifications in the top right of the browser&amp;#39;s viewport. Multiple messages are stacked.&lt;/p&gt;
&lt;h3&gt;Methods&lt;/h3&gt;
&lt;h4&gt;addFilter&lt;/h4&gt;
&lt;p&gt;Adds a client-side filter to prevent the raising of client messages about new notifications. Returns a specific id for the filter handler.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.addFilter(notificationTypeId, handler);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;options:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;notificationTypeId&lt;/code&gt;: The notification type ID to filter&lt;/li&gt;
&lt;li&gt;&lt;code&gt;handler&lt;/code&gt;: callback called before a notification message is raised. Passed the notification data. Returning true allows the notification message to be raised. Returning false prevents it. If a handler is not provided, the default behavior is to prevent all messages of the notification type id.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;#### removeFilter&lt;/p&gt;
&lt;p&gt;Removes a client-side filter notification filter.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.addFilter(notificationTypeId, filterId);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;options:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;notificationTypeId&lt;/code&gt;: The notification type ID for which to remove the filters&lt;/li&gt;
&lt;li&gt;&lt;code&gt;filterId&lt;/code&gt;: When provided, removes only the specific handler matching the filter ID (returned from addFilter). When not provided, all handlers for the notification type id are removed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;clearFilters&lt;/h4&gt;
&lt;p&gt;Clears all notification filters.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.clearFilters();
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;show&lt;/h4&gt;
&lt;p&gt;Shows the provided HTML message in the notifications area of the page. Returns the unique ID of the notification message.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.show(message, options);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;options:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;duration&lt;/code&gt;: the number of milliseconds to show the message. While hovered, messages stay visible even if the duration has passed.
&lt;ul&gt;
&lt;li&gt;default: &lt;code&gt;5000&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;width&lt;/code&gt;: the width of the notification in pixels
&lt;ul&gt;
&lt;li&gt;default: &lt;code&gt;200&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;type&lt;/code&gt;: the textual CSS message type (success, warning, error)
&lt;ul&gt;
&lt;li&gt;default: &lt;code&gt;empty&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mode&lt;/code&gt;: the placement of the notification (&amp;#39;alert&amp;#39; or &amp;#39;banner&amp;#39;)
&lt;ul&gt;
&lt;li&gt;default: &lt;code&gt;alert&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt;: a unique ID for the message. If one is not provided, one will be generated. IDs can passed in and re-used in order to alter the content of an already-displayed message.
&lt;ul&gt;
&lt;li&gt;default: &lt;code&gt;null&lt;/code&gt; (auto-generated)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;transient&lt;/code&gt;: when true, is not re-shown on next page load if its previous duration did not elapse
&lt;ul&gt;
&lt;li&gt;default: &lt;code&gt;false&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onClick&lt;/code&gt;: callback called when the message is clicked. When an &lt;code&gt;onClick&lt;/code&gt; handler is provided, the message has an different styling when hovered over&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onClose&lt;/code&gt;: callback called when the message is explicitly closed by the user. When onClose returns a promise, the message is not closed until the promise resolves.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onShow&lt;/code&gt;: callback called when the message is shown&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onHide&lt;/code&gt;: callback called when the message disappears either automatically or explicitly&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onOver&lt;/code&gt;: callback called when the mouse is over the message&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onOut&lt;/code&gt;: callback called when the mouse leaves the message&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;hide&lt;/h4&gt;
&lt;p&gt;Hides a single notification message by its id&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.hide(id);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Hides all open notifications and execute a callback function&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.hide(callback);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;unread&lt;/h4&gt;
&lt;p&gt;Updates or adjusts unread counts to or by value. The value can be an explicit value or a + or - prefixed value to represent an offset.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.notifications.unread(value, options);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;options:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;isLocal&lt;/code&gt;: the value applies only to the current tab/window.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;namespace&lt;/code&gt;: the namespace of the component applying the unread change.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Retrieves the count of unread items as an object: { local: 2, global: 2 }&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evoution.notifications.unread();
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>