angular-iban 4.0.2 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 fundsaccess AG
3
+ Copyright (c) 2018 - 2022 fundsaccess AG
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -14,11 +14,14 @@ This library supports Angular 7+. Please check the Version compatibility below t
14
14
 
15
15
  | angular-iban | Angular |
16
16
  |:------------:|:-------:|
17
- | 0.2.0 | 7.x |
18
- | 1.x | 8.x |
19
- | 2.x | 9.x |
20
- | 3.x | 10.x |
21
- | 4.x | 11.x |
17
+ | 0.2.0 | 7.x |
18
+ | 1.x | 8.x |
19
+ | 2.x | 9.x |
20
+ | 3.x | 10.x |
21
+ | 4.x | 11.x |
22
+ | 5.x | 12.x |
23
+ | 6.x | 13.x |
24
+ | 14.x | 14.x |
22
25
 
23
26
  ## Installation
24
27
 
@@ -42,7 +45,7 @@ import { NgModule } from '@angular/core';
42
45
 
43
46
  @NgModule({
44
47
  declarations: [],
45
- imports: [AngularIbanModule],
48
+ imports: [AngularIbanModule],
46
49
  })
47
50
  export class Module {
48
51
  }
@@ -63,11 +66,11 @@ import { NgModule } from '@angular/core';
63
66
 
64
67
  @NgModule({
65
68
  declarations: [],
66
- imports: [
67
- BrowserModule,
68
- AngularIbanModule,
69
- FormsModule
70
- ],
69
+ imports: [
70
+ BrowserModule,
71
+ AngularIbanModule,
72
+ FormsModule
73
+ ],
71
74
  })
72
75
  export class Module {
73
76
  }
