npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@smals-belgium-shared/vidis-diarynote

v5.1.1

Published

Diary notes web component

Readme

Vidis diary notes web component

Context

VIDIS (Virtual Integrated Drug Information System) integrates several sources and systems:

In order to be reused by other software vendors, the VIDIS front-end is now split into web components. The container application will have to provide the input parameters to provision the web component with a working context.

Prerequisites

⚠️ IE (internet explorer) is not supported. You can include polyfill scripts ("polyfills") for the browsers that you must support.

Features

The diary notes web component allows patients and caregivers to keep detailed, organized records of health-related events, changes, or observations, which can be crucial for ongoing treatment or communication with healthcare providers.

List of diary notes

The main view displays a list of all diary notes that have been created by the patient or caregiver. For each entry, the following key information is shown:

  • Author: The person who wrote the note (e.g., patient, caregiver, or healthcare provider).
  • Creation Date: The date and time when the note was created.
  • Summary of the Note: A brief preview or summary of the note’s content, allowing users to quickly assess the subject matter of each entry without opening the full note.

Note management

  • Delete Notes: Users can delete notes that are no longer needed or relevant, helping to keep the diary organized and clutter-free.
  • Filtering: The component allows users to filter notes based on specific criteria, such as:
    • Period: Filter notes by date range, helping users review notes from a particular timeframe (e.g., last week, last month).
    • Author: Users can filter notes by the author, enabling them to view entries made by a specific person (e.g., only the patient’s notes or caregiver’s notes).
    • Roles: Filter by roles (e.g., caregiver, patient, healthcare provider) to distinguish the perspective of different authors.
  • Sorting: Notes can be sorted by different parameters, such as creation date or author, giving users more control over how they view the list.
  • Adding a Note:
    • Text-only Notes: Users can add new diary notes by simply typing in text.
    • Notes with Attachments: Users can also add attachments to their notes, allowing for richer documentation (e.g., photos, reports, or scanned documents).

⚠️ Attachment Restrictions: Attachments have size limitations (e.g., maximum file size) and format restrictions (e.g., PDF, JPG, PNG) as explained by safes cookbook document.

Pager alignment

Set the pager alignment in the application's global SCSS using the shared vidis.core mixin (default is right):

@include vidis.core($pager-alignment: center);

Inputs

| Name | Mandatory | Possible values | Description | |-----------------------------|-----------|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | userLanguage | true | en, de, fr, nl | The language holds the current language as a value, which means it can change over time if the user changes his/her preferred language. The web component adapts the translations based on the value set. The values of the language property are defined in the Language enum. | | configName | true | acc, prod | Name of the configuration the application and the components are being deployed to. | | authenticationStatus | true | unauthenticated, online-authenticated, offline-authenticated | Indicates the authentication state of the current user. When online-authenticated, the component can access all backend services. When offline-authenticated, the component uses cached data. When unauthenticated, no token is fetched from the host application. | | professional | false | true, false | Indicates whether the component is being used in a professional context. If set to true, the ssin input must be provided and will be used to identify the patient. If false, the SSIN will be retrieved automatically from the authentication token. Defaults to false. | | ssin | false | N/A | The patient's SSIN. Required when professional is true. When professional is false, this value is ignored and the SSIN is extracted from the authentication token. | | offlineDataStorageEnabled | false | true, false | A boolean flag indicating whether offline data storage has been enabled by the user. When true, the web component can store and retrieve data locally for offline access. | | isOfflineAuthenticated | false | true, false | Deprecated since v5.0.2 — use authenticationStatus instead. A boolean flag indicating whether the web component is being accessed from an offline state. | | exchangeClientId | false | N/A | The client ID used for the token exchange. |

Outputs

| Name | Type | Description | |-----------------|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| | getTotalItems | number | Emitted with the total number of diary notes. | | onDownload | {fileName: string, content: Blob, mimeType: string} | Emitted when a diary note attachment download is triggered. | | refresh | {status: 'request' | 'success' | 'fail'} | Emitted during data refresh cycles to indicate the current refresh status. | | onError | {reported: boolean} | Emitted after the error dialog closes. reported is true if the user confirmed reporting the error; otherwise false. |

Usage

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Vidis diary notes web component</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script type="module" src="vidis-diarynote/diarynote.js"></script>
	<link rel="stylesheet" href="vidis-diarynote/diarynote.css">
</head>
<body>
<script>
	const wc = document.createElement("vidis-diarynote");

	// Common inputs for all VIDIS web components
	// Refer to https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration for more details
	wc.language = 'en'
	wc.configName = 'acc';
	wc.services = {
		cache: {
			get: (key) => (undefined),
			set: (key, value) => {
			},
			remove: (key) => {
			}
		},
		getAccessToken: async (audience) => "TODO : the eHealth OAuth2 JWT token.",
		registerRefreshCallback: () => {
		}
	}

	// Example on how to provide extra input parameter(s), if needed / requested by the component
	// wc["attributeName"] = "myValue" 

	// Example on how to listen to output parameter(s)
	wc.addEventListener("eventName", (event) => {
		console.log(`event:`, event)
		const params = event.detail;
		console.log('param:', params);
	})

	// Example on how to listen to output parameter(s), for printing
	wc.addEventListener("onPrint", (event) => {
		console.log(`event:`, event)
		const params = event.detail;
		console.log('param:', params);

		const byteArray = new Uint8Array(atob(params.content).split('').map(char => char.charCodeAt(0)))
		const blob = new Blob([byteArray], {type: 'application/pdf'})
		const url = window.URL.createObjectURL(blob)
		window.open(url, '_blank').print()
	})

	document.body.append(wc);
</script>
</body>
</html>

Versioning

This project follows Semantic Versioning. Each release is categorized by major, minor, and patch updates. Significant changes that may break existing integrations will be introduced with major versions. Please check CHANGELOG.md file for more info.

Accessibility

We are committed to making our web components accessible to all users. Our components are:

  • Screen reader friendly : Designed to work well with popular screen readers (Talkback / VoiceOver / ...)
  • Responsive : Adapt to various screen sizes (desktop / mobile).
  • Compliant: Meet accessibility criteria, including ARIA labels and keyboard navigation

Customizations

The web components are build with Angular Material. The styling of it is overwritten by the “My Health” portal, by there design kit.

Icons

The web components display their icons with the Material Symbols Rounded font. The host application must provide this font and bind it to the icon CSS classes.

  1. Install the font dependency:

    npm install @fontsource/material-symbols-rounded
  2. Configure the design kit in your global stylesheet, with the font file and the icon CSS classes:

    @use '@myhealth-belgium/design-kit' as mh;
    
    @include mh.core(
      $use-material: true,
      $symbols-font-url: url('@fontsource/material-symbols-rounded/files/material-symbols-rounded-latin-400-normal.woff2'),
      $symbols-font-classes: ('material-icons', 'material-symbols', 'material-symbols-rounded')
    );
    @include mh.override-all-mat-components();
    • $symbols-font-url: path to the font file provided by @fontsource/material-symbols-rounded.
    • $symbols-font-classes: CSS classes the font is bound to. material-symbols-rounded is required with Angular Material 22.2+, which uses it as the default mat-icon font set when the Material Symbols Rounded font is loaded. Without it, icons are displayed as plain text.

Troubleshoots

If you encounter issues while using the web components :

  • Ensure that your token is valid and hasn't expired. For assistance, contact eHealth.
  • Ensure you are using the latest version of the web components
  • Ensure you are using a supported browser and that you have cleared your cache if issues persist.
  • Ensure your organization, browser or device don't block calls to VIDIS API by any way.
  • If none of the above, please contact [email protected] / [email protected]

License

GNU Lesser General Public License v3.0 or later