commit for current

This commit is contained in:
Yubing325
2020-07-09 13:41:22 -05:00
parent 66d34d1019
commit f702608640
50 changed files with 369 additions and 268 deletions
@@ -5,7 +5,7 @@ import { CommandModalDemoRoutingModule } from './command-modal-demo-routing.modu
import { DataGridModule } from '@poweredsoft/ngx-cdk-ui';
import {FormsModule} from '@angular/forms';
import { CommandModalModule, psbxPaginationModule, ConfirmModalModule } from '@poweredsoft/ngx-bootstrap';
import { CommandModalModule, PaginationModule, ConfirmModalModule,CommandModule } from '@poweredsoft/ngx-bootstrap';
@NgModule({
declarations: [CommandModalDemoComponent],
imports: [
@@ -14,8 +14,9 @@ import { CommandModalModule, psbxPaginationModule, ConfirmModalModule } from '@p
DataGridModule,
CommandModalModule,
FormsModule,
psbxPaginationModule,
ConfirmModalModule
PaginationModule,
ConfirmModalModule,
CommandModule
]
})
export class CommandModalDemoModule { }
@@ -26,11 +26,26 @@
<ng-container psDataGridCol="commands">
<ng-container *psDataGridColHeader>Actions</ng-container>
<ng-container *psDataGridCell="let model">
<div class="btn-group">
<button class="btn-primary btn" psbxCommandModal [commandTitle]="'Change ' + model.name + ' name'" commandText="Update"
[dataSource]="merchantDataSource" command="changeMerchant" [model]="model" [template]="changeName">Change</button>
<button class="btn-danger btn" psbxConfirmModal [commandTitle]="'Are you sure you wnat to remove ' + model.name + '?'" commandText="Remove"
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model" >RemoveIt</button>
<button class="btn-danger btn" psbxCommand
[dataSource]="merchantDataSource"
command="removeMerchant"
[model]="model"
[confirm]="true"
confirmMessage="Are you sure you want to delete this merchant?"
>RemoveIt</button>
<button class="btn-warning btn" psbxCommand
[dataSource]="merchantDataSource"
command="removeMerchant"
[model]="model"
>Remove Without confirmation</button> </div>
</ng-container>
</ng-container>
<ng-container *psDataGridFooter>
@@ -45,7 +45,7 @@ export class CommandModalDemoComponent implements OnInit,OnDestroy {
ngOnInit() {
this.merchantDataSource.refresh();
this.merchantDataSource.data$.subscribe(newData => {
this._dataSubscription = this.merchantDataSource.data$.subscribe(newData => {
if (newData)
this.pages = new Array(newData.numberOfPages);
});
@@ -50,7 +50,7 @@ export class DataGridDemoHomeComponent implements OnInit, OnDestroy {
console.log('merchant data source event loading', isLoading);
});
this.merchantDataSource.data$.subscribe(receivedData => {
this._dataSubscription = this.merchantDataSource.data$.subscribe(receivedData => {
console.log('new data is coming from the server', receivedData);
});
this.merchantDataSource.refresh();
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
import { FormGroupModalDemoComponent } from './form-group-modal-demo/form-group-modal-demo.component';
import { FormGroupModalDemoRoutingModule } from './form-group-modal-demo-routing.module'
import { DataGridModule } from '@poweredsoft/ngx-cdk-ui';
import { FormGroupCommandModalModule,CommandModalModule, psbxPaginationModule } from '@poweredsoft/ngx-bootstrap';
import { FormGroupCommandModalModule, PaginationModule, CommandModule } from '@poweredsoft/ngx-bootstrap';
import { ReactiveFormsModule } from '@angular/forms';
import { ConfirmModalModule } from 'projects/poweredsoft/ngx-bootstrap/src/public-api';
@@ -17,8 +17,9 @@ import { ConfirmModalModule } from 'projects/poweredsoft/ngx-bootstrap/src/publi
DataGridModule,
FormGroupCommandModalModule,
ReactiveFormsModule,
psbxPaginationModule,
PaginationModule,
ConfirmModalModule,
CommandModule
]
})
@@ -23,8 +23,8 @@
<ng-container *psDataGridCell="let model">
<button class="btn-success btn" psbxFormGroupCommandModal [commandTitle]="'Change ' + model.name + ' name'" commandText="Update"
[dataSource]="merchantDataSource" command="changeMerchant" (formCreate)="onFormCreate($event)" [model]="model" [template]="theModal">Change</button>
<button class="btn-danger btn" psbxConfirmModal [commandTitle]="'Are you sure you wnat to remove ' + model.name + '?'" commandText="Remove"
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model" >Delete!</button>
<!-- <button class="btn-danger btn" psbxConfirmModal [commandTitle]="'Are you sure you wnat to remove ' + model.name + '?'" commandText="Remove"
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model" >Delete!</button> -->
</ng-container>
</ng-container>
<ng-container *psDataGridFooter>
@@ -31,7 +31,7 @@ export class FormGroupModalDemoComponent implements OnInit,OnDestroy {
ngOnInit(): void {
this.merchantDataSource.refresh();
this.merchantDataSource.data$.subscribe(newData => {
this._dataSubscription = this.merchantDataSource.data$.subscribe(newData => {
if (newData)
this.pages = new Array(newData.numberOfPages);
});
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
import { GridFilterDemoRoutingModule } from './grid-filter-demo-routing.module';
import { GridFilterDemoComponent } from './grid-filter-demo/grid-filter-demo.component';
import { DataSourceFilterModule, psbxPaginationModule, CommandModalModule, ConfirmModalModule, SpinnerModule, DataSourceSortingModule } from '@poweredsoft/ngx-bootstrap';
import { DataSourceFilterModule, PaginationModule, CommandModalModule, ConfirmModalModule, SpinnerModule, DataSourceSortingModule, CommandModule } from '@poweredsoft/ngx-bootstrap';
import { DataGridModule } from '@poweredsoft/ngx-cdk-ui';
import { FormsModule } from '@angular/forms';
@@ -13,13 +13,14 @@ import { FormsModule } from '@angular/forms';
CommonModule,
GridFilterDemoRoutingModule,
DataSourceFilterModule,
psbxPaginationModule,
PaginationModule,
DataGridModule,
CommandModalModule,
ConfirmModalModule,
FormsModule,
SpinnerModule,
DataSourceSortingModule
DataSourceSortingModule,
CommandModule
]
})
export class GridFilterDemoModule { }
@@ -55,9 +55,9 @@
<button class="btn-info btn" psbxCommandModal [commandTitle]="'Change ' + model.name + ' name'"
commandText="Update" [dataSource]="merchantDataSource" command="changeMerchant" [model]="model"
[template]="theModal">Change</button>
<button class="btn-danger btn" psbxConfirmModal
<!-- <button class="btn-danger btn" psbxConfirmModal
[commandTitle]="'Are you sure you wnat to remove ' + model.name + '?'" commandText="Remove"
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model">Remove</button>
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model">Remove</button> -->
</div>
</ng-container>
@@ -30,10 +30,13 @@ selected: {{ myForm.value | json }}
selected: {{ myValue3 | json }}
<h2>Single Select Demo | notFound Template</h2>
<ps-ng-select [dataSource]="merchantDataSource3" bindLabel="name" bindValue="id" [(ngModel)]="myValue2" [serverFiltering]="true">
<ps-ng-select [dataSource]="merchantDataSource3" bindLabel="name" bindValue="id" [(ngModel)]="myValue2" [serverFiltering]="false">
<div *psNgNotFoundTemplate="let searchTerm">
<div class="ng-option disabled">
No data found for "{{searchTerm}}" <button class="btn btn-success">Create New {{searchTerm}}</button>
No data found for "{{searchTerm}}" <button class="btn btn-success"
psbxCommand
(success)="myValue2 = $event">
Create New {{searchTerm}}</button>
</div>
</div>
</ps-ng-select>
@@ -4,7 +4,7 @@ import { CommonModule } from '@angular/common';
import { PaginationDemoRoutingModule } from './pagination-demo-routing.module';
import { PaginationDemoComponent } from './pagination-demo/pagination/pagination-demo.component';
import { DataGridModule } from '@poweredsoft/ngx-cdk-ui';
import { psbxPaginationModule, CommandModalModule, ConfirmModalModule,SpinnerModule } from '@poweredsoft/ngx-bootstrap';
import { PaginationModule, CommandModalModule, ConfirmModalModule,SpinnerModule } from '@poweredsoft/ngx-bootstrap';
import { FormsModule } from '@angular/forms';
import { ModalModule } from 'ngx-bootstrap/modal';
@@ -16,7 +16,7 @@ import { ModalModule } from 'ngx-bootstrap/modal';
imports: [
CommonModule,
PaginationDemoRoutingModule,
psbxPaginationModule,
PaginationModule,
DataGridModule,
CommandModalModule,
ConfirmModalModule,
@@ -42,8 +42,8 @@
<ng-container psDataGridCol="commands">
<ng-container *psDataGridColHeader>Actions</ng-container>
<ng-container *psDataGridCell="let model">
<button class="btn-danger btn" psbxConfirmModal [commandTitle]="'Are you sure you wnat to remove ' + model.name + '?'" commandText="Remove"
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model" >Remove</button>
<!-- <button class="btn-danger btn" psbxConfirmModal [commandTitle]="'Are you sure you wnat to remove ' + model.name + '?'" commandText="Remove"
[dataSource]="merchantDataSource" command="removeMerchant" [model]="model" >Remove</button> -->
</ng-container>
</ng-container>
@@ -31,7 +31,7 @@ export class PaginationDemoComponent implements OnInit, OnDestroy {
ngOnInit() {
this.merchantDataSource.refresh();
this.merchantDataSource.data$.subscribe(newData => {
this._dataSubscription = this.merchantDataSource.data$.subscribe(newData => {
if (newData)
this.pages = new Array(newData.numberOfPages);
});