Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@disane/ngx-taskboard

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@disane/ngx-taskboard

Yet another angular taskboard

  • 1.1.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
56
increased by273.33%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-taskboard

badge codecov badge npm bundle size (scoped)

ngx-taskboard is an implemention of my on taskboard, because all other taskboards are not that what I need. Feel free to contribute or leave some important feedback! Head over to the issues when you have questions or found a bug or leave a PR if you have som additions. Styling is made with Bootstrap, so it's 100% compatible.

Description

Taskboard

Dependencies

  • Angular 7
  • Bootstrap 4

Installation

npm install @disane/ngx-taskboard

Basic usage

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { NgxTaskboardModule } from '@disane/ngx-taskboard';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule, NgxTaskboardModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

app.component.html

<ngx-taskboard class="w-100 h-100" [items]="items" [hGroupKeys]="hGroupKeys" [vGroupKeys]="vGroupKeys"
  [vGroupKey]="vGroupKey" [hGroupKey]="hGroupKey" [sortBy]="sortBy" [invertGroupDirection]="false">
</ngx-taskboard>

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  public items = [
    { id: 1, name: 'Evaluate', color: '#fb3064', status: 'open', user: 'Marco', priority: 1 },
    { id: 2, name: 'Call customer', color: '#71dd8f', status: 'working', user: 'Jamie', priority: 1 },
    { id: 3, name: 'Fix bugs', color: '#29aa82', status: 'open', user: 'Malian', priority: 1 },
    { id: 3, name: 'Create SCSS', color: '#e14a2f', status: 'open', user: 'Marco', priority: 1 },
    { id: 4, name: 'Boil water', color: '#209ab7', status: 'working', user: 'Marco', priority: 2 },
    { id: 4, name: 'Walking the doggo', color: '#b3f7dd', status: 'done', user: 'Thorsten', priority: 3 },
    { id: 4, name: 'Prepare for xmas', color: '#ea6562', status: '', user: '' },
    { id: 4, name: 'Birthday preps', color: '#b4ade5', status: 'test', user: '', priority: 5 }
  ];

  public vGroupKeys = ['open', 'working', 'test', 'done'];
  public hGroupKeys = ['Marco', 'Jamie', 'Malian', 'Natalie', 'Thorsten'];

  public vGroupKey = 'status';
  public hGroupKey = 'user';
  public sortBy = 'priority';

}

Configuration

Properties

NameDefault valueDescriptionType
actionsTemplatenullTemplate for actions, add and collapse buttons (see examples)TemplateRef<any>
backlogName'Backlog'Name of the backlog rowstring
boardName''Board name to show between row and column headerstring
cellAddNewItemstrueShow add buttons in the cells for columns and rowsboolean
cellClass'card-header'Default css class for cell headerstring
dragoverPlaceholderTemplatenullTemplate for the placeholder element which will be generated when an item is draged over a cellTemplateRef<any>
filter''Predefined filter for the searchbar. If set, the items are filtered by the term on init.string
filterOnProperties[]Specify the properties which will be searched for the given term in filter. If not properties are given, all will be searchedArray<string>
filterRowPlaceholder'Search for items'SPlaceholde rfor the input with the filter rowstring
hAddNewItemstrueShow add buttons on the column headingsboolean
hCollapsedfalseColumns are collapsed or not on initboolean
hGroupKey''Key to group data for columnsstring
hGroupKeys[]Grouping keys for columns (if not passed, the keys will be determined out of the items)Caution: If you don't pass any headings manually, only the columns are shown, which have data.If you want to show emtpy rows, please set themArray<string>
hHeaderClass'card-header'Default css class for column headerstring
hHeaderTemplatenullTemplate for column headers. Current groupName will be passed (see examples)TemplateRef<any>
invertGroupDirectionfalseInvert rows and columnsboolean
items[]Items to displayArray<CardItem> | Array
itemTemplatenullTemplate for items to render. "item" object ist passed (see examples)TemplateRef<any>
noElementsTemplatenullTemplate for collapsed rows to render. "count" object ist passed (see examples)TemplateRef<any>
scrollablefalseIf set to true, the rows and columns are scrollable and will be out of the viewport.If not set, all rows and column will only use 100% of the parent element (aligned by flex/flex-fill)boolean
showBacklogtrueShows the blacklog on onitboolean
showFilterRowtrueShows the filter row to search items by filter in filterOnProperties arrayboolean
showUngroupedInBacklogtrueAll items which can't be grouped into rows and columns are stored into the backlogboolean
smallTextfalseDecrease overall font sizeboolean
sortBy''Sort items by propertystring
vAddNewItemstrueShow add buttons on the row headingsboolean
vCollapsabletrueAllow to collapse the rowsboolean
vCollapsedfalseRows are collapsed or not on initboolean
vGroupKey''Key to group data for rowsstring
vGroupKeys[]Grouping keys for rows (if not passed, the keys will be determined out of the items)Caution: If you don't pass any headings manually, only the rows are shown, which have data.If you want to show emtpy rows, please set themArray<string>
vHeaderClass'card-header'Default css class for row headerstring
vHeaderTemplatenullTemplate for row headers. Current groupName will be passed (see examples)TemplateRef<any>

Events

NameDefault valueDescriptionType
dragStartednew EventEmitter<object>()Fired when the user drags an item. Current item is passedEventEmitter
droppednew EventEmitter<object>()Fired when an item is dropped. Current item is passedEventEmitter
elementCreateClicknew EventEmitter<ClickEvent>()Fired when an add action is click. Current ClickEvent is passedEventEmitter

Interfaces

NameTypeDescription
CardIteminterfaceItem to render
ClickEventinterfaceDatatype which is emitted when an item should be added
CollapseStateinterfaceAll the collapse stated of every group item (horizontal / vertical)
GroupKeysinterfaceGroup keys to determine the correct groups internally

Examples

Following soon

Limitations

  • Scrolling actually not possible

Contributing

Installation the project

git clone https://github.com/Disane87/ngx-taskboard.git .

Since this is a Angular library, you have can't start it as standalone, like a normal Angular application. Instead, you have to build it with ng build . --watch and link it with npm link. The link process creates a symlink to your global npm which you can access from other projects.

In your test or real project, you have to add the package, but only with another command npm link @disane/ngx-taskboard --save. This means, you are not obtaining the package from npm, instead you are symlinking it to you global npm which has a reference to the above created link in your project.

This is a bit odd, but you can read more about it here.

If you have an existing Angular library project with a tets application, you can work here with submoduling in git, instead of a git clone:

git submodule add https://github.com/Disane87/ngx-taskboard.git`

And now, have some fun! 😊

Keywords

FAQs

Package last updated on 22 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc