2.4.0 • Published 7 years ago

angular-material-widget-engine v2.4.0

Weekly downloads
15
License
ISC
Repository
github
Last release
7 years ago

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

KeyValueDescription
dynamicColumnsbooleanEnable / disable the feature of allowing user to add more remove empty columns (default is true)
resizeableColumnsbooleanEnable / disable the feature of allowing user to adjust the width of each column

Column Configuration

KeyValueDescription
namecolumn-1Any descriptive name for the column
background#FFFFFFAny hex color code as the background color of the column
size50A 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

KeyValueDescription
namewidget-1Any descriptive name for the widget
titleReport OneTitle displayed in the toolbar for each widget
typeinclude or iframe or htmlThe content of widget can be fetched through ng-include or any external content through iFrame or simple HTML content string through HTML
resizetrueIt allows the content to be resized vertically by the user
minHeight300Minimum height of the widget during resizing
maxHeight500Maximum height of the widget possible during resizing
stickytrueSet it to true if widget should not be replaced or moved by another widget
sitckyControltrueSet it to true to allow the lock icon to show up on tool bar so user can toggle the sticky feature (default is false)
fullscreenControltrueShow the button control for fullscreen toggle or not in the widget toolbar (default is true)
closeControltrueShow the button control for removing widget or not in the widget toolbar (default is true)
controlsLayoutdefault or menu or fabView 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

2.4.0

7 years ago

2.3.8

7 years ago

2.3.7

7 years ago

2.3.6

7 years ago

2.3.5

8 years ago

2.3.4

8 years ago

2.3.3

8 years ago

2.3.2

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.3

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.4

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago