• This repository has been archived on 04/Dec/2019
  • Stars
    star
    577
  • Rank 76,911 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A feature-rich but lightweight ES6 AngularJS Data Table crafted for large data sets!

angular-data-table

Join the chat at https://gitter.im/Swimlane/angular-data-table npm-version Dependency Status devDependency Status download-count

angular-data-table is a AngularJS directive for presenting large and complex data. It has all the features you would expect from any other table but in a light package with no external depedencies. The table was designed to be extremely flexible and light; it doesn't make any assumptions about your data or how you: filter, sort or page it.

It was engineered from its conception to handle thousands of rows without sacrificing performance. It was built for modern browsers using ES6, CSS3 and HTML5 and only supports Evergreen Browsers and Angular >= 1.4.x and < 1.6.0.

Sadly, this project is not Angular2 upgrade compatible. Fortunately, we have authored ngx-datatable which is the successor to this project. We are going to slowly be transitioning this project maintenance mode. We will continue to provide feedback to the community and accept PRs but we won't be doing any major new development.

See live demos here.

Features

  • Handle large data sets ( Virtual DOM )
  • Left and Right Column Pinning
  • Column Reordering
  • Column Resizing
  • Intelligent Column Width Algorithms ( Force fill / Flex-grow )
  • Horizontal/Vertical Scrolling
  • Virtual Paging WITH linked traditional pager
  • Tree Grids
  • Row Grouping
  • Checkbox and Row Selection ( multi / single / keyboard / touch )
  • Light codebase / No external deps
  • Client-side AND Server Pagination / Sorting
  • Rich header / column templates
  • Fixed AND Fluid height
  • Decoupled themeing with included Google Material theme
  • Decoupled Cell tooltips on overflow
  • Decoupled Column Add/Removing Menu
  • Expressive Syntax

Using It

Download

  • NPM npm install angular-data-table
  • JSPM jspm install github:swimlane/angular-data-table
  • BOWER bower install angular-data-table

or Github download or clone of course!

Include

You've got 5 different options to include this in your build depending on your setup.

  • ./release/dataTable.js - A standalone file that was compiled with Babel (UMD)
  • ./release/dataTable.min.js - A minified standalone file that was compiled with Babel (UMD)
  • ./release/dataTable.cjs.js - A standalone file that was compiled with Babel (CommonJS)
  • ./release/dataTable.es6.js - Raw ES6 Version.

All distributions include babel helpers, so they do not have to be included separately.

There is also the CSS too:

  • ./release/dataTable.css - The base CSS, pretty much required
  • ./release/material.css - Material theme
  • ./release/icons.css - If you want to show fancy icons when sorting

Usage

Include the data-table module as a dependency:

    var module = angular.module('myApp', [ 'data-table' ]);

Set the data and the options in your controller:

    module.controller('HomeController', function($scope){
      $scope.options = {
        scrollbarV: false
      };

      $scope.data = [
        { name: 'Austin', gender: 'Male' },
        { name: 'Marjan', gender: 'Male' }
      ];
    });

then using expressive markup in your template:

    <dtable options="options" rows="data" class="material dt">
      <column name="Name" width="300" flex-grow="2"></column>
      <column name="Gender">
        <strong>{{$row.name}}</strong>: {{$cell}}
      </column>
    </dtable>

and your off to the races! See live demos here.

API

