🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@smals-belgium/myhealth-wc-integration

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smals-belgium/myhealth-wc-integration

MyHealth web component inputs/outputs types definition

latest
Source
npmnpm
Version
5.0.3
Version published
Maintainers
1
Created
Source

MyHealth - Web Component Integration

This module defines the types used to describe the inputs and outputs exposed by the MyHealth Web Components.

It also provides a web component documentation template (markdown) at: README-component.template.md.

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

Documentation

See Guidelines

Note that the types used in this library are also thoroughly documented, so if you prefer to dig in through the code, that's also an option.

In that case your best starting point is MyHealthModule.
Everything else builds up from there.

Example web component module

Example of one web component module with multiple components that work together.
It uses the pre-fetch to load data before any component is displayed, and stores the data in the "cache service" provided by the host application.

import {
  MyHealthModuleBootstrap,
  family,
  MyHealthModuleManifest,
  openEventType
} from '@smals-belgium/myhealth-wc-integration';

import { hostServices } from './host';
import { getEmployees } from './employee.api';
import { EmployeeList } from './view/employee-list';
import { EmployeeDetail } from './view/employee-detail';


const tag = {
  list: 'wc-employee-list',
  detail: 'wc-employee-detail'
};

export const manifest: MyHealthModuleManifest = {
  specVersion: { major: 5, minor: 0, patch: 0 },
  family: family('wc-employees'),
  components: [{
    tagName: tag.list,
    events: [openEventType, refreshEventType],
  }, {
    tagName: tag.detail,
    requiredInputs: ['userId'],
    events: [refreshEventType],
  }]
};


export const bootstrap: MyHealthModuleBootstrap = ({ services }) => {
  Object.assign(hostServices, services);

  customElements.define(tag.list, EmployeeList);
  customElements.define(tag.detail, EmployeeDetail);

  return () => getEmployees()
    .then(employees => hostServices.cacheDataStorage.set('employees', employees));
}

Keywords

myhealth

FAQs

Package last updated on 18 Nov 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