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

@wincc-oa/wui-alert-data

v1.2.2

Published

WinCC Open Architecture Dashboard project.

Readme

WinCCOA WebComponent Dashboard — wui-alert-data

This package is part of the workspace for the WinCC Open Architecture WebComponent Dashboard, built using Lit and managed with Nx.

Usage information and reference details can be found in the WinCC OA documentation.

Overview

Live alarm subscription and history queries for WinCC OA. The AlertService is a tsyringe singleton; the same connect() call from multiple consumers shares one underlying server subscription via shareReplay({ refCount: true }).

Services

import { AlertService } from '@wincc-oa/wui-alert-data/alert-service.js';
import type { Alert } from '@wincc-oa/wui-models/interfaces/wui-alert/alert.js';
import { container } from 'tsyringe';

const alertService = container.resolve(AlertService);

alertService.connect().subscribe((alerts: Alert[]) => {
  const active = alerts.filter((a) => a.direction); // see direction semantics below
});

Alert fields:

| Field | Type | Description | | ---------------- | ---------- | --------------------------------------------------------------------------------------------------- | | dpeName | string | Full DP name e.g. System1:Foo.float | | text | string | Alarm text (may be "") | | color | string | Hex alarm color, e.g. "#FF0000" — ready to use as a CSS color (see Alarm colors) | | prior | number | Priority number, e.g. 60 | | abbr | string | Class abbreviation, e.g. "A" (Alert), "I" (Info) | | direction | boolean | true = CAME (active), false = WENT (cleared) | | ackState | AckState | Acknowledgment state | | ackable | boolean | Whether the alarm can be acknowledged | | formattedValue | string | Value with unit, e.g. "3.69 m/s²" |

Direction semantics — read this carefully: direction === true means the alarm CAME (is currently active). direction === false means it WENT (cleared). This is the opposite of what most people guess; filter on direction === true for an "active alarms" list.

connect(filter?) filter caveat: the optional filter is forwarded to the backend as etm.alert.connect { filter }. The backend rejects glob patterns (e.g. Foo_*.float). For wildcard semantics, omit the filter and filter client-side.

Acknowledging is a dpSet of value 2 to the alarm-handling attribute on the affected DP. It requires write permission:

oaRxJsApi.dpSet(`System1:${dpName}:_alert_hdl.._ack`, 2).subscribe();

dpName is the bare DPE name (without the System1: prefix), e.g. Foo.float.

alertService.getAlertArchive(startDate, endDate, filter, maxResults /* default 1000 */).subscribe((archive) => {
  // archive.alerts: { [id: string]: Alert } — same shape as connect()
});
alertService.listFilters().subscribe((filters) => {
  // [{ dp, name, label }, …] — includes a synthetic "Unfiltered" entry first
});

Alarm colors

Alert.color is a hex string (e.g. "#FF0000") that the standard backend handler resolves from the configured color name. Drop it directly into a CSS color slot:

html`<ix-pill variant="custom" background=${alert.color}>${alert.abbr}</ix-pill>`;
html`<ix-icon style="color: ${alert.color}" name="warning-rhomb-filled"></ix-icon>`;

When you have a color name instead — typically when reading alert range configuration or subscribing directly to a DP's alarm-color attribute (:_alert_hdl.._act_state_color) — resolve it through the theme's --oa-color--<name> CSS variables. See @wincc-oa/wui-oarxjs-context README for the dpconnectalertcolor context binding that automates this for context-generator pipelines.

License

MIT