@dsivd/prestations-ng 19.1.0 → 19.1.2
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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [19.1.2]
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- [provide-prestations-ng-core.ts](projects/prestations-ng/src/provide-prestations-ng-core.ts)
|
|
14
|
+
- `providePrestationsNgCore()` registers again the HTTP interceptors lost with `FoehnPageModule` in 19.0.0:
|
|
15
|
+
the `foehn-transmit-waiting-modal` is displayed again during a long transmission, the warning before the
|
|
16
|
+
expiration of the session receives its date again, and a new version of the application deployed meanwhile is
|
|
17
|
+
detected again.
|
|
18
|
+
|
|
19
|
+
## [19.1.1]
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- [foehn-input-phone.component.ts](projects/prestations-ng/src/foehn-input/foehn-input-phone.component.ts)
|
|
24
|
+
- fixed help texts to be aligned with ch.vd.cyber.prestationsbe.validation.PhoneNumberValidator (prestations-be)
|
|
25
|
+
- dictionary keys have changed to be more explicit :
|
|
26
|
+
- foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_AND_MOBILE
|
|
27
|
+
- foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_ONLY
|
|
28
|
+
- foehn-input-phone.STANDARD_HELPTEXT_SWISS_MOBILE_ONLY
|
|
29
|
+
- foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_AND_MOBILE
|
|
30
|
+
- foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_ONLY
|
|
31
|
+
- foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_MOBILE_ONLY
|
|
32
|
+
|
|
9
33
|
## [19.1.0] - should be aligned with prestations-be 19.1.x
|
|
10
34
|
|
|
11
35
|
### Changed
|
|
Binary file
|
|
@@ -1151,17 +1151,15 @@ const DEFAULT_DICTIONARY = {
|
|
|
1151
1151
|
'foehn-input-email.standard-connected-help-text': "Cette adresse est utilisée pour l'envoi des alertes automatiques vous informant " +
|
|
1152
1152
|
"d'un nouvel événement vous concernant sur le portail sécurisé.<br/>" +
|
|
1153
1153
|
'Vous pouvez uniquement la modifier dans les <a href="/100002/" target="_blank">préférences de votre espace sécurisé</a>',
|
|
1154
|
-
'foehn-input-phone.
|
|
1155
|
-
'<li>+
|
|
1156
|
-
'foehn-input-phone.
|
|
1157
|
-
'<li>+41791234567,</li><li>0041
|
|
1158
|
-
'foehn-input-phone.
|
|
1159
|
-
'<li>+41211234567,</li><li>0041 21 123 45 56 ou</li><li>+33 6 12 34 56 78</li></ul>)',
|
|
1160
|
-
'foehn-input-phone.DEFAULT_INTERNATIONAL_HELP_TEXT': "Préfixer avec l'indicatif de votre pays (ex : <ul class='sameLine-list'>" +
|
|
1154
|
+
'foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_ONLY': "Préfixer avec l'indicatif de votre pays (ex : <ul class='sameLine-list'>" +
|
|
1155
|
+
'<li>+41211234567,</li><li>0041 21 123 45 67 ou</li><li>+33 1 42 92 81 00</li></ul>)',
|
|
1156
|
+
'foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_MOBILE_ONLY': "Préfixer avec l'indicatif de votre pays (ex : <ul class='sameLine-list'>" +
|
|
1157
|
+
'<li>+41791234567,</li><li>0041 79 123 45 67 ou</li><li>+33 6 12 34 56 78</li></ul>)',
|
|
1158
|
+
'foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_AND_MOBILE': "Préfixer avec l'indicatif de votre pays (ex : <ul class='sameLine-list'>" +
|
|
1161
1159
|
'<li>+41791234567,</li><li>+41 22 012 34 56,</li><li>0041 79 012 34 56</li><li>ou +33612345678</li></ul>)',
|
|
1162
|
-
'foehn-input-phone.
|
|
1163
|
-
'foehn-input-phone.
|
|
1164
|
-
'foehn-input-phone.
|
|
1160
|
+
'foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_AND_MOBILE': "ex : <ul class='sameLine-list'><li>079 123 45 67,</li><li>0211234567,</li><li>+41 79 123 45 67 ou</li><li>+41211234567</li></ul>",
|
|
1161
|
+
'foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_ONLY': "ex : <ul class='sameLine-list'><li>0211234567,</li><li>021 123 45 67,</li><li>+41211234567 ou</li><li>+41 21 123 45 67</li></ul>",
|
|
1162
|
+
'foehn-input-phone.STANDARD_HELPTEXT_SWISS_MOBILE_ONLY': "ex : <ul class='sameLine-list'><li>0791234567,</li><li>079 123 45 67,</li><li>+41791234567 ou</li><li>+41 79 123 45 67</li></ul>",
|
|
1165
1163
|
'foehn-input-time.hours.label': 'Heure',
|
|
1166
1164
|
'foehn-input-time.minutes.label': 'Minutes',
|
|
1167
1165
|
'foehn-input-number.standard-help-text.label': 'Saisir un nombre entre {minValue} et {maxValue}',
|
|
@@ -5399,6 +5397,193 @@ class I18nForm {
|
|
|
5399
5397
|
}
|
|
5400
5398
|
}
|
|
5401
5399
|
|
|
5400
|
+
const APP_VERSION_HEADER = 'app-version';
|
|
5401
|
+
class AppInfoHeadersInterceptor {
|
|
5402
|
+
constructor() {
|
|
5403
|
+
this.foehnPageService = inject(FoehnPageService);
|
|
5404
|
+
this.errorListenerRegistered = false;
|
|
5405
|
+
// Enregistrer une seule fois
|
|
5406
|
+
if (!this.errorListenerRegistered) {
|
|
5407
|
+
window.addEventListener('error', (event) => {
|
|
5408
|
+
if (event.message?.includes('ChunkLoadError') ||
|
|
5409
|
+
event.message?.includes('Loading chunk')) {
|
|
5410
|
+
this.foehnPageService.setAppVersionMismatch();
|
|
5411
|
+
}
|
|
5412
|
+
});
|
|
5413
|
+
this.errorListenerRegistered = true;
|
|
5414
|
+
}
|
|
5415
|
+
}
|
|
5416
|
+
intercept(request, next) {
|
|
5417
|
+
return next.handle(request).pipe(tap$1((httpEvent) => {
|
|
5418
|
+
if (httpEvent instanceof HttpResponse) {
|
|
5419
|
+
const appVersionInHeader = httpEvent.headers.get(APP_VERSION_HEADER);
|
|
5420
|
+
if (!this.appVersion?.length) {
|
|
5421
|
+
this.appVersion = appVersionInHeader;
|
|
5422
|
+
}
|
|
5423
|
+
else if (appVersionInHeader &&
|
|
5424
|
+
this.appVersion !== appVersionInHeader) {
|
|
5425
|
+
this.foehnPageService.setAppVersionMismatch();
|
|
5426
|
+
}
|
|
5427
|
+
}
|
|
5428
|
+
}));
|
|
5429
|
+
}
|
|
5430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AppInfoHeadersInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5431
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AppInfoHeadersInterceptor, providedIn: 'root' }); }
|
|
5432
|
+
}
|
|
5433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: AppInfoHeadersInterceptor, decorators: [{
|
|
5434
|
+
type: Injectable,
|
|
5435
|
+
args: [{
|
|
5436
|
+
providedIn: 'root',
|
|
5437
|
+
}]
|
|
5438
|
+
}], ctorParameters: () => [] });
|
|
5439
|
+
const APP_INFO_HEADERS_INTERCEPTOR_PROVIDER = [
|
|
5440
|
+
{
|
|
5441
|
+
provide: HTTP_INTERCEPTORS,
|
|
5442
|
+
useExisting: AppInfoHeadersInterceptor,
|
|
5443
|
+
multi: true,
|
|
5444
|
+
},
|
|
5445
|
+
];
|
|
5446
|
+
|
|
5447
|
+
class CurrentSessionExpiration {
|
|
5448
|
+
}
|
|
5449
|
+
|
|
5450
|
+
class IntervalHelper {
|
|
5451
|
+
static accurateInterval(
|
|
5452
|
+
// eslint-disable-next-line
|
|
5453
|
+
callBack, intervalInMilliseconds,
|
|
5454
|
+
// eslint-disable-next-line
|
|
5455
|
+
errorCallBack) {
|
|
5456
|
+
let timeout = null;
|
|
5457
|
+
let nextAt = Date.now() + intervalInMilliseconds;
|
|
5458
|
+
const clear = () => clearTimeout(timeout);
|
|
5459
|
+
const timerHandler = () => {
|
|
5460
|
+
nextAt += intervalInMilliseconds;
|
|
5461
|
+
// Avoid time drift by doing "nextAt - Date.now()"
|
|
5462
|
+
const calculatedTimeout = nextAt - Date.now();
|
|
5463
|
+
// Verify browser tab inactivity
|
|
5464
|
+
if (calculatedTimeout < 0) {
|
|
5465
|
+
if (errorCallBack) {
|
|
5466
|
+
clear();
|
|
5467
|
+
return errorCallBack();
|
|
5468
|
+
}
|
|
5469
|
+
}
|
|
5470
|
+
timeout = setTimeout(timerHandler, Math.max(0, nextAt - Date.now()));
|
|
5471
|
+
callBack();
|
|
5472
|
+
};
|
|
5473
|
+
// Avoid time drift by doing "nextAt - Date.now()"
|
|
5474
|
+
timeout = setTimeout(timerHandler, nextAt - Date.now());
|
|
5475
|
+
return { clear };
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
|
|
5479
|
+
class DemandeExpirationService {
|
|
5480
|
+
constructor() {
|
|
5481
|
+
this.PULLING_IN_MILLISECONDS = 1000;
|
|
5482
|
+
this._demandeExpirationDateTimeSubject = new BehaviorSubject(null);
|
|
5483
|
+
this.intervalSubject = new BehaviorSubject(null);
|
|
5484
|
+
}
|
|
5485
|
+
shouldDisplayExpirationTimerMessage() {
|
|
5486
|
+
return combineLatest([
|
|
5487
|
+
this.getDemandeExpirationDateTime(),
|
|
5488
|
+
this.intervalSubject.asObservable(),
|
|
5489
|
+
]).pipe(map(([value]) => !dayjs().isBefore(value?.expiration)), tap((visible) => {
|
|
5490
|
+
if (visible) {
|
|
5491
|
+
this.clearPulling();
|
|
5492
|
+
}
|
|
5493
|
+
}), shareReplay(1));
|
|
5494
|
+
}
|
|
5495
|
+
setDemandeExpirationDateTime(expiration) {
|
|
5496
|
+
this._demandeExpirationDateTimeSubject.next(expiration);
|
|
5497
|
+
}
|
|
5498
|
+
getDemandeExpirationDateTime() {
|
|
5499
|
+
return this._demandeExpirationDateTimeSubject.asObservable().pipe(filter((value) => !!value && value.expiration?.isValid()), tap((value) => {
|
|
5500
|
+
if (dayjs().isBefore(value.expiration)) {
|
|
5501
|
+
this.startPulling();
|
|
5502
|
+
}
|
|
5503
|
+
}), shareReplay(1));
|
|
5504
|
+
}
|
|
5505
|
+
startPulling() {
|
|
5506
|
+
this.clearPulling();
|
|
5507
|
+
this.interval = IntervalHelper.accurateInterval(() => {
|
|
5508
|
+
this.intervalSubject.next();
|
|
5509
|
+
}, this.PULLING_IN_MILLISECONDS, () => {
|
|
5510
|
+
this.startPulling();
|
|
5511
|
+
});
|
|
5512
|
+
}
|
|
5513
|
+
clearPulling() {
|
|
5514
|
+
this.interval?.clear();
|
|
5515
|
+
}
|
|
5516
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5517
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationService, providedIn: 'root' }); }
|
|
5518
|
+
}
|
|
5519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationService, decorators: [{
|
|
5520
|
+
type: Injectable,
|
|
5521
|
+
args: [{
|
|
5522
|
+
providedIn: 'root',
|
|
5523
|
+
}]
|
|
5524
|
+
}] });
|
|
5525
|
+
|
|
5526
|
+
const EXPIRATION_HEADER = 'Sessions-Expirations';
|
|
5527
|
+
class DemandeExpirationInterceptor {
|
|
5528
|
+
constructor() {
|
|
5529
|
+
this.demandeExpirationService = inject(DemandeExpirationService);
|
|
5530
|
+
}
|
|
5531
|
+
intercept(request, next) {
|
|
5532
|
+
return next.handle(request).pipe(tap$1((httpEvent) => {
|
|
5533
|
+
if (httpEvent.type === HttpEventType.Sent) {
|
|
5534
|
+
return;
|
|
5535
|
+
}
|
|
5536
|
+
if (httpEvent instanceof HttpResponse) {
|
|
5537
|
+
if (httpEvent.headers.has(EXPIRATION_HEADER)) {
|
|
5538
|
+
this.manageDemandeExpirationHeader(httpEvent.headers.get(EXPIRATION_HEADER), httpEvent.body);
|
|
5539
|
+
}
|
|
5540
|
+
}
|
|
5541
|
+
}));
|
|
5542
|
+
}
|
|
5543
|
+
manageDemandeExpirationHeader(expirationByDemande, responseBody) {
|
|
5544
|
+
const expirationByDemandeMap = this.getExpirationByDemandeMap(expirationByDemande);
|
|
5545
|
+
const expiration = new CurrentSessionExpiration();
|
|
5546
|
+
const reference = responseBody?.meta?.reference || '';
|
|
5547
|
+
const dateTimeForReference = expirationByDemandeMap.get(reference);
|
|
5548
|
+
const dateTimeForIam = expirationByDemandeMap.get('IAM');
|
|
5549
|
+
if (dateTimeForReference) {
|
|
5550
|
+
expiration.type = 'SESSION-TOKEN';
|
|
5551
|
+
expiration.expiration = dayjs(dateTimeForReference);
|
|
5552
|
+
}
|
|
5553
|
+
else if (dateTimeForIam) {
|
|
5554
|
+
expiration.type = 'IAM';
|
|
5555
|
+
expiration.expiration = dayjs(dateTimeForIam);
|
|
5556
|
+
}
|
|
5557
|
+
if (expiration.expiration?.isValid()) {
|
|
5558
|
+
this.demandeExpirationService.setDemandeExpirationDateTime(expiration);
|
|
5559
|
+
}
|
|
5560
|
+
}
|
|
5561
|
+
getExpirationByDemandeMap(expirationByDemande) {
|
|
5562
|
+
const myMap = new Map();
|
|
5563
|
+
const expirationByDemandesAsArray = expirationByDemande.split(';');
|
|
5564
|
+
expirationByDemandesAsArray.forEach((value) => {
|
|
5565
|
+
const valueAsArray = value.split(',');
|
|
5566
|
+
myMap.set(valueAsArray[0], new Date(valueAsArray[1]));
|
|
5567
|
+
});
|
|
5568
|
+
return myMap;
|
|
5569
|
+
}
|
|
5570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5571
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationInterceptor, providedIn: 'root' }); }
|
|
5572
|
+
}
|
|
5573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationInterceptor, decorators: [{
|
|
5574
|
+
type: Injectable,
|
|
5575
|
+
args: [{
|
|
5576
|
+
providedIn: 'root',
|
|
5577
|
+
}]
|
|
5578
|
+
}] });
|
|
5579
|
+
const DEMANDE_EXPIRATION_INTERCEPTOR_PROVIDER = [
|
|
5580
|
+
{
|
|
5581
|
+
provide: HTTP_INTERCEPTORS,
|
|
5582
|
+
useExisting: DemandeExpirationInterceptor,
|
|
5583
|
+
multi: true,
|
|
5584
|
+
},
|
|
5585
|
+
];
|
|
5586
|
+
|
|
5402
5587
|
const OIDC_ENABLED = new InjectionToken('enable.oidc.interceptor', {
|
|
5403
5588
|
factory: () => false,
|
|
5404
5589
|
});
|
|
@@ -5470,6 +5655,11 @@ function providePrestationsNgCore() {
|
|
|
5470
5655
|
useExisting: IamExpiredInterceptorService,
|
|
5471
5656
|
multi: true,
|
|
5472
5657
|
},
|
|
5658
|
+
// Formerly provided by FoehnPageModule: the version of the application changed during a deployment,
|
|
5659
|
+
// the expiration of the session and the modal displayed during the transmission
|
|
5660
|
+
APP_INFO_HEADERS_INTERCEPTOR_PROVIDER,
|
|
5661
|
+
DEMANDE_EXPIRATION_INTERCEPTOR_PROVIDER,
|
|
5662
|
+
DEMANDE_TRANSMIT_INTERCEPTOR_PROVIDER,
|
|
5473
5663
|
{
|
|
5474
5664
|
provide: ErrorHandler,
|
|
5475
5665
|
useClass: ChunkLoadErrorHandler,
|
|
@@ -7290,82 +7480,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImpo
|
|
|
7290
7480
|
args: [{ selector: 'foehn-app-version-mis-match-modal', imports: [FoehnModalComponent, AsyncPipe, SdkDictionaryPipe], template: "<foehn-modal\n [id]=\"'foehn-app-version-mismatch-modal'\"\n [modalHeaderText]=\"\n 'foehn-app-version-mismatch-modal.title' | fromDictionary\n \"\n modalSize=\"modal-md\"\n [isModalVisible]=\"isModalVisible | async\"\n [closeable]=\"false\"\n>\n <div\n id=\"foehn-app-version-mismatch-modal-body\"\n [innerHTML]=\"\n 'foehn-app-version-mismatch-modal.content' | fromDictionary\n \"\n ></div>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-flex\">\n <button\n id=\"saveAndReloadBtn\"\n type=\"button\"\n class=\"btn btn-primary ms-auto\"\n [innerHTML]=\"\n (hasDemandeInProgress\n ? 'foehn-app-version-mismatch-modal.btn.save-and-reload'\n : 'foehn-app-version-mismatch-modal.btn.reload'\n ) | fromDictionary\n \"\n (click)=\"saveAndReload()\"\n ></button>\n </div>\n </div>\n</foehn-modal>\n", styles: [":host ::ng-deep .modal{z-index:10000}\n"] }]
|
|
7291
7481
|
}], ctorParameters: () => [] });
|
|
7292
7482
|
|
|
7293
|
-
class IntervalHelper {
|
|
7294
|
-
static accurateInterval(
|
|
7295
|
-
// eslint-disable-next-line
|
|
7296
|
-
callBack, intervalInMilliseconds,
|
|
7297
|
-
// eslint-disable-next-line
|
|
7298
|
-
errorCallBack) {
|
|
7299
|
-
let timeout = null;
|
|
7300
|
-
let nextAt = Date.now() + intervalInMilliseconds;
|
|
7301
|
-
const clear = () => clearTimeout(timeout);
|
|
7302
|
-
const timerHandler = () => {
|
|
7303
|
-
nextAt += intervalInMilliseconds;
|
|
7304
|
-
// Avoid time drift by doing "nextAt - Date.now()"
|
|
7305
|
-
const calculatedTimeout = nextAt - Date.now();
|
|
7306
|
-
// Verify browser tab inactivity
|
|
7307
|
-
if (calculatedTimeout < 0) {
|
|
7308
|
-
if (errorCallBack) {
|
|
7309
|
-
clear();
|
|
7310
|
-
return errorCallBack();
|
|
7311
|
-
}
|
|
7312
|
-
}
|
|
7313
|
-
timeout = setTimeout(timerHandler, Math.max(0, nextAt - Date.now()));
|
|
7314
|
-
callBack();
|
|
7315
|
-
};
|
|
7316
|
-
// Avoid time drift by doing "nextAt - Date.now()"
|
|
7317
|
-
timeout = setTimeout(timerHandler, nextAt - Date.now());
|
|
7318
|
-
return { clear };
|
|
7319
|
-
}
|
|
7320
|
-
}
|
|
7321
|
-
|
|
7322
|
-
class DemandeExpirationService {
|
|
7323
|
-
constructor() {
|
|
7324
|
-
this.PULLING_IN_MILLISECONDS = 1000;
|
|
7325
|
-
this._demandeExpirationDateTimeSubject = new BehaviorSubject(null);
|
|
7326
|
-
this.intervalSubject = new BehaviorSubject(null);
|
|
7327
|
-
}
|
|
7328
|
-
shouldDisplayExpirationTimerMessage() {
|
|
7329
|
-
return combineLatest([
|
|
7330
|
-
this.getDemandeExpirationDateTime(),
|
|
7331
|
-
this.intervalSubject.asObservable(),
|
|
7332
|
-
]).pipe(map(([value]) => !dayjs().isBefore(value?.expiration)), tap((visible) => {
|
|
7333
|
-
if (visible) {
|
|
7334
|
-
this.clearPulling();
|
|
7335
|
-
}
|
|
7336
|
-
}), shareReplay(1));
|
|
7337
|
-
}
|
|
7338
|
-
setDemandeExpirationDateTime(expiration) {
|
|
7339
|
-
this._demandeExpirationDateTimeSubject.next(expiration);
|
|
7340
|
-
}
|
|
7341
|
-
getDemandeExpirationDateTime() {
|
|
7342
|
-
return this._demandeExpirationDateTimeSubject.asObservable().pipe(filter((value) => !!value && value.expiration?.isValid()), tap((value) => {
|
|
7343
|
-
if (dayjs().isBefore(value.expiration)) {
|
|
7344
|
-
this.startPulling();
|
|
7345
|
-
}
|
|
7346
|
-
}), shareReplay(1));
|
|
7347
|
-
}
|
|
7348
|
-
startPulling() {
|
|
7349
|
-
this.clearPulling();
|
|
7350
|
-
this.interval = IntervalHelper.accurateInterval(() => {
|
|
7351
|
-
this.intervalSubject.next();
|
|
7352
|
-
}, this.PULLING_IN_MILLISECONDS, () => {
|
|
7353
|
-
this.startPulling();
|
|
7354
|
-
});
|
|
7355
|
-
}
|
|
7356
|
-
clearPulling() {
|
|
7357
|
-
this.interval?.clear();
|
|
7358
|
-
}
|
|
7359
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7360
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationService, providedIn: 'root' }); }
|
|
7361
|
-
}
|
|
7362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: DemandeExpirationService, decorators: [{
|
|
7363
|
-
type: Injectable,
|
|
7364
|
-
args: [{
|
|
7365
|
-
providedIn: 'root',
|
|
7366
|
-
}]
|
|
7367
|
-
}] });
|
|
7368
|
-
|
|
7369
7483
|
class FoehnPageExpirationTimerComponent {
|
|
7370
7484
|
constructor() {
|
|
7371
7485
|
this.applicationInfoService = inject(ApplicationInfoService);
|
|
@@ -10013,14 +10127,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImpo
|
|
|
10013
10127
|
], template: "<div\n class=\"form-group clearable-input-form-group\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n [attr.id]=\"buildId('Container')\"\n tabindex=\"-1\"\n>\n <div class=\"d-flex justify-content-between\">\n @if (label() && type !== 'hidden') {\n <label\n [class]=\"\n 'form-label ' +\n (isLabelSrOnly()\n ? 'visually-hidden'\n : (labelStyleModifier() ?? ''))\n \"\n [attr.for]=\"buildChildId()\"\n >\n <span [innerHTML]=\"label()\"></span>\n @if (!required() && !hideNotRequiredExtraLabel()) {\n <span aria-hidden=\"true\">\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n }\n </label>\n }\n\n @if (!!helpModal()) {\n <foehn-help-modal\n class=\"removePaddingButton\"\n [modalContent]=\"helpModal()\"\n />\n }\n </div>\n\n <foehn-validation-alerts [component]=\"this\" />\n\n @if (standardHelpText() && type !== 'hidden') {\n <small\n [attr.id]=\"buildChildId() + 'StandardHelpText'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"standardHelpText()\"\n ></small>\n }\n\n @if (helpText() && type !== 'hidden') {\n <small\n [attr.id]=\"buildChildId() + 'Help'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText()\"\n ></small>\n }\n\n <ng-content />\n\n <input\n [class.is-invalid]=\"hasErrorsToDisplay() || hasInheritErrorFromParent()\"\n [class.clearable-input]=\"displayClearButton()\"\n class=\"form-control\"\n [name]=\"name() || label()\"\n [attr.maxlength]=\"getMaxLength()\"\n [attr.autocomplete]=\"getAutoComplete()\"\n [attr.autocapitalize]=\"autocapitalize()\"\n [disabled]=\"disabled()\"\n [attr.type]=\"type\"\n [attr.pattern]=\"pattern()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [attr.id]=\"buildChildId()\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n [attr.aria-required]=\"required() || null\"\n [ngModel]=\"model()\"\n (paste)=\"onPaste($event)\"\n (ngModelChange)=\"updateNgModel($event)\"\n (input)=\"handleChange(entryComponent.value)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n #entryComponent\n />\n\n @if (displayClearButton()) {\n <button\n type=\"button\"\n [id]=\"buildChildId() + 'ClearButton'\"\n class=\"clearable-input-clear-button btn\"\n (click)=\"onClear()\"\n >\n <foehn-icon-times\n class=\"clearable-input-clear-button-icon\"\n [title]=\"'foehn-input.clear-button.label' | fromDictionary\"\n />\n </button>\n }\n</div>\n", styles: ["input::-ms-clear{display:none}input.clearable-input{padding-right:30px}.clearable-input-form-group{position:relative}:host ::ng-deep foehn-help-modal>.btn{padding-top:0!important;margin-top:0!important}.clearable-input-clear-button{position:absolute;bottom:4px;right:4px;height:30px;width:30px;background:none;border:none;box-shadow:none}.clearable-input-clear-button-icon{top:4px;right:8px;position:absolute}:host ::ng-deep .clearable-input-clear-button.btn .svg-inline--fa{color:#595959!important}:host ::ng-deep .clearable-input-clear-button.btn:hover .svg-inline--fa{color:#000!important}.chars-remaining{color:#757575;font-size:.9rem}.char-count-exceeded{color:#c21f39}:host ::ng-deep .sameLine-list{display:inline;list-style:none;padding:0}:host ::ng-deep .sameLine-list li{display:inline;padding:3px}\n"] }]
|
|
10014
10128
|
}], propDecorators: { autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }] } });
|
|
10015
10129
|
|
|
10016
|
-
const
|
|
10017
|
-
const
|
|
10018
|
-
const
|
|
10019
|
-
const
|
|
10020
|
-
const
|
|
10021
|
-
const
|
|
10022
|
-
const
|
|
10023
|
-
const BAD_PARAMS_HELP_TEXT = 'Mauvais paramétrage du composant. Un téléphone est soit international, mobile, fixe ou les deux mais pas rien';
|
|
10130
|
+
const DEFAULT_INTERNATIONAL_FIX_ONLY = 'foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_ONLY';
|
|
10131
|
+
const DEFAULT_INTERNATIONAL_MOBILE_ONLY = 'foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_MOBILE_ONLY';
|
|
10132
|
+
const DEFAULT_INTERNATIONAL_FIX_AND_MOBILE = 'foehn-input-phone.STANDARD_HELPTEXT_INTERNATIONAL_FIX_AND_MOBILE';
|
|
10133
|
+
const DEFAULT_SWISS_FIX_AND_MOBILE = 'foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_AND_MOBILE';
|
|
10134
|
+
const DEFAULT_SWISS_FIX_ONLY = 'foehn-input-phone.STANDARD_HELPTEXT_SWISS_FIX_ONLY';
|
|
10135
|
+
const DEFAULT_SWISS_MOBILE_ONLY = 'foehn-input-phone.STANDARD_HELPTEXT_SWISS_MOBILE_ONLY';
|
|
10136
|
+
const BAD_PARAMS_HELP_TEXT = 'Mauvais paramétrage du composant. Un téléphone est mobile, fixe ou les deux mais pas rien';
|
|
10024
10137
|
class FoehnInputPhoneComponent extends FoehnInputStringComponent {
|
|
10025
10138
|
constructor() {
|
|
10026
10139
|
super(...arguments);
|
|
@@ -10046,28 +10159,31 @@ class FoehnInputPhoneComponent extends FoehnInputStringComponent {
|
|
|
10046
10159
|
const acceptInternational = this.acceptInternational();
|
|
10047
10160
|
const acceptPhone = this.acceptPhone();
|
|
10048
10161
|
const acceptMobilePhone = this.acceptMobilePhone();
|
|
10049
|
-
if (
|
|
10050
|
-
return
|
|
10162
|
+
if (!acceptPhone && !acceptMobilePhone) {
|
|
10163
|
+
return BAD_PARAMS_HELP_TEXT;
|
|
10051
10164
|
}
|
|
10052
|
-
if (acceptInternational
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
return DEFAULT_SWISS_HELP_TEXT;
|
|
10063
|
-
}
|
|
10064
|
-
if (acceptPhone) {
|
|
10065
|
-
return DEFAULT_SWISS_PHONE_HELP_TEXT;
|
|
10165
|
+
if (!acceptInternational) {
|
|
10166
|
+
if (acceptPhone && acceptMobilePhone) {
|
|
10167
|
+
return DEFAULT_SWISS_FIX_AND_MOBILE;
|
|
10168
|
+
}
|
|
10169
|
+
if (acceptPhone) {
|
|
10170
|
+
return DEFAULT_SWISS_FIX_ONLY;
|
|
10171
|
+
}
|
|
10172
|
+
else {
|
|
10173
|
+
return DEFAULT_SWISS_MOBILE_ONLY;
|
|
10174
|
+
}
|
|
10066
10175
|
}
|
|
10067
|
-
|
|
10068
|
-
|
|
10176
|
+
else {
|
|
10177
|
+
if (acceptPhone && acceptMobilePhone) {
|
|
10178
|
+
return DEFAULT_INTERNATIONAL_FIX_AND_MOBILE;
|
|
10179
|
+
}
|
|
10180
|
+
if (acceptPhone) {
|
|
10181
|
+
return DEFAULT_INTERNATIONAL_FIX_ONLY;
|
|
10182
|
+
}
|
|
10183
|
+
else {
|
|
10184
|
+
return DEFAULT_INTERNATIONAL_MOBILE_ONLY;
|
|
10185
|
+
}
|
|
10069
10186
|
}
|
|
10070
|
-
return BAD_PARAMS_HELP_TEXT;
|
|
10071
10187
|
}
|
|
10072
10188
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: FoehnInputPhoneComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10073
10189
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: FoehnInputPhoneComponent, isStandalone: true, selector: "foehn-input-phone", inputs: { acceptInternational: { classPropertyName: "acceptInternational", publicName: "acceptInternational", isSignal: true, isRequired: false, transformFunction: null }, acceptMobilePhone: { classPropertyName: "acceptMobilePhone", publicName: "acceptMobilePhone", isSignal: true, isRequired: false, transformFunction: null }, acceptPhone: { classPropertyName: "acceptPhone", publicName: "acceptPhone", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
@@ -15191,5 +15307,5 @@ class SdkLog {
|
|
|
15191
15307
|
* Generated bundle index. Do not edit.
|
|
15192
15308
|
*/
|
|
15193
15309
|
|
|
15194
|
-
export { APP_INFO_API_URL, AbstractFoehnUploaderComponent, AbstractListDetailPageComponent, AbstractMenuPageComponent, AbstractPageComponent, AbstractPageFromMenuComponent, ActionStatut, Address, AddressTypeLight, ApplicationInfo, ApplicationInfoService, BAD_PARAMS_HELP_TEXT, BoDocumentError, BoDocumentsWithErrors, BoMultiUploadService, Breadcrumb, BreadcrumbEventService, BreadcrumbItem, CAPTCHA_ERROR_NAME, CURRENCY_REGEXP, Calendar, Canton, Captcha, ChunkLoadErrorHandler, ComponentError, Configuration, Country, CurrencyHelper, CurrentWeek, DECIMALS_SEPARATOR,
|
|
15310
|
+
export { APP_INFO_API_URL, AbstractFoehnUploaderComponent, AbstractListDetailPageComponent, AbstractMenuPageComponent, AbstractPageComponent, AbstractPageFromMenuComponent, ActionStatut, Address, AddressTypeLight, ApplicationInfo, ApplicationInfoService, BAD_PARAMS_HELP_TEXT, BoDocumentError, BoDocumentsWithErrors, BoMultiUploadService, Breadcrumb, BreadcrumbEventService, BreadcrumbItem, CAPTCHA_ERROR_NAME, CURRENCY_REGEXP, Calendar, Canton, Captcha, ChunkLoadErrorHandler, ComponentError, Configuration, Country, CurrencyHelper, CurrentWeek, DECIMALS_SEPARATOR, DEFAULT_INTERNATIONAL_FIX_AND_MOBILE, DEFAULT_INTERNATIONAL_FIX_ONLY, DEFAULT_INTERNATIONAL_MOBILE_ONLY, DEFAULT_PREFIX, DEFAULT_SWISS_FIX_AND_MOBILE, DEFAULT_SWISS_FIX_ONLY, DEFAULT_SWISS_MOBILE_ONLY, DICTIONARY_BASE_URL, DateHelper, DatePickerHelper, DatePickerNavigationHelper, DayMonth, DaySlots, DemandeExpirationService, DemandeHelper, DisplayCurrencyPipe, DisplayDatePipe, District, Document, DocumentError, DocumentReference, DocumentReferenceWithFile, DocumentsWithErrors, DropdownMenuGroup, DropdownMenuItem, EPaymentService, EtapeInfo, FEEDBACK_USAGERS_LOCAL_STORAGE_PREFIX, FORM_SUPPORT_CYBER_TITLE_FALLBACK, FocusedDay, FoehnAbbrComponent, FoehnAgendaComponent, FoehnAgendaNavigationComponent, FoehnAgendaTimeslotPanelComponent, FoehnAutocompleteComponent, FoehnBoMultiUploadComponent, FoehnBooleanCheckboxComponent, FoehnBooleanRadioComponent, FoehnBreadcrumbComponent, FoehnCheckableGroupComponent, FoehnCheckboxComponent, FoehnConfirmModalComponent, FoehnConfirmModalContent, FoehnConfirmModalService, FoehnDateComponent, FoehnDatePickerButtonComponent, FoehnDatePickerComponent, FoehnDateTimeComponent, FoehnDecisionElectroniqueComponent, FoehnDisplayAddressComponent, FoehnDropdownMenuComponent, FoehnErrorPillComponent, FoehnFeedbackNotificationComponent, FoehnFormComponent, FoehnGlobalUploadProgressBarComponent, FoehnHeaderComponent, FoehnHelpModalComponent, FoehnIconCalendarComponent, FoehnIconCheckComponent, FoehnIconCheckSquareOComponent, FoehnIconChevronDownComponent, FoehnIconChevronLeftComponent, FoehnIconChevronRightComponent, FoehnIconChevronUpComponent, FoehnIconClockComponent, FoehnIconCommentDotsComponent, FoehnIconEditComponent, FoehnIconExternalLinkAltComponent, FoehnIconFilePdfComponent, FoehnIconInfoCircleComponent, FoehnIconLockComponent, FoehnIconMapMarkerComponent, FoehnIconMinusCircleComponent, FoehnIconPencilComponent, FoehnIconPlusCircleComponent, FoehnIconPlusSquareComponent, FoehnIconSearchComponent, FoehnIconTimesComponent, FoehnIconTrashAltComponent, FoehnIconUnlockAltComponent, FoehnIconUserComponent, FoehnInputAddressComponent, FoehnInputComponent, FoehnInputEmailComponent, FoehnInputForeignLocalityComponent, FoehnInputForeignStreetComponent, FoehnInputHiddenComponent, FoehnInputNav13Component, FoehnInputNumberComponent, FoehnInputPasswordComponent, FoehnInputPhoneComponent, FoehnInputPrefixedTextComponent, FoehnInputStringComponent, FoehnInputTextComponent, FoehnInputTextareaComponent, FoehnListComponent, FoehnListItem, FoehnListSummaryComponent, FoehnMenuItemComponent, FoehnMenuItemTransmitComponent, FoehnModalComponent, FoehnMultiUploadComponent, FoehnMultiselectAutocompleteComponent, FoehnNavigationComponent, FoehnNavigationService, FoehnNotfoundComponent, FoehnPageComponent, FoehnPageCounterComponent, FoehnPageExpirationTimerComponent, FoehnPageModalComponent, FoehnPageService, FoehnPictureUploadComponent, FoehnRadioComponent, FoehnRecapSectionComponent, FoehnRemainingAlertsSummaryComponent, FoehnSelectComponent, FoehnSimpleNavigationComponent, FoehnSkipLinkComponent, FoehnStatusProgressBarComponent, FoehnTableColumnConfiguration, FoehnTableComponent, FoehnTablePageChangeEvent, FoehnTimeComponent, FoehnTransmitWaitingModalComponent, FoehnTransmitWaitingModalService, FoehnUploadProgressBarComponent, FoehnUserConnectedAsComponent, FoehnValidationAlertSummaryComponent, FoehnValidationAlertsComponent, FooterLink, FormMetadata, FormPostResponse, FormSelectOption, FormatAvsPipe, FormatIdePipe, GESDEM_MAX_DATA_LENGTH, GesdemActionRecoveryLoginComponent, GesdemActionRecoveryRegistrationComponent, GesdemConfirmationComponent, GesdemErrorComponent, GesdemEventService, GesdemHandlerService, GesdemStatutUtils, GlobalUploadProgressService, GrowlBrokerService, GrowlMessage, GrowlType, HTTP_LOADER_FILTERED_URL, I18nForm, IAM_ACV_OIDC_REDIRECT_LOCATION_REGEX, IAM_ACV_REDIRECT_LOCATION_REGEX, IbanFormatterDirective, IdeFormatterDirective, IntervalHelper, LineBreakAsHtmlPipe, Locality, MonthYear, MultiUploadService, Municipality, NDCFormatterDirective, NavigationDirection, NumberCurrencyFormatterDirective, OIDC_ENABLED, ObjectHelper, PORTAIL_BASE_URL_INT, PORTAIL_BASE_URL_PROD, PORTAIL_BASE_URL_VAL, PageChangeEvent, PageUploadLimitService, PaginationWeek, PendingFiles, PendingPaymentComponent, PendingUploadService, PlaceOfOrigin, Portail, PostalLocality, Preferences, RECAPTCHA_API_URL, RecaptchaService, RedirectComponent, RegisterNgModelService, RowElement, SESSION_INFO_API_URL, SWISS_ISO_ID, ScrollHelper, SdkDictionaryPipe, SdkDictionaryService, SdkEpaymentComponent, SdkEvent, SdkEventType, SdkEventsLoggerService, SdkLog, SdkLogLevel, SdkLogsService, SdkRecaptchaComponent, SdkStatisticsService, SelectedSlot, Session, SessionInfo, SessionInfoData, SessionInfoWithApplicationService, Street, StreetNumber, StringHelper, THOUSANDS_SEPARATOR, TRANSMIT_WAITING_MODAL_DELAY_IN_MILLISECONDS, TableSort, UploadProgress, UploadProgressService, UploaderHelper, ValidationHandlerService, formatDecimalCurrency, formatNonDecimalCurrency, formatNumberAsGiven, gesdemLoaderGuard, providePrestationsNgCore, replaceAll };
|
|
15195
15311
|
//# sourceMappingURL=dsivd-prestations-ng.mjs.map
|