@dsivd/prestations-ng 17.10.0-beta.1 → 17.10.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.
@@ -611,6 +611,22 @@ class ObjectHelper {
611
611
  const doc = new DOMParser().parseFromString(html, 'text/html');
612
612
  return doc.body.textContent || '';
613
613
  }
614
+ static getNestedProperty(obj, key) {
615
+ for (const property in obj) {
616
+ if (obj.hasOwnProperty(property)) {
617
+ // in case it is an object
618
+ if (typeof obj[property] === 'object') {
619
+ const result = this.getNestedProperty(obj[property], key.split('.').slice(1).join('.'));
620
+ if (typeof result !== 'undefined') {
621
+ return result;
622
+ }
623
+ }
624
+ else if (property === key) {
625
+ return obj[key]; // returns the value
626
+ }
627
+ }
628
+ }
629
+ }
614
630
  }
615
631
 
616
632
  class ServiceLocator {
@@ -770,6 +786,15 @@ class FoehnInputComponent {
770
786
  return this.isErrorInherited;
771
787
  }
772
788
  isPristine() {
789
+ if (!this.inputModelList && !this.subComponents) {
790
+ return true;
791
+ }
792
+ if (this.inputModelList && !this.subComponents) {
793
+ return this.inputModelList.filter(m => !m.pristine).length === 0;
794
+ }
795
+ if (!this.inputModelList && this.subComponents) {
796
+ return this.subComponents.filter(c => !c.isPristine()).length === 0;
797
+ }
773
798
  return (this.inputModelList.filter(m => !m.pristine).length === 0 &&
774
799
  this.subComponents.filter(c => !c.isPristine()).length === 0);
775
800
  }
@@ -1065,6 +1090,7 @@ const GrowlType = {
1065
1090
  };
1066
1091
 
1067
1092
  const DEFAULT_DICTIONARY = {
1093
+ 'plural-marker': 's',
1068
1094
  'draft-container.button.show-drafts': 'Demandes en cours de saisie : {draftsLength}',
1069
1095
  'draft-container.modal.title': 'Il existe déjà une ou plusieurs demandes en cours de saisie',
1070
1096
  'draft-container.modal.close.button': 'Fermer',
@@ -1161,7 +1187,7 @@ const DEFAULT_DICTIONARY = {
1161
1187
  'gesdem-action-recovery-registration.current-info.preview': 'Un lien de reprise a été envoyé à <i>{recoveryMail}</i> ({lastRegistration})',
1162
1188
  'gesdem-action-recovery-registration.not-connected.current-info': '<p>Un lien de reprise vous a été envoyé à la date suivante : <strong>{lastRegistration}</strong></p>' +
1163
1189
  // eslint-disable-next-line max-len
1164
- "<p>La demande pourra être reprise pendant <strong>{draftDemRetentionDaysPublic} jour(s)</strong> après votre dernière modification, mais vous devez quand même respecter la date limite pour son dépôt, s'il y en a une. Ensuite elle sera supprimée définitivement du portail et vous devrez faire une nouvelle demande.</p>" +
1190
+ "<p>La demande pourra être reprise pendant <strong>{draftDemRetentionDaysPublic} jour{plural}</strong> après votre dernière modification, mais vous devez quand même respecter la date limite pour son dépôt, s'il y en a une. Ensuite elle sera supprimée définitivement du portail et vous devrez faire une nouvelle demande.</p>" +
1165
1191
  '<p>Voulez-vous renvoyer un lien ? <br/>' +
1166
1192
  "Vous pouvez aussi changer l'adresse de destination et le numéro de mobile pour la reprise</p>",
1167
1193
  'gesdem-action-recovery-registration.modalHeaderText': 'Informations pour la reprise de la demande',
@@ -1169,7 +1195,7 @@ const DEFAULT_DICTIONARY = {
1169
1195
  'gesdem-action-recovery-registration.connected.info.draft-link-text': 'demandes en cours de saisie',
1170
1196
  'gesdem-action-recovery-registration.not-connected.not-registered.info': '<p>Vous avez la possibilité de reprendre votre demande plus tard en complétant ce formulaire.</p>' +
1171
1197
  // eslint-disable-next-line max-len
1172
- "<p>La demande pourra être reprise pendant <strong>{draftDemRetentionDaysPublic} jour(s)</strong> après votre dernière modification, mais vous devez quand même respecter la date limite pour son dépôt, s'il y en a une. Ensuite elle sera supprimée définitivement du portail et vous devrez faire une nouvelle demande.</p>" +
1198
+ "<p>La demande pourra être reprise pendant <strong>{draftDemRetentionDaysPublic} jour{plural}</strong> après votre dernière modification, mais vous devez quand même respecter la date limite pour son dépôt, s'il y en a une. Ensuite elle sera supprimée définitivement du portail et vous devrez faire une nouvelle demande.</p>" +
1173
1199
  '<p class="small mb-0">' +
1174
1200
  "<i>Les informations demandées sont uniquement utilisées pour vous permettre d'effectuer la reprise de demande.</i>" +
1175
1201
  '</p>',
@@ -1179,7 +1205,7 @@ const DEFAULT_DICTIONARY = {
1179
1205
  '<strong>{recoveryMobile}</strong>.' +
1180
1206
  '</p>' +
1181
1207
  // eslint-disable-next-line max-len
1182
- "<p>La demande pourra être reprise pendant <strong>{draftDemRetentionDaysPublic} jour(s)</strong> après votre dernière modification, mais vous devez quand même respecter la date limite pour son dépôt, s'il y en a une. Ensuite elle sera supprimée définitivement du portail et vous devrez faire une nouvelle demande.</p>",
1208
+ "<p>La demande pourra être reprise pendant <strong>{draftDemRetentionDaysPublic} jour{plural}</strong> après votre dernière modification, mais vous devez quand même respecter la date limite pour son dépôt, s'il y en a une. Ensuite elle sera supprimée définitivement du portail et vous devrez faire une nouvelle demande.</p>",
1183
1209
  'gesdem-action-recovery-registration.not-connected.email.label': 'Email',
1184
1210
  'gesdem-action-recovery-registration.not-connected.email.help-text': 'Par exemple, john@doe.ch',
1185
1211
  'gesdem-action-recovery-registration.not-connected.mobile.label': 'Numéro de téléphone mobile',
@@ -1464,6 +1490,12 @@ class SdkDictionaryService {
1464
1490
  }
1465
1491
  return getKeyOrDefault(this.dictionary, key, placeholders);
1466
1492
  }
1493
+ getPluralMarkerSync(count) {
1494
+ if (!count || count === 1) {
1495
+ return '';
1496
+ }
1497
+ return this.getKeySync('plural-marker');
1498
+ }
1467
1499
  changeLanguage(code) {
1468
1500
  if (!!code && this.languageCodeSubject.getValue() !== code) {
1469
1501
  this.languageCodeSubject.next(code);
@@ -6165,7 +6197,7 @@ class FoehnCheckableGroupComponent extends FoehnInputComponent {
6165
6197
  return null;
6166
6198
  }
6167
6199
  if (typeof this.elementGroup === 'string') {
6168
- return this.getNestedProperty(element, this.elementGroup);
6200
+ return ObjectHelper.getNestedProperty(element, this.elementGroup);
6169
6201
  }
6170
6202
  return this.elementGroup(element);
6171
6203
  }
@@ -6179,13 +6211,13 @@ class FoehnCheckableGroupComponent extends FoehnInputComponent {
6179
6211
  return null;
6180
6212
  }
6181
6213
  if (typeof this.elementValue === 'string') {
6182
- return this.getNestedProperty(element, this.elementValue);
6214
+ return ObjectHelper.getNestedProperty(element, this.elementValue);
6183
6215
  }
6184
6216
  return this.elementValue(element);
6185
6217
  }
6186
6218
  getLabel(element) {
6187
6219
  if (typeof this.elementLabel === 'string') {
6188
- return this.getNestedProperty(element, this.elementLabel);
6220
+ return ObjectHelper.getNestedProperty(element, this.elementLabel);
6189
6221
  }
6190
6222
  return this.elementLabel(element);
6191
6223
  }
@@ -6201,7 +6233,7 @@ class FoehnCheckableGroupComponent extends FoehnInputComponent {
6201
6233
  return 'disabled';
6202
6234
  }
6203
6235
  if (typeof this.elementDisabled === 'string') {
6204
- return this.getNestedProperty(element, this.elementDisabled);
6236
+ return ObjectHelper.getNestedProperty(element, this.elementDisabled);
6205
6237
  }
6206
6238
  return this.elementDisabled(element);
6207
6239
  }
@@ -6272,22 +6304,6 @@ class FoehnCheckableGroupComponent extends FoehnInputComponent {
6272
6304
  }
6273
6305
  this.groupedElements = this.getGroupedElements();
6274
6306
  }
6275
- getNestedProperty(obj, key) {
6276
- for (const property in obj) {
6277
- if (obj.hasOwnProperty(property)) {
6278
- // in case it is an object
6279
- if (typeof obj[property] === 'object') {
6280
- const result = this.getNestedProperty(obj[property], key.split('.').slice(1).join('.'));
6281
- if (typeof result !== 'undefined') {
6282
- return result;
6283
- }
6284
- }
6285
- else if (property === key) {
6286
- return obj[key]; // returns the value
6287
- }
6288
- }
6289
- }
6290
- }
6291
6307
  getGroupedElements() {
6292
6308
  if (!this.elements) {
6293
6309
  return [];
@@ -8363,7 +8379,7 @@ class FoehnAutocompleteComponent extends FoehnCheckableGroupComponent {
8363
8379
  return this.getLabel(element);
8364
8380
  }
8365
8381
  if (typeof this.elementSuggestionLabel === 'string') {
8366
- return this.getNestedProperty(element, this.elementSuggestionLabel);
8382
+ return ObjectHelper.getNestedProperty(element, this.elementSuggestionLabel);
8367
8383
  }
8368
8384
  return this.elementSuggestionLabel(element);
8369
8385
  }
@@ -12688,7 +12704,7 @@ class RepriseInfo {
12688
12704
  }
12689
12705
 
12690
12706
  class GesdemActionRecoveryRegistrationComponent {
12691
- constructor(actionRecoveryService, validationHandler, foehnPageService, gesdemEventService, gesdemService, appInfoService, sessionInfoService, router, eventsLoggerService) {
12707
+ constructor(actionRecoveryService, validationHandler, foehnPageService, gesdemEventService, gesdemService, appInfoService, sessionInfoService, router, eventsLoggerService, dictionaryService) {
12692
12708
  this.actionRecoveryService = actionRecoveryService;
12693
12709
  this.validationHandler = validationHandler;
12694
12710
  this.foehnPageService = foehnPageService;
@@ -12698,6 +12714,7 @@ class GesdemActionRecoveryRegistrationComponent {
12698
12714
  this.sessionInfoService = sessionInfoService;
12699
12715
  this.router = router;
12700
12716
  this.eventsLoggerService = eventsLoggerService;
12717
+ this.dictionaryService = dictionaryService;
12701
12718
  this.dispatchFormErrors = false;
12702
12719
  this.triggerOnPageChange = false;
12703
12720
  this.model = new RepriseInfo();
@@ -12837,6 +12854,9 @@ class GesdemActionRecoveryRegistrationComponent {
12837
12854
  this.modalTrigger.nativeElement.focus();
12838
12855
  }
12839
12856
  }
12857
+ getPluralMarker(count) {
12858
+ return this.dictionaryService.getPluralMarkerSync(count);
12859
+ }
12840
12860
  canContinueLaterForEtape(currentEtapeInfo, isConnectedCyber, isConnectedIamAcv) {
12841
12861
  if (isConnectedIamAcv) {
12842
12862
  return false;
@@ -12858,13 +12878,13 @@ class GesdemActionRecoveryRegistrationComponent {
12858
12878
  this.validationHandler.updateErrors([]);
12859
12879
  }
12860
12880
  }
12861
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GesdemActionRecoveryRegistrationComponent, deps: [{ token: GesdemActionRecoveryService }, { token: ValidationHandlerService }, { token: FoehnPageService }, { token: GesdemEventService }, { token: GesdemHandlerService }, { token: ApplicationInfoService }, { token: SessionInfo }, { token: i1$1.Router }, { token: SdkEventsLoggerService }], target: i0.ɵɵFactoryTarget.Component }); }
12862
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GesdemActionRecoveryRegistrationComponent, selector: "gesdem-action-recovery-registration", inputs: { dispatchFormErrors: "dispatchFormErrors", continueLaterLabel: "continueLaterLabel", continueLaterAlreadyRegisteredLabel: "continueLaterAlreadyRegisteredLabel", continueLaterConnectedLabel: "continueLaterConnectedLabel", triggerOnPageChange: "triggerOnPageChange" }, viewQueries: [{ propertyName: "modalTrigger", first: true, predicate: ["modalTrigger"], descendants: true }, { propertyName: "form", first: true, predicate: FoehnFormComponent, descendants: true }], ngImport: i0, template: "<button\n type=\"button\"\n id=\"continueLaterButton\"\n class=\"btn btn-link pe-0 ps-0 no-text-transform\"\n *ngIf=\"canContinueLater | async\"\n [innerHTML]=\"modalTriggerLabel | async\"\n (click)=\"saveAndOpenModal()\"\n #modalTrigger\n></button>\n\n<ng-container *ngIf=\"currentInfoReprise | async as currentInfo\">\n <div\n class=\"small\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.current-info.preview'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n lastRegistration:\n (currentInfo.lastUpdate | displayDate)\n }\n \"\n ></div>\n</ng-container>\n\n<foehn-modal\n *ngIf=\"currentEtapeInfo | async as etapeInfo\"\n id=\"action-recovery-registration-modal\"\n [modalSize]=\"!(isConnectedCyber | async) ? 'modal-lg' : 'modal-md'\"\n [modalHeaderText]=\"\n 'gesdem-action-recovery-registration.modalHeaderText' | fromDictionary\n \"\n [isModalVisible]=\"isModalVisible\"\n (isModalVisibleChange)=\"updateVisibilityStatus($event)\"\n>\n <ng-container *ngIf=\"!!(isConnectedCyber | async)\">\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info'\n | fromDictionary\n \"\n ></span>\n\n <a href=\"/100002/demandes/search/MINE/INITIAL\">\n <foehn-icon-pencil\n class=\"h3\"\n aria-hidden=\"true\"\n [title]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></foehn-icon-pencil>\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></span>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"!(isConnectedCyber | async)\">\n <ng-container\n *ngIf=\"\n currentInfoReprise | async as currentInfo;\n else noCurrentInfo\n \"\n >\n <div\n class=\"alert alert-info\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.current-info'\n | fromDictionary\n : {\n lastRegistration:\n (currentInfo.lastUpdate | displayDate),\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString()\n }\n \"\n ></div>\n\n <div\n class=\"alert alert-info\"\n *ngIf=\"mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.info.sent'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n recoveryMobile: currentInfo.mobile,\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString()\n }\n \"\n ></div>\n </ng-container>\n\n <foehn-form *ngIf=\"!mailSent\" [shouldDisplayAlertSummary]=\"false\">\n <foehn-input-email\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.email.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.email.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.email\"\n name=\"email\"\n [required]=\"true\"\n ></foehn-input-email>\n\n <foehn-input-phone\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.mobile.label'\n | fromDictionary\n \"\n [acceptInternational]=\"true\"\n [acceptMobilePhone]=\"true\"\n [acceptPhone]=\"false\"\n [(model)]=\"model.mobile\"\n name=\"mobile\"\n [required]=\"true\"\n ></foehn-input-phone>\n\n <foehn-input-text\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.referenceInterne\"\n name=\"referenceInterne\"\n [required]=\"false\"\n ></foehn-input-text>\n </foehn-form>\n </ng-container>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-md-flex\">\n <div class=\"ms-md-auto me-md-2 mb-2 mt-2\">\n <button\n id=\"continueLaterModalCancelButton\"\n type=\"button\"\n (click)=\"close()\"\n class=\"btn btn-secondary w-100\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.cancel.button'\n | fromDictionary\n \"\n ></button>\n </div>\n <div\n *ngIf=\"!(isConnectedCyber | async)\"\n class=\"ms-md-0 me-md-2 mb-2 mt-2\"\n >\n <button\n id=\"continueLaterModalSaveButton\"\n type=\"submit\"\n (click)=\"sendAndClose()\"\n class=\"btn btn-success w-100\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.save.button'\n | fromDictionary\n \"\n ></button>\n </div>\n </div>\n </div>\n</foehn-modal>\n\n<ng-template #noCurrentInfo>\n <div\n class=\"alert alert-info\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.not-registered.info'\n | fromDictionary\n : {\n draftDemRetentionDaysPublic: (\n currentEtapeInfo | async\n ).draftDemRetentionDaysPublic?.toString()\n }\n \"\n ></div>\n</ng-template>\n", styles: [".no-text-transform{text-transform:none;cursor:pointer}:host ::ng-deep foehn-icon-pencil .svg-inline--fa{color:#4a4a4b!important;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FoehnInputTextComponent, selector: "foehn-input-text", inputs: ["numberOnly"] }, { kind: "component", type: FoehnInputEmailComponent, selector: "foehn-input-email" }, { kind: "component", type: FoehnInputPhoneComponent, selector: "foehn-input-phone", inputs: ["acceptInternational", "acceptMobilePhone", "acceptPhone"] }, { kind: "component", type: FoehnIconPencilComponent, selector: "foehn-icon-pencil" }, { kind: "component", type: FoehnFormComponent, selector: "foehn-form", inputs: ["shouldDisplayAlertSummary"] }, { kind: "component", type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "closeable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }, { kind: "pipe", type: DisplayDatePipe, name: "displayDate" }] }); }
12881
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GesdemActionRecoveryRegistrationComponent, deps: [{ token: GesdemActionRecoveryService }, { token: ValidationHandlerService }, { token: FoehnPageService }, { token: GesdemEventService }, { token: GesdemHandlerService }, { token: ApplicationInfoService }, { token: SessionInfo }, { token: i1$1.Router }, { token: SdkEventsLoggerService }, { token: SdkDictionaryService }], target: i0.ɵɵFactoryTarget.Component }); }
12882
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GesdemActionRecoveryRegistrationComponent, selector: "gesdem-action-recovery-registration", inputs: { dispatchFormErrors: "dispatchFormErrors", continueLaterLabel: "continueLaterLabel", continueLaterAlreadyRegisteredLabel: "continueLaterAlreadyRegisteredLabel", continueLaterConnectedLabel: "continueLaterConnectedLabel", triggerOnPageChange: "triggerOnPageChange" }, viewQueries: [{ propertyName: "modalTrigger", first: true, predicate: ["modalTrigger"], descendants: true }, { propertyName: "form", first: true, predicate: FoehnFormComponent, descendants: true }], ngImport: i0, template: "<button\n type=\"button\"\n id=\"continueLaterButton\"\n class=\"btn btn-link pe-0 ps-0 no-text-transform\"\n *ngIf=\"canContinueLater | async\"\n [innerHTML]=\"modalTriggerLabel | async\"\n (click)=\"saveAndOpenModal()\"\n #modalTrigger\n></button>\n\n<ng-container *ngIf=\"currentInfoReprise | async as currentInfo\">\n <div\n class=\"small\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.current-info.preview'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n lastRegistration:\n (currentInfo.lastUpdate | displayDate)\n }\n \"\n ></div>\n</ng-container>\n\n<foehn-modal\n *ngIf=\"currentEtapeInfo | async as etapeInfo\"\n id=\"action-recovery-registration-modal\"\n [modalSize]=\"!(isConnectedCyber | async) ? 'modal-lg' : 'modal-md'\"\n [modalHeaderText]=\"\n 'gesdem-action-recovery-registration.modalHeaderText' | fromDictionary\n \"\n [isModalVisible]=\"isModalVisible\"\n (isModalVisibleChange)=\"updateVisibilityStatus($event)\"\n>\n <ng-container *ngIf=\"!!(isConnectedCyber | async)\">\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info'\n | fromDictionary\n \"\n ></span>\n\n <a href=\"/100002/demandes/search/MINE/INITIAL\">\n <foehn-icon-pencil\n class=\"h3\"\n aria-hidden=\"true\"\n [title]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></foehn-icon-pencil>\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></span>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"!(isConnectedCyber | async)\">\n <ng-container\n *ngIf=\"\n currentInfoReprise | async as currentInfo;\n else noCurrentInfo\n \"\n >\n <div\n class=\"alert alert-info\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.current-info'\n | fromDictionary\n : {\n lastRegistration:\n (currentInfo.lastUpdate | displayDate),\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString(),\n plural: getPluralMarker(\n etapeInfo.draftDemRetentionDaysPublic\n )\n }\n \"\n ></div>\n\n <div\n class=\"alert alert-info\"\n *ngIf=\"mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.info.sent'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n recoveryMobile: currentInfo.mobile,\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString(),\n plural: getPluralMarker(\n etapeInfo.draftDemRetentionDaysPublic\n )\n }\n \"\n ></div>\n </ng-container>\n\n <foehn-form *ngIf=\"!mailSent\" [shouldDisplayAlertSummary]=\"false\">\n <foehn-input-email\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.email.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.email.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.email\"\n name=\"email\"\n [required]=\"true\"\n ></foehn-input-email>\n\n <foehn-input-phone\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.mobile.label'\n | fromDictionary\n \"\n [acceptInternational]=\"true\"\n [acceptMobilePhone]=\"true\"\n [acceptPhone]=\"false\"\n [(model)]=\"model.mobile\"\n name=\"mobile\"\n [required]=\"true\"\n ></foehn-input-phone>\n\n <foehn-input-text\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.referenceInterne\"\n name=\"referenceInterne\"\n [required]=\"false\"\n ></foehn-input-text>\n </foehn-form>\n </ng-container>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-md-flex\">\n <div class=\"ms-md-auto me-md-2 mb-2 mt-2\">\n <button\n id=\"continueLaterModalCancelButton\"\n type=\"button\"\n (click)=\"close()\"\n class=\"btn btn-secondary w-100\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.cancel.button'\n | fromDictionary\n \"\n ></button>\n </div>\n <div\n *ngIf=\"!(isConnectedCyber | async)\"\n class=\"ms-md-0 me-md-2 mb-2 mt-2\"\n >\n <button\n id=\"continueLaterModalSaveButton\"\n type=\"submit\"\n (click)=\"sendAndClose()\"\n class=\"btn btn-success w-100\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.save.button'\n | fromDictionary\n \"\n ></button>\n </div>\n </div>\n </div>\n</foehn-modal>\n\n<ng-template #noCurrentInfo>\n <div\n class=\"alert alert-info\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.not-registered.info'\n | fromDictionary\n : {\n draftDemRetentionDaysPublic: (\n currentEtapeInfo | async\n ).draftDemRetentionDaysPublic?.toString(),\n plural: getPluralMarker(\n (currentEtapeInfo | async)\n .draftDemRetentionDaysPublic\n )\n }\n \"\n ></div>\n</ng-template>\n", styles: [".no-text-transform{text-transform:none;cursor:pointer}:host ::ng-deep foehn-icon-pencil .svg-inline--fa{color:#4a4a4b!important;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FoehnInputTextComponent, selector: "foehn-input-text", inputs: ["numberOnly"] }, { kind: "component", type: FoehnInputEmailComponent, selector: "foehn-input-email" }, { kind: "component", type: FoehnInputPhoneComponent, selector: "foehn-input-phone", inputs: ["acceptInternational", "acceptMobilePhone", "acceptPhone"] }, { kind: "component", type: FoehnIconPencilComponent, selector: "foehn-icon-pencil" }, { kind: "component", type: FoehnFormComponent, selector: "foehn-form", inputs: ["shouldDisplayAlertSummary"] }, { kind: "component", type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "closeable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }, { kind: "pipe", type: DisplayDatePipe, name: "displayDate" }] }); }
12863
12883
  }
