Gathering detailed insights and metrics for @pluritech/dialog-service
Gathering detailed insights and metrics for @pluritech/dialog-service
Gathering detailed insights and metrics for @pluritech/dialog-service
Gathering detailed insights and metrics for @pluritech/dialog-service
npm install @pluritech/dialog-service
Typescript
Module System
Node Version
NPM Version
JavaScript (57.65%)
TypeScript (30.46%)
HTML (11.89%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1 Stars
26 Commits
4 Watchers
2 Branches
7 Contributors
Updated on Mar 19, 2018
Latest Version
2.0.0
Package Id
@pluritech/dialog-service@2.0.0
Unpacked Size
35.27 kB
Size
5.46 kB
File Count
14
NPM Version
5.5.1
Node Version
8.8.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
4
This library abstracts the job bringing modals pre-componentized as alert, confirm and prompt. This is built based on ng2-bootstrap-modal.
To install this library, run:
1$ npm install @pluritech/dialog-service --save 2$ npm install ng2-bootstrap-modal --save (Temporary) 3$ npm install bootstrap --save (Optional)
You can also use your custom css, see the docs in ng2-bootstrap-modal
Import bootstrap css in Angular CLI.
1 "styles": [ 2 "../node_modules/bootstrap/dist/css/bootstrap.css" 3 ]
and then import it in your Angular AppModule
:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4 5import { AppComponent } from './app.component'; 6 7// Import the library like the following: 8import { DialogServiceModule } from '@pluritech/dialog-service'; 9 10@NgModule({ 11 declarations: [ 12 AppComponent 13 ], 14 imports: [ 15 BrowserModule, 16 17 // Specify the library as an import 18 DialogServiceModule.forRoot() 19 ], 20 providers: [], 21 bootstrap: [AppComponent] 22}) 23export class AppModule { }
Once your library is imported, you can use its components (dialogs) in your Angular application:
1import { Component } from '@angular/core'; 2 3import { Validators } from '@angular/forms'; 4 5import { DialogModalService } from '@pluritech/dialog-service'; 6 7@Component({ 8 selector: 'app-root', 9 templateUrl: './app.component.html', 10 styleUrls: ['./app.component.css'] 11}) 12export class AppComponent { 13 14 constructor(private dialogModalService:DialogModalService<any>) {} 15 16 public openModals() { 17 // Opennig Alert Modal 18 this.dialogModalService.openAlert({ 19 message: 'Hi, im alert modal!', 20 btnClass: 'btn-primary' 21 }).subscribe((res) => console.log('openAlert response', res)); 22 23 // Opennig Confirmation Modal 24 this.dialogModalService.openConfirm({ 25 btnNo: 'Cancel', 26 btnYes: 'Ok', 27 message: 'Hi, im alert confirm modal!', 28 title: 'Confirm Modal Title', 29 btnNoClass: 'btn-danger', 30 btnYesClass: 'btn-primary', 31 positionBtnYes: 'right' // Default: Left 32 }).subscribe(res => console.log('openConfirm response', res)); 33 34 // Opennig Prompt Modal 35 this.dialogModalService.openPrompt({ 36 btnNo: 'Cancel', 37 btnYes: 'Signup', 38 title: 'Add Person', 39 fields: [ 40 { 41 idField: 'name', 42 label: 'Name', 43 placeholder: 'John', 44 type: 'text', 45 validators: [], 46 valueDefault: '' 47 }, 48 { 49 idField: 'age', 50 label: 'Age', 51 placeholder: '26', 52 type: 'number', 53 validators: [Validators.required], 54 valueDefault: '' 55 } 56 ] 57 }).subscribe(res => console.log('openPrompt', res)); 58 } 59 title = 'app'; 60} 61
Every modal returns a subscribe with receives the response data.
Modal | Type of response |
---|---|
Alert | boolean - always true, it is returned when modal goes closed |
Confirm | boolean - can be true or false |
Prompt | a object that represents the form value with keys being the idField and the respective value |
MIT © mduraes1994 and lucascco
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 3/22 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
108 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More