0.0.9 • Published 3 years ago

ngx-view-index v0.0.9

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

NgxViewIndex

This library was generated with Angular CLI version 9.1.15.

Code scaffolding

Run ng generate component component-name --project NgxViewIndex to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project NgxViewIndex.

Note: Don't forget to add --project NgxViewIndex or else it will be added to the default project in your angular.json file.

Build

Run ng build NgxViewIndex to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build NgxViewIndex, go to the dist folder cd dist/ngx-view-index and run npm publish.

Running unit tests

Run ng test NgxViewIndex to execute the unit tests via Karma.

Example usage

Angular component.ts

private sections: { value: string, name: string }[] = [];
	public viewIndex: Configuration = {
		graphqlService: this.mockGraphqlService,
		notifiService: this.mockNotificationService,
		query: 'getData',
		columns: [
			{ field: 'id', title: 'ID', cssClass: 'box__headline' },
			{ field: 'name', title: 'Jmeno', cssClass: 'box__headline', selectList: this.sections },
		],
		possibilities: [
			{ type: 'url', url: '/advices/edit/:id:', title: 'Editace', icon: 'icon--pencil', permission: 'edit'},
			{ type: 'trash', mutation: 'deleteAdvice', title: 'Smazání', icon: 'icon--times-circle', permission: 'trash'},
		],
		topActions: [
			{ type: 'url', url: '/settings/advices-order', title: 'Upravit pořadí', icon: 'icon--cog', permission: 'edit'},
			{ type: 'url', url: '/settings/advices-sections', title: 'Spravovat sekce', icon: 'icon--bars', permission: 'edit'},
			{ type: 'url', url: '/advices/edit/new', title: 'Nová položka', icon: 'icon--plus', permission: 'add'},
		],
		filtrations: [
			{ type: 'text', field: 'q', title: 'Otázka' },
			{ type: 'text', field: 'q', title: 'Odpověď' },
			{ type: 'select', field: 'section', title: 'sekci', list: this.sections },
		],
		conditions: {},
		removeTrash: true,
		preloaderIndex: true,
		data: [],
		dataAll: [],
		sortKey: 'created',
		sortDirection: 'DESC',
		styles: {
			filtration: 'col-12',
		},
	};

Angular component.html

<ngx-view-index [viewIndex]="viewIndex"></ngx-view-index>

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Author

Fastest Solution s.r.o.

0.0.3

3 years ago

0.0.2

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.1

3 years ago