Skip to content

Commit

Permalink
feat(SwalComponent): add @inputs for inputLabel, returnInputValueOnDe…
Browse files Browse the repository at this point in the history
…ny, preDeny
  • Loading branch information
toverux committed Dec 27, 2020
1 parent 0526399 commit fb82274
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ npm install sweetalert2 @sweetalert2/ngx-sweetalert2

| Angular version | Latest compatible version range | Required SweetAlert2 version range |
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| Angular 9+ | @sweetalert2/ngx-sweetalert2@**^9.0.0** (current) | sweetalert2@**^10.3.0** |
| Angular 9 to 11 | @sweetalert2/ngx-sweetalert2@**^9.0.0** (current) | sweetalert2@**^10.8.0** |
| Angular 8 | [@sweetalert2/ngx-sweetalert2@**~7.3.0**](https://github.com/sweetalert2/ngx-sweetalert2/tree/v7.3.0#readme) (:warning: NOT ~7.4.0, broken AoT metadata) | sweetalert2@**^9.7.0** |
| Angular 7 | [@sweetalert2/ngx-sweetalert2@**^5.1.0**](https://github.com/sweetalert2/ngx-sweetalert2/tree/v5.1.0#readme) | sweetalert2@**^8.5.0** |
| Angular 6 | [@sweetalert2/ngx-sweetalert2@**^5.1.0**](https://github.com/sweetalert2/ngx-sweetalert2/tree/v5.1.0#readme) | sweetalert2@**^8.5.0** |
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-sweetalert2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"peerDependencies": {
"@angular/common": ">=9.0.0",
"@angular/core": ">=9.0.0",
"sweetalert2": "^10.3.0"
"sweetalert2": "^10.8.0"
}
}
7 changes: 5 additions & 2 deletions projects/ngx-sweetalert2/src/lib/swal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import { SweetAlert2LoaderService } from './sweetalert2-loader.service';
*
* /!\ Some SweetAlert options aren't @Inputs but @Outputs: `willOpen`, `didOpen`, `didRender`, `willClose`, `didClose`
* and `didDestroy`.
* However, `preConfirm` and `inputValidator` are still @Inputs because they are not event handlers, there can't be
* multiple listeners on them, and we need the values they can/must return.
* However, `preConfirm`, `preDeny` and `inputValidator` are still @Inputs because they are not event handlers,
* there can't be multiple listeners on them, and we need the values they can/must return.
*/
@Component({
// tslint:disable-next-line:component-selector
Expand Down Expand Up @@ -86,16 +86,19 @@ export class SwalComponent implements OnInit, AfterViewInit, OnChanges, OnDestro
@Input() public loaderHtml: SweetAlertOptions['loaderHtml'];
@Input() public showLoaderOnConfirm: SweetAlertOptions['showLoaderOnConfirm'];
@Input() public preConfirm: SweetAlertOptions['preConfirm'];
@Input() public preDeny: SweetAlertOptions['preDeny'];
@Input() public imageUrl: SweetAlertOptions['imageUrl'];
@Input() public imageWidth: SweetAlertOptions['imageWidth'];
@Input() public imageHeight: SweetAlertOptions['imageHeight'];
@Input() public imageAlt: SweetAlertOptions['imageAlt'];
@Input() public inputLabel: SweetAlertOptions['inputLabel'];
@Input() public inputPlaceholder: SweetAlertOptions['inputPlaceholder'];
@Input() public inputValue: SweetAlertOptions['inputValue'];
@Input() public inputOptions: SweetAlertOptions['inputOptions'];
@Input() public inputAutoTrim: SweetAlertOptions['inputAutoTrim'];
@Input() public inputAttributes: SweetAlertOptions['inputAttributes'];
@Input() public inputValidator: SweetAlertOptions['inputValidator'];
@Input() public returnInputValueOnDeny: SweetAlertOptions['returnInputValueOnDeny'];
@Input() public validationMessage: SweetAlertOptions['validationMessage'];
@Input() public progressSteps: SweetAlertOptions['progressSteps'];
@Input() public currentProgressStep: SweetAlertOptions['currentProgressStep'];
Expand Down

0 comments on commit fb82274

Please sign in to comment.