-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding some new tools and enhancements from project work
- Loading branch information
1 parent
ad693d2
commit af15015
Showing
40 changed files
with
797 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="WEB_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<excludeFolder url="file://$MODULE_DIR$/dist" /> | ||
<excludeFolder url="file://$MODULE_DIR$/tmp" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
// NG | ||
// NG2 | ||
import { Component } from '@angular/core'; | ||
// Vendor | ||
// APP | ||
|
||
@Component({ | ||
selector: 'platform-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.scss'], | ||
template: ` | ||
<router-outlet></router-outlet> | ||
` | ||
}) | ||
export class AppComponent {} | ||
export class AppComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import {NovoElementProviders, NovoElementsModule} from 'novo-elements'; | ||
|
||
import {StandardModalComponent} from './standard/standard-modal.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
NovoElementsModule, | ||
NovoElementProviders.forChild() | ||
], | ||
declarations: [ | ||
StandardModalComponent | ||
], | ||
entryComponents: [ | ||
StandardModalComponent | ||
], | ||
exports: [ | ||
StandardModalComponent | ||
] | ||
}) | ||
export class ModalModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import {NovoModalParams} from 'novo-elements'; | ||
import {ModalParams} from 'novo-elements/elements/modal/Modal'; | ||
|
||
export class StandardModalParams implements CustomModalParams { | ||
|
||
public message: string; | ||
public isConfirm: boolean = false; | ||
public onClose: (result: boolean) => void = () => {}; | ||
|
||
constructor(message: string, isConfirm: boolean = false, onClose: (result: boolean) => void = () => {}) { | ||
this.message = message; | ||
this.isConfirm = isConfirm; | ||
this.onClose = onClose; | ||
} | ||
|
||
static fromNovo(params: NovoModalParams): StandardModalParams { | ||
return new StandardModalParams( | ||
params['message'], | ||
params['isConfirm'], | ||
params['onClose'] | ||
); | ||
} | ||
|
||
} | ||
|
||
export interface CustomModalParams extends ModalParams { | ||
|
||
message: string; | ||
isConfirm: boolean; | ||
onClose: (result: boolean) => void; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<novo-notification type="warning"> | ||
<h1>{{ modalParams.message }}</h1> | ||
<button *ngIf="modalParams.isConfirm" theme="standard" (click)="close()">Cancel</button> | ||
<button *ngIf="modalParams.isConfirm" theme="primary" icon="check" (click)="yes()">Yes</button> | ||
<button *ngIf="!modalParams.isConfirm" theme="primary" icon="check" (click)="yes()">OK</button> | ||
</novo-notification> |
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
src/app/tools/modal/standard/standard-modal.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import {StandardModalComponent} from './standard-modal.component'; | ||
|
||
describe('StandardModalComponent', () => { | ||
let component: StandardModalComponent; | ||
let fixture: ComponentFixture<StandardModalComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ StandardModalComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(StandardModalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.