feat: update ng2-smart-table to 1.6

This commit is contained in:
Evgeny Lupanov 2020-03-24 17:36:32 +03:00
parent c56b348eb8
commit 929406eb42
6 changed files with 39 additions and 17 deletions

20
package-lock.json generated
View file

@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@akveo/ng2-completer": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@akveo/ng2-completer/-/ng2-completer-9.0.1.tgz",
"integrity": "sha512-iACL0heOUmGV1GBKD3srwBJMFLZykld1MiTDvmbgEEXMhavp0UA45GdNsv7BBKI9XauuFKpOqHLlC+fT6DLGAQ=="
},
"@angular-devkit/architect": {
"version": "0.900.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.900.4.tgz",
@ -12739,6 +12744,21 @@
"resolved": "https://registry.npmjs.org/ng2-ckeditor/-/ng2-ckeditor-1.2.2.tgz",
"integrity": "sha512-4md+hLpELy1ni0SbUYDD0XPpwjn9PUT+Loq8AyXzJutwg3xBQB7K4P2TxDr6wTiYZX+ZVSqmUOFwTL25LW129A=="
},
"ng2-smart-table": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/ng2-smart-table/-/ng2-smart-table-1.6.0.tgz",
"integrity": "sha512-ejAIcVgEznsMD79xg+HfCha804KyGEiX9KH5BnmVzQZFzpC782I5W2wn4zackp4Gi9km1H6pKf3+MXLCF8IRXQ==",
"requires": {
"lodash": "^4.17.10"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}
}
},
"ngx-echarts": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/ngx-echarts/-/ngx-echarts-4.2.2.tgz",

View file

@ -30,6 +30,7 @@
"postinstall": "ngcc --properties es2015 es5 browser module main --first-only --create-ivy-entry-points"
},
"dependencies": {
"@akveo/ng2-completer": "^9.0.1",
"@angular/animations": "^9.0.4",
"@angular/cdk": "^9.1.2",
"@angular/common": "^9.0.4",
@ -59,6 +60,7 @@
"leaflet": "1.2.0",
"nebular-icons": "1.1.0",
"ng2-ckeditor": "^1.2.2",
"ng2-smart-table": "^1.6.0",
"ngx-echarts": "^4.2.2",
"node-sass": "^4.12.0",
"normalize.css": "6.0.0",

View file

@ -1,4 +1,4 @@
<!-- <nb-card>
<nb-card>
<nb-card-header>
Smart Table
</nb-card-header>
@ -7,4 +7,4 @@
<ng2-smart-table [settings]="settings" [source]="source" (deleteConfirm)="onDeleteConfirm($event)">
</ng2-smart-table>
</nb-card-body>
</nb-card> -->
</nb-card>

View file

@ -1,7 +1,7 @@
import { Component } from '@angular/core';
// import { LocalDataSource } from 'ng2-smart-table';
import { LocalDataSource } from 'ng2-smart-table';
// import { SmartTableData } from '../../../@core/data/smart-table';
import { SmartTableData } from '../../../@core/data/smart-table';
@Component({
selector: 'ngx-smart-table',
@ -53,12 +53,12 @@ export class SmartTableComponent {
},
};
// source: LocalDataSource = new LocalDataSource();
source: LocalDataSource = new LocalDataSource();
// constructor(private service: SmartTableData) {
// const data = this.service.getData();
// this.source.load(data);
// }
constructor(private service: SmartTableData) {
const data = this.service.getData();
this.source.load(data);
}
onDeleteConfirm(event): void {
if (window.confirm('Are you sure you want to delete?')) {

View file

@ -2,17 +2,17 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { TablesComponent } from './tables.component';
// import { SmartTableComponent } from './smart-table/smart-table.component';
import { SmartTableComponent } from './smart-table/smart-table.component';
import { TreeGridComponent } from './tree-grid/tree-grid.component';
const routes: Routes = [{
path: '',
component: TablesComponent,
children: [
// {
// path: 'smart-table',
// component: SmartTableComponent,
// },
{
path: 'smart-table',
component: SmartTableComponent,
},
{
path: 'tree-grid',
component: TreeGridComponent,
@ -28,6 +28,6 @@ export class TablesRoutingModule { }
export const routedComponents = [
TablesComponent,
// SmartTableComponent,
SmartTableComponent,
TreeGridComponent,
];

View file

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { NbCardModule, NbIconModule, NbInputModule, NbTreeGridModule } from '@nebular/theme';
// import { Ng2SmartTableModule } from 'ng2-smart-table';
import { Ng2SmartTableModule } from 'ng2-smart-table';
import { ThemeModule } from '../../@theme/theme.module';
import { TablesRoutingModule, routedComponents } from './tables-routing.module';
@ -14,7 +14,7 @@ import { FsIconComponent } from './tree-grid/tree-grid.component';
NbInputModule,
ThemeModule,
TablesRoutingModule,
// Ng2SmartTableModule,
Ng2SmartTableModule,
],
declarations: [
...routedComponents,