fst-ngx-view-index
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

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 and npm run copyStylesViewIndex 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.

Installation

npm install fst-ngx-view-index@latest

Import the styles in your main stylesheet:

@import '../node_modules/fst-ngx-view-index/scss/ngx-view-index.component';

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.

Readme

Keywords

none

Package Sidebar

Install

npm i fst-ngx-view-index

Weekly Downloads

1

Version

1.0.13

License

none

Unpacked Size

255 kB

Total Files

29

Last publish

Collaborators

  • elieux
  • tajsn