12864
12884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GesdemActionRecoveryRegistrationComponent, decorators: [{
12865
12885
  type: Component,
12866
- args: [{ selector: 'gesdem-action-recovery-registration', template: "<button\n type=\"button\"\n id=\"continueLaterButton\"\n class=\"btn btn-link pe-0 ps-0 no-text-transform\"\n *ngIf=\"canContinueLater | async\"\n [innerHTML]=\"modalTriggerLabel | async\"\n (click)=\"saveAndOpenModal()\"\n #modalTrigger\n></button>\n\n<ng-container *ngIf=\"currentInfoReprise | async as currentInfo\">\n <div\n class=\"small\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.current-info.preview'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n lastRegistration:\n (currentInfo.lastUpdate | displayDate)\n }\n \"\n ></div>\n</ng-container>\n\n<foehn-modal\n *ngIf=\"currentEtapeInfo | async as etapeInfo\"\n id=\"action-recovery-registration-modal\"\n [modalSize]=\"!(isConnectedCyber | async) ? 'modal-lg' : 'modal-md'\"\n [modalHeaderText]=\"\n 'gesdem-action-recovery-registration.modalHeaderText' | fromDictionary\n \"\n [isModalVisible]=\"isModalVisible\"\n (isModalVisibleChange)=\"updateVisibilityStatus($event)\"\n>\n <ng-container *ngIf=\"!!(isConnectedCyber | async)\">\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info'\n | fromDictionary\n \"\n ></span>\n\n <a href=\"/100002/demandes/search/MINE/INITIAL\">\n <foehn-icon-pencil\n class=\"h3\"\n aria-hidden=\"true\"\n [title]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></foehn-icon-pencil>\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></span>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"!(isConnectedCyber | async)\">\n <ng-container\n *ngIf=\"\n currentInfoReprise | async as currentInfo;\n else noCurrentInfo\n \"\n >\n <div\n class=\"alert alert-info\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.current-info'\n | fromDictionary\n : {\n lastRegistration:\n (currentInfo.lastUpdate | displayDate),\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString()\n }\n \"\n ></div>\n\n <div\n class=\"alert alert-info\"\n *ngIf=\"mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.info.sent'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n recoveryMobile: currentInfo.mobile,\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString()\n }\n \"\n ></div>\n </ng-container>\n\n <foehn-form *ngIf=\"!mailSent\" [shouldDisplayAlertSummary]=\"false\">\n <foehn-input-email\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.email.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.email.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.email\"\n name=\"email\"\n [required]=\"true\"\n ></foehn-input-email>\n\n <foehn-input-phone\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.mobile.label'\n | fromDictionary\n \"\n [acceptInternational]=\"true\"\n [acceptMobilePhone]=\"true\"\n [acceptPhone]=\"false\"\n [(model)]=\"model.mobile\"\n name=\"mobile\"\n [required]=\"true\"\n ></foehn-input-phone>\n\n <foehn-input-text\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.referenceInterne\"\n name=\"referenceInterne\"\n [required]=\"false\"\n ></foehn-input-text>\n </foehn-form>\n </ng-container>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-md-flex\">\n <div class=\"ms-md-auto me-md-2 mb-2 mt-2\">\n <button\n id=\"continueLaterModalCancelButton\"\n type=\"button\"\n (click)=\"close()\"\n class=\"btn btn-secondary w-100\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.cancel.button'\n | fromDictionary\n \"\n ></button>\n </div>\n <div\n *ngIf=\"!(isConnectedCyber | async)\"\n class=\"ms-md-0 me-md-2 mb-2 mt-2\"\n >\n <button\n id=\"continueLaterModalSaveButton\"\n type=\"submit\"\n (click)=\"sendAndClose()\"\n class=\"btn btn-success w-100\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.save.button'\n | fromDictionary\n \"\n ></button>\n </div>\n </div>\n </div>\n</foehn-modal>\n\n<ng-template #noCurrentInfo>\n <div\n class=\"alert alert-info\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.not-registered.info'\n | fromDictionary\n : {\n draftDemRetentionDaysPublic: (\n currentEtapeInfo | async\n ).draftDemRetentionDaysPublic?.toString()\n }\n \"\n ></div>\n</ng-template>\n", styles: [".no-text-transform{text-transform:none;cursor:pointer}:host ::ng-deep foehn-icon-pencil .svg-inline--fa{color:#4a4a4b!important;margin-right:10px}\n"] }]
12867
- }], ctorParameters: () => [{ type: GesdemActionRecoveryService }, { type: ValidationHandlerService }, { type: FoehnPageService }, { type: GesdemEventService }, { type: GesdemHandlerService }, { type: ApplicationInfoService }, { type: SessionInfo }, { type: i1$1.Router }, { type: SdkEventsLoggerService }], propDecorators: { dispatchFormErrors: [{
12886
+ args: [{ selector: 'gesdem-action-recovery-registration', template: "<button\n type=\"button\"\n id=\"continueLaterButton\"\n class=\"btn btn-link pe-0 ps-0 no-text-transform\"\n *ngIf=\"canContinueLater | async\"\n [innerHTML]=\"modalTriggerLabel | async\"\n (click)=\"saveAndOpenModal()\"\n #modalTrigger\n></button>\n\n<ng-container *ngIf=\"currentInfoReprise | async as currentInfo\">\n <div\n class=\"small\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.current-info.preview'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n lastRegistration:\n (currentInfo.lastUpdate | displayDate)\n }\n \"\n ></div>\n</ng-container>\n\n<foehn-modal\n *ngIf=\"currentEtapeInfo | async as etapeInfo\"\n id=\"action-recovery-registration-modal\"\n [modalSize]=\"!(isConnectedCyber | async) ? 'modal-lg' : 'modal-md'\"\n [modalHeaderText]=\"\n 'gesdem-action-recovery-registration.modalHeaderText' | fromDictionary\n \"\n [isModalVisible]=\"isModalVisible\"\n (isModalVisibleChange)=\"updateVisibilityStatus($event)\"\n>\n <ng-container *ngIf=\"!!(isConnectedCyber | async)\">\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info'\n | fromDictionary\n \"\n ></span>\n\n <a href=\"/100002/demandes/search/MINE/INITIAL\">\n <foehn-icon-pencil\n class=\"h3\"\n aria-hidden=\"true\"\n [title]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></foehn-icon-pencil>\n <span\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.connected.info.draft-link-text'\n | fromDictionary\n \"\n ></span>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"!(isConnectedCyber | async)\">\n <ng-container\n *ngIf=\"\n currentInfoReprise | async as currentInfo;\n else noCurrentInfo\n \"\n >\n <div\n class=\"alert alert-info\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.current-info'\n | fromDictionary\n : {\n lastRegistration:\n (currentInfo.lastUpdate | displayDate),\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString(),\n plural: getPluralMarker(\n etapeInfo.draftDemRetentionDaysPublic\n )\n }\n \"\n ></div>\n\n <div\n class=\"alert alert-info\"\n *ngIf=\"mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.info.sent'\n | fromDictionary\n : {\n recoveryMail: currentInfo.email,\n recoveryMobile: currentInfo.mobile,\n draftDemRetentionDaysPublic:\n etapeInfo.draftDemRetentionDaysPublic?.toString(),\n plural: getPluralMarker(\n etapeInfo.draftDemRetentionDaysPublic\n )\n }\n \"\n ></div>\n </ng-container>\n\n <foehn-form *ngIf=\"!mailSent\" [shouldDisplayAlertSummary]=\"false\">\n <foehn-input-email\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.email.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.email.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.email\"\n name=\"email\"\n [required]=\"true\"\n ></foehn-input-email>\n\n <foehn-input-phone\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.mobile.label'\n | fromDictionary\n \"\n [acceptInternational]=\"true\"\n [acceptMobilePhone]=\"true\"\n [acceptPhone]=\"false\"\n [(model)]=\"model.mobile\"\n name=\"mobile\"\n [required]=\"true\"\n ></foehn-input-phone>\n\n <foehn-input-text\n [label]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.label'\n | fromDictionary\n \"\n [helpText]=\"\n 'gesdem-action-recovery-registration.not-connected.reference-interne.help-text'\n | fromDictionary\n \"\n [(model)]=\"model.referenceInterne\"\n name=\"referenceInterne\"\n [required]=\"false\"\n ></foehn-input-text>\n </foehn-form>\n </ng-container>\n\n <div modal-footer class=\"w-100\">\n <div class=\"d-md-flex\">\n <div class=\"ms-md-auto me-md-2 mb-2 mt-2\">\n <button\n id=\"continueLaterModalCancelButton\"\n type=\"button\"\n (click)=\"close()\"\n class=\"btn btn-secondary w-100\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.cancel.button'\n | fromDictionary\n \"\n ></button>\n </div>\n <div\n *ngIf=\"!(isConnectedCyber | async)\"\n class=\"ms-md-0 me-md-2 mb-2 mt-2\"\n >\n <button\n id=\"continueLaterModalSaveButton\"\n type=\"submit\"\n (click)=\"sendAndClose()\"\n class=\"btn btn-success w-100\"\n *ngIf=\"!mailSent\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.save.button'\n | fromDictionary\n \"\n ></button>\n </div>\n </div>\n </div>\n</foehn-modal>\n\n<ng-template #noCurrentInfo>\n <div\n class=\"alert alert-info\"\n [innerHTML]=\"\n 'gesdem-action-recovery-registration.not-connected.not-registered.info'\n | fromDictionary\n : {\n draftDemRetentionDaysPublic: (\n currentEtapeInfo | async\n ).draftDemRetentionDaysPublic?.toString(),\n plural: getPluralMarker(\n (currentEtapeInfo | async)\n .draftDemRetentionDaysPublic\n )\n }\n \"\n ></div>\n</ng-template>\n", styles: [".no-text-transform{text-transform:none;cursor:pointer}:host ::ng-deep foehn-icon-pencil .svg-inline--fa{color:#4a4a4b!important;margin-right:10px}\n"] }]
12887
+ }], ctorParameters: () => [{ type: GesdemActionRecoveryService }, { type: ValidationHandlerService }, { type: FoehnPageService }, { type: GesdemEventService }, { type: GesdemHandlerService }, { type: ApplicationInfoService }, { type: SessionInfo }, { type: i1$1.Router }, { type: SdkEventsLoggerService }, { type: SdkDictionaryService }], propDecorators: { dispatchFormErrors: [{
12868
12888
  type: Input
12869
12889
  }], continueLaterLabel: [{
12870
12890
  type: Input