The data table can be created with the following options:

  • checkboxSelection: Checkbox selection vs row click (default: false)
  • columnMode: Possible values are flex, force and standard (default: standard)
  • columns
    • canAutoResize: Whether the column can automatically resize to fill space in the table (default: true)
    • cellDataGetter: Type function. Returns content for the cellRenderer. If not provided, the cell data will be collected from row data instead (default: undefined)
    • cellRenderer: Type function. Returns HTML for the cell.
    • className: CSS class for the body cell (default: undefined)
    • comparator: Type function. Custom sort comparator, pass false if you want to do server sort
    • flexGrow: The growth factor relative to other columns (default: 0)
    • frozenLeft: Column is pinned to the left (default: false)
    • frozenRight: Column is pinned to the right (default: false)
    • group: Whether to group by the column (default: false)
    • headerCheckbox: Toggles the checkbox column in the header for selecting all values given to the grid (default: false)
    • headerClassName: CSS class for the header cell (default: undefined)
    • headerRenderer: Type function. Returns HTML for the cell (default: undefined)
    • isCheckboxColumn: Adds the checkbox selection to the column (default: false)
    • isTreeColumn: Adds +/- button and makes a secondary call to load nested data (default: false)
    • maxWidth: Maximum width, in pixels (default: undefined)
    • minWidth: Minimum width, in pixels (default: 100)
    • name: Name of the column
    • prop: Property to use to get the data
    • resizable: Whether the column can be resized (default: true)
    • sort: Default sort asecending/descending for the column (default: undefined)
    • sortBy: Property by which to sort (default: undefined)
    • sortable: Whether the column can be sorted (default: true)
    • template
    • width: Width, in pixels (default: 150)
  • emptyMessage: Message to show when array is presented but contains no values (default: 'No data to display')
  • footerHeight: Footer height in pixels. Pass a falsey value for no footer (default: 0)
  • headerHeight: Header height in pixels. Pass a falsey value for no header (default: 30)
  • loadingMessage: Loading message presented when the array is undefined (default: 'Loading...')
  • multiSelect: Whether users can select multiple items (default: false)
  • paging
    • externalPaging. Default false
    • size. Default undefined
    • count. Default 0
    • offset. Default 0
    • loadingIndicator. Default false
  • reorderable: Whether you can reorder columns (default: true)
  • rowHeight: Row height in pixels, necessary if using lazy rendering (default: 30)
  • scrollbarV: Enable vertical scrollbars (default: true)
  • selectable: Whether users can select items (default: false)

Contributing

Run Demos

Ensure you have the latest NPM and JSPM installed globally. If you don't already have JSPM installed run: npm install jspm -g.

  • npm install
  • jspm install
  • gulp watch serve
  • Open your browser to http://localhost:9000

Build

gulp release to build Modules, ES* via Babel and compile.

Credits

angular-data-table is a Swimlane open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.

More Repositories

1

ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
TypeScript
4,625
star
2

ngx-charts

📊 Declarative Charting Framework for Angular
TypeScript
4,285
star
3

ngx-graph

Graph visualization library for angular
TypeScript
927
star
4

ngx-ui

🚀 Style and Component Library for Angular
TypeScript
705
star
5

ngx-dnd

🕶 Drag, Drop and Sorting Library for Angular2 and beyond!
TypeScript
574
star
6

pyattck

A Python package to interact with the Mitre ATT&CK Framework
Python
465
star
7

node-microservice-demo

✨ Example project for Micro-services w/ Node + TypeScript + Express + Swagger + Docker
TypeScript
446
star
8

angular-model-factory

angular-model-factory makes working with RESTful APIs in AngularJS easy!
JavaScript
230
star
9

angular1-systemjs-seed

AngularJS 1.x + SystemJS Seed
JavaScript
210
star
10

elk-tls-docker

This repository contains code to create a ELK stack with certificates & security enabled using docker-compose
Python
183
star
11

soc-faker

A python package for use in generating fake data for SOC and security automation.
Python
158
star
12

atomic-operator

A Python package is used to execute Atomic Red Team tests (Atomics) across multiple operating system environments.
Python
136
star
13

trafficlight

🚦 Flexible NodeJS Routing Decorators for API Routing
TypeScript
73
star
14

mongtype

🚀 MongoDB Repository Pattern for Node written in TypeScript
TypeScript
65
star
15

ng1-ng4-webpack-lazy-uirouter

😁 Angular1 + Angular4 + Webpack2 + UI-Router + Lazy Loading + Babel
JavaScript
55
star
16

DocSPA

A documentation SPA in Angular.
TypeScript
46
star
17

coconspirators

📞 Microservice framework for RabbitMQ written in TypeScript
TypeScript
43
star
18

systemjs-route-bundler

SystemJS Route-Driven Bundler
JavaScript
41
star
19

PSAttck

PSAttck is a light-weight framework for the MITRE ATT&CK Framework.
PowerShell
38
star
20

trawl

A utility to trawl phishing domains and attempt to identify phishing kits as well as other malicious activity
Python
36
star
21

pyews

A Python package to interact with the both on-premises and Office 365 Exchange Web Services
Python
32
star
22

swimlane-python

🐍 Official Python client for the Swimlane API
Python
32
star
23

ngx-cron

🕒 User-friendly cron input...
TypeScript
32
star
24

qswag

Fast & Light Swagger generator for .NET Core
C#
28
star
25

ngx-charts-builder

🚀 Chart Builder for ngx-charts!
TypeScript
26
star
26

graphish

A Python package to search & delete messages from mailboxes in Office 365 using Microsoft Graph API
Python
25
star
27

makobot

🚨 Slack bot for cyber-security phishing
Python
21
star
28

el-segundo

💩 I don't always do dirty checking, but when I do, I use El Segundo.
JavaScript
20
star
29

python-office365

💼 Office 365 REST API wrapper. Strongly typed.
Python
19
star
30

swagger-changelog

Generate a changelog between two versions of a swagger spec
JavaScript
17
star
31

pyattck-data

This repository contains generated contextual data utilized by pyattck.
Python
17
star
32

cy-mockapi

Easily mock your REST API in Cypress using fixtures
TypeScript
16
star
33

CLAW

A packer utility to create and capture DFIR Image for use AWS & Azure
Shell
14
star
34

PSCVSS

A Windows PowerShell & PowerShell Core Module to calculate a CVSS3 Score based on a Vector string
PowerShell
12
star
35

pkgdrop

Easy deployment of ES modules without external connection needed at runtime
TypeScript
12
star
36

deepdive-domain-data

This repository contains data related to coronavirus & COVID-19 based domains identified by Swimlane's DeepDive research team
Python
11
star
37

ng-context-menu

Originally ianwalter/ng-context-menu
JavaScript
11
star
38

ngx-charts-dashboard

TypeScript
10
star
39

cy-dom-diff

Allows matching chunks of DOM against HTML; including dynamic content.
TypeScript
9
star
40

gulp-dotnet

GulpJS plugin for DOTNET Core that builds, starts and updates
JavaScript
7
star
41

obfuscator

🗝 Obfuscate values based on JSON Schemas
TypeScript
6
star
42

swinger

Swagger aggregation for microservices
TypeScript
5
star
43

lint-rules

A collection of lint rules used in Swimlane Development Projects 📏🐼
4
star
44

rql-to-mongo

TypeScript
4
star
45

ews-builder

A Python package to build EWS SOAP request bodies from EWS WSDL
Python
3
star
46

atomic-operator-runner

A Python package used to run code remotely.
Python
3
star
47

blog-resources

This repository contains examples and references used by Swimlane Security Research Engineering
PowerShell
3
star
48

attck

This repository contains documentation for pyattck & PSAttck
JavaScript
2
star
49

prettier-config-swimlane

💄 Prettier configuration used in Swimlane projects.
JavaScript
2
star
50

R4T4

Roslyn code dom provider for T4 templates
C#
2
star
51

swimlane-learnupon

A python package for interacting with the LearnUpon LMS
Python
2
star
52

pyattck-data-models

A Python package containing data models for pyattck
Python
2
star
53

sw_sixgill_darkfeed

Python
2
star
54

turbine-environment-validator

Turbine Environment Validator
Python
1
star
55

sw_sixgill_dve_enrich

Python
1
star
56

swimmy

Swimmy is a Slack bot to interact with a Swimlane instance
Python
1
star
57

rabbitmq-docker

1
star
58

splunkapi3

Splunk API for Python 3.5
Python
1
star
59

docspa-starter

TypeScript
1
star
60

orient-client

Swimlane fork of OrientDB Client
C#
1
star
61

docker-login-tag-push-action

Github action for republishing docker image to a different repository,
1
star
62

prettier-setup

💅 A CLI tool for adding Prettier to projects.
JavaScript
1
star
63

sw_sixgill_dvefeed_ingestion

Python
1
star
64

sla_calculator

A python module that will calculate the sla time based on working hours and holidays.
Python
1
star
65

sw_sixgill_actionable_alerts

Python
1
star
66

swimlane-environment-validator

Python
1
star
67

techpubs-knowledgecenter

HTML
1
star
68

eslint-config

Rules for eslint used in Swimlane's Javascript (etc) development.
JavaScript
1
star