Socket
Book a DemoInstallSign in
Socket

@smals-belgium/myhealth-wc-integration-angular

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smals-belgium/myhealth-wc-integration-angular

Angular goodies for MyHealth web component development

4.1.0
latest
Source
npmnpm
Version published
Weekly downloads
32
113.33%
Maintainers
1
Weekly downloads
 
Created
Source

MyHealth - Web Component Integration for Angular

Collection of Angular goodies to help build MyHealth Web Components.

Based on Angular v19

This library is published to the NPM registry at: https://www.npmjs.com/package/@smals-belgium/myhealth-wc-integration-angular

Documentation

BaseWebComponent (component class)

Abstract base component class that can be used as a base class to implement MyHealth web components.

This class defines the inputs and outputs according to the MyHealth specification and provides the following goodies:

  • validate the given version info and ensure it is compatible with the version of the spec used by this component
  • validate the inputs to ensure they have been set and have the right content
  • possibity to add extra required input that needs to be validated using extraRequiredFields
  • provides a onPropsChanged() method as a convenience to handle input changes
  • possibility to use the onPrint output to output a Printable

BaseDataFetchHelper<T> (helper class)

This abstract base helper class manages fetching data from the cache, the offline data storage, or the backend.

When getting data, the logic is as follows:

  • If the user is offline authenticated and offline storage is enabled, it tries to load data from the offline data storage.
    • If no data is found offline, it falls back to the backend.
    • If offline storage is expected but unavailable, it throws an error.
  • If the user is online authenticated and caching is allowed, it checks the cache (with coordination to avoid redundant backend calls).
    • If cached data is unavailable, it fetches from the backend.
  • If the user is online authenticated and caching is bypassed, it fetches directly from the backend.

When online, retrieved data is stored in both the cache and the offline data storage (if applicable) for future use.

Subclasses must implement getDataFromBackend() to define how backend data is retrieved.

Utilities

const delay = async function<T>(ms:number, fn:()=>Promise<T>): Promise<T>

Return a promise that will be resolved with the value (of type T) returned by fn(), which is invoked after ms milliseconds

const isMobileNative = (): boolean

Return true if embedded in a mobile native application (e.g. Ionic)

const isTouchDevice = (): boolean

Return true if this is a touch device (smartphone, tablet, etc.)

Keywords

myhealth

FAQs

Package last updated on 25 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.