@rign/sh-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Core

This library was contains list off UI components, pipes and directives used in other Smart Home libraries and projects

List of content

Classes

  • DestroyableComponent - class contains onDestroy lifecycle function and build-in destroy$ property which can be use to unsubscribe subscriptions

Components

  • InlineEditComponent - component allow to edit inline using contenteditable property
  • LastUpdateComponent - simple component to display last update date or "never"

Form

Directives

  • LeadingZeroValueDirective [riLeadingZeroValue] - directive add leading "zero" if number is lower than 10 (using for time field)
  • NumberFieldDirective [riNumberField] - filter input chars and allow only numeric and dots keys
  • RangeNumberValue [riRangeNumberValue] - allow only values from passing range

Fields

  • DaysFieldComponent - days of week form field component
  • TimeFieldComponent - time field form component

Pipes

  • DaysPipe (days) - days of week pipe, convert number representing day of week to name: long, medium or short
  • TimePipe (time) - convert object TimeValue to string with leading zeros

Notifications

  • NotificationsService - proxy to any notifications module you use, has two methods:

    • error(title: string, message: string): void
    • success(title: string, message: string): void

Change Log

v1.0.0

  • start of project

Package Sidebar

Install

npm i @rign/sh-core

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

1.06 MB

Total Files

96

Last publish

Collaborators

  • rign