angular-iban 16.0.0 → 18.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 +1 -1
- package/README.md +69 -75
- 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 +3 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ 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 |
|
|
28
|
+
| 18.x | 18.x |
|
|
27
29
|
|
|
28
30
|
## Installation
|
|
29
31
|
|
|
@@ -58,64 +60,87 @@ export class Module {
|
|
|
58
60
|
### Some sample accounts
|
|
59
61
|
https://www.iban-bic.com/sample_accounts.html
|
|
60
62
|
|
|
61
|
-
### IBAN Validator with
|
|
62
|
-
|
|
63
|
+
### IBAN Validator with reactive form
|
|
63
64
|
```typescript
|
|
65
|
+
import { NgModule } from '@angular/core';
|
|
64
66
|
import { BrowserModule } from '@angular/platform-browser';
|
|
65
67
|
import { AngularIbanModule } from 'angular-iban';
|
|
66
|
-
import {
|
|
67
|
-
import { NgModule } from '@angular/core';
|
|
68
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
68
69
|
|
|
69
70
|
@NgModule({
|
|
70
71
|
declarations: [],
|
|
71
72
|
imports: [
|
|
72
73
|
BrowserModule,
|
|
73
74
|
AngularIbanModule,
|
|
74
|
-
|
|
75
|
+
ReactiveFormsModule,
|
|
75
76
|
],
|
|
76
77
|
})
|
|
77
78
|
export class Module {
|
|
78
79
|
}
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
|
|
82
82
|
```html
|
|
83
|
-
<form
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class="alert alert-danger">
|
|
83
|
+
<form [formGroup]="reactiveForm" autocomplete="off" novalidate>
|
|
84
|
+
<div class="form-group row">
|
|
85
|
+
<label for="ibanReactive" class="col-sm-2 col-form-label">IBAN: </label>
|
|
86
|
+
<input type="text" class="form-control" id="ibanReactive" name="ibanReactive" formControlName="ibanReactive" required>
|
|
87
|
+
</div>
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</div>
|
|
93
|
-
<div *ngIf="iban.errors.['iban']">
|
|
94
|
-
IBAN is invalid
|
|
95
|
-
</div>
|
|
89
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.invalid && (reactiveForm.get('ibanReactive')?.dirty || reactiveForm.get('ibanReactive')?.touched)"
|
|
90
|
+
class="alert alert-danger">
|
|
96
91
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class="alert alert-danger">
|
|
100
|
-
IBAN is valid.
|
|
101
|
-
</div>
|
|
92
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.errors?.['required']">
|
|
93
|
+
IBAN is required.
|
|
102
94
|
</div>
|
|
103
|
-
|
|
95
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.errors?.['iban']">
|
|
96
|
+
IBAN is invalid
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
</div>
|
|
100
|
+
<div *ngIf="reactiveForm.get('ibanReactive')?.valid && (reactiveForm.get('ibanReactive')?.dirty || reactiveForm.get('ibanReactive')?.touched)"
|
|
101
|
+
class="alert alert-danger">
|
|
102
|
+
IBAN is valid.
|
|
103
|
+
</div>
|
|
104
|
+
</form>
|
|
104
105
|
```
|
|
105
106
|
|
|
106
|
-
### IBAN Validator with reactive form
|
|
107
107
|
```typescript
|
|
108
|
-
import {
|
|
108
|
+
import { Component } from '@angular/core';
|
|
109
|
+
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
|
110
|
+
import { ValidatorService } from 'angular-iban';
|
|
111
|
+
|
|
112
|
+
@Component({
|
|
113
|
+
selector: 'app-root',
|
|
114
|
+
templateUrl: './app.component.html',
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
export class AppComponent {
|
|
118
|
+
public reactiveForm = new FormGroup({
|
|
119
|
+
ibanReactive: new FormControl(
|
|
120
|
+
null,
|
|
121
|
+
[
|
|
122
|
+
Validators.required,
|
|
123
|
+
ValidatorService.validateIban,
|
|
124
|
+
],
|
|
125
|
+
),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### IBAN Validator with template driven form
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
109
133
|
import { BrowserModule } from '@angular/platform-browser';
|
|
110
134
|
import { AngularIbanModule } from 'angular-iban';
|
|
111
|
-
import {
|
|
135
|
+
import { FormsModule } from '@angular/forms';
|
|
136
|
+
import { NgModule } from '@angular/core';
|
|
112
137
|
|
|
113
138
|
@NgModule({
|
|
114
139
|
declarations: [],
|
|
115
140
|
imports: [
|
|
116
141
|
BrowserModule,
|
|
117
142
|
AngularIbanModule,
|
|
118
|
-
|
|
143
|
+
FormsModule
|
|
119
144
|
],
|
|
120
145
|
})
|
|
121
146
|
export class Module {
|
|
@@ -123,60 +148,29 @@ export class Module {
|
|
|
123
148
|
```
|
|
124
149
|
|
|
125
150
|
```html
|
|
126
|
-
<form
|
|
151
|
+
<form name="templateDrivenForm" novalidate>
|
|
127
152
|
<div class="form-group row">
|
|
128
|
-
<label for="
|
|
129
|
-
<input
|
|
130
|
-
|
|
153
|
+
<label for="iban" class="col-sm-2 col-form-label">IBAN:</label>
|
|
154
|
+
<input id="iban" name="iban" class="form-control" #iban="ngModel" type="text" ibanValidator [(ngModel)]="testIban" [ngModelOptions]="{standalone: true}" required autocomplete="off">
|
|
155
|
+
<div *ngIf="iban.invalid && (iban.dirty || iban.touched)"
|
|
156
|
+
class="alert alert-danger">
|
|
131
157
|
|
|
132
|
-
|
|
133
|
-
|
|
158
|
+
<div *ngIf="iban.errors.['required']">
|
|
159
|
+
IBAN is required.
|
|
160
|
+
</div>
|
|
161
|
+
<div *ngIf="iban.errors.['iban']">
|
|
162
|
+
IBAN is invalid
|
|
163
|
+
</div>
|
|
134
164
|
|
|
135
|
-
<div *ngIf="ibanReactive.errors.['required']">
|
|
136
|
-
IBAN is required.
|
|
137
165
|
</div>
|
|
138
|
-
<div *ngIf="
|
|
139
|
-
|
|
166
|
+
<div *ngIf="iban.valid && (iban.dirty || iban.touched)"
|
|
167
|
+
class="alert alert-danger">
|
|
168
|
+
IBAN is valid.
|
|
140
169
|
</div>
|
|
141
|
-
|
|
142
|
-
</div>
|
|
143
|
-
<div *ngIf="ibanReactive.valid && (ibanReactive.dirty || ibanReactive.touched)"
|
|
144
|
-
class="alert alert-danger">
|
|
145
|
-
IBAN is valid.
|
|
146
170
|
</div>
|
|
147
171
|
</form>
|
|
148
172
|
```
|
|
149
173
|
|
|
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
174
|
### IBAN Formatter
|
|
181
175
|
```html
|
|
182
176
|
before
|
|
@@ -190,7 +184,7 @@ after
|
|
|
190
184
|
```
|
|
191
185
|
|
|
192
186
|
## Demo
|
|
193
|
-
|
|
187
|
+
|
|
194
188
|
https://fundsaccess.github.io/angular-iban/
|
|
195
189
|
|
|
196
190
|
or
|
|
@@ -199,6 +193,6 @@ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`.
|
|
|
199
193
|
|
|
200
194
|
## License
|
|
201
195
|
|
|
202
|
-
Copyright (c) 2018 -
|
|
196
|
+
Copyright (c) 2018 - 2024 fundsaccess AG. Licensed under the MIT License (MIT)
|
|
203
197
|
|
|
204
198
|
|
|
@@ -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: "18.0.3", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.3", 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: "18.0.3", 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: "18.0.3", 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: "18.0.3", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.3", 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: "18.0.3", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi12YWxpZGF0b3IuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi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F0b3Iuc2VydmljZSc7XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICBzZWxlY3RvcjogJ1tpYmFuVmFsaWRhdG9yXScsXHJcbiAgcHJvdmlkZXJzOiBbeyBwcm92aWRlOiBOR19WQUxJREFUT1JTLCB1c2VFeGlzdGluZzogSWJhblZhbGlkYXRvckRpcmVjdGl2ZSwgbXVsdGk6IHRydWUgfV0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlIGltcGxlbWVudHMgVmFsaWRhdG9yIHtcclxuICB2YWxpZGF0ZShjOiBBYnN0cmFjdENvbnRyb2wpOiB7IFtrZXk6IHN0cmluZ106IGFueSB9IHtcclxuICAgIHJldHVybiBWYWxpZGF0b3JTZXJ2aWNlLnZhbGlkYXRlSWJhbihjKTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -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: "18.0.3", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.3", 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: "18.0.3", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi1mb3JtYXR0ZXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL3BpcGVzL2liYW4tZm9ybWF0dGVyLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7O0FBSzdCLE1BQU0sT0FBTyxpQkFBaUI7SUFDNUIsU0FBUyxDQUFDLEtBQVUsRUFBRSxJQUFVO1FBQzlCLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDO1lBQ3hCLE9BQU8sSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFDdEMsQ0FBQztRQUNELE9BQU8sS0FBSyxDQUFDO0lBQ2YsQ0FBQzs4R0FOVSxpQkFBaUI7NEdBQWpCLGlCQUFpQjs7MkZBQWpCLGlCQUFpQjtrQkFIN0IsSUFBSTttQkFBQztvQkFDSixJQUFJLEVBQUUsZUFBZTtpQkFDdEIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCAqIGFzIElCQU4gZnJvbSAnaWJhbic7XHJcblxyXG5AUGlwZSh7XHJcbiAgbmFtZTogJ2liYW5Gb3JtYXR0ZXInLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgSWJhbkZvcm1hdHRlclBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICB0cmFuc2Zvcm0odmFsdWU6IGFueSwgYXJncz86IGFueSk6IGFueSB7XHJcbiAgICBpZiAoSUJBTi5pc1ZhbGlkKHZhbHVlKSkge1xyXG4gICAgICByZXR1cm4gSUJBTi5wcmludEZvcm1hdCh2YWx1ZSwgJyAnKTtcclxuICAgIH1cclxuICAgIHJldHVybiB2YWx1ZTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWliYW4vc3JjL2xpYi9zZXJ2aWNlcy92YWxpZGF0b3Iuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUU3QixNQUFNLE9BQU8sZ0JBQWdCO0lBQzNCLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBa0I7UUFDcEMsSUFBSSxDQUFDLENBQUMsS0FBSyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQztZQUN0QyxPQUFPLEVBQUUsSUFBSSxFQUFFLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDO1FBQ3RDLENBQUM7UUFFRCxPQUFPLElBQVcsQ0FBQztJQUNyQixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBYnN0cmFjdENvbnRyb2wsIFZhbGlkYXRpb25FcnJvcnMgfSBmcm9tICdAYW5ndWxhci9mb3Jtcyc7XHJcbmltcG9ydCAqIGFzIElCQU4gZnJvbSAnaWJhbic7XHJcblxyXG5leHBvcnQgY2xhc3MgVmFsaWRhdG9yU2VydmljZSB7XHJcbiAgc3RhdGljIHZhbGlkYXRlSWJhbihjOiBBYnN0cmFjdENvbnRyb2wpOiBWYWxpZGF0aW9uRXJyb3JzIHtcclxuICAgIGlmIChjLnZhbHVlICYmICFJQkFOLmlzVmFsaWQoYy52YWx1ZSkpIHtcclxuICAgICAgcmV0dXJuIHsgaWJhbjogeyB2YWx1ZTogYy52YWx1ZSB9IH07XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIG51bGwgYXMgYW55O1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -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: "18.0.3", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
20
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.3", 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: "18.0.3", 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: "18.0.3", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
38
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.3", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", 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: "18.0.3", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
49
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.3", 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: "18.0.3", ngImport: i0, type: AngularIbanModule }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", 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;SACrC;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,sB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OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAV1B,sBAAsB;AACtB,YAAA,iBAAiB,aAKjB,sBAAsB;YACtB,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGR,iBAAiB,EAAA,CAAA,CAAA,EAAA;;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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-iban",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.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": "^18.x",
|
|
20
|
+
"@angular/core": "^18.x",
|
|
21
21
|
"iban": "0.0.14"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|