1.0.44 • Published 3 years ago

dynamic-angular-tables v1.0.44

Weekly downloads
270
License
-
Repository
-
Last release
3 years ago

DynamicTables

Dynamic Tables is a UI component library for Angular 2+ developers,
DynamicTables Components help in constructing attractive, consistent,
and functional web pages and web applications, It helps in creating
faster, beautiful, and responsive websites.

For any Help, Bug, Features needs to be implemented fell free to visit me on GitHub or on linkedin

Before use import '@angular/compiler' in main.ts
Import Every thing from 'dynamic-angular-tables'

Implemented Components

services
  1. Api.Service

components

  1. Data Table
  2. Stepper
  3. Tree View
  4. Auto Complete

Api.Service

Angular Service provide a fast way to register your system lookups in app.component.ts
then you can use it any where to get fast implemented service.

Lookup Api Register

Use Static Method setBaseUrl to set your website base url
make sure it's not end with slash /
Then make enum.ts file will contains all lookApi alias
Then register your api by call static method createApi
this method accepts two parameters the first one api alias,
second is api route without slash / at the beginning

farther this service will be enhanced with many features
make sure you follow up my steps

Example
#ApiLookupsEnum.ts

export enum apiLookupsEnum {
	testApi1,
    testApi2
}


#App.component.ts

constructor(apiService:ApiService) {
	ApiService.setBaseUrl("www.siteBase.com:10"); //localhost:port or any format
	ApiService.createApi(apiLookupsEnum.testApi1, "ApiRoute/GetData");
    ApiService.createApi(apiLookupsEnum.testApi2, "ApiRoute/GetData")

}

Getting Api Service Instance

instead of using dependency injection of angular you can call getApi static method
in ApiService while make sure you get new instance of api service by api alias then
you can use it easly.

Example
 #TestComponent.component.ts

constructor() {
	// alias defined in previous example (ApiLookupsEnum.ts)   
	const instance = ApiService.getApi(apiLookupsEnum.testApi1); 
    instance.getList().subscribe(data => {
  		console.log("data retried");
	});

}

Data Table

To use data table import dyanmic tables module then use component tag dynamic-dataTable

Inputs

dataSource: any[] | ApiService;// By providing Api Serivce instance Data table Will Auto Call getList Method
headers: IHeader;  // IHeader Interface contains required information to render your data.
				   interface IHeader {
                  		name: string;   // display name;
                        prop: string;   // property name in row object
                        visiblity: visibility; // set column (header) visiblity
                  } // you will notice that there is many other fields defined in the interface
                  	// these fields is for future features
                        

Output

No Output

Tree View

To use data table import dyanmic tables module then use component tag dynamic-tree-view

Inputs

dataSource: any[] | ApiService;
// By providing Api Serivce instance Data table Will Auto Call getAutoComplete Method
// Make Sure Data follow up Ilookup Interface

allowSearch:boolean; // make tree view component render search box to search in nodes
allowSelect:boolean; // gives user ability to select node
allowMultiSelect:boolean; // gives use ability to select multiple nodes (make sure allowSelect is set to true)
                        

Output

onSelect: EventEmitter<INodeConfig[]> // INodeConfig Interface Gives you some information About Selected Node
					

Auto Complete

To use data table import dyanmic tables module then use component tag dynamic-auto-complete

Inputs

dataSource: any[] | ApiService;
// By providing Api Serivce instance Data table Will Auto Call getAutoComplete Method
// Make Sure Data follow up Ilookup Interface

model:ILookup | ILookup[] | number | number[] | string | string[]; // pre selected Values 
allowMultiSelect:boolean; // gives user ability to select multiple items
allowSelectAll:boolean;   // gives user allow select all items 
modelType: dataType; // configure how modelChange Event Emmitted Data Type
					 // Default: dataType.number, Ilookup.id ;
                        

Output

modelChange: EventEmitter<ILookup | ILookup[] | number | number[] | string | string[]> 
			 // event for setting selected values

Stepper

To use data table import dyanmic tables module then use both components 1. steps container dynamic-stepper 2. wizard step stepComponent

