@tsi-developpement/tsi-shared-ui 1.8.11 → 1.8.13

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.
Files changed (22) hide show
  1. package/esm2022/lib/end-points/endpoints.mjs +2 -2
  2. package/esm2022/lib/end-points/user-identity-endpoints.mjs +5 -1
  3. package/esm2022/lib/guards/admin.guard.mjs +2 -2
  4. package/esm2022/lib/models/layout/channel-validation-result.mjs +2 -0
  5. package/esm2022/lib/services/UserIdentity/identity-platform-authentication.service.mjs +16 -1
  6. package/esm2022/lib/shared.module.mjs +8 -4
  7. package/esm2022/lib/tsi-components/index.mjs +2 -1
  8. package/esm2022/lib/tsi-components/mfa-components/verification-code/verification-code.component.mjs +22 -9
  9. package/esm2022/lib/tsi-components/mfa-components/verification-code-inscription/verification-code-inscription.component.mjs +175 -0
  10. package/esm2022/lib/tsi-components/mfa-components/verification-code-sms/verification-code-sms.component.mjs +19 -6
  11. package/esm2022/lib/tsi-components/reporting/reporting.component.mjs +4 -1
  12. package/fesm2022/tsi-developpement-tsi-shared-ui.mjs +237 -19
  13. package/fesm2022/tsi-developpement-tsi-shared-ui.mjs.map +1 -1
  14. package/lib/end-points/user-identity-endpoints.d.ts +4 -0
  15. package/lib/models/layout/channel-validation-result.d.ts +5 -0
  16. package/lib/services/UserIdentity/identity-platform-authentication.service.d.ts +4 -1
  17. package/lib/shared.module.d.ts +56 -55
  18. package/lib/tsi-components/index.d.ts +1 -0
  19. package/lib/tsi-components/mfa-components/verification-code/verification-code.component.d.ts +1 -0
  20. package/lib/tsi-components/mfa-components/verification-code-inscription/verification-code-inscription.component.d.ts +36 -0
  21. package/lib/tsi-components/mfa-components/verification-code-sms/verification-code-sms.component.d.ts +1 -0
  22. package/package.json +1 -1
@@ -403,7 +403,7 @@ const AdministrationEndpoints = {
403
403
  // FormulaireData
404
404
  getFormulaireDataColumnsDefinition: (id) => `${Segment.base}/${AdministrationSegments.formulaireData}/${AdministrationSegments.columnsDefinition}/${id}`,
405
405
  // Entity Formulaires
406
- getEntityFormulairesColumnsDefinition: (businessClass) => `${Segment.base}/${AdministrationSegments.formulaireData}/${AdministrationSegments.columnsDefinition}/${businessClass}`
406
+ getEntityFormulairesColumnsDefinition: (businessClass) => `${Segment.base}/${AdministrationSegments.formulaireData}/${AdministrationSegments.columnsDefinition}/${businessClass}`,
407
407
  };
408
408
 
409
409
  const ImportExportSegments = {
@@ -529,6 +529,8 @@ const IdentityPlatformSegments = {
529
529
  sendVerificationUtilisateurByMFALogin: 'SendVerificationUtilisateurByMFALogin',
530
530
  checkIsExisteMFAAsync: 'CheckIsExisteMFAAsync',
531
531
  checkBothChannelsValid: 'CheckBothChannelsValid',
532
+ sendVerificationUtilisateurByMFAResetPassword: 'SendVerificationUtilisateurByMFAResetPassword',
533
+ resendVerificationCodeEmail: "ResendVerificationCodeEmail",
532
534
  };
533
535
  const IdentityPlatformEndpoints = {
534
536
  getAllUsersMinimal: () => `${Segment.identityPlatformUrlApi}/${IdentityPlatformSegments.users}/${IdentityPlatformSegments.allMinimal}`,
@@ -570,6 +572,8 @@ const IdentityPlatformEndpoints = {
570
572
  sendVerificationUtilisateurByMFALogin: () => `${Segment.identityPlatformUrlApi}/${IdentityPlatformSegments.authentication}/${IdentityPlatformSegments.sendVerificationUtilisateurByMFALogin}`,
571
573
  checkBothChannelsValid: () => `${Segment.identityPlatformUrlApi}/${IdentityPlatformSegments.authentication}/${IdentityPlatformSegments.checkBothChannelsValid}`,
572
574
  checkIsExisteMFAAsync: () => `${Segment.identityPlatformUrlApi}/${IdentityPlatformSegments.authentication}/${IdentityPlatformSegments.checkIsExisteMFAAsync}`,
575
+ sendVerificationUtilisateurByMFAResetPassword: () => `${Segment.identityPlatformUrlApi}/${IdentityPlatformSegments.authentication}/${IdentityPlatformSegments.sendVerificationUtilisateurByMFAResetPassword}`,
576
+ resendVerificationCodeEmail: () => `${Segment.identityPlatformUrlApi}/${IdentityPlatformSegments.authentication}/${IdentityPlatformSegments.resendVerificationCodeEmail}`,
573
577
  };
574
578
 
575
579
  /**
@@ -4085,6 +4089,13 @@ class IdentityPlatformAuthenticationService {
4085
4089
  }
4086
4090
  return this._httpClient.post(IdentityPlatformEndpoints.sendVerificationUtilisateurByMFALogin(), payload);
4087
4091
  }
4092
+ sendVerificationUtilisateurByMFAResetPassword(email, choix, mfa) {
4093
+ const payload = { email, mfa };
4094
+ if (choix !== undefined) {
4095
+ payload.choix = choix;
4096
+ }
4097
+ return this._httpClient.post(IdentityPlatformEndpoints.sendVerificationUtilisateurByMFAResetPassword(), payload);
4098
+ }
4088
4099
  checkBothChannelsValid(email) {
4089
4100
  return this._httpClient.get(IdentityPlatformEndpoints.checkBothChannelsValid(), {
4090
4101
  params: { email }
@@ -4093,6 +4104,14 @@ class IdentityPlatformAuthenticationService {
4093
4104
  checkIsExisteMFAAsync() {
4094
4105
  return this._httpClient.get(IdentityPlatformEndpoints.checkIsExisteMFAAsync());
4095
4106
  }
4107
+ /* public resendVerificationCodeEmail(email: string): Observable<any> {
4108
+ return this._httpClient.post(IdentityPlatformEndpoints.resendVerificationCodeEmail(), { email });
4109
+ } */
4110
+ resendVerificationCodeEmail(email) {
4111
+ return this._httpClient.post(IdentityPlatformEndpoints.resendVerificationCodeEmail(), JSON.stringify(email), {
4112
+ headers: { 'Content-Type': 'application/json' }
4113
+ });
4114
+ }
4096
4115
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IdentityPlatformAuthenticationService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
4097
4116
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IdentityPlatformAuthenticationService, providedIn: 'root' }); }
4098
4117
  }
@@ -11065,6 +11084,9 @@ class ReportingComponent {
11065
11084
  return this._reportingInformation;
11066
11085
  }
11067
11086
  get enableToPrintReport() {
11087
+ if (this._layoutHelperService.isDesignMode) {
11088
+ return true;
11089
+ }
11068
11090
  return !this.fromTsiForm || this._inputRegistryService.getAll().every(x => {
11069
11091
  return !x.isDirty;
11070
11092
  });
@@ -20093,9 +20115,10 @@ class VerificationCodeSmsComponent {
20093
20115
  this.isResendDisabled = false;
20094
20116
  this.resendDelay = 60;
20095
20117
  this.isSubmitting = false;
20096
- this.verificationTypeText = "";
20118
+ this.verificationTypeText = '';
20097
20119
  this.email = this.config.data.email;
20098
20120
  this.choix = this.config.data.choix;
20121
+ this.isMFAEnabled = this.config.data.isMFAEnabled;
20099
20122
  }
20100
20123
  onInput(event, index) {
20101
20124
  const input = event.target;
@@ -20118,12 +20141,24 @@ class VerificationCodeSmsComponent {
20118
20141
  }
20119
20142
  }
20120
20143
  ngOnInit() {
20121
- if (this.choix === MFAEnum.Email) {
20122
- this.verificationTypeText = "choose_choice_mfa_Email";
20144
+ if (this.choix === null) {
20145
+ if (this.isMFAEnabled === MFAEnum.Email) {
20146
+ this.verificationTypeText = "Email";
20147
+ }
20148
+ else if (this.isMFAEnabled === MFAEnum.SMS) {
20149
+ this.verificationTypeText = "SMS";
20150
+ }
20123
20151
  }
20124
- else if (this.choix === MFAEnum.SMS) {
20125
- this.verificationTypeText = "choose_choice_mfa_SMS";
20152
+ else {
20153
+ if (this.choix === MFAEnum.Email) {
20154
+ this.verificationTypeText = "Email";
20155
+ }
20156
+ else if (this.choix === MFAEnum.SMS) {
20157
+ this.verificationTypeText = "SMS";
20158
+ }
20126
20159
  }
20160
+ console.log("2 choixxx", this.choix, ":::::", this.verificationTypeText);
20161
+ console.log("2 isMFAEnabled", this.isMFAEnabled, ":::::", this.verificationTypeText);
20127
20162
  this.envoyerCodeSms();
20128
20163
  }
20129
20164
  envoyerCodeSms() {
@@ -20241,9 +20276,10 @@ class VerificationCodeComponent {
20241
20276
  this.isResendDisabled = false;
20242
20277
  this.resendDelay = 60;
20243
20278
  this.isSubmitting = false;
20244
- this.verificationTypeText = "";
20279
+ this.verificationTypeText = '';
20245
20280
  this.email = this.config.data.email;
20246
20281
  this.choix = this.config.data.choix;
20282
+ this.isMFAEnabled = this.config.data.isMFAEnabled;
20247
20283
  }
20248
20284
  onInput(event, index) {
20249
20285
  const input = event.target;
@@ -20266,20 +20302,31 @@ class VerificationCodeComponent {
20266
20302
  }
20267
20303
  }
20268
20304
  ngOnInit() {
20269
- console.log("choixxx", this.choix);
20270
- if (this.choix === 1) {
20271
- this.verificationTypeText = "Email";
20305
+ if (this.choix === null) {
20306
+ if (this.isMFAEnabled === MFAEnum.Email) {
20307
+ this.verificationTypeText = "Email";
20308
+ }
20309
+ else if (this.isMFAEnabled === MFAEnum.SMS) {
20310
+ this.verificationTypeText = "SMS";
20311
+ }
20272
20312
  }
20273
- else if (this.choix === 2) {
20274
- this.verificationTypeText = "SMS";
20313
+ else {
20314
+ if (this.choix === MFAEnum.Email) {
20315
+ this.verificationTypeText = "Email";
20316
+ }
20317
+ else if (this.choix === MFAEnum.SMS) {
20318
+ this.verificationTypeText = "SMS";
20319
+ }
20275
20320
  }
20321
+ console.log("1 choixxx", this.choix, ":::::", this.verificationTypeText);
20322
+ console.log("1 isMFAEnabled", this.isMFAEnabled, ":::::", this.verificationTypeText);
20276
20323
  this.envoyerCodeSms();
20277
20324
  }
20278
20325
  envoyerCodeSms() {
20279
20326
  if (!this.email)
20280
20327
  return;
20281
20328
  this._identityPlatformAuthenticationService
20282
- .sendVerificationUtilisateurByMFALogin(this.email, this.choix)
20329
+ .sendVerificationUtilisateurByMFAResetPassword(this.email, this.choix)
20283
20330
  .subscribe({
20284
20331
  next: () => {
20285
20332
  this.smsResent = true;
@@ -20358,7 +20405,7 @@ class VerificationCodeComponent {
20358
20405
  event.preventDefault();
20359
20406
  if (this.isResendDisabled)
20360
20407
  return;
20361
- this._identityPlatformAuthenticationService.sendVerificationUtilisateurByMFALogin(this.email, this.choix).subscribe(() => {
20408
+ this._identityPlatformAuthenticationService.sendVerificationUtilisateurByMFAResetPassword(this.email, this.choix).subscribe(() => {
20362
20409
  this.smsResent = true;
20363
20410
  this.isResendDisabled = true;
20364
20411
  this.countdownInterval = setInterval(() => {
@@ -20628,6 +20675,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
20628
20675
  args: [{ selector: 'lib-locale-poc', template: "<div class=\"card w-10 locale-poc-container\">\r\n\r\n <h3 class=\"mb-2\">Locale Formatting POC</h3>\r\n\r\n <!-- Explanation -->\r\n <p class=\"text-700 line-height-3 mb-4\">\r\n This page is a proof-of-concept used to validate the locale integration of the UI library.\r\n It allows testers and developers to enter numeric values using the library input components\r\n and immediately verify how those values are formatted by the corresponding display components.\r\n <br /><br />\r\n The objective is to ensure that number formatting (group separators, decimal separators,\r\n currency formatting, and integer grouping) behaves correctly for the currently active locale.\r\n This page is mainly intended for QA testing and debugging during internationalization development.\r\n </p>\r\n\r\n <!-- Locale Info Table -->\r\n <div class=\"mb-4 overflow-auto\">\r\n <h4 class=\"mb-2\">Supported Locales & Format</h4>\r\n <table class=\"table-auto w-full text-sm border-collapse border border-300\">\r\n <thead>\r\n <tr class=\"bg-gray-200\">\r\n <th class=\"border border-300 p-2 text-left\">Full Label</th>\r\n <th class=\"border border-300 p-2 text-left\">Code</th>\r\n <th class=\"border border-300 p-2 text-left\">Thousands Separator</th>\r\n <th class=\"border border-300 p-2 text-left\">Decimal Separator</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr>\r\n <td>French (France)</td>\r\n <td>fr-FR</td>\r\n <td class=\"font-bold text-lg\">\u23BD (space)</td>\r\n <td class=\"font-bold text-lg\">, (comma)</td>\r\n </tr>\r\n <tr>\r\n <td>English (United Kingdom)</td>\r\n <td>en-GB</td>\r\n <td class=\"font-bold text-lg\">, (comma)</td>\r\n <td class=\"font-bold text-lg\">. (dot)</td>\r\n </tr>\r\n <tr>\r\n <td>Arabic (Tunisia)</td>\r\n <td>ar-TN</td>\r\n <td class=\"font-bold text-lg\">. (dot)</td>\r\n <td class=\"font-bold text-lg\">, (comma)</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <!-- Input / Display Table -->\r\n <p-table [value]=\"[{}]\" styleClass=\"p-datatable-sm\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th style=\"width: 25%\">Field</th>\r\n <th style=\"width: 35%\">Input Component</th>\r\n <th style=\"width: 40%\">Display Component</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\">\r\n\r\n <tr>\r\n <td>Currency (Societe)</td>\r\n <td>\r\n <Tsi-Currency-Societe-Input [(inputField)]=\"currencySociete\" />\r\n </td>\r\n <td>\r\n <Tsi-Currency-Societe-Display [inputData]=\"currencySociete\" />\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td>Currency (Other)</td>\r\n <td>\r\n <Tsi-Currency-Other-Input [(inputField)]=\"currencyOther\" currency=\"EUR\" />\r\n </td>\r\n <td>\r\n <Tsi-Currency-Other-Display [inputData]=\"currencyOther\" currency=\"EUR\" />\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td>Decimal</td>\r\n <td>\r\n <Tsi-Decimal-Input [(inputField)]=\"decimal\" [numOfDecimal]=\"3\" />\r\n </td>\r\n <td>\r\n <Tsi-Decimal-Display [inputData]=\"decimal\" [numOfDecimal]=\"3\" />\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td>Rate</td>\r\n <td>\r\n <Tsi-Rate-Input [(inputField)]=\"rate\" [numOfDecimal]=\"3\" [isFraction]=\"false\" />\r\n </td>\r\n <td>\r\n <Tsi-Rate-Display [inputData]=\"rate\" [numOfDecimal]=\"3\" [isFraction]=\"false\" />\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td>Integer</td>\r\n <td>\r\n <Tsi-Integer [(inputField)]=\"integer\" />\r\n </td>\r\n <td>\r\n <Tsi-Integer-Display [inputData]=\"integer\" />\r\n </td>\r\n </tr>\r\n\r\n </ng-template>\r\n\r\n </p-table>\r\n\r\n</div>", styles: [".locale-poc-container{padding:1rem!important}\n"] }]
20629
20676
  }] });
20630
20677
 
20678
+ class VerificationCodeInscriptionComponent {
20679
+ constructor(dialogRef, config, _identityPlatformAuthenticationService, _errorResponseManagerService) {
20680
+ this.dialogRef = dialogRef;
20681
+ this.config = config;
20682
+ this._identityPlatformAuthenticationService = _identityPlatformAuthenticationService;
20683
+ this._errorResponseManagerService = _errorResponseManagerService;
20684
+ this.codeEntered = new EventEmitter();
20685
+ this.code = new Array(6).fill('');
20686
+ this.showChannelChoice = false;
20687
+ this.smsResent = false;
20688
+ this.isResendDisabled = false;
20689
+ this.resendDelay = 60;
20690
+ this.isSubmitting = false;
20691
+ this.verificationTypeText = '';
20692
+ this.email = this.config.data.email;
20693
+ this.choix = this.config.data.choix;
20694
+ this.isMFAEnabled = this.config.data.isMFAEnabled;
20695
+ }
20696
+ onInput(event, index) {
20697
+ const input = event.target;
20698
+ let value = input.value.replace(/[^0-9]/g, '');
20699
+ if (!value) {
20700
+ this.code[index] = '';
20701
+ return;
20702
+ }
20703
+ const newValue = value.charAt(0);
20704
+ if (this.code[index] === newValue)
20705
+ return;
20706
+ this.code[index] = newValue;
20707
+ input.value = newValue;
20708
+ if (index < 5) {
20709
+ setTimeout(() => {
20710
+ const nextInput = this.codeInputs.toArray()[index + 1].nativeElement;
20711
+ nextInput.focus();
20712
+ nextInput.value = '';
20713
+ }, 10);
20714
+ }
20715
+ }
20716
+ ngOnInit() {
20717
+ if (this.choix === null) {
20718
+ if (this.isMFAEnabled === MFAEnum.Email) {
20719
+ this.verificationTypeText = "Email";
20720
+ }
20721
+ else if (this.isMFAEnabled === MFAEnum.SMS) {
20722
+ this.verificationTypeText = "SMS";
20723
+ }
20724
+ }
20725
+ else {
20726
+ if (this.choix === MFAEnum.Email) {
20727
+ this.verificationTypeText = "Email";
20728
+ }
20729
+ else if (this.choix === MFAEnum.SMS) {
20730
+ this.verificationTypeText = "SMS";
20731
+ }
20732
+ }
20733
+ console.log("1 choixxx", this.choix, ":::::", this.verificationTypeText);
20734
+ console.log("1 isMFAEnabled", this.isMFAEnabled, ":::::", this.verificationTypeText);
20735
+ this.envoyerCodeSms();
20736
+ }
20737
+ envoyerCodeSms() {
20738
+ if (!this.email)
20739
+ return;
20740
+ this._identityPlatformAuthenticationService
20741
+ .resendVerificationCodeEmail(this.email)
20742
+ .subscribe({
20743
+ next: () => {
20744
+ this.smsResent = true;
20745
+ this.isResendDisabled = true;
20746
+ this.lancerCompteRebours();
20747
+ },
20748
+ error: (response) => {
20749
+ this._errorResponseManagerService.showErrorMessage(response);
20750
+ }
20751
+ });
20752
+ }
20753
+ lancerCompteRebours() {
20754
+ this.countdownInterval = setInterval(() => {
20755
+ this.resendDelay--;
20756
+ if (this.resendDelay <= 0) {
20757
+ clearInterval(this.countdownInterval);
20758
+ this.isResendDisabled = false;
20759
+ this.resendDelay = 30;
20760
+ }
20761
+ }, 1000);
20762
+ }
20763
+ onKeyDown(event, index) {
20764
+ const input = event.target;
20765
+ if (event.key === 'Backspace' && !input.value && index > 0) {
20766
+ event.preventDefault();
20767
+ this.code[index] = '';
20768
+ const prevInput = this.codeInputs.toArray()[index - 1].nativeElement;
20769
+ prevInput.focus();
20770
+ prevInput.value = '';
20771
+ }
20772
+ }
20773
+ onPaste(event) {
20774
+ event.preventDefault();
20775
+ const pasteData = event.clipboardData?.getData('text/plain').replace(/[^0-9]/g, '');
20776
+ if (pasteData && pasteData.length === 6) {
20777
+ this.handlePastedCode(pasteData);
20778
+ }
20779
+ }
20780
+ handlePastedCode(pastedCode) {
20781
+ for (let i = 0; i < 6; i++) {
20782
+ this.code[i] = pastedCode.charAt(i);
20783
+ this.codeInputs.toArray()[i].nativeElement.value = this.code[i];
20784
+ }
20785
+ setTimeout(() => this.codeInputs.last.nativeElement.focus(), 10);
20786
+ }
20787
+ submitCode() {
20788
+ const finalCode = this.code.join('');
20789
+ if (finalCode.length !== 6) {
20790
+ this._errorResponseManagerService.showErrorMessagesFromArrayString(["Veuillez entrer un code valide de 6 chiffres."]);
20791
+ return;
20792
+ }
20793
+ this.isSubmitting = true;
20794
+ this._identityPlatformAuthenticationService
20795
+ .verifySmsCode(this.email, finalCode)
20796
+ .subscribe({
20797
+ next: (res) => {
20798
+ this.isSubmitting = false;
20799
+ if (!res?.error) {
20800
+ this.codeEntered.emit(finalCode);
20801
+ this.dialogRef.close(finalCode);
20802
+ }
20803
+ else {
20804
+ this._errorResponseManagerService.showErrorMessagesFromArrayString(['Code invalide.']);
20805
+ this.code = new Array(6).fill('');
20806
+ setTimeout(() => this.codeInputs.first?.nativeElement.focus(), 0);
20807
+ }
20808
+ },
20809
+ error: (response) => {
20810
+ this.isSubmitting = false;
20811
+ this._errorResponseManagerService.showErrorMessage(response);
20812
+ return;
20813
+ }
20814
+ });
20815
+ }
20816
+ resendVerificationSms(event) {
20817
+ event.preventDefault();
20818
+ if (this.isResendDisabled)
20819
+ return;
20820
+ this._identityPlatformAuthenticationService.resendVerificationCodeEmail(this.email).subscribe(() => {
20821
+ this.smsResent = true;
20822
+ this.isResendDisabled = true;
20823
+ this.countdownInterval = setInterval(() => {
20824
+ this.resendDelay--;
20825
+ if (this.resendDelay <= 0) {
20826
+ clearInterval(this.countdownInterval);
20827
+ this.isResendDisabled = false;
20828
+ this.resendDelay = 30;
20829
+ }
20830
+ }, 1000);
20831
+ });
20832
+ }
20833
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VerificationCodeInscriptionComponent, deps: [{ token: i1$3.DynamicDialogRef }, { token: i1$3.DynamicDialogConfig }, { token: IdentityPlatformAuthenticationService }, { token: ErrorResponseManagerService }], target: i0.ɵɵFactoryTarget.Component }); }
20834
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: VerificationCodeInscriptionComponent, selector: "app-verification-code-inscription", outputs: { codeEntered: "codeEntered" }, viewQueries: [{ propertyName: "codeInputs", predicate: ["codeInput"], descendants: true }], ngImport: i0, template: "<div class=\"verification-container\">\r\n <h2>Entrez le code de v\u00E9rification {{ verificationTypeText }}</h2>\r\n <p>Un code a \u00E9t\u00E9 envoy\u00E9 \u00E0 votre {{ verificationTypeText | lowercase }}.</p>\r\n\r\n <div class=\"code-inputs\">\r\n <input *ngFor=\"let digit of code; let i = index\" #codeInput type=\"text\" maxlength=\"1\" pattern=\"[0-9]*\"\r\n inputmode=\"numeric\" [value]=\"code[i]\" (input)=\"onInput($event, i)\" \r\n (keydown)=\"onKeyDown($event, i)\" (paste)=\"onPaste($event)\">\r\n </div>\r\n\r\n <button (click)=\"submitCode()\" [disabled]=\"isSubmitting\">Valider</button>\r\n <div class=\"resend-link\">\r\n <p *ngIf=\"!smsResent\">\r\n Vous n'avez pas re\u00E7u le code ?\r\n <a href=\"#\" (click)=\"resendVerificationSms($event)\" [class.disabled]=\"isResendDisabled\">\r\n Renvoyer le code {{ verificationTypeText }}\r\n <span *ngIf=\"isResendDisabled\">({{resendDelay}}s)</span>\r\n </a>\r\n </p>\r\n\r\n <p *ngIf=\"smsResent\" class=\"success-message\">\r\n {{ verificationTypeText }} renvoy\u00E9 avec succ\u00E8s !\r\n <a href=\"#\" (click)=\"resendVerificationSms($event)\" *ngIf=\"!isResendDisabled\">\r\n Renvoyer \u00E0 nouveau\r\n </a>\r\n <span *ngIf=\"isResendDisabled\">Attendez {{resendDelay}} secondes</span>\r\n </p>\r\n </div>\r\n</div>\r\n\r\n", styles: [".verification-container{text-align:center;padding:20px}.code-inputs{display:flex;justify-content:center;gap:10px;margin:20px 0}.code-inputs input{width:40px;height:40px;text-align:center;font-size:20px;border:2px solid #ccc;border-radius:5px}button{background-color:#007bff;color:#fff;border:none;padding:10px 20px;cursor:pointer;font-size:16px;border-radius:5px}button:hover{background-color:#0056b3}.resend-link{margin-top:15px;text-align:center;font-size:14px}.resend-link a{color:#007bff;text-decoration:none;cursor:pointer}.resend-link a:hover:not(.disabled){text-decoration:underline}.resend-link a.disabled{color:#6c757d;cursor:not-allowed;opacity:.7}.success-message{color:#28a745}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.LowerCasePipe, name: "lowercase" }] }); }
20835
+ }
20836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VerificationCodeInscriptionComponent, decorators: [{
20837
+ type: Component,
20838
+ args: [{ selector: 'app-verification-code-inscription', template: "<div class=\"verification-container\">\r\n <h2>Entrez le code de v\u00E9rification {{ verificationTypeText }}</h2>\r\n <p>Un code a \u00E9t\u00E9 envoy\u00E9 \u00E0 votre {{ verificationTypeText | lowercase }}.</p>\r\n\r\n <div class=\"code-inputs\">\r\n <input *ngFor=\"let digit of code; let i = index\" #codeInput type=\"text\" maxlength=\"1\" pattern=\"[0-9]*\"\r\n inputmode=\"numeric\" [value]=\"code[i]\" (input)=\"onInput($event, i)\" \r\n (keydown)=\"onKeyDown($event, i)\" (paste)=\"onPaste($event)\">\r\n </div>\r\n\r\n <button (click)=\"submitCode()\" [disabled]=\"isSubmitting\">Valider</button>\r\n <div class=\"resend-link\">\r\n <p *ngIf=\"!smsResent\">\r\n Vous n'avez pas re\u00E7u le code ?\r\n <a href=\"#\" (click)=\"resendVerificationSms($event)\" [class.disabled]=\"isResendDisabled\">\r\n Renvoyer le code {{ verificationTypeText }}\r\n <span *ngIf=\"isResendDisabled\">({{resendDelay}}s)</span>\r\n </a>\r\n </p>\r\n\r\n <p *ngIf=\"smsResent\" class=\"success-message\">\r\n {{ verificationTypeText }} renvoy\u00E9 avec succ\u00E8s !\r\n <a href=\"#\" (click)=\"resendVerificationSms($event)\" *ngIf=\"!isResendDisabled\">\r\n Renvoyer \u00E0 nouveau\r\n </a>\r\n <span *ngIf=\"isResendDisabled\">Attendez {{resendDelay}} secondes</span>\r\n </p>\r\n </div>\r\n</div>\r\n\r\n", styles: [".verification-container{text-align:center;padding:20px}.code-inputs{display:flex;justify-content:center;gap:10px;margin:20px 0}.code-inputs input{width:40px;height:40px;text-align:center;font-size:20px;border:2px solid #ccc;border-radius:5px}button{background-color:#007bff;color:#fff;border:none;padding:10px 20px;cursor:pointer;font-size:16px;border-radius:5px}button:hover{background-color:#0056b3}.resend-link{margin-top:15px;text-align:center;font-size:14px}.resend-link a{color:#007bff;text-decoration:none;cursor:pointer}.resend-link a:hover:not(.disabled){text-decoration:underline}.resend-link a.disabled{color:#6c757d;cursor:not-allowed;opacity:.7}.success-message{color:#28a745}\n"] }]
20839
+ }], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }, { type: i1$3.DynamicDialogConfig }, { type: IdentityPlatformAuthenticationService }, { type: ErrorResponseManagerService }], propDecorators: { codeEntered: [{
20840
+ type: Output
20841
+ }], codeInputs: [{
20842
+ type: ViewChildren,
20843
+ args: ['codeInput']
20844
+ }] } });
20845
+
20631
20846
  class AdminGuard {
20632
20847
  constructor(_identityManagerService, _router, _authService) {
20633
20848
  this._identityManagerService = _identityManagerService;
@@ -20641,7 +20856,7 @@ class AdminGuard {
20641
20856
  }
20642
20857
  else {
20643
20858
  const user = this._identityManagerService.parseMyAuthToken();
20644
- if (user && user.isSaasAdmin === "True") {
20859
+ if (user && (user.isSaasAdmin === "True" || user.isTenantAdmin === "True")) {
20645
20860
  return true;
20646
20861
  }
20647
20862
  this._router.navigate(['/app/unauthorized']);
@@ -20873,7 +21088,8 @@ const _tsiComponents = [
20873
21088
  DynamicFormListComponent,
20874
21089
  CreateOrEditDynamicFormComponent,
20875
21090
  TsiKanbanWorkflowEtatComponent,
20876
- LocalePocComponent
21091
+ LocalePocComponent,
21092
+ VerificationCodeInscriptionComponent,
20877
21093
  ];
20878
21094
  const _tsiPipes = [
20879
21095
  LocalizePipe,
@@ -20995,7 +21211,8 @@ class SharedModule {
20995
21211
  DynamicFormListComponent,
20996
21212
  CreateOrEditDynamicFormComponent,
20997
21213
  TsiKanbanWorkflowEtatComponent,
20998
- LocalePocComponent, AdDirective,
21214
+ LocalePocComponent,
21215
+ VerificationCodeInscriptionComponent, AdDirective,
20999
21216
  BusyDirective,
21000
21217
  ModuleMainParameterDirective,
21001
21218
  ValidationDirective,
@@ -21179,7 +21396,8 @@ class SharedModule {
21179
21396
  DynamicFormListComponent,
21180
21397
  CreateOrEditDynamicFormComponent,
21181
21398
  TsiKanbanWorkflowEtatComponent,
21182
- LocalePocComponent, AdDirective,
21399
+ LocalePocComponent,
21400
+ VerificationCodeInscriptionComponent, AdDirective,
21183
21401
  BusyDirective,
21184
21402
  ModuleMainParameterDirective,
21185
21403
  ValidationDirective,
@@ -21298,5 +21516,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
21298
21516
  * Generated bundle index. Do not edit.
21299
21517
  */
21300
21518
 
21301
- export { AdDirective, AdItem, AddReportPopupComponent, AdminGuard, AdminRoutes, AdministrationEndpoints, AdministrationSegments, AdvancedSearchComponentService, AlertImportMessageComponent, ApiDateTimeFormat, ApiExplorerService, AppBaseComponent, AppRoutes, AppSettingsService, AuthenticationGuard, AuthorizationEndpoints, AuthorizationSegments, AuthorizationService, AuthorizationTokenMapper, AutoComplete, AutoSelectDirective, BsModalRef, BusyDirective, ButtonType, CSSSizeProperty, CSSUnits, ChooseChoiceMfaMethodComponent, ClaimTypes, CodeFormat, ComboStatusModel, Component_Modes, ContextMenuComponent, CreateOrEditDynamicFormComponent, CreateOrEditEntityInformationsComponent, CreateOrEditModeleImportComponent, CrudBaseService, CurrentUser, CurrentUserService, CutLabelPipe, DateFormat, DateFormatDisplay, DateHelper, DateHelperService, DatePickerDateFormat, DatePickerDateTimeFormat, DatePickerTimeFormat, DateTimeFormat, DateTimeFormatDisplay, DecimalFormat, DefaultSocieteDevise, Devise, DialogDataService, DisplayNestedPropComponent, DisplayTypeColors, DisplayTypes, DynamicFormListComponent, EditableGridComponent, EndpointInfos, EntityColumnDetailResponse, EntityConfigurationService, EntityInfo, EntityInfoWithRelations, EntityRelation, EntityStatusService, EntityValidationsService, ErrorResponseManagerService, ExecuteImportRequest, ExportExcelHelper, Fichier, FilterByExistingValues, FilterByProprety, FilterHelper, FilterOperatorType, FilterOperatorTypeDescriptions, FormValidationError, FormulaService, GenericFormHelper, GenericValidationStateService, GetWorkflowInstanceInformationRequest, GridColumnStyleHelper, GridSelectionMode, GridSortMode, Guid, Helpers, HtmlTemplateGeneratorService, HtmlTemplates, HttpMethodType, IdentityManagerService, IdentityPlatformAuthenticationService, IdentityPlatformEndpoints, IdentityPlatformSegments, IdentityRoutes, ImportExportEndPoints, ImportExportSegments, ImportResult, InputRegistryService, InputTypes, JournalisationApplication, JournalisationApplicationService, KeyboardShortcutService, LanguageInformations, LanguageLocale, LanguagesCodes, LayoutHelperService, LayoutOrientation, LocaleCode, LocalePocComponent, LocalizationKeys, LocalizePipe, LogoutPopupComponent, MFAEnum, MailingService, ManageImportExportComponent, ManageReportingComponent, ManageReportingRoutes, MappingHelper, ModalComponent, ModalLabelPipe, ModalLoaderComponent, ModalSizeEnum, ModeleImportCreateRequest, ModeleImportDetail, ModeleImportService, Modes, ModuleCodeService, ModuleMainParameterDirective, ModuleMainParameterService, NoteService, NumericDisplayTypes, ObjectHelper, PagedResultRequestBase, PermissionGuard, PresentationDesignerDirective, PresentationDesignerDirectiveBase, PresentationDesignerService, PresentationSetting, PresentationSettingDetail, PresentationSettingService, ProceedLoginRequest, ProgressBarHelperService, ProgressBarResponse, ProgressBarService, ProgressBarUpdateRequest, RecordInfoPopupService, ReportingComponent, ReportingEndpoints, ReportingSegments, ReportingService, RequestTrackerInterceptor, RequestTrackerService, Segment, Segments, SeparateurDecimal, SeparateurMillier, SharedComponentReferenceHelper, SharedModule, SharedUiTsiProviders, ShortenPipe, SpinnerComponent, Status, StatusHistory, StatusHistoryService, StorageManager, SubscriptionResult, TS_ValidDateFormat, TS_ValidDateTimeFormat, TS_ValidTimeFormat, TextBoxType, Themes, TimeFormat, TimeOnly, TimeZoneLocale, ToNumberPipe, TooltipPosition, TranslationService, TsiBaseComponent, TsiBsModalService, TsiBubbleInfoComponent, TsiButtonComponent, TsiCalenderComponent, TsiCard, TsiCardComponent, TsiCardListComponent, TsiChangePasswordComponent, TsiCheckboxComponent, TsiCheckboxDisplayComponent, TsiCodeGeneratorComponent, TsiComponentEnum, TsiComponentFinderService, TsiConfirmationService, TsiCurrencyOtherDisplayComponent, TsiCurrencyOtherInputComponent, TsiCurrencyPipe, TsiCurrencySocieteDisplayComponent, TsiCurrencySocieteInputComponent, TsiDateDisplayComponent, TsiDatePickerComponent, TsiDecimalDisplayComponent, TsiDecimalInputComponent, TsiDecimalPipe, TsiDisplayGridComponent, TsiDividerComponent, TsiErrorMessageComponent, TsiFileManagerComponent, TsiFormComponent, TsiFormComponentBaseComponent, TsiFormModalFooterComponent, TsiFormulaBoxComponent, TsiGenericCrudComponent, TsiGenericFormComponent, TsiGenericGridComponent, TsiImageDisplayComponent, TsiInfoMessageComponent, TsiInputBase, TsiIntegerComponent, TsiIntegerDisplayComponent, TsiKanbanComponent, TsiKanbanWorkflowEtatComponent, TsiLabelComponent, TsiLabelLegendComponent, TsiLegendComponent, TsiListBaseComponent, TsiLogEventHistoryComponent, TsiMessageService, TsiModalComponent, TsiModalFooterComponent, TsiModalHeaderComponent, TsiModalService, TsiNotesAvertirComponent, TsiNotesComponent, TsiNotesGridComponent, TsiNotificationService, TsiParagraphComponent, TsiPopupTextViewerComponent, TsiProgressBarComponent, TsiRadioButtonComponent, TsiRateDisplayComponent, TsiRateInputComponent, TsiRedirectionMessageComponent, TsiReportType, TsiSearchBoxComponent, TsiSearchComboComponent, TsiSendMailComponent, TsiSubmitButtonComponent, TsiSuccessMessageComponent, TsiTabPanelComponent, TsiTabViewComponent, TsiTemplate, TsiTenantsComponent, TsiTextAreaComponent, TsiTextBoxComponent, TsiTimeDisplayComponent, TsiTimePickerComponent, TsiTooltipComponent, TsiUploadFicheComponent, TsiUploadGridComponent, TsiViewGridComponent, TypeFichier, TypeImportEnum, TypeRegistryHelper, UpdateEntityInfoWithRelationsRequest, UserIdentityService, ValidationDirective, VerificationCodeComponent, VerificationCodeSmsComponent, WorkflowConfigurationService, WorkflowEtatForm, WorkflowEtatKanbanRequest, WorkflowEtatSuivantResponse, appProviders, authorization, dashboardConst, defaultCardHeader, distinct, executeImportResult, initSharedComponents, isNullOrEmpty, lengthValidator, locals, logoutReasonEnum, lowerFirst, menuItems, primengDateLocalAr, primengLocaleAr, queryParamNamesConst, rangeValidator, registerLibraryLocales, requestHeaderNames, rtlModeKeys, splitArrayIntoChunks, tokenQueryParamName, updateEntityWorkflowInformation, updateEntityWorkflowInstanceResponse, userLanguage, workflowEtatDetailledResponse, workflowInstanceInformationResponse };
21519
+ export { AdDirective, AdItem, AddReportPopupComponent, AdminGuard, AdminRoutes, AdministrationEndpoints, AdministrationSegments, AdvancedSearchComponentService, AlertImportMessageComponent, ApiDateTimeFormat, ApiExplorerService, AppBaseComponent, AppRoutes, AppSettingsService, AuthenticationGuard, AuthorizationEndpoints, AuthorizationSegments, AuthorizationService, AuthorizationTokenMapper, AutoComplete, AutoSelectDirective, BsModalRef, BusyDirective, ButtonType, CSSSizeProperty, CSSUnits, ChooseChoiceMfaMethodComponent, ClaimTypes, CodeFormat, ComboStatusModel, Component_Modes, ContextMenuComponent, CreateOrEditDynamicFormComponent, CreateOrEditEntityInformationsComponent, CreateOrEditModeleImportComponent, CrudBaseService, CurrentUser, CurrentUserService, CutLabelPipe, DateFormat, DateFormatDisplay, DateHelper, DateHelperService, DatePickerDateFormat, DatePickerDateTimeFormat, DatePickerTimeFormat, DateTimeFormat, DateTimeFormatDisplay, DecimalFormat, DefaultSocieteDevise, Devise, DialogDataService, DisplayNestedPropComponent, DisplayTypeColors, DisplayTypes, DynamicFormListComponent, EditableGridComponent, EndpointInfos, EntityColumnDetailResponse, EntityConfigurationService, EntityInfo, EntityInfoWithRelations, EntityRelation, EntityStatusService, EntityValidationsService, ErrorResponseManagerService, ExecuteImportRequest, ExportExcelHelper, Fichier, FilterByExistingValues, FilterByProprety, FilterHelper, FilterOperatorType, FilterOperatorTypeDescriptions, FormValidationError, FormulaService, GenericFormHelper, GenericValidationStateService, GetWorkflowInstanceInformationRequest, GridColumnStyleHelper, GridSelectionMode, GridSortMode, Guid, Helpers, HtmlTemplateGeneratorService, HtmlTemplates, HttpMethodType, IdentityManagerService, IdentityPlatformAuthenticationService, IdentityPlatformEndpoints, IdentityPlatformSegments, IdentityRoutes, ImportExportEndPoints, ImportExportSegments, ImportResult, InputRegistryService, InputTypes, JournalisationApplication, JournalisationApplicationService, KeyboardShortcutService, LanguageInformations, LanguageLocale, LanguagesCodes, LayoutHelperService, LayoutOrientation, LocaleCode, LocalePocComponent, LocalizationKeys, LocalizePipe, LogoutPopupComponent, MFAEnum, MailingService, ManageImportExportComponent, ManageReportingComponent, ManageReportingRoutes, MappingHelper, ModalComponent, ModalLabelPipe, ModalLoaderComponent, ModalSizeEnum, ModeleImportCreateRequest, ModeleImportDetail, ModeleImportService, Modes, ModuleCodeService, ModuleMainParameterDirective, ModuleMainParameterService, NoteService, NumericDisplayTypes, ObjectHelper, PagedResultRequestBase, PermissionGuard, PresentationDesignerDirective, PresentationDesignerDirectiveBase, PresentationDesignerService, PresentationSetting, PresentationSettingDetail, PresentationSettingService, ProceedLoginRequest, ProgressBarHelperService, ProgressBarResponse, ProgressBarService, ProgressBarUpdateRequest, RecordInfoPopupService, ReportingComponent, ReportingEndpoints, ReportingSegments, ReportingService, RequestTrackerInterceptor, RequestTrackerService, Segment, Segments, SeparateurDecimal, SeparateurMillier, SharedComponentReferenceHelper, SharedModule, SharedUiTsiProviders, ShortenPipe, SpinnerComponent, Status, StatusHistory, StatusHistoryService, StorageManager, SubscriptionResult, TS_ValidDateFormat, TS_ValidDateTimeFormat, TS_ValidTimeFormat, TextBoxType, Themes, TimeFormat, TimeOnly, TimeZoneLocale, ToNumberPipe, TooltipPosition, TranslationService, TsiBaseComponent, TsiBsModalService, TsiBubbleInfoComponent, TsiButtonComponent, TsiCalenderComponent, TsiCard, TsiCardComponent, TsiCardListComponent, TsiChangePasswordComponent, TsiCheckboxComponent, TsiCheckboxDisplayComponent, TsiCodeGeneratorComponent, TsiComponentEnum, TsiComponentFinderService, TsiConfirmationService, TsiCurrencyOtherDisplayComponent, TsiCurrencyOtherInputComponent, TsiCurrencyPipe, TsiCurrencySocieteDisplayComponent, TsiCurrencySocieteInputComponent, TsiDateDisplayComponent, TsiDatePickerComponent, TsiDecimalDisplayComponent, TsiDecimalInputComponent, TsiDecimalPipe, TsiDisplayGridComponent, TsiDividerComponent, TsiErrorMessageComponent, TsiFileManagerComponent, TsiFormComponent, TsiFormComponentBaseComponent, TsiFormModalFooterComponent, TsiFormulaBoxComponent, TsiGenericCrudComponent, TsiGenericFormComponent, TsiGenericGridComponent, TsiImageDisplayComponent, TsiInfoMessageComponent, TsiInputBase, TsiIntegerComponent, TsiIntegerDisplayComponent, TsiKanbanComponent, TsiKanbanWorkflowEtatComponent, TsiLabelComponent, TsiLabelLegendComponent, TsiLegendComponent, TsiListBaseComponent, TsiLogEventHistoryComponent, TsiMessageService, TsiModalComponent, TsiModalFooterComponent, TsiModalHeaderComponent, TsiModalService, TsiNotesAvertirComponent, TsiNotesComponent, TsiNotesGridComponent, TsiNotificationService, TsiParagraphComponent, TsiPopupTextViewerComponent, TsiProgressBarComponent, TsiRadioButtonComponent, TsiRateDisplayComponent, TsiRateInputComponent, TsiRedirectionMessageComponent, TsiReportType, TsiSearchBoxComponent, TsiSearchComboComponent, TsiSendMailComponent, TsiSubmitButtonComponent, TsiSuccessMessageComponent, TsiTabPanelComponent, TsiTabViewComponent, TsiTemplate, TsiTenantsComponent, TsiTextAreaComponent, TsiTextBoxComponent, TsiTimeDisplayComponent, TsiTimePickerComponent, TsiTooltipComponent, TsiUploadFicheComponent, TsiUploadGridComponent, TsiViewGridComponent, TypeFichier, TypeImportEnum, TypeRegistryHelper, UpdateEntityInfoWithRelationsRequest, UserIdentityService, ValidationDirective, VerificationCodeComponent, VerificationCodeInscriptionComponent, VerificationCodeSmsComponent, WorkflowConfigurationService, WorkflowEtatForm, WorkflowEtatKanbanRequest, WorkflowEtatSuivantResponse, appProviders, authorization, dashboardConst, defaultCardHeader, distinct, executeImportResult, initSharedComponents, isNullOrEmpty, lengthValidator, locals, logoutReasonEnum, lowerFirst, menuItems, primengDateLocalAr, primengLocaleAr, queryParamNamesConst, rangeValidator, registerLibraryLocales, requestHeaderNames, rtlModeKeys, splitArrayIntoChunks, tokenQueryParamName, updateEntityWorkflowInformation, updateEntityWorkflowInstanceResponse, userLanguage, workflowEtatDetailledResponse, workflowInstanceInformationResponse };
21302
21520
  //# sourceMappingURL=tsi-developpement-tsi-shared-ui.mjs.map