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

angular-material-widget-engine

v2.4.0

Published

Widget engine built using angular and angular-material

Downloads

80

Readme

Widget Engine

Introduction

A widget engine to create beautiful and interactive dashboards, reports, widgets containing HTML content, videos, canvas, what have you to display almost anything in the form of widgets, which can be dragged and dropped, maxmized. Customizable look and feel for each widget.

Features

  • Configurable number of columns
  • Configurable default widgets
  • Resize columns
  • Dynamic adding and removing of columns
  • Sticky widgets
  • Fullscreen widget
  • Dynamic adding and removing of widgets
  • Drag and drop widgets
  • Add custom widget controls
  • Events on custom widget controls
  • Everything configured through single JSON (sample)
  • Callbacks for any change in the widget engine

Demo (Simple, Dashboard)

Demo GIF

Dependencies

  • Angular
  • Angular Material
  • Material Icons Fonts

Usage

npm install angular-material-widget-engine
<body ng-app="MyApp">
    <div ng-controller="sampleCtrl">
        <md-widget-engine configuration='data.WEconfiguration' callback="data.WEcallback"></md-widget-engine>
    </div>
</body>
angular.module('MyApp', ['ngMaterial', 'ngMdWidgetEngine']);

angular.module('MyApp').controller('sampleCtrl', sampleCtrl);

// get your widget configuration from your API
function sampleCtrl($scope, $http){
    $http.get("/example/data/engine.json").success(function(data){
        $scope.data = {};
        $scope.data.WEconfiguration = data;
        $scope.data.WEcallback = function(e, configuration){
            console.log(e, configuration);
        };
        
    });
}

Engine Configuration

Key | Value | Description --------- | ------- | ------- | dynamicColumns | boolean | Enable / disable the feature of allowing user to add more remove empty columns (default is true) resizeableColumns | boolean | Enable / disable the feature of allowing user to adjust the width of each column

Column Configuration

Key | Value | Description --------- | ------- | ------- | name | column-1 | Any descriptive name for the column background | #FFFFFF | Any hex color code as the background color of the column size | 50 | A numeric value less than 100 for the width of the column with respective to with widget engine width (min. is 15) widgets | [...] | List of widgets in the column (with the below Widget Configurations)

Widget Configuration

Key | Value | Description --------- | ------- | ------- | name | widget-1 | Any descriptive name for the widget title | Report One | Title displayed in the toolbar for each widget type | include or iframe or html | The content of widget can be fetched through ng-include or any external content through iFrame or simple HTML content string through HTML resize | true | It allows the content to be resized vertically by the user minHeight | 300 | Minimum height of the widget during resizing maxHeight | 500 | Maximum height of the widget possible during resizing sticky | true | Set it to true if widget should not be replaced or moved by another widget sitckyControl | true | Set it to true to allow the lock icon to show up on tool bar so user can toggle the sticky feature (default is false) fullscreenControl | true | Show the button control for fullscreen toggle or not in the widget toolbar (default is true) closeControl | true | Show the button control for removing widget or not in the widget toolbar (default is true) controlsLayout | default or menu or fab | View the widget controls in different layouts in the toolbar customActions | [{"name": "android", "icon": "android", "event": "show_me_android", "tooltip": "A custom action"}] | Add any number of custom controls to the widget toolbar and widget engine will fire an event through the callback function specified in WECallback

Theming

Widget engine follows the guidelines set by the $mdThemingProvider