angular-iban 16.0.0 → 17.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/README.md +67 -74
- package/esm2022/lib/angular-iban.module.mjs +8 -9
- package/esm2022/lib/directives/iban-validator.directive.mjs +6 -7
- package/esm2022/lib/pipes/iban-formatter.pipe.mjs +6 -7
- package/esm2022/lib/services/validator.service.mjs +1 -1
- package/fesm2022/angular-iban.mjs +14 -14
- package/fesm2022/angular-iban.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ This library supports Angular 7+. Please check the Version compatibility below t
|
|
|
24
24
|
| 14.x | 14.x |
|
|
25
25
|
| 15.x | 15.x |
|
|
26
26
|
| 16.x | 16.x |
|
|
27
|
+
| 17.x | 17.x |
|
|
27
28
|
|
|
28
29
|
## Installation
|
|
29
30
|
|
|
@@ -58,64 +59,87 @@ export class Module {
|
|
|
58
59
|
### Some sample accounts
|
|
59
60
|
https://www.iban-bic.com/sample_accounts.html
|
|
60
61
|
|
|
61
|
-
### IBAN Validator with
|
|
62
|
-
|
|
62
|
+
### IBAN Validator with reactive form
|
|
63
63
|
```typescript
|
|
64
|
+
import { NgModule } from '@angular/core';
|
|
64
65
|
import { BrowserModule } from '@angular/platform-browser';
|
|
65
66
|
import { AngularIbanModule } from 'angular-iban';
|
|
66
|
-
import {
|
|
67
|
-
import { NgModule } from '@angular/core';
|
|
67
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
68
68
|
|
|
69
69
|
@NgModule({
|
|
70
70
|
declarations: [],
|
|
71
71
|
imports: [
|
|
72
72
|
BrowserModule,
|
|
73
73
|
AngularIbanModule,
|
|
74
|
-
|
|
74
|
+
ReactiveFormsModule,
|
|
75
75
|
],
|
|
76
76
|
})
|
|
77
77
|
export class Module {
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
|
|
82
81
|
```html
|
|
83
|
-
<form
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class="alert alert-danger">
|
|
82
|
+
<form [formGroup]="reactiveForm" autocomplete="off" novalidate>
|
|
83
|
+
<div class="form-group row">
|
|
84
|
+
<label for="ibanReactive" class="col-sm-2 col-form-label">IBAN: </label>
|
|
85
|
+
<input type="text" class="form-control" id="ibanReactive" name="ibanReactive" formControlName="ibanReactive" required>
|
|
86
|
+
</div>
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</div>
|
|
93
|
-
<div *ngIf="iban.errors.['iban']">
|
|
94
|
-
IBAN is invalid
|
|
95
|
-
</div>
|
|
88
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.invalid && (reactiveForm.get('ibanReactive')?.dirty || reactiveForm.get('ibanReactive')?.touched)"
|
|
89
|
+
class="alert alert-danger">
|
|
96
90
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class="alert alert-danger">
|
|
100
|
-
IBAN is valid.
|
|
101
|
-
</div>
|
|
91
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.errors?.['required']">
|
|
92
|
+
IBAN is required.
|
|
102
93
|
</div>
|
|
103
|
-
|
|
94
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.errors?.['iban']">
|
|
95
|
+
IBAN is invalid
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.valid && (reactiveForm.get('ibanReactive')?.dirty || reactiveForm.get('ibanReactive')?.touched)"
|
|
100
|
+
class="alert alert-danger">
|
|
101
|
+
IBAN is valid.
|
|
102
|
+
</div>
|
|
103
|
+
</form>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
### IBAN Validator with reactive form
|
|
107
106
|
```typescript
|
|
108
|
-
import {
|
|
107
|
+
import { Component } from '@angular/core';
|
|
108
|
+
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
|
109
|
+
import { ValidatorService } from 'angular-iban';
|
|
110
|
+
|
|
111
|
+
@Component({
|
|
112
|
+
selector: 'app-root',
|
|
113
|
+
templateUrl: './app.component.html',
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
export class AppComponent {
|
|
117
|
+
public reactiveForm = new FormGroup({
|
|
118
|
+
ibanReactive: new FormControl(
|
|
119
|
+
null,
|
|
120
|
+
[
|
|
121
|
+
Validators.required,
|
|
122
|
+
ValidatorService.validateIban,
|
|
123
|
+
],
|
|
124
|
+
),
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### IBAN Validator with template driven form
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
109
132
|
import { BrowserModule } from '@angular/platform-browser';
|
|
110
133
|
import { AngularIbanModule } from 'angular-iban';
|
|
111
|
-
import {
|
|
134
|
+
import { FormsModule } from '@angular/forms';
|
|
135
|
+
import { NgModule } from '@angular/core';
|
|
112
136
|
|
|
113
137
|
@NgModule({
|
|
114
138
|
declarations: [],
|
|
115
139
|
imports: [
|
|
116
140
|
BrowserModule,
|
|
117
141
|
AngularIbanModule,
|
|
118
|
-
|
|
142
|
+
FormsModule
|
|
119
143
|
],
|
|
120
144
|
})
|
|
121
145
|
export class Module {
|
|
@@ -123,60 +147,29 @@ export class Module {
|
|
|
123
147
|
```
|
|
124
148
|
|
|
125
149
|
```html
|
|
126
|
-
<form
|
|
150
|
+
<form name="templateDrivenForm" novalidate>
|
|
127
151
|
<div class="form-group row">
|
|
128
|
-
<label for="
|
|
129
|
-
<input
|
|
130
|
-
|
|
152
|
+
<label for="iban" class="col-sm-2 col-form-label">IBAN:</label>
|
|
153
|
+
<input id="iban" name="iban" class="form-control" #iban="ngModel" type="text" ibanValidator [(ngModel)]="testIban" [ngModelOptions]="{standalone: true}" required autocomplete="off">
|
|
154
|
+
<div *ngIf="iban.invalid && (iban.dirty || iban.touched)"
|
|
155
|
+
class="alert alert-danger">
|
|
131
156
|
|
|
132
|
-
|
|
133
|
-
|
|
157
|
+
<div *ngIf="iban.errors.['required']">
|
|
158
|
+
IBAN is required.
|
|
159
|
+
</div>
|
|
160
|
+
<div *ngIf="iban.errors.['iban']">
|
|
161
|
+
IBAN is invalid
|
|
162
|
+
</div>
|
|
134
163
|
|
|
135
|
-
<div *ngIf="ibanReactive.errors.['required']">
|
|
136
|
-
IBAN is required.
|
|
137
164
|
</div>
|
|
138
|
-
<div *ngIf="
|
|
139
|
-
|
|
165
|
+
<div *ngIf="iban.valid && (iban.dirty || iban.touched)"
|
|
166
|
+
class="alert alert-danger">
|
|
167
|
+
IBAN is valid.
|
|
140
168
|
</div>
|
|
141
|
-
|
|
142
|
-
</div>
|
|
143
|
-
<div *ngIf="ibanReactive.valid && (ibanReactive.dirty || ibanReactive.touched)"
|
|
144
|
-
class="alert alert-danger">
|
|
145
|
-
IBAN is valid.
|
|
146
169
|
</div>
|
|
147
170
|
</form>
|
|
148
171
|
```
|
|
149
172
|
|
|
150
|
-
```typescript
|
|
151
|
-
import {Component, OnInit} from '@angular/core';
|
|
152
|
-
import {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';
|
|
153
|
-
import {ValidatorService} from 'angular-iban';
|
|
154
|
-
|
|
155
|
-
export class AppComponent implements OnInit {
|
|
156
|
-
|
|
157
|
-
public reactiveForm: FormGroup;
|
|
158
|
-
|
|
159
|
-
public ibanReactive: FormControl;
|
|
160
|
-
|
|
161
|
-
constructor(private fb: FormBuilder
|
|
162
|
-
) {}
|
|
163
|
-
|
|
164
|
-
public ngOnInit(): void {
|
|
165
|
-
this.ibanReactive = new FormControl(
|
|
166
|
-
null,
|
|
167
|
-
[
|
|
168
|
-
Validators.required,
|
|
169
|
-
ValidatorService.validateIban
|
|
170
|
-
]
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
this.reactiveForm = this.fb.group({
|
|
174
|
-
ibanReactive: this.ibanReactive,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
173
|
### IBAN Formatter
|
|
181
174
|
```html
|
|
182
175
|
before
|
|
@@ -190,7 +183,7 @@ after
|
|
|
190
183
|
```
|
|
191
184
|
|
|
192
185
|
## Demo
|
|
193
|
-
|
|
186
|
+
|
|
194
187
|
https://fundsaccess.github.io/angular-iban/
|
|
195
188
|
|
|
196
189
|
or
|
|
@@ -2,26 +2,25 @@ import { NgModule } from '@angular/core';
|
|
|
2
2
|
import { IbanValidatorDirective } from './directives/iban-validator.directive';
|
|
3
3
|
import { IbanFormatterPipe } from './pipes/iban-formatter.pipe';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
class AngularIbanModule {
|
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
5
|
+
export class AngularIbanModule {
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
|
|
8
8
|
IbanFormatterPipe], exports: [IbanValidatorDirective,
|
|
9
9
|
IbanFormatterPipe] }); }
|
|
10
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
10
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule }); }
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, decorators: [{
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule, decorators: [{
|
|
14
13
|
type: NgModule,
|
|
15
14
|
args: [{
|
|
16
15
|
declarations: [
|
|
17
16
|
IbanValidatorDirective,
|
|
18
|
-
IbanFormatterPipe
|
|
17
|
+
IbanFormatterPipe,
|
|
19
18
|
],
|
|
20
19
|
imports: [],
|
|
21
20
|
exports: [
|
|
22
21
|
IbanValidatorDirective,
|
|
23
22
|
IbanFormatterPipe,
|
|
24
|
-
]
|
|
23
|
+
],
|
|
25
24
|
}]
|
|
26
25
|
}] });
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1pYmFuLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL2FuZ3VsYXItaWJhbi5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUMvRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQzs7QUFjaEUsTUFBTSxPQUFPLGlCQUFpQjs4R0FBakIsaUJBQWlCOytHQUFqQixpQkFBaUIsaUJBVjFCLHNCQUFzQjtZQUN0QixpQkFBaUIsYUFLakIsc0JBQXNCO1lBQ3RCLGlCQUFpQjsrR0FHUixpQkFBaUI7OzJGQUFqQixpQkFBaUI7a0JBWjdCLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFO3dCQUNaLHNCQUFzQjt3QkFDdEIsaUJBQWlCO3FCQUNsQjtvQkFDRCxPQUFPLEVBQUUsRUFDUjtvQkFDRCxPQUFPLEVBQUU7d0JBQ1Asc0JBQXNCO3dCQUN0QixpQkFBaUI7cUJBQ2xCO2lCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHsgSWJhblZhbGlkYXRvckRpcmVjdGl2ZSB9IGZyb20gJy4vZGlyZWN0aXZlcy9pYmFuLXZhbGlkYXRvci5kaXJlY3RpdmUnO1xyXG5pbXBvcnQgeyBJYmFuRm9ybWF0dGVyUGlwZSB9IGZyb20gJy4vcGlwZXMvaWJhbi1mb3JtYXR0ZXIucGlwZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gIGRlY2xhcmF0aW9uczogW1xyXG4gICAgSWJhblZhbGlkYXRvckRpcmVjdGl2ZSxcclxuICAgIEliYW5Gb3JtYXR0ZXJQaXBlLFxyXG4gIF0sXHJcbiAgaW1wb3J0czogW1xyXG4gIF0sXHJcbiAgZXhwb3J0czogW1xyXG4gICAgSWJhblZhbGlkYXRvckRpcmVjdGl2ZSxcclxuICAgIEliYW5Gb3JtYXR0ZXJQaXBlLFxyXG4gIF0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBBbmd1bGFySWJhbk1vZHVsZSB7IH1cclxuIl19
|
|
@@ -2,19 +2,18 @@ import { Directive } from '@angular/core';
|
|
|
2
2
|
import { NG_VALIDATORS } from '@angular/forms';
|
|
3
3
|
import { ValidatorService } from '../services/validator.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
class IbanValidatorDirective {
|
|
5
|
+
export class IbanValidatorDirective {
|
|
6
6
|
validate(c) {
|
|
7
7
|
return ValidatorService.validateIban(c);
|
|
8
8
|
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 }); }
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanValidatorDirective, decorators: [{
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanValidatorDirective, decorators: [{
|
|
14
13
|
type: Directive,
|
|
15
14
|
args: [{
|
|
16
15
|
selector: '[ibanValidator]',
|
|
17
|
-
providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
|
|
16
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }],
|
|
18
17
|
}]
|
|
19
18
|
}] });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi12YWxpZGF0b3IuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1pYmFuL3NyYy9saWIvZGlyZWN0aXZlcy9pYmFuLXZhbGlkYXRvci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsYUFBYSxFQUE4QixNQUFNLGdCQUFnQixDQU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GFzcyBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlIGltcGxlbWVudHMgVmFsaWRhdG9yIHtcclxuICB2YWxpZGF0ZShjOiBBYnN0cmFjdENvbnRyb2wpOiB7IFtrZXk6IHN0cmluZ106IGFueSB9IHtcclxuICAgIHJldHVybiBWYWxpZGF0b3JTZXJ2aWNlLnZhbGlkYXRlSWJhbihjKTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { Pipe } from '@angular/core';
|
|
2
2
|
import * as IBAN from 'iban';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
class IbanFormatterPipe {
|
|
4
|
+
export class IbanFormatterPipe {
|
|
5
5
|
transform(value, args) {
|
|
6
6
|
if (IBAN.isValid(value)) {
|
|
7
7
|
return IBAN.printFormat(value, ' ');
|
|
8
8
|
}
|
|
9
9
|
return value;
|
|
10
10
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" }); }
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, decorators: [{
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanFormatterPipe, decorators: [{
|
|
16
15
|
type: Pipe,
|
|
17
16
|
args: [{
|
|
18
|
-
name: 'ibanFormatter'
|
|
17
|
+
name: 'ibanFormatter',
|
|
19
18
|
}]
|
|
20
19
|
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi1mb3JtYXR0ZXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL3BpcGVzL2liYW4tZm9ybWF0dGVyLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7O0FBSzdCLE1BQU0sT0FBTyxpQkFBaUI7SUFDNUIsU0FBUyxDQUFDLEtBQVUsRUFBRSxJQUFVO1FBQzlCLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUN2QixPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxDQUFDO1NBQ3JDO1FBQ0QsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDOzhHQU5VLGlCQUFpQjs0R0FBakIsaUJBQWlCOzsyRkFBakIsaUJBQWlCO2tCQUg3QixJQUFJO21CQUFDO29CQUNKLElBQUksRUFBRSxlQUFlO2lCQUN0QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0ICogYXMgSUJBTiBmcm9tICdpYmFuJztcclxuXHJcbkBQaXBlKHtcclxuICBuYW1lOiAnaWJhbkZvcm1hdHRlcicsXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBJYmFuRm9ybWF0dGVyUGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xyXG4gIHRyYW5zZm9ybSh2YWx1ZTogYW55LCBhcmdzPzogYW55KTogYW55IHtcclxuICAgIGlmIChJQkFOLmlzVmFsaWQodmFsdWUpKSB7XHJcbiAgICAgIHJldHVybiBJQkFOLnByaW50Rm9ybWF0KHZhbHVlLCAnICcpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIHZhbHVlO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -7,4 +7,4 @@ export class ValidatorService {
|
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWliYW4vc3JjL2xpYi9zZXJ2aWNlcy92YWxpZGF0b3Iuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUU3QixNQUFNLE9BQU8sZ0JBQWdCO0lBQzNCLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBa0I7UUFDcEMsSUFBSSxDQUFDLENBQUMsS0FBSyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDckMsT0FBTyxFQUFFLElBQUksRUFBRSxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQztTQUNyQztRQUVELE9BQU8sSUFBVyxDQUFDO0lBQ3JCLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFic3RyYWN0Q29udHJvbCwgVmFsaWRhdGlvbkVycm9ycyB9IGZyb20gJ0Bhbmd1bGFyL2Zvcm1zJztcclxuaW1wb3J0ICogYXMgSUJBTiBmcm9tICdpYmFuJztcclxuXHJcbmV4cG9ydCBjbGFzcyBWYWxpZGF0b3JTZXJ2aWNlIHtcclxuICBzdGF0aWMgdmFsaWRhdGVJYmFuKGM6IEFic3RyYWN0Q29udHJvbCk6IFZhbGlkYXRpb25FcnJvcnMge1xyXG4gICAgaWYgKGMudmFsdWUgJiYgIUlCQU4uaXNWYWxpZChjLnZhbHVlKSkge1xyXG4gICAgICByZXR1cm4geyBpYmFuOiB7IHZhbHVlOiBjLnZhbHVlIH0gfTtcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gbnVsbCBhcyBhbnk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -16,14 +16,14 @@ class IbanValidatorDirective {
|
|
|
16
16
|
validate(c) {
|
|
17
17
|
return ValidatorService.validateIban(c);
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
20
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanValidatorDirective, decorators: [{
|
|
23
23
|
type: Directive,
|
|
24
24
|
args: [{
|
|
25
25
|
selector: '[ibanValidator]',
|
|
26
|
-
providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }]
|
|
26
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }],
|
|
27
27
|
}]
|
|
28
28
|
}] });
|
|
29
29
|
|
|
@@ -34,35 +34,35 @@ class IbanFormatterPipe {
|
|
|
34
34
|
}
|
|
35
35
|
return value;
|
|
36
36
|
}
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
38
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: IbanFormatterPipe, decorators: [{
|
|
41
41
|
type: Pipe,
|
|
42
42
|
args: [{
|
|
43
|
-
name: 'ibanFormatter'
|
|
43
|
+
name: 'ibanFormatter',
|
|
44
44
|
}]
|
|
45
45
|
}] });
|
|
46
46
|
|
|
47
47
|
class AngularIbanModule {
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
49
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
|
|
50
50
|
IbanFormatterPipe], exports: [IbanValidatorDirective,
|
|
51
51
|
IbanFormatterPipe] }); }
|
|
52
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
52
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: AngularIbanModule, decorators: [{
|
|
55
55
|
type: NgModule,
|
|
56
56
|
args: [{
|
|
57
57
|
declarations: [
|
|
58
58
|
IbanValidatorDirective,
|
|
59
|
-
IbanFormatterPipe
|
|
59
|
+
IbanFormatterPipe,
|
|
60
60
|
],
|
|
61
61
|
imports: [],
|
|
62
62
|
exports: [
|
|
63
63
|
IbanValidatorDirective,
|
|
64
64
|
IbanFormatterPipe,
|
|
65
|
-
]
|
|
65
|
+
],
|
|
66
66
|
}]
|
|
67
67
|
}] });
|
|
68
68
|
|
|
@@ -1 +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';\r\nimport * as IBAN from 'iban';\r\n\r\nexport class ValidatorService {\r\n
|
|
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';\r\nimport * as IBAN from 'iban';\r\n\r\nexport class ValidatorService {\r\n static validateIban(c: AbstractControl): ValidationErrors {\r\n if (c.value && !IBAN.isValid(c.value)) {\r\n return { iban: { value: c.value } };\r\n }\r\n\r\n return null as any;\r\n }\r\n}\r\n","import { Directive } from '@angular/core';\r\nimport { NG_VALIDATORS, Validator, AbstractControl } from '@angular/forms';\r\nimport { ValidatorService } from '../services/validator.service';\r\n\r\n@Directive({\r\n selector: '[ibanValidator]',\r\n providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }],\r\n})\r\nexport class IbanValidatorDirective implements Validator {\r\n validate(c: AbstractControl): { [key: string]: any } {\r\n return ValidatorService.validateIban(c);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport * as IBAN from 'iban';\r\n\r\n@Pipe({\r\n name: 'ibanFormatter',\r\n})\r\nexport class IbanFormatterPipe implements PipeTransform {\r\n transform(value: any, args?: any): any {\r\n if (IBAN.isValid(value)) {\r\n return IBAN.printFormat(value, ' ');\r\n }\r\n return value;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { IbanValidatorDirective } from './directives/iban-validator.directive';\r\nimport { IbanFormatterPipe } from './pipes/iban-formatter.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n IbanValidatorDirective,\r\n IbanFormatterPipe,\r\n ],\r\n imports: [\r\n ],\r\n exports: [\r\n IbanValidatorDirective,\r\n IbanFormatterPipe,\r\n ],\r\n})\r\nexport class AngularIbanModule { }\r\n","/*\r\n * Public API Surface of angular-iban\r\n */\r\n\r\nexport * from './lib/angular-iban.module';\r\nexport * from './lib/services/validator.service';\r\nexport * from './lib/directives/iban-validator.directive';\r\nexport * from './lib/pipes/iban-formatter.pipe';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAGa,gBAAgB,CAAA;IAC3B,OAAO,YAAY,CAAC,CAAkB,EAAA;AACpC,QAAA,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;YACrC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;AACrC,SAAA;AAED,QAAA,OAAO,IAAW,CAAC;KACpB;AACF;;MCHY,sBAAsB,CAAA;AACjC,IAAA,QAAQ,CAAC,CAAkB,EAAA;AACzB,QAAA,OAAO,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;KACzC;8GAHU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAFtB,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAE9E,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3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Y,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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-iban",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Angular directives and pipes for IBAN",
|
|
5
5
|
"author": "fundsaccess AG",
|
|
6
6
|
"repository": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"typescript"
|
|
17
17
|
],
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@angular/common": "^
|
|
20
|
-
"@angular/core": "^
|
|
19
|
+
"@angular/common": "^17.x",
|
|
20
|
+
"@angular/core": "^17.x",
|
|
21
21
|
"iban": "0.0.14"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false
|
|
41
|
-
}
|
|
41
|
+
}
|