@@ -76,26 +79,26 @@ export class Module {
76
79
 
77
80
  ```html
78
81
  <form name="templateDrivenForm" novalidate>
79
- <div class="form-group row">
80
- <label for="iban" class="col-sm-2 col-form-label">IBAN:</label>
81
- <input id="iban" name="iban" class="form-control" #iban="ngModel" type="text" ibanValidator [(ngModel)]="testIban" [ngModelOptions]="{standalone: true}" required autocomplete="off">
82
- <div *ngIf="iban.invalid && (iban.dirty || iban.touched)"
83
- class="alert alert-danger">
82
+ <div class="form-group row">
83
+ <label for="iban" class="col-sm-2 col-form-label">IBAN:</label>
84
+ <input id="iban" name="iban" class="form-control" #iban="ngModel" type="text" ibanValidator [(ngModel)]="testIban" [ngModelOptions]="{standalone: true}" required autocomplete="off">
85
+ <div *ngIf="iban.invalid && (iban.dirty || iban.touched)"
86
+ class="alert alert-danger">
87
+
88
+ <div *ngIf="iban.errors.['required']">
89
+ IBAN is required.
90
+ </div>
91
+ <div *ngIf="iban.errors.['iban']">
92
+ IBAN is invalid
93
+ </div>
84
94
 
85
- <div *ngIf="iban.errors.required">
86
- IBAN is required.
87
95
  </div>
88
- <div *ngIf="iban.errors.iban">
89
- IBAN is invalid
96
+ <div *ngIf="iban.valid && (iban.dirty || iban.touched)"
97
+ class="alert alert-danger">
98
+ IBAN is valid.
90
99
  </div>
91
-
92
100
  </div>
93
- <div *ngIf="iban.valid && (iban.dirty || iban.touched)"
94
- class="alert alert-danger">
95
- IBAN is valid.
96
- </div>
97
- </div>
98
- </form>
101
+ </form>
99
102
  ```
100
103
 
101
104
  ### IBAN Validator with reactive form
@@ -107,11 +110,11 @@ import { ReactiveFormsModule } from '@angular/forms';
107
110
 
108
111
  @NgModule({
109
112
  declarations: [],
110
- imports: [
111
- BrowserModule,
112
- AngularIbanModule,
113
- ReactiveFormsModule,
114
- ],
113
+ imports: [
114
+ BrowserModule,
115
+ AngularIbanModule,
116
+ ReactiveFormsModule,
117
+ ],
115
118
  })
116
119
  export class Module {
117
120
  }
@@ -119,27 +122,27 @@ export class Module {
119
122
 
120
123
  ```html
121
124
  <form [formGroup]="reactiveForm" autocomplete="off" novalidate>
122
- <div class="form-group row">
123
- <label for="ibanReactive" class="col-sm-2 col-form-label">IBAN:</label>
124
- <input type="text" class="form-control" id="ibanReactive" name="ibanReactive" formControlName="ibanReactive" required>
125
- </div>
125
+ <div class="form-group row">
126
+ <label for="ibanReactive" class="col-sm-2 col-form-label">IBAN:</label>
127
+ <input type="text" class="form-control" id="ibanReactive" name="ibanReactive" formControlName="ibanReactive" required>
128
+ </div>
129
+
130
+ <div *ngIf="ibanReactive.invalid && (ibanReactive.dirty || ibanReactive.touched)"
131
+ class="alert alert-danger">
126
132
 
127
- <div *ngIf="ibanReactive.invalid && (ibanReactive.dirty || ibanReactive.touched)"
128
- class="alert alert-danger">
133
+ <div *ngIf="ibanReactive.errors.['required']">
134
+ IBAN is required.
135
+ </div>
136
+ <div *ngIf="ibanReactive.errors.['iban']">
137
+ IBAN is invalid
138
+ </div>
129
139
 
130
- <div *ngIf="ibanReactive.errors.required">
131
- IBAN is required.
132
140
  </div>
133
- <div *ngIf="ibanReactive.errors.iban">
134
- IBAN is invalid
141
+ <div *ngIf="ibanReactive.valid && (ibanReactive.dirty || ibanReactive.touched)"
142
+ class="alert alert-danger">
143
+ IBAN is valid.
135
144
  </div>
136
-
137
- </div>
138
- <div *ngIf="ibanReactive.valid && (ibanReactive.dirty || ibanReactive.touched)"
139
- class="alert alert-danger">
140
- IBAN is valid.
141
- </div>
142
- </form>
145
+ </form>
143
146
  ```
144
147
 
145
148
  ```typescript
@@ -159,10 +162,10 @@ export class AppComponent implements OnInit {
159
162
  public ngOnInit(): void {
160
163
  this.ibanReactive = new FormControl(
161
164
  null,
162
- [
163
- Validators.required,
164
- ValidatorService.validateIban
165
- ]
165
+ [
166
+ Validators.required,
167
+ ValidatorService.validateIban
168
+ ]
166
169
  );
167
170
 
168
171
  this.reactiveForm = this.fb.group({
@@ -185,7 +188,7 @@ after
185
188
  ```
186
189
 
187
190
  ## Demo
188
-
191
+
189
192
  https://fundsaccess.github.io/angular-iban/
190
193
 
191
194
  or
@@ -194,6 +197,6 @@ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`.
194
197
 
195
198
  ## License
196
199
 
197
- Copyright (c) 2018 fundsaccess AG. Licensed under the MIT License (MIT)
200
+ Copyright (c) 2018 - 2021 fundsaccess AG. Licensed under the MIT License (MIT)
198
201
 
199
202
 
@@ -0,0 +1,26 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { IbanValidatorDirective } from './directives/iban-validator.directive';
3
+ import { IbanFormatterPipe } from './pipes/iban-formatter.pipe';
4
+ import * as i0 from "@angular/core";
5
+ export class AngularIbanModule {
6
+ }
7
+ AngularIbanModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8
+ AngularIbanModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
9
+ IbanFormatterPipe], exports: [IbanValidatorDirective,
10
+ IbanFormatterPipe] });
11
+ AngularIbanModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, decorators: [{
13
+ type: NgModule,
14
+ args: [{
15
+ declarations: [
16
+ IbanValidatorDirective,
17
+ IbanFormatterPipe
18
+ ],
19
+ imports: [],
20
+ exports: [
21
+ IbanValidatorDirective,
22
+ IbanFormatterPipe,
23
+ ]
24
+ }]
25
+ }] });
26
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1pYmFuLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL2FuZ3VsYXItaWJhbi5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFN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YXNzIEFuZ3VsYXJJYmFuTW9kdWxlIHsgfVxuIl19
@@ -0,0 +1,19 @@
1
+ import { Directive } from '@angular/core';
2
+ import { NG_VALIDATORS } from '@angular/forms';
3
+ import { ValidatorService } from '../services/validator.service';
4
+ import * as i0 from "@angular/core";
5
+ export class IbanValidatorDirective {
6
+ validate(c) {
7
+ return ValidatorService.validateIban(c);
8
+ }
9
+ }
10
+ IbanValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
+ IbanValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanValidatorDirective, decorators: [{
13
+ type: Directive,
14
+ args: [{
15
+ selector: '[ibanValidator]',
16
+ providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
17
+ }]
18
+ }] });
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi12YWxpZGF0b3IuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1pYmFuL3NyYy9saWIvZGlyZWN0aXZlcy9pYmFuLXZhbGlkYXRvci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsYUFBYSxFQUE4QixNQUFNLGdCQUFnQixDQUFDO0FBQzNFLE9BQU8sRUFBRSxnQ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1wbGVtZW50cyBWYWxpZGF0b3Ige1xuICB2YWxpZGF0ZShjOiBBYnN0cmFjdENvbnRyb2wpOiB7IFtrZXk6IHN0cmluZ106IGFueSB9IHtcbiAgICByZXR1cm4gVmFsaWRhdG9yU2VydmljZS52YWxpZGF0ZUliYW4oYyk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,20 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as IBAN from 'iban';
3
+ import * as i0 from "@angular/core";
4
+ export class IbanFormatterPipe {
5
+ transform(value, args) {
6
+ if (IBAN.isValid(value)) {
7
+ return IBAN.printFormat(value, ' ');
8
+ }
9
+ return value;
10
+ }
11
+ }
12
+ IbanFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
13
+ IbanFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" });
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, decorators: [{
15
+ type: Pipe,
16
+ args: [{
17
+ name: 'ibanFormatter'
18
+ }]
19
+ }] });
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi1mb3JtYXR0ZXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL3BpcGVzL2liYW4tZm9ybWF0dGVyLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7O0FBSzdCLE1BQU0sT0FBTyxpQkFBaUI7SUFFNUIsU0FBUyxDQUFDLEtBQVUsRUFBRSxJQUFVO1FBQzlCLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUN2QixPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxDQUFDO1NBQ3JDO1FBQ0QsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDOzs4R0FQVSxpQkFBaUI7NEdBQWpCLGlCQUFpQjsyRkFBakIsaUJBQWlCO2tCQUg3QixJQUFJO21CQUFDO29CQUNKLElBQUksRUFBRSxlQUFlO2lCQUN0QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCAqIGFzIElCQU4gZnJvbSAnaWJhbic7XG5cbkBQaXBlKHtcbiAgbmFtZTogJ2liYW5Gb3JtYXR0ZXInXG59KVxuZXhwb3J0IGNsYXNzIEliYW5Gb3JtYXR0ZXJQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG5cbiAgdHJhbnNmb3JtKHZhbHVlOiBhbnksIGFyZ3M/OiBhbnkpOiBhbnkge1xuICAgIGlmIChJQkFOLmlzVmFsaWQodmFsdWUpKSB7XG4gICAgICByZXR1cm4gSUJBTi5wcmludEZvcm1hdCh2YWx1ZSwgJyAnKTtcbiAgICB9XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG5cbn1cbiJdfQ==
@@ -7,4 +7,4 @@ export class ValidatorService {
7
7
  return null;
8
8
  }
9
9
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy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8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWliYW4vc3JjL2xpYi9zZXJ2aWNlcy92YWxpZGF0b3Iuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUU3QixNQUFNLE9BQU8sZ0JBQWdCO0lBRTNCLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBa0I7UUFDcEMsSUFBSSxDQUFDLENBQUMsS0FBSyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDckMsT0FBTyxFQUFDLElBQUksRUFBRSxFQUFDLEtBQUssRUFBRSxDQUFDLENBQUMsS0FBSyxFQUFDLEVBQUMsQ0FBQztTQUNqQztRQUVELE9BQU8sSUFBVyxDQUFDO0lBQ3JCLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7QWJzdHJhY3RDb250cm9sLCBWYWxpZGF0aW9uRXJyb3JzfSBmcm9tICdAYW5ndWxhci9mb3Jtcyc7XG5pbXBvcnQgKiBhcyBJQkFOIGZyb20gJ2liYW4nO1xuXG5leHBvcnQgY2xhc3MgVmFsaWRhdG9yU2VydmljZSB7XG5cbiAgc3RhdGljIHZhbGlkYXRlSWJhbihjOiBBYnN0cmFjdENvbnRyb2wpOiBWYWxpZGF0aW9uRXJyb3JzIHtcbiAgICBpZiAoYy52YWx1ZSAmJiAhSUJBTi5pc1ZhbGlkKGMudmFsdWUpKSB7XG4gICAgICByZXR1cm4ge2liYW46IHt2YWx1ZTogYy52YWx1ZX19O1xuICAgIH1cblxuICAgIHJldHVybiBudWxsIGFzIGFueTtcbiAgfVxufVxuIl19
@@ -0,0 +1,78 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Pipe, NgModule } from '@angular/core';
3
+ import { NG_VALIDATORS } from '@angular/forms';
4
+ import * as IBAN from 'iban';
5
+
6
+ class ValidatorService {
7
+ static validateIban(c) {
8
+ if (c.value && !IBAN.isValid(c.value)) {
9
+ return { iban: { value: c.value } };
10
+ }
11
+ return null;
12
+ }
13
+ }
14
+
15
+ class IbanValidatorDirective {
16
+ validate(c) {
17
+ return ValidatorService.validateIban(c);
18
+ }
19
+ }
20
+ IbanValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
21
+ IbanValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanValidatorDirective, decorators: [{
23
+ type: Directive,
24
+ args: [{
25
+ selector: '[ibanValidator]',
26
+ providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
27
+ }]
28
+ }] });
29
+
30
+ class IbanFormatterPipe {
31
+ transform(value, args) {
32
+ if (IBAN.isValid(value)) {
33
+ return IBAN.printFormat(value, ' ');
34
+ }
35
+ return value;
36
+ }
37
+ }
38
+ IbanFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
39
+ IbanFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, decorators: [{
41
+ type: Pipe,
42
+ args: [{
43
+ name: 'ibanFormatter'
44
+ }]
45
+ }] });
46
+
47
+ class AngularIbanModule {
48
+ }
49
+ AngularIbanModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
50
+ AngularIbanModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
51
+ IbanFormatterPipe], exports: [IbanValidatorDirective,
52
+ IbanFormatterPipe] });
53
+ AngularIbanModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule });
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, decorators: [{
55
+ type: NgModule,
56
+ args: [{
57
+ declarations: [
58
+ IbanValidatorDirective,
59
+ IbanFormatterPipe
60
+ ],
61
+ imports: [],
62
+ exports: [
63
+ IbanValidatorDirective,
64
+ IbanFormatterPipe,
65
+ ]
66
+ }]
67
+ }] });
68
+
69
+ /*
70
+ * Public API Surface of angular-iban
71
+ */
72
+
73
+ /**
74
+ * Generated bundle index. Do not edit.
75
+ */
76
+
77
+ export { AngularIbanModule, IbanFormatterPipe, IbanValidatorDirective, ValidatorService };
78
+ //# sourceMappingURL=angular-iban.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"angular-iban.mjs","sources":["../../../projects/angular-iban/src/lib/services/validator.service.ts","../../../projects/angular-iban/src/lib/directives/iban-validator.directive.ts","../../../projects/angular-iban/src/lib/pipes/iban-formatter.pipe.ts","../../../projects/angular-iban/src/lib/angular-iban.module.ts","../../../projects/angular-iban/src/public-api.ts","../../../projects/angular-iban/src/angular-iban.ts"],"sourcesContent":["import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport * as IBAN from 'iban';\n\nexport class ValidatorService {\n\n static validateIban(c: AbstractControl): ValidationErrors {\n if (c.value && !IBAN.isValid(c.value)) {\n return {iban: {value: c.value}};\n }\n\n return null as any;\n }\n}\n","import { Directive } from '@angular/core';\nimport { NG_VALIDATORS, Validator, AbstractControl } from '@angular/forms';\nimport { ValidatorService } from '../services/validator.service';\n\n@Directive({\n selector: '[ibanValidator]',\n providers: [{provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true}]\n})\nexport class IbanValidatorDirective implements Validator {\n validate(c: AbstractControl): { [key: string]: any } {\n return ValidatorService.validateIban(c);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport * as IBAN from 'iban';\n\n@Pipe({\n name: 'ibanFormatter'\n})\nexport class IbanFormatterPipe implements PipeTransform {\n\n transform(value: any, args?: any): any {\n if (IBAN.isValid(value)) {\n return IBAN.printFormat(value, ' ');\n }\n return value;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { IbanValidatorDirective } from './directives/iban-validator.directive';\nimport { IbanFormatterPipe } from './pipes/iban-formatter.pipe';\n\n@NgModule({\n declarations: [\n IbanValidatorDirective,\n IbanFormatterPipe\n ],\n imports: [\n ],\n exports: [\n IbanValidatorDirective,\n IbanFormatterPipe,\n ]\n})\nexport class AngularIbanModule { }\n","/*\n * Public API Surface of angular-iban\n */\n\nexport * from './lib/angular-iban.module';\nexport * from './lib/services/validator.service';\nexport * from './lib/directives/iban-validator.directive';\nexport * from './lib/pipes/iban-formatter.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAGa,gBAAgB,CAAA;IAE3B,OAAO,YAAY,CAAC,CAAkB,EAAA;AACpC,QAAA,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;YACrC,OAAO,EAAC,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAC,EAAC,CAAC;AACjC,SAAA;AAED,QAAA,OAAO,IAAW,CAA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B,EAAA,UAAA,EAAA,CAAA;kBAH7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,eAAe;iBACtB,CAAA;;;MCWY,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAV1B,sBAAsB;AACtB,QAAA,iBAAiB,aAKjB,sBAAsB;QACtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;+GAGR,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAZ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,sBAAsB;wBACtB,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,iBAAiB;AAClB,qBAAA;iBACF,CAAA;;;ACfD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,78 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Pipe, NgModule } from '@angular/core';
3
+ import { NG_VALIDATORS } from '@angular/forms';
4
+ import * as IBAN from 'iban';
5
+
6
+ class ValidatorService {
7
+ static validateIban(c) {
8
+ if (c.value && !IBAN.isValid(c.value)) {
9
+ return { iban: { value: c.value } };
10
+ }
11
+ return null;
12
+ }
13
+ }
14
+
15
+ class IbanValidatorDirective {
16
+ validate(c) {
17
+ return ValidatorService.validateIban(c);
18
+ }
19
+ }
20
+ IbanValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
21
+ IbanValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanValidatorDirective, decorators: [{
23
+ type: Directive,
24
+ args: [{
25
+ selector: '[ibanValidator]',
26
+ providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
27
+ }]
28
+ }] });
29
+
30
+ class IbanFormatterPipe {
31
+ transform(value, args) {
32
+ if (IBAN.isValid(value)) {
33
+ return IBAN.printFormat(value, ' ');
34
+ }
35
+ return value;
36
+ }
37
+ }
38
+ IbanFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
39
+ IbanFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IbanFormatterPipe, decorators: [{
41
+ type: Pipe,
42
+ args: [{
43
+ name: 'ibanFormatter'
44
+ }]
45
+ }] });
46
+
47
+ class AngularIbanModule {
48
+ }
49
+ AngularIbanModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
50
+ AngularIbanModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
51
+ IbanFormatterPipe], exports: [IbanValidatorDirective,
52
+ IbanFormatterPipe] });
53
+ AngularIbanModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule });
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: AngularIbanModule, decorators: [{
55
+ type: NgModule,
56
+ args: [{
57
+ declarations: [
58
+ IbanValidatorDirective,
59
+ IbanFormatterPipe
60
+ ],
61
+ imports: [],
62
+ exports: [
63
+ IbanValidatorDirective,
64
+ IbanFormatterPipe,
65
+ ]
66
+ }]
67
+ }] });
68
+
69
+ /*
70
+ * Public API Surface of angular-iban
71
+ */
72
+
73
+ /**
74
+ * Generated bundle index. Do not edit.
75
+ */
76
+
77
+ export { AngularIbanModule, IbanFormatterPipe, IbanValidatorDirective, ValidatorService };
78
+ //# sourceMappingURL=angular-iban.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"angular-iban.mjs","sources":["../../../projects/angular-iban/src/lib/services/validator.service.ts","../../../projects/angular-iban/src/lib/directives/iban-validator.directive.ts","../../../projects/angular-iban/src/lib/pipes/iban-formatter.pipe.ts","../../../projects/angular-iban/src/lib/angular-iban.module.ts","../../../projects/angular-iban/src/public-api.ts","../../../projects/angular-iban/src/angular-iban.ts"],"sourcesContent":["import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport * as IBAN from 'iban';\n\nexport class ValidatorService {\n\n static validateIban(c: AbstractControl): ValidationErrors {\n if (c.value && !IBAN.isValid(c.value)) {\n return {iban: {value: c.value}};\n }\n\n return null as any;\n }\n}\n","import { Directive } from '@angular/core';\nimport { NG_VALIDATORS, Validator, AbstractControl } from '@angular/forms';\nimport { ValidatorService } from '../services/validator.service';\n\n@Directive({\n selector: '[ibanValidator]',\n providers: [{provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true}]\n})\nexport class IbanValidatorDirective implements Validator {\n validate(c: AbstractControl): { [key: string]: any } {\n return ValidatorService.validateIban(c);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport * as IBAN from 'iban';\n\n@Pipe({\n name: 'ibanFormatter'\n})\nexport class IbanFormatterPipe implements PipeTransform {\n\n transform(value: any, args?: any): any {\n if (IBAN.isValid(value)) {\n return IBAN.printFormat(value, ' ');\n }\n return value;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { IbanValidatorDirective } from './directives/iban-validator.directive';\nimport { IbanFormatterPipe } from './pipes/iban-formatter.pipe';\n\n@NgModule({\n declarations: [\n IbanValidatorDirective,\n IbanFormatterPipe\n ],\n imports: [\n ],\n exports: [\n IbanValidatorDirective,\n IbanFormatterPipe,\n ]\n})\nexport class AngularIbanModule { }\n","/*\n * Public API Surface of angular-iban\n */\n\nexport * from './lib/angular-iban.module';\nexport * from './lib/services/validator.service';\nexport * from './lib/directives/iban-validator.directive';\nexport * from './lib/pipes/iban-formatter.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAGa,gBAAgB,CAAA;IAE3B,OAAO,YAAY,CAAC,CAAkB,EAAA;AACpC,QAAA,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;YACrC,OAAO,EAAC,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAC,EAAC,CAAC;AACjC,SAAA;AAED,QAAA,OAAO,IAAW,CAAC;KACpB;AACF;;MCJY,sBAAsB,CAAA;AACjC,IAAA,QAAQ,CAAC,CAAkB,EAAA;AACzB,QAAA,OAAO,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;KACzC;;mHAHU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA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AAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAV1B,sBAAsB;AACtB,QAAA,iBAAiB,aAKjB,sBAAsB;QACtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;+GAGR,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAZ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,sBAAsB;wBACtB,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;;;ACfD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="angular-iban" />
4
5
  export * from './public-api';
@@ -1,2 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./directives/iban-validator.directive";
3
+ import * as i2 from "./pipes/iban-formatter.pipe";
1
4
  export declare class AngularIbanModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularIbanModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AngularIbanModule, [typeof i1.IbanValidatorDirective, typeof i2.IbanFormatterPipe], never, [typeof i1.IbanValidatorDirective, typeof i2.IbanFormatterPipe]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<AngularIbanModule>;
2
8
  }
@@ -1,6 +1,9 @@
1
1
  import { Validator, AbstractControl } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class IbanValidatorDirective implements Validator {
3
4
  validate(c: AbstractControl): {
4
5
  [key: string]: any;
5
6
  };
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<IbanValidatorDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IbanValidatorDirective, "[ibanValidator]", never, {}, {}, never, never, false>;
6
9
  }
@@ -1,4 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class IbanFormatterPipe implements PipeTransform {
3
4
  transform(value: any, args?: any): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<IbanFormatterPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<IbanFormatterPipe, "ibanFormatter", false>;
4
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-iban",
3
- "version": "4.0.2",
3
+ "version": "14.0.0",
4
4
  "description": "Angular directives and pipes for IBAN",
5
5
  "author": "fundsaccess AG",
6
6
  "repository": {
@@ -16,20 +16,32 @@
16
16
  "typescript"
17
17
  ],
18
18
  "peerDependencies": {
19
- "@angular/common": "^11.x",
20
- "@angular/core": "^11.x",
19
+ "@angular/common": "^14.x",
20
+ "@angular/core": "^14.x",
21
21
  "iban": "0.0.14"
22
22
  },
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "tslib": "^2.0.0"
25
+ "tslib": "^2.3.0"
26
+ },
27
+ "module": "fesm2015/angular-iban.mjs",
28
+ "es2020": "fesm2020/angular-iban.mjs",
29
+ "esm2020": "esm2020/angular-iban.mjs",
30
+ "fesm2020": "fesm2020/angular-iban.mjs",
31
+ "fesm2015": "fesm2015/angular-iban.mjs",
32
+ "typings": "index.d.ts",
33
+ "exports": {
34
+ "./package.json": {
35
+ "default": "./package.json"
36
+ },
37
+ ".": {
38
+ "types": "./index.d.ts",
39
+ "esm2020": "./esm2020/angular-iban.mjs",
40
+ "es2020": "./fesm2020/angular-iban.mjs",
41
+ "es2015": "./fesm2015/angular-iban.mjs",
42
+ "node": "./fesm2015/angular-iban.mjs",
43
+ "default": "./fesm2020/angular-iban.mjs"
44
+ }
26
45
  },
27
- "main": "bundles/angular-iban.umd.js",
28
- "module": "fesm2015/angular-iban.js",
29
- "es2015": "fesm2015/angular-iban.js",
30
- "esm2015": "esm2015/angular-iban.js",
31
- "fesm2015": "fesm2015/angular-iban.js",
32
- "typings": "angular-iban.d.ts",
33
- "metadata": "angular-iban.metadata.json",
34
46
  "sideEffects": false
35
47
  }
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"AngularIbanModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"IbanValidatorDirective"},{"__symbolic":"reference","name":"IbanFormatterPipe"}],"imports":[],"exports":[{"__symbolic":"reference","name":"IbanValidatorDirective"},{"__symbolic":"reference","name":"IbanFormatterPipe"}]}]}],"members":{}},"ValidatorService":{"__symbolic":"class","members":{}},"IbanValidatorDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[ibanValidator]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":6,"character":24},"useExisting":{"__symbolic":"reference","name":"IbanValidatorDirective"},"multi":true}]}]}],"members":{"validate":[{"__symbolic":"method"}]}},"IbanFormatterPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":3,"character":1},"arguments":[{"name":"ibanFormatter"}]}],"members":{"transform":[{"__symbolic":"method"}]}}},"origins":{"AngularIbanModule":"./lib/angular-iban.module","ValidatorService":"./lib/services/validator.service","IbanValidatorDirective":"./lib/directives/iban-validator.directive","IbanFormatterPipe":"./lib/pipes/iban-formatter.pipe"},"importAs":"angular-iban"}
@@ -1,86 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('iban')) :
3
- typeof define === 'function' && define.amd ? define('angular-iban', ['exports', '@angular/core', '@angular/forms', 'iban'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['angular-iban'] = {}, global.ng.core, global.ng.forms, global.iban));
5
- }(this, (function (exports, core, forms, IBAN) { 'use strict';
6
-
7
- var ValidatorService = /** @class */ (function () {
8
- function ValidatorService() {
9
- }
10
- ValidatorService.validateIban = function (c) {
11
- if (c.value && !IBAN.isValid(c.value)) {
12
- return { iban: { value: c.value } };
13
- }
14
- return null;
15
- };
16
- return ValidatorService;
17
- }());
18
-
19
- var IbanValidatorDirective = /** @class */ (function () {
20
- function IbanValidatorDirective() {
21
- }
22
- IbanValidatorDirective.prototype.validate = function (c) {
23
- return ValidatorService.validateIban(c);
24
- };
25
- return IbanValidatorDirective;
26
- }());
27
- IbanValidatorDirective.decorators = [
28
- { type: core.Directive, args: [{
29
- selector: '[ibanValidator]',
30
- providers: [{ provide: forms.NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
31
- },] }
32
- ];
33
-
34
- var IbanFormatterPipe = /** @class */ (function () {
35
- function IbanFormatterPipe() {
36
- }
37
- IbanFormatterPipe.prototype.transform = function (value, args) {
38
- if (IBAN.isValid(value)) {
39
- return IBAN.printFormat(value, ' ');
40
- }
41
- return value;
42
- };
43
- return IbanFormatterPipe;
44
- }());
45
- IbanFormatterPipe.decorators = [
46
- { type: core.Pipe, args: [{
47
- name: 'ibanFormatter'
48
- },] }
49
- ];
50
-
51
- var AngularIbanModule = /** @class */ (function () {
52
- function AngularIbanModule() {
53
- }
54
- return AngularIbanModule;
55
- }());
56
- AngularIbanModule.decorators = [
57
- { type: core.NgModule, args: [{
58
- declarations: [
59
- IbanValidatorDirective,
60
- IbanFormatterPipe
61
- ],
62
- imports: [],
63
- exports: [
64
- IbanValidatorDirective,
65
- IbanFormatterPipe,
66
- ]
67
- },] }
68
- ];
69
-
70
- /*
71
- * Public API Surface of angular-iban
72
- */
73
-
74
- /**
75
- * Generated bundle index. Do not edit.
76
- */
77
-
78
- exports.AngularIbanModule = AngularIbanModule;
79
- exports.IbanFormatterPipe = IbanFormatterPipe;
80
- exports.IbanValidatorDirective = IbanValidatorDirective;
81
- exports.ValidatorService = ValidatorService;
82
-
83
- Object.defineProperty(exports, '__esModule', { value: true });
84
-
85
- })));
86
- //# sourceMappingURL=angular-iban.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"angular-iban.umd.js","sources":["../../../projects/angular-iban/src/lib/services/validator.service.ts","../../../projects/angular-iban/src/lib/directives/iban-validator.directive.ts","../../../projects/angular-iban/src/lib/pipes/iban-formatter.pipe.ts","../../../projects/angular-iban/src/lib/angular-iban.module.ts","../../../projects/angular-iban/src/public-api.ts","../../../projects/angular-iban/src/angular-iban.ts"],"sourcesContent":["import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport * as IBAN from 'iban';\n\nexport class ValidatorService {\n\n static validateIban(c: AbstractControl): ValidationErrors {\n if (c.value && !IBAN.isValid(c.value)) {\n return {iban: {value: c.value}};\n }\n\n return null;\n }\n}\n","import { Directive } from '@angular/core';\nimport {NG_VALIDATORS, Validator, AbstractControl} from '@angular/forms';\nimport {ValidatorService} from '../services/validator.service';\n\n@Directive({\n selector: '[ibanValidator]',\n providers: [{provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true}]\n})\nexport class IbanValidatorDirective implements Validator {\n validate(c: AbstractControl): { [key: string]: any } {\n return ValidatorService.validateIban(c);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport * as IBAN from 'iban';\n\n@Pipe({\n name: 'ibanFormatter'\n})\nexport class IbanFormatterPipe implements PipeTransform {\n\n transform(value: any, args?: any): any {\n if (IBAN.isValid(value)) {\n return IBAN.printFormat(value, ' ');\n }\n return value;\n }\n\n}\n","import { NgModule } from '@angular/core';\n\nimport { IbanValidatorDirective } from './directives/iban-validator.directive';\nimport { IbanFormatterPipe } from './pipes/iban-formatter.pipe';\n\n@NgModule({\n declarations: [\n IbanValidatorDirective,\n IbanFormatterPipe\n ],\n imports: [\n ],\n exports: [\n IbanValidatorDirective,\n IbanFormatterPipe,\n ]\n})\nexport class AngularIbanModule { }\n","/*\n * Public API Surface of angular-iban\n */\n\nexport * from './lib/angular-iban.module';\nexport * from './lib/services/validator.service';\nexport * from './lib/directives/iban-validator.directive';\nexport * from './lib/pipes/iban-formatter.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["IBAN.isValid","Directive","NG_VALIDATORS","IBAN.printFormat","Pipe","NgModule"],"mappings":";;;;;;;QAGA;SASC;QAPQ,6BAAY,GAAnB,UAAoB,CAAkB;YACpC,IAAI,CAAC,CAAC,KAAK,IAAI,CAACA,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;gBACrC,OAAO,EAAC,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAC,EAAC,CAAC;aACjC;YAED,OAAO,IAAI,CAAC;SACb;+BACF;KAAA;;;QCJD;;QACE,yCAAQ,GAAR,UAAS,CAAkB;YACzB,OAAO,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;SACzC;;;;gBAPFC,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,SAAS,EAAE,CAAC,EAAC,OAAO,EAAEC,mBAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;iBACxF;;;;QCDD;;QAEE,qCAAS,GAAT,UAAU,KAAU,EAAE,IAAU;YAC9B,IAAIF,YAAY,CAAC,KAAK,CAAC,EAAE;gBACvB,OAAOG,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;aACrC;YACD,OAAO,KAAK,CAAC;SACd;;;;gBAVFC,SAAI,SAAC;oBACJ,IAAI,EAAE,eAAe;iBACtB;;;;QCYD;;;;;gBAZCC,aAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,sBAAsB;wBACtB,iBAAiB;qBAClB;oBACD,OAAO,EAAE,EACR;oBACD,OAAO,EAAE;wBACP,sBAAsB;wBACtB,iBAAiB;qBAClB;iBACF;;;IChBD;;;;ICAA;;;;;;;;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/core"),require("@angular/forms"),require("iban")):"function"==typeof define&&define.amd?define("angular-iban",["exports","@angular/core","@angular/forms","iban"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["angular-iban"]={},e.ng.core,e.ng.forms,e.iban)}(this,(function(e,r,n,a){"use strict";var t=function(){function e(){}return e.validateIban=function(e){return e.value&&!a.isValid(e.value)?{iban:{value:e.value}}:null},e}(),i=function(){function e(){}return e.prototype.validate=function(e){return t.validateIban(e)},e}();i.decorators=[{type:r.Directive,args:[{selector:"[ibanValidator]",providers:[{provide:n.NG_VALIDATORS,useExisting:i,multi:!0}]}]}];var o=function(){function e(){}return e.prototype.transform=function(e,r){return a.isValid(e)?a.printFormat(e," "):e},e}();o.decorators=[{type:r.Pipe,args:[{name:"ibanFormatter"}]}];var u=function(){};u.decorators=[{type:r.NgModule,args:[{declarations:[i,o],imports:[],exports:[i,o]}]}],e.AngularIbanModule=u,e.IbanFormatterPipe=o,e.IbanValidatorDirective=i,e.ValidatorService=t,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=angular-iban.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../projects/angular-iban/src/lib/services/validator.service.ts","../../../projects/angular-iban/src/lib/directives/iban-validator.directive.ts","../../../projects/angular-iban/src/lib/pipes/iban-formatter.pipe.ts","../../../projects/angular-iban/src/lib/angular-iban.module.ts"],"names":["ValidatorService","validateIban","c","value","IBAN.isValid","iban","IbanValidatorDirective","prototype","validate","Directive","args","selector","providers","provide","NG_VALIDATORS","useExisting","multi","IbanFormatterPipe","transform","IBAN.printFormat","Pipe","name","NgModule","declarations","imports","exports"],"mappings":"oaAGA,SAAAA,YAESA,EAAAC,aAAP,SAAoBC,GAClB,OAAIA,EAAEC,QAAUC,EAAAA,QAAaF,EAAEC,OACtB,CAACE,KAAM,CAACF,MAAOD,EAAEC,QAGnB,wBCFX,SAAAG,YACEA,EAAAC,UAAAC,SAAA,SAASN,GACP,OAAOF,EAAiBC,aAAaC,6BANxCO,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,UAAW,CAAC,CAACC,QAASC,EAAAA,cAAeC,YAAaT,EAAwBU,OAAO,yBCAnF,SAAAC,YAEEA,EAAAV,UAAAW,UAAA,SAAUf,EAAYO,GACpB,OAAIN,EAAAA,QAAaD,GACRgB,EAAAA,YAAiBhB,EAAO,KAE1BA,4BATViB,EAAAA,KAAIV,KAAA,CAAC,CACJW,KAAM,0BCaR,iCAZCC,EAAAA,SAAQZ,KAAA,CAAC,CACRa,aAAc,CACZjB,EACAW,GAEFO,QAAS,GAETC,QAAS,CACPnB,EACAW","sourcesContent":["import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport * as IBAN from 'iban';\n\nexport class ValidatorService {\n\n static validateIban(c: AbstractControl): ValidationErrors {\n if (c.value && !IBAN.isValid(c.value)) {\n return {iban: {value: c.value}};\n }\n\n return null;\n }\n}\n","import { Directive } from '@angular/core';\nimport {NG_VALIDATORS, Validator, AbstractControl} from '@angular/forms';\nimport {ValidatorService} from '../services/validator.service';\n\n@Directive({\n selector: '[ibanValidator]',\n providers: [{provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true}]\n})\nexport class IbanValidatorDirective implements Validator {\n validate(c: AbstractControl): { [key: string]: any } {\n return ValidatorService.validateIban(c);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport * as IBAN from 'iban';\n\n@Pipe({\n name: 'ibanFormatter'\n})\nexport class IbanFormatterPipe implements PipeTransform {\n\n transform(value: any, args?: any): any {\n if (IBAN.isValid(value)) {\n return IBAN.printFormat(value, ' ');\n }\n return value;\n }\n\n}\n","import { NgModule } from '@angular/core';\n\nimport { IbanValidatorDirective } from './directives/iban-validator.directive';\nimport { IbanFormatterPipe } from './pipes/iban-formatter.pipe';\n\n@NgModule({\n declarations: [\n IbanValidatorDirective,\n IbanFormatterPipe\n ],\n imports: [\n ],\n exports: [\n IbanValidatorDirective,\n IbanFormatterPipe,\n ]\n})\nexport class AngularIbanModule { }\n"]}
@@ -1,19 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { IbanValidatorDirective } from './directives/iban-validator.directive';
3
- import { IbanFormatterPipe } from './pipes/iban-formatter.pipe';
4
- export class AngularIbanModule {
5
- }
6
- AngularIbanModule.decorators = [
7
- { type: NgModule, args: [{
8
- declarations: [
9
- IbanValidatorDirective,
10
- IbanFormatterPipe
11
- ],
12
- imports: [],
13
- exports: [
14
- IbanValidatorDirective,
15
- IbanFormatterPipe,
16
- ]
17
- },] }
18
- ];
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1pYmFuLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL2FuZ3VsYXItaWJhbi5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUMvRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQWNoRSxNQUFNLE9BQU8saUJBQWlCOzs7WUFaN0IsUUFBUSxTQUFDO2dCQUNSLFlBQVksRUFBRTtvQkFDWixzQkFBc0I7b0JBQ3RCLGlCQUFpQjtpQkFDbEI7Z0JBQ0QsT0FBTyxFQUFFLEVBQ1I7Z0JBQ0QsT0FBTyxFQUFFO29CQUNQLHNCQUFzQjtvQkFDdEIsaUJBQWlCO2lCQUNsQjthQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgSWJhblZhbGlkYXRvckRpcmVjdGl2ZSB9IGZyb20gJy4vZGlyZWN0aXZlcy9pYmFuLXZhbGlkYXRvci5kaXJlY3RpdmUnO1xuaW1wb3J0IHsgSWJhbkZvcm1hdHRlclBpcGUgfSBmcm9tICcuL3BpcGVzL2liYW4tZm9ybWF0dGVyLnBpcGUnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtcbiAgICBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlLFxuICAgIEliYW5Gb3JtYXR0ZXJQaXBlXG4gIF0sXG4gIGltcG9ydHM6IFtcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIEliYW5WYWxpZGF0b3JEaXJlY3RpdmUsXG4gICAgSWJhbkZvcm1hdHRlclBpcGUsXG4gIF1cbn0pXG5leHBvcnQgY2xhc3MgQW5ndWxhckliYW5Nb2R1bGUgeyB9XG4iXX0=
@@ -1,15 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import { NG_VALIDATORS } from '@angular/forms';
3
- import { ValidatorService } from '../services/validator.service';
4
- export class IbanValidatorDirective {
5
- validate(c) {
6
- return ValidatorService.validateIban(c);
7
- }
8
- }
9
- IbanValidatorDirective.decorators = [
10
- { type: Directive, args: [{
11
- selector: '[ibanValidator]',
12
- providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
13
- },] }
14
- ];
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi12YWxpZGF0b3IuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vL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dGl2ZSwgbXVsdGk6IHRydWV9XVxufSlcbmV4cG9ydCBjbGFzcyBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlIGltcGxlbWVudHMgVmFsaWRhdG9yIHtcbiAgdmFsaWRhdGUoYzogQWJzdHJhY3RDb250cm9sKTogeyBba2V5OiBzdHJpbmddOiBhbnkgfSB7XG4gICAgcmV0dXJuIFZhbGlkYXRvclNlcnZpY2UudmFsaWRhdGVJYmFuKGMpO1xuICB9XG59XG4iXX0=
@@ -1,16 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import * as IBAN from 'iban';
3
- export class IbanFormatterPipe {
4
- transform(value, args) {
5
- if (IBAN.isValid(value)) {
6
- return IBAN.printFormat(value, ' ');
7
- }
8
- return value;
9
- }
10
- }
11
- IbanFormatterPipe.decorators = [
12
- { type: Pipe, args: [{
13
- name: 'ibanFormatter'
14
- },] }
15
- ];
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi1mb3JtYXR0ZXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL3BpcGVzL2liYW4tZm9ybWF0dGVyLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7QUFLN0IsTUFBTSxPQUFPLGlCQUFpQjtJQUU1QixTQUFTLENBQUMsS0FBVSxFQUFFLElBQVU7UUFDOUIsSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUFFO1lBQ3ZCLE9BQU8sSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDLENBQUM7U0FDckM7UUFDRCxPQUFPLEtBQUssQ0FBQztJQUNmLENBQUM7OztZQVZGLElBQUksU0FBQztnQkFDSixJQUFJLEVBQUUsZUFBZTthQUN0QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCAqIGFzIElCQU4gZnJvbSAnaWJhbic7XG5cbkBQaXBlKHtcbiAgbmFtZTogJ2liYW5Gb3JtYXR0ZXInXG59KVxuZXhwb3J0IGNsYXNzIEliYW5Gb3JtYXR0ZXJQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG5cbiAgdHJhbnNmb3JtKHZhbHVlOiBhbnksIGFyZ3M/OiBhbnkpOiBhbnkge1xuICAgIGlmIChJQkFOLmlzVmFsaWQodmFsdWUpKSB7XG4gICAgICByZXR1cm4gSUJBTi5wcmludEZvcm1hdCh2YWx1ZSwgJyAnKTtcbiAgICB9XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG5cbn1cbiJdfQ==
@@ -1,65 +0,0 @@
1
- import { Directive, Pipe, NgModule } from '@angular/core';
2
- import { NG_VALIDATORS } from '@angular/forms';
3
- import { isValid, printFormat } from 'iban';
4
-
5
- class ValidatorService {
6
- static validateIban(c) {
7
- if (c.value && !isValid(c.value)) {
8
- return { iban: { value: c.value } };
9
- }
10
- return null;
11
- }
12
- }
13
-
14
- class IbanValidatorDirective {
15
- validate(c) {
16
- return ValidatorService.validateIban(c);
17
- }
18
- }
19
- IbanValidatorDirective.decorators = [
20
- { type: Directive, args: [{
21
- selector: '[ibanValidator]',
22
- providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
23
- },] }
24
- ];
25
-
26
- class IbanFormatterPipe {
27
- transform(value, args) {
28
- if (isValid(value)) {
29
- return printFormat(value, ' ');
30
- }
31
- return value;
32
- }
33
- }
34
- IbanFormatterPipe.decorators = [
35
- { type: Pipe, args: [{
36
- name: 'ibanFormatter'
37
- },] }
38
- ];
39
-
40
- class AngularIbanModule {
41
- }
42
- AngularIbanModule.decorators = [
43
- { type: NgModule, args: [{
44
- declarations: [
45
- IbanValidatorDirective,
46
- IbanFormatterPipe
47
- ],
48
- imports: [],
49
- exports: [
50
- IbanValidatorDirective,
51
- IbanFormatterPipe,
52
- ]
53
- },] }
54
- ];
55
-
56
- /*
57
- * Public API Surface of angular-iban
58
- */
59
-
60
- /**
61
- * Generated bundle index. Do not edit.
62
- */
63
-
64
- export { AngularIbanModule, IbanFormatterPipe, IbanValidatorDirective, ValidatorService };
65
- //# sourceMappingURL=angular-iban.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"angular-iban.js","sources":["../../../projects/angular-iban/src/lib/services/validator.service.ts","../../../projects/angular-iban/src/lib/directives/iban-validator.directive.ts","../../../projects/angular-iban/src/lib/pipes/iban-formatter.pipe.ts","../../../projects/angular-iban/src/lib/angular-iban.module.ts","../../../projects/angular-iban/src/public-api.ts","../../../projects/angular-iban/src/angular-iban.ts"],"sourcesContent":["import {AbstractControl, ValidationErrors} from '@angular/forms';\nimport * as IBAN from 'iban';\n\nexport class ValidatorService {\n\n static validateIban(c: AbstractControl): ValidationErrors {\n if (c.value && !IBAN.isValid(c.value)) {\n return {iban: {value: c.value}};\n }\n\n return null;\n }\n}\n","import { Directive } from '@angular/core';\nimport {NG_VALIDATORS, Validator, AbstractControl} from '@angular/forms';\nimport {ValidatorService} from '../services/validator.service';\n\n@Directive({\n selector: '[ibanValidator]',\n providers: [{provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true}]\n})\nexport class IbanValidatorDirective implements Validator {\n validate(c: AbstractControl): { [key: string]: any } {\n return ValidatorService.validateIban(c);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport * as IBAN from 'iban';\n\n@Pipe({\n name: 'ibanFormatter'\n})\nexport class IbanFormatterPipe implements PipeTransform {\n\n transform(value: any, args?: any): any {\n if (IBAN.isValid(value)) {\n return IBAN.printFormat(value, ' ');\n }\n return value;\n }\n\n}\n","import { NgModule } from '@angular/core';\n\nimport { IbanValidatorDirective } from './directives/iban-validator.directive';\nimport { IbanFormatterPipe } from './pipes/iban-formatter.pipe';\n\n@NgModule({\n declarations: [\n IbanValidatorDirective,\n IbanFormatterPipe\n ],\n imports: [\n ],\n exports: [\n IbanValidatorDirective,\n IbanFormatterPipe,\n ]\n})\nexport class AngularIbanModule { }\n","/*\n * Public API Surface of angular-iban\n */\n\nexport * from './lib/angular-iban.module';\nexport * from './lib/services/validator.service';\nexport * from './lib/directives/iban-validator.directive';\nexport * from './lib/pipes/iban-formatter.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["IBAN.isValid","IBAN.printFormat"],"mappings":";;;;MAGa,gBAAgB;IAE3B,OAAO,YAAY,CAAC,CAAkB;QACpC,IAAI,CAAC,CAAC,KAAK,IAAI,CAACA,OAAY,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;YACrC,OAAO,EAAC,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAC,EAAC,CAAC;SACjC;QAED,OAAO,IAAI,CAAC;KACb;;;MCHU,sBAAsB;IACjC,QAAQ,CAAC,CAAkB;QACzB,OAAO,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;KACzC;;;YAPF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;aACxF;;;MCDY,iBAAiB;IAE5B,SAAS,CAAC,KAAU,EAAE,IAAU;QAC9B,IAAIA,OAAY,CAAC,KAAK,CAAC,EAAE;YACvB,OAAOC,WAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SACrC;QACD,OAAO,KAAK,CAAC;KACd;;;YAVF,IAAI,SAAC;gBACJ,IAAI,EAAE,eAAe;aACtB;;;MCYY,iBAAiB;;;YAZ7B,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,sBAAsB;oBACtB,iBAAiB;iBAClB;gBACD,OAAO,EAAE,EACR;gBACD,OAAO,EAAE;oBACP,sBAAsB;oBACtB,iBAAiB;iBAClB;aACF;;;AChBD;;;;ACAA;;;;;;"}