@next-level-integration/system-messages
TypeScript icon, indicating that this package has built-in type declarations

10.0.8-beta • Public • Published

System-messages

This library allow user to receive notification from system-messages server, where user just need to provide the request url to component. It contain two components:

  1. system-messages-display - a sidenav bar to show user a list of messages, with mark as read buttons.
  2. system-message-display-icon - an icon which will show in ui for user to open the sidenav bar.

How to use

  1. Both component need to provide the same parameter systemMessageProxyUrl , this parameter is to tell the component where to call to get systems messages from the server / backend.
  2. This library contain its own data model, please double check the data model from server is same as system-messages.model.ts
  3. This library contain its own translation, which use ngx-translate. Translation json are located in assets folder.
    1. after build this library make sure the assets folder also copy to the dist folder.
    2. after npm publish, please make sure the main project which will import this lib, able to support multiple translate http loader. Without support multi loader, the translation for this library will not work, and it might clash to your main project translation
      1. E.g. export function HttpLoaderFactory(http: HttpClient) { return new MultiHttpLoader(http, [ {prefix: "./lib/system-messages/assets/i18n/", suffix: ".json"}, {prefix: "./assets/i18n/", suffix: ".json"}, ]);}
      2. After npm install this lib in your main project, then add below configuration into angular.json assets path.
        1. "assets": [ "src/assets", ...... ..... ... { "glob": "**/*", "input": "./node_modules/@next-level-integration/system-messages/assets", "output": "./lib/system-messages/assets/" } ],
      3. then the translation will work as expected in the system-messages components. Above point 1, 1st prefix map is actually refer to point 2 output folder.

Readme

Keywords

none

Package Sidebar

Install

npm i @next-level-integration/system-messages

Weekly Downloads

15

Version

10.0.8-beta

License

none

Unpacked Size

228 kB

Total Files

40

Last publish

Collaborators

  • mkorsch-nli
  • sdtyn
  • mzimmermann
  • ykh
  • yousof56
  • hashemnik
  • albertarvato
  • kohl077
  • nagendra.donthi
  • echeah
  • sbienert