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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sdk-window

v2.2.2

Published

Resizable and movable (Angular) modal window.

Downloads

22

Readme

Description:

The sdk-window component is a reusable, modular window that can be resized or moved around the page.

NOTE: This package leverages the sdk-core-library for core configurations (i.e., colors, icons, etc.).

INSTALLATION:

Using NPM:

npm install --save sdk-window

CONFIGURATION:

To configure the sdk-window for your application, add the following lines to your app.module.ts file:

import { SDKWindowModule } from 'sdk-window';

@NgModule({
    imports: [
        SDKWindowModule
    ]
})
export class AppModule { }

PROPERTIES:

Inputs:

  • parent: (string): The id of the parent object. [Default "webspace"]
  • windowID: (string): The id for the window.
  • windowTitle: (string): The title to show in the header bar.
  • windowColor: (string): The header bar background color. [Default "rgb(36, 144, 201)"]
  • windowTitleColor: (string): The title font color. [Default "white"]
  • windowContent: (TemplateRef): The reference name of the content template for the window.
  • windowContentData: (any | undefined) Data passed into the content template.
  • windowActions: (TemplateRef): The reference name of the actions template (i.e., buttons) to show in the right side of the header.
  • windowActionsData: (any | undefined) Data passed into the actions template.
  • zIndex: (number): The z-index (style) for the window. [Default 0]
  • top: (string): Top position of the window. [Default "0"]
  • left: (string): Left position of the window. [Default "0"]
  • height: (string): Height of the window. [Default "500"]
  • width: (string): Width of the window. [Default "600"]
  • minHeight: (string): Minimum height of the window. [Default "300"]
  • minWidth: (string): Minimum width of the window. [Default "300"]
  • overflow: (string): Allow window content to be scrollable. [Default: "auto"]
  • init: (boolean): Initially show the window. [Default false]
  • fullscreen: (boolean): Set window to fullscreen (maximized). [Default false]
  • centered: (boolean): Center window on init. [Default true]
  • resizable: (boolean): Allow window to be resizable. [Default true]
  • closeable: (boolean): Show close icon (right side of header). [Default true]
  • maximize: (boolean): Show maximize icon (left side of header). [Default true]
  • highlight: (boolean): Highlight window on focus. [Default true]

Outputs:

  • adjustmentEvent Emitted when the window is resized or moved.

    returns:

    {
        window: (pointer to html element),
        top: (number),
        left: (number),
        height: (number),
        width: (number)
    }
  • closeEvent Emitted when the window is closed.

USAGE:

<sdk-window
    [windowID]="'Demo'"
    [windowTitle]="'SDK-WINDOW Demo'"
    [windowContent]="content"
    [top]="'10'"
    [left]="'10'"
    [init]=true
    [centered]=false
    (adjustmentEvent)="windowMove($event)">
</sdk-window>

<ng-template #content>
    <div>window: {{ winProps.window }}</div>
    <div>top: {{ winProps.top }}</div>
    <div>left: {{ winProps.left }}</div>
    <div>height: {{ winProps.height }}</div>
    <div>width: {{ winProps.width }}</div>
</ng-template>
public windowMove(event: any) {
    this.winProps = event;
}