Inputs ( wizard Step )

stepTitle:string; // title will be displayed in container
desc: string; // step description
                        

Output ( wizard Step )

No Output

Inputs ( Container )

allowJumping: boolean; // allow jumping between steps, default (false).
currentStep: number;   // set current step, default step number (0)
onJumping: (stepNumber: number) => boolean; // call back method fire on user jumping 
											// returns true to jump, false to keep on current step
onMoveNext: (stepNumber: number) => boolean; // call back method fire on user moving next 
											 // returns true to move, false to keep on current step
onMovePrevious: (stepNumber: number) => boolean; // call back method fire on user moving previous 
												 // returns true to move, false to keep on current step
                        

Output ( Container )

No Output
Example
# dataStep.component.ts
<dynamic-stepper [allowJumping] = "false">
  <dynamic-step  [stepTitle]="'step 1'"> step1 Content or <comp-tag> </dynamic-step>
  <dynamic-step  [stepTitle]="'step 2'"> step1 Content or <comp-tag> </dynamic-step>
</dynamic-stepper>
					
1.0.282

3 years ago

1.0.281

3 years ago

1.0.284

3 years ago

1.0.283

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.44

3 years ago

1.0.22

3 years ago

1.0.43

3 years ago

1.0.21

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.0

3 years ago

0.1.1

3 years ago

0.6.0

3 years ago

0.0.0

3 years ago

0.0.55

3 years ago

0.0.5

3 years ago

2.5.37

3 years ago

2.5.36

3 years ago

2.2.5

3 years ago

2.5.0

3 years ago

2.5.2

3 years ago

2.5.1

3 years ago

2.5.3

3 years ago

2.5.33

3 years ago

2.5.34

3 years ago

2.5.35

3 years ago

2.5.31

3 years ago

2.4.40

3 years ago

2.4.39

3 years ago

2.4.38

3 years ago

2.4.37

3 years ago

2.4.36

3 years ago

2.4.35

3 years ago

2.4.34

3 years ago

2.4.33

3 years ago

2.4.32

3 years ago

2.4.31

3 years ago

2.4.30

3 years ago

2.4.29

3 years ago

2.4.28

3 years ago

2.4.27

3 years ago

2.4.26

3 years ago

2.4.25

3 years ago

2.4.24

3 years ago

2.4.21

3 years ago

2.4.23

3 years ago

2.4.22

3 years ago

2.4.18

3 years ago

2.4.17

3 years ago

2.4.19

3 years ago

2.4.16

3 years ago

2.4.15

3 years ago

2.4.20

3 years ago

2.4.14

3 years ago

2.4.12

3 years ago

2.4.10

3 years ago

2.4.11

3 years ago

2.4.3

3 years ago

2.4.2

3 years ago

2.4.1

3 years ago

2.3.11

3 years ago

2.3.10

3 years ago

2.3.9

3 years ago

2.3.8

3 years ago

2.3.7

3 years ago

2.3.4

3 years ago

2.3.6

3 years ago

2.3.5

3 years ago

2.3.2

3 years ago

2.3.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.3.1

3 years ago

2.1.3

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.0

3 years ago

2.0.1033

3 years ago

2.0.1032

3 years ago

2.0.1031

3 years ago

2.0.1030

3 years ago

2.0.1029

3 years ago

2.0.1027

3 years ago

2.0.1028

3 years ago

2.0.1025

3 years ago

2.0.1026

3 years ago

2.0.1023

3 years ago

2.0.1021

3 years ago

2.0.1022

3 years ago

2.0.1020

3 years ago

2.0.1018

3 years ago

2.0.1016

3 years ago

2.0.1015

3 years ago

2.0.1014

3 years ago

2.0.1012

3 years ago

2.0.1011

3 years ago

2.0.1010

3 years ago

2.0.1009

3 years ago

2.0.1008

3 years ago

2.0.1007

3 years ago

2.0.1006

3 years ago

2.0.1005

3 years ago

2.0.1004

3 years ago

2.0.1003

3 years ago

2.0.1002

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

0.0.402

3 years ago

0.0.401

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago