diff --git a/package-lock.json b/package-lock.json index cfa89217..718b130e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index d5398448..e4b29037 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/app/pages/tables/smart-table/smart-table.component.html b/src/app/pages/tables/smart-table/smart-table.component.html index fea5e268..05cd834c 100644 --- a/src/app/pages/tables/smart-table/smart-table.component.html +++ b/src/app/pages/tables/smart-table/smart-table.component.html @@ -1,4 +1,4 @@ - + diff --git a/src/app/pages/tables/smart-table/smart-table.component.ts b/src/app/pages/tables/smart-table/smart-table.component.ts index 164778cf..89c8ec59 100644 --- a/src/app/pages/tables/smart-table/smart-table.component.ts +++ b/src/app/pages/tables/smart-table/smart-table.component.ts @@ -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?')) { diff --git a/src/app/pages/tables/tables-routing.module.ts b/src/app/pages/tables/tables-routing.module.ts index dd0725e1..3271c0a2 100644 --- a/src/app/pages/tables/tables-routing.module.ts +++ b/src/app/pages/tables/tables-routing.module.ts @@ -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, ]; diff --git a/src/app/pages/tables/tables.module.ts b/src/app/pages/tables/tables.module.ts index 7c4a5ad8..a9074c4f 100644 --- a/src/app/pages/tables/tables.module.ts +++ b/src/app/pages/tables/tables.module.ts @@ -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,