angular-iban 14.0.0 → 16.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,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 - 2022 fundsaccess AG
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2018 - 2023 fundsaccess AG
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,202 +1,204 @@
1
- <p align="center">
2
- <img height="256px" width="256px" style="text-align: center;" src="https://fundsaccess.github.io/angular-iban/assets/angular.svg">
3
- </p>
4
-
5
- # Angular-iban
6
-
7
- Angular directives and pipes for IBAN
8
-
9
- Demo: https://fundsaccess.github.io/angular-iban/
10
-
11
- ## Version compatibility
12
-
13
- This library supports Angular 7+. Please check the Version compatibility below to choose the correct version to install.
14
-
15
- | angular-iban | Angular |
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 |
22
- | 5.x | 12.x |
23
- | 6.x | 13.x |
24
- | 14.x | 14.x |
25
-
26
- ## Installation
27
-
28
- npm:
29
- ```shell
30
- npm install --save angular-iban iban
31
- ```
32
-
33
- yarn:
34
- ```shell
35
- yarn add angular-iban iban
36
- ```
37
-
38
-
39
- ## Import
40
-
41
- Once installed you need to import the main module:
42
- ```typescript
43
- import { AngularIbanModule } from 'angular-iban';
44
- import { NgModule } from '@angular/core';
45
-
46
- @NgModule({
47
- declarations: [],
48
- imports: [AngularIbanModule],
49
- })
50
- export class Module {
51
- }
52
- ```
53
-
54
- ## Usage
55
-
56
- ### Some sample accounts
57
- https://www.iban-bic.com/sample_accounts.html
58
-
59
- ### IBAN Validator with template driven form
60
-
61
- ```typescript
62
- import { BrowserModule } from '@angular/platform-browser';
63
- import { AngularIbanModule } from 'angular-iban';
64
- import { FormsModule } from '@angular/forms';
65
- import { NgModule } from '@angular/core';
66
-
67
- @NgModule({
68
- declarations: [],
69
- imports: [
70
- BrowserModule,
71
- AngularIbanModule,
72
- FormsModule
73
- ],
74
- })
75
- export class Module {
76
- }
77
- ```
78
-
79
-
80
- ```html
81
- <form name="templateDrivenForm" novalidate>
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>
94
-
95
- </div>
96
- <div *ngIf="iban.valid && (iban.dirty || iban.touched)"
97
- class="alert alert-danger">
98
- IBAN is valid.
99
- </div>
100
- </div>
101
- </form>
102
- ```
103
-
104
- ### IBAN Validator with reactive form
105
- ```typescript
106
- import { NgModule } from '@angular/core';
107
- import { BrowserModule } from '@angular/platform-browser';
108
- import { AngularIbanModule } from 'angular-iban';
109
- import { ReactiveFormsModule } from '@angular/forms';
110
-
111
- @NgModule({
112
- declarations: [],
113
- imports: [
114
- BrowserModule,
115
- AngularIbanModule,
116
- ReactiveFormsModule,
117
- ],
118
- })
119
- export class Module {
120
- }
121
- ```
122
-
123
- ```html
124
- <form [formGroup]="reactiveForm" autocomplete="off" novalidate>
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">
132
-
133
- <div *ngIf="ibanReactive.errors.['required']">
134
- IBAN is required.
135
- </div>
136
- <div *ngIf="ibanReactive.errors.['iban']">
137
- IBAN is invalid
138
- </div>
139
-
140
- </div>
141
- <div *ngIf="ibanReactive.valid && (ibanReactive.dirty || ibanReactive.touched)"
142
- class="alert alert-danger">
143
- IBAN is valid.
144
- </div>
145
- </form>
146
- ```
147
-
148
- ```typescript
149
- import {Component, OnInit} from '@angular/core';
150
- import {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';
151
- import {ValidatorService} from 'angular-iban';
152
-
153
- export class AppComponent implements OnInit {
154
-
155
- public reactiveForm: FormGroup;
156
-
157
- public ibanReactive: FormControl;
158
-
159
- constructor(private fb: FormBuilder
160
- ) {}
161
-
162
- public ngOnInit(): void {
163
- this.ibanReactive = new FormControl(
164
- null,
165
- [
166
- Validators.required,
167
- ValidatorService.validateIban
168
- ]
169
- );
170
-
171
- this.reactiveForm = this.fb.group({
172
- ibanReactive: this.ibanReactive,
173
- });
174
- }
175
- }
176
- ```
177
-
178
- ### IBAN Formatter
179
- ```html
180
- before
181
- <p>DE12500105170648489890</p>
182
-
183
- set pipe
184
- <p>{{ibanGermany | ibanFormatter}}</p>
185
-
186
- after
187
- <p>DE12 5001 0517 0648 4898 90</p>
188
- ```
189
-
190
- ## Demo
191
-
192
- https://fundsaccess.github.io/angular-iban/
193
-
194
- or
195
-
196
- Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`.
197
-
198
- ## License
199
-
200
- Copyright (c) 2018 - 2021 fundsaccess AG. Licensed under the MIT License (MIT)
201
-
202
-
1
+ <p align="center">
2
+ <img height="256px" width="256px" style="text-align: center;" src="https://fundsaccess.github.io/angular-iban/assets/angular.svg">
3
+ </p>
4
+
5
+ # Angular-iban
6
+
7
+ Angular directives and pipes for IBAN
8
+
9
+ Demo: https://fundsaccess.github.io/angular-iban/
10
+
11
+ ## Version compatibility
12
+
13
+ This library supports Angular 7+. Please check the Version compatibility below to choose the correct version to install.
14
+
15
+ | angular-iban | Angular |
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 |
22
+ | 5.x | 12.x |
23
+ | 6.x | 13.x |
24
+ | 14.x | 14.x |
25
+ | 15.x | 15.x |
26
+ | 16.x | 16.x |
27
+
28
+ ## Installation
29
+
30
+ npm:
31
+ ```shell
32
+ npm install --save angular-iban iban
33
+ ```
34
+
35
+ yarn:
36
+ ```shell
37
+ yarn add angular-iban iban
38
+ ```
39
+
40
+
41
+ ## Import
42
+
43
+ Once installed you need to import the main module:
44
+ ```typescript
45
+ import { AngularIbanModule } from 'angular-iban';
46
+ import { NgModule } from '@angular/core';
47
+
48
+ @NgModule({
49
+ declarations: [],
50
+ imports: [AngularIbanModule],
51
+ })
52
+ export class Module {
53
+ }
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ### Some sample accounts
59
+ https://www.iban-bic.com/sample_accounts.html
60
+
61
+ ### IBAN Validator with template driven form
62
+
63
+ ```typescript
64
+ import { BrowserModule } from '@angular/platform-browser';
65
+ import { AngularIbanModule } from 'angular-iban';
66
+ import { FormsModule } from '@angular/forms';
67
+ import { NgModule } from '@angular/core';
68
+
69
+ @NgModule({
70
+ declarations: [],
71
+ imports: [
72
+ BrowserModule,
73
+ AngularIbanModule,
74
+ FormsModule
75
+ ],
76
+ })
77
+ export class Module {
78
+ }
79
+ ```
80
+
81
+
82
+ ```html
83
+ <form name="templateDrivenForm" novalidate>
84
+ <div class="form-group row">
85
+ <label for="iban" class="col-sm-2 col-form-label">IBAN:</label>
86
+ <input id="iban" name="iban" class="form-control" #iban="ngModel" type="text" ibanValidator [(ngModel)]="testIban" [ngModelOptions]="{standalone: true}" required autocomplete="off">
87
+ <div *ngIf="iban.invalid && (iban.dirty || iban.touched)"
88
+ class="alert alert-danger">
89
+
90
+ <div *ngIf="iban.errors.['required']">
91
+ IBAN is required.
92
+ </div>
93
+ <div *ngIf="iban.errors.['iban']">
94
+ IBAN is invalid
95
+ </div>
96
+
97
+ </div>
98
+ <div *ngIf="iban.valid && (iban.dirty || iban.touched)"
99
+ class="alert alert-danger">
100
+ IBAN is valid.
101
+ </div>
102
+ </div>
103
+ </form>
104
+ ```
105
+
106
+ ### IBAN Validator with reactive form
107
+ ```typescript
108
+ import { NgModule } from '@angular/core';
109
+ import { BrowserModule } from '@angular/platform-browser';
110
+ import { AngularIbanModule } from 'angular-iban';
111
+ import { ReactiveFormsModule } from '@angular/forms';
112
+
113
+ @NgModule({
114
+ declarations: [],
115
+ imports: [
116
+ BrowserModule,
117
+ AngularIbanModule,
118
+ ReactiveFormsModule,
119
+ ],
120
+ })
121
+ export class Module {
122
+ }
123
+ ```
124
+
125
+ ```html
126
+ <form [formGroup]="reactiveForm" autocomplete="off" novalidate>
127
+ <div class="form-group row">
128
+ <label for="ibanReactive" class="col-sm-2 col-form-label">IBAN:</label>
129
+ <input type="text" class="form-control" id="ibanReactive" name="ibanReactive" formControlName="ibanReactive" required>
130
+ </div>
131
+
132
+ <div *ngIf="ibanReactive.invalid && (ibanReactive.dirty || ibanReactive.touched)"
133
+ class="alert alert-danger">
134
+
135
+ <div *ngIf="ibanReactive.errors.['required']">
136
+ IBAN is required.
137
+ </div>
138
+ <div *ngIf="ibanReactive.errors.['iban']">
139
+ IBAN is invalid
140
+ </div>
141
+
142
+ </div>
143
+ <div *ngIf="ibanReactive.valid && (ibanReactive.dirty || ibanReactive.touched)"
144
+ class="alert alert-danger">
145
+ IBAN is valid.
146
+ </div>
147
+ </form>
148
+ ```
149
+
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
+ ### IBAN Formatter
181
+ ```html
182
+ before
183
+ <p>DE12500105170648489890</p>
184
+
185
+ set pipe
186
+ <p>{{ibanGermany | ibanFormatter}}</p>
187
+
188
+ after
189
+ <p>DE12 5001 0517 0648 4898 90</p>
190
+ ```
191
+
192
+ ## Demo
193
+
194
+ https://fundsaccess.github.io/angular-iban/
195
+
196
+ or
197
+
198
+ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`.
199
+
200
+ ## License
201
+
202
+ Copyright (c) 2018 - 2023 fundsaccess AG. Licensed under the MIT License (MIT)
203
+
204
+
@@ -0,0 +1,27 @@
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
+ class AngularIbanModule {
6
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
8
+ IbanFormatterPipe], exports: [IbanValidatorDirective,
9
+ IbanFormatterPipe] }); }
10
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule }); }
11
+ }
12
+ export { AngularIbanModule };
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, decorators: [{
14
+ type: NgModule,
15
+ args: [{
16
+ declarations: [
17
+ IbanValidatorDirective,
18
+ IbanFormatterPipe
19
+ ],
20
+ imports: [],
21
+ exports: [
22
+ IbanValidatorDirective,
23
+ IbanFormatterPipe,
24
+ ]
25
+ }]
26
+ }] });
27
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1pYmFuLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL2FuZ3VsYXItaWJhbi5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUMvRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQzs7QUFFaEUsTUFZYSxpQkFBaUI7OEdBQWpCLGlCQUFpQjsrR0FBakIsaUJBQWlCLGlCQVYxQixzQkFBc0I7WUFDdEIsaUJBQWlCLGFBS2pCLHNCQUFzQjtZQUN0QixpQkFBaUI7K0dBR1IsaUJBQWlCOztTQUFqQixpQkFBaUI7MkZBQWpCLGlCQUFpQjtrQkFaN0IsUUFBUTttQkFBQztvQkFDUixZQUFZLEVBQUU7d0JBQ1osc0JBQXNCO3dCQUN0QixpQkFBaUI7cUJBQ2xCO29CQUNELE9BQU8sRUFBRSxFQUNSO29CQUNELE9BQU8sRUFBRTt3QkFDUCxzQkFBc0I7d0JBQ3RCLGlCQUFpQjtxQkFDbEI7aUJBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlIH0gZnJvbSAnLi9kaXJlY3RpdmVzL2liYW4tdmFsaWRhdG9yLmRpcmVjdGl2ZSc7XHJcbmltcG9ydCB7IEliYW5Gb3JtYXR0ZXJQaXBlIH0gZnJvbSAnLi9waXBlcy9pYmFuLWZvcm1hdHRlci5waXBlJztcclxuXHJcbkBOZ01vZHVsZSh7XHJcbiAgZGVjbGFyYXRpb25zOiBbXHJcbiAgICBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlLFxyXG4gICAgSWJhbkZvcm1hdHRlclBpcGVcclxuICBdLFxyXG4gIGltcG9ydHM6IFtcclxuICBdLFxyXG4gIGV4cG9ydHM6IFtcclxuICAgIEliYW5WYWxpZGF0b3JEaXJlY3RpdmUsXHJcbiAgICBJYmFuRm9ybWF0dGVyUGlwZSxcclxuICBdXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBBbmd1bGFySWJhbk1vZHVsZSB7IH1cclxuIl19
@@ -0,0 +1,20 @@
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
+ class IbanValidatorDirective {
6
+ validate(c) {
7
+ return ValidatorService.validateIban(c);
8
+ }
9
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
10
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 }); }
11
+ }
12
+ export { IbanValidatorDirective };
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanValidatorDirective, decorators: [{
14
+ type: Directive,
15
+ args: [{
16
+ selector: '[ibanValidator]',
17
+ providers: [{ provide: NG_VALIDATORS, useEx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0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBOR19WQUxJREFUT1JTLCBWYWxpZGF0b3IsIEFic3RyYWN0Q29udHJvbCB9IGZyb20gJ0Bhbmd1bGFyL2Zvcm1zJztcclxuaW1wb3J0IHsgVmFsaWRhdG9yU2VydmljZSB9IGZyb20gJy4uL3NlcnZpY2VzL3ZhbGlkYXRvci5zZXJ2aWNlJztcclxuXHJcbkBEaXJlY3RpdmUoe1xyXG4gIHNlbGVjdG9yOiAnW2liYW5WYWxpZGF0b3JdJyxcclxuICBwcm92aWRlcnM6IFt7cHJvdmlkZTogTkdfVkFMSURBVE9SUywgdXNlRXhpc3Rpbmc6IEliYW5WYWxpZGF0b3JEaXJlY3RpdmUsIG11bHRpOiB0cnVlfV1cclxufSlcclxuZXhwb3J0IGNsYXNzIEliYW5WYWxpZGF0b3JEaXJlY3RpdmUgaW1wbGVtZW50cyBWYWxpZGF0b3Ige1xyXG4gIHZhbGlkYXRlKGM6IEFic3RyYWN0Q29udHJvbCk6IHsgW2tleTogc3RyaW5nXTogYW55IH0ge1xyXG4gICAgcmV0dXJuIFZhbGlkYXRvclNlcnZpY2UudmFsaWRhdGVJYmFuKGMpO1xyXG4gIH1cclxufVxyXG4iXX0=
@@ -0,0 +1,21 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as IBAN from 'iban';
3
+ import * as i0 from "@angular/core";
4
+ class IbanFormatterPipe {
5
+ transform(value, args) {
6
+ if (IBAN.isValid(value)) {
7
+ return IBAN.printFormat(value, ' ');
8
+ }
9
+ return value;
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
12
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" }); }
13
+ }
14
+ export { IbanFormatterPipe };
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, decorators: [{
16
+ type: Pipe,
17
+ args: [{
18
+ name: 'ibanFormatter'
19
+ }]
20
+ }] });
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi1mb3JtYXR0ZXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvbGliL3BpcGVzL2liYW4tZm9ybWF0dGVyLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7O0FBRTdCLE1BR2EsaUJBQWlCO0lBRTVCLFNBQVMsQ0FBQyxLQUFVLEVBQUUsSUFBVTtRQUM5QixJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDdkIsT0FBTyxJQUFJLENBQUMsV0FBVyxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUMsQ0FBQztTQUNyQztRQUNELE9BQU8sS0FBSyxDQUFDO0lBQ2YsQ0FBQzs4R0FQVSxpQkFBaUI7NEdBQWpCLGlCQUFpQjs7U0FBakIsaUJBQWlCOzJGQUFqQixpQkFBaUI7a0JBSDdCLElBQUk7bUJBQUM7b0JBQ0osSUFBSSxFQUFFLGVBQWU7aUJBQ3RCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGlwZSwgUGlwZVRyYW5zZm9ybSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgKiBhcyBJQkFOIGZyb20gJ2liYW4nO1xyXG5cclxuQFBpcGUoe1xyXG4gIG5hbWU6ICdpYmFuRm9ybWF0dGVyJ1xyXG59KVxyXG5leHBvcnQgY2xhc3MgSWJhbkZvcm1hdHRlclBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuXHJcbiAgdHJhbnNmb3JtKHZhbHVlOiBhbnksIGFyZ3M/OiBhbnkpOiBhbnkge1xyXG4gICAgaWYgKElCQU4uaXNWYWxpZCh2YWx1ZSkpIHtcclxuICAgICAgcmV0dXJuIElCQU4ucHJpbnRGb3JtYXQodmFsdWUsICcgJyk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gdmFsdWU7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
@@ -7,4 +7,4 @@ export class ValidatorService {
7
7
  return null;
8
8
  }
9
9
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWliYW4vc3JjL2xpYi9zZXJ2aWNlcy92YWxpZGF0b3Iuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUU3QixNQUFNLE9BQU8sZ0JBQWdCO0lBRTNCLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBa0I7UUFDcEMsSUFBSSxDQUFDLENBQUMsS0FBSyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDckMsT0FBTyxFQUFDLElBQUksRUFBRSxFQUFDLEtBQUssRUFBRSxDQUFDLENBQUMsS0FBSyxFQUFDLEVBQUMsQ0FBQztTQUNqQztRQUVELE9BQU8sSUFBVyxDQUFDO0lBQ3JCLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50Ijpb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iIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7QWJzdHJhY3RDb250cm9sLCBWYWxpZGF0aW9uRXJyb3JzfSBmcm9tICdAYW5ndWxhci9mb3Jtcyc7XHJcbmltcG9ydCAqIGFzIElCQU4gZnJvbSAnaWJhbic7XHJcblxyXG5leHBvcnQgY2xhc3MgVmFsaWRhdG9yU2VydmljZSB7XHJcblxyXG4gIHN0YXRpYyB2YWxpZGF0ZUliYW4oYzogQWJzdHJhY3RDb250cm9sKTogVmFsaWRhdGlvbkVycm9ycyB7XHJcbiAgICBpZiAoYy52YWx1ZSAmJiAhSUJBTi5pc1ZhbGlkKGMudmFsdWUpKSB7XHJcbiAgICAgIHJldHVybiB7aWJhbjoge3ZhbHVlOiBjLnZhbHVlfX07XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIG51bGwgYXMgYW55O1xyXG4gIH1cclxufVxyXG4iXX0=
@@ -5,4 +5,4 @@ export * from './lib/angular-iban.module';
5
5
  export * from './lib/services/validator.service';
6
6
  export * from './lib/directives/iban-validator.directive';
7
7
  export * from './lib/pipes/iban-formatter.pipe';
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLDJDQUEyQyxDQUFDO0FBQzFELGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGFuZ3VsYXItaWJhblxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2FuZ3VsYXItaWJhbi5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc2VydmljZXMvdmFsaWRhdG9yLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGlyZWN0aXZlcy9pYmFuLXZhbGlkYXRvci5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvaWJhbi1mb3JtYXR0ZXIucGlwZSc7XG4iXX0=
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItaWJhbi9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLDJDQUEyQyxDQUFDO0FBQzFELGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgYW5ndWxhci1pYmFuXHJcbiAqL1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci1pYmFuLm1vZHVsZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3NlcnZpY2VzL3ZhbGlkYXRvci5zZXJ2aWNlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvZGlyZWN0aXZlcy9pYmFuLXZhbGlkYXRvci5kaXJlY3RpdmUnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9waXBlcy9pYmFuLWZvcm1hdHRlci5waXBlJztcclxuIl19
@@ -16,10 +16,10 @@ 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: "16.0.4", ngImport: i0, type: IbanValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
20
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.4", type: IbanValidatorDirective, selector: "[ibanValidator]", providers: [{ provide: NG_VALIDATORS, useExisting: IbanValidatorDirective, multi: true }], ngImport: i0 }); }
19
21
  }
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: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanValidatorDirective, decorators: [{
23
23
  type: Directive,
24
24
  args: [{
25
25
  selector: '[ibanValidator]',
@@ -34,10 +34,10 @@ class IbanFormatterPipe {
34
34
  }
35
35
  return value;
36
36
  }
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
38
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, name: "ibanFormatter" }); }
37
39
  }
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: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: IbanFormatterPipe, decorators: [{
41
41
  type: Pipe,
42
42
  args: [{
43
43
  name: 'ibanFormatter'
@@ -45,13 +45,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
45
45
  }] });
46
46
 
47
47
  class AngularIbanModule {
48
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
49
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, declarations: [IbanValidatorDirective,
50
+ IbanFormatterPipe], exports: [IbanValidatorDirective,
51
+ IbanFormatterPipe] }); }
52
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule }); }
48
53
  }
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: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.4", ngImport: i0, type: AngularIbanModule, decorators: [{
55
55
  type: NgModule,
56
56
  args: [{
57
57
  declarations: [
@@ -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';\r\nimport * as IBAN from 'iban';\r\n\r\nexport class ValidatorService {\r\n\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\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}\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;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;;ACRD,MAIa,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,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE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AAsB;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;;;;"}
@@ -5,5 +5,5 @@ export declare class IbanValidatorDirective implements Validator {
5
5
  [key: string]: any;
6
6
  };
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<IbanValidatorDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<IbanValidatorDirective, "[ibanValidator]", never, {}, {}, never, never, false>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<IbanValidatorDirective, "[ibanValidator]", never, {}, {}, never, never, false, never>;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-iban",
3
- "version": "14.0.0",
3
+ "version": "16.0.0",
4
4
  "description": "Angular directives and pipes for IBAN",
5
5
  "author": "fundsaccess AG",
6
6
  "repository": {
@@ -16,19 +16,15 @@
16
16
  "typescript"
17
17
  ],
18
18
  "peerDependencies": {
19
- "@angular/common": "^14.x",
20
- "@angular/core": "^14.x",
19
+ "@angular/common": "^16.x",
20
+ "@angular/core": "^16.x",
21
21
  "iban": "0.0.14"
22
22
  },
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
25
  "tslib": "^2.3.0"
26
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",
27
+ "module": "fesm2022/angular-iban.mjs",
32
28
  "typings": "index.d.ts",
33
29
  "exports": {
34
30
  "./package.json": {
@@ -36,12 +32,10 @@
36
32
  },
37
33
  ".": {
38
34
  "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"
35
+ "esm2022": "./esm2022/angular-iban.mjs",
36
+ "esm": "./esm2022/angular-iban.mjs",
37
+ "default": "./fesm2022/angular-iban.mjs"
44
38
  }
45
39
  },
46
40
  "sideEffects": false
47
- }
41
+ }
@@ -1,26 +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
- 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: [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W5Gb3JtYXR0ZXJQaXBlIH0gZnJvbSAnLi9waXBlcy9pYmFuLWZvcm1hdHRlci5waXBlJztcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgSWJhblZhbGlkYXRvckRpcmVjdGl2ZSxcbiAgICBJYmFuRm9ybWF0dGVyUGlwZVxuICBdLFxuICBpbXBvcnRzOiBbXG4gIF0sXG4gIGV4cG9ydHM6IFtcbiAgICBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlLFxuICAgIEliYW5Gb3JtYXR0ZXJQaXBlLFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIEFuZ3VsYXJJYmFuTW9kdWxlIHsgfVxuIl19
@@ -1,19 +0,0 @@
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi12YWxpZGF0b3IuZGlyZWN0aXZlLmpzIiwic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G9yU2VydmljZSB9IGZyb20gJy4uL3NlcnZpY2VzL3ZhbGlkYXRvci5zZXJ2aWNlJztcblxuQERpcmVjdGl2ZSh7XG4gIHNlbGVjdG9yOiAnW2liYW5WYWxpZGF0b3JdJyxcbiAgcHJvdmlkZXJzOiBbe3Byb3ZpZGU6IE5HX1ZBTElEQVRPUlMsIHVzZUV4aXN0aW5nOiBJYmFuVmFsaWRhdG9yRGlyZWN0aXZlLCBtdWx0aTogdHJ1ZX1dXG59KVxuZXhwb3J0IGNsYXNzIEliYW5WYWxpZGF0b3JEaXJlY3RpdmUgaW1wbGVtZW50cyBWYWxpZGF0b3Ige1xuICB2YWxpZGF0ZShjOiBBYnN0cmFjdENvbnRyb2wpOiB7IFtrZXk6IHN0cmluZ106IGFueSB9IHtcbiAgICByZXR1cm4gVmFsaWRhdG9yU2VydmljZS52YWxpZGF0ZUliYW4oYyk7XG4gIH1cbn1cbiJdfQ==
@@ -1,20 +0,0 @@
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWJhbi1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UJBTi5wcmludEZvcm1hdCh2YWx1ZSwgJyAnKTtcbiAgICB9XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG5cbn1cbiJdfQ==
@@ -1 +0,0 @@
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,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAFtB,QAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAE5E,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAA,sBAAwB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AAiB;AAClB,qBAAA;iBACF,CAAA;;;ACfD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,78 +0,0 @@
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
@@ -1 +0,0 @@
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,E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