protvista-utils

3.8.10 • Public • Published

protvista-utils

This is a utility package that groups several classes and method that are used by other protvista elements.

Here is the description anf reference for the utilities expose in this package.

ColorScaleParser

Region

ScrollFilter

withMargin

It's a way to extend protvista components to include the logic related with dealing with a property margin that follows the shape:

{
  top: 0,
  bottom: 0,
  left: 0,
  right: 0,
}

The embedded logic takes care of exposing the following attributes in the webcomponent:

  • margintop
  • marginbottom
  • marginleft
  • marginright

The attributes are added to the observedAttributes of the element, so a change in the dom will trigger the attributeChangedCallback method.

The element is also extended to have getters and setters for properties with the same name.

The approach of this implementations is similar to Higher order components in React.

Package Sidebar

Install

npm i protvista-utils

Weekly Downloads

107

Version

3.8.10

License

ISC

Unpacked Size

79.7 kB

Total Files

16

Last publish

Collaborators

  • xwatkins
  • ljgarcia
  • mmahmoudy
  • 4ndr01d3
  • aurel-l
  • swaathik
  • dlrice2