This package has been deprecated

Author message:

This component is deprecated. Use 'arc-messages' instead.

@advanced-rest-client/arc-messages-service
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Published on NPM

Build Status

Published on webcomponents.org

arc-messages-service

A service to synchronize messages from service provider to app users.

The service queries ARC application server for new messages and stores in local data store. The messages are presented to the user in message center of Advanced REST Client.

Usage

Installation

npm install --save @advanced-rest-client/arc-messages-service

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/arc-messages-service/arc-messages-service.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <arc-messages-service
      platform="electron-app"
      channel="stable"
      automessages
      @messages-changed="${this._messagesHandler}"
      @unread-changed="${this._unreadHandler}"></arc-messages-service>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Note that unread messages are included in messages.

To mark a message as read use markRead() function which takes message key property as only argument. This operation changes size of unread property.

To mark all are read use makrkAllRead() function. This eventually clears unread array.

Development

git clone https://github.com/advanced-rest-client/arc-messages-service
cd arc-messages-service
npm install

Running the tests

npm test

API components

This components is a part of API components ecosystem

Package Sidebar

Install

npm i @advanced-rest-client/arc-messages-service

Weekly Downloads

2

Version

3.0.1

License

Apache-2.0

Unpacked Size

73.3 kB

Total Files

10

Last publish

Collaborators

  • carowright
  • jarrodek
  • lbauret
  • twoplustwoone