@idea-ionic/auth 6.11.0 → 6.12.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.
Files changed (35) hide show
  1. package/environment.d.ts +1 -0
  2. package/esm2020/environment.mjs +3 -2
  3. package/esm2020/public-api.mjs +4 -1
  4. package/esm2020/src/auth.module.mjs +19 -6
  5. package/esm2020/src/auth.service.mjs +167 -42
  6. package/esm2020/src/confirmPassword.page.mjs +16 -22
  7. package/esm2020/src/forgotPassword.page.mjs +17 -24
  8. package/esm2020/src/mfaChallenge.page.mjs +45 -0
  9. package/esm2020/src/newPassword.page.mjs +18 -25
  10. package/esm2020/src/resendLink.page.mjs +12 -17
  11. package/esm2020/src/setupMFA/setupMFA.module.mjs +22 -0
  12. package/esm2020/src/setupMFA/setupMFAButton.component.mjs +43 -0
  13. package/esm2020/src/setupMFA/setupMFAModal.component.mjs +77 -0
  14. package/esm2020/src/setupMFA.page.mjs +24 -0
  15. package/esm2020/src/signIn.page.mjs +36 -47
  16. package/esm2020/src/signUp.page.mjs +18 -32
  17. package/fesm2015/idea-ionic-auth.mjs +485 -211
  18. package/fesm2015/idea-ionic-auth.mjs.map +1 -1
  19. package/fesm2020/idea-ionic-auth.mjs +470 -211
  20. package/fesm2020/idea-ionic-auth.mjs.map +1 -1
  21. package/package.json +2 -1
  22. package/public-api.d.ts +3 -0
  23. package/src/auth.module.d.ts +9 -6
  24. package/src/auth.service.d.ts +54 -13
  25. package/src/confirmPassword.page.d.ts +11 -30
  26. package/src/forgotPassword.page.d.ts +6 -19
  27. package/src/mfaChallenge.page.d.ts +20 -0
  28. package/src/newPassword.page.d.ts +7 -28
  29. package/src/resendLink.page.d.ts +5 -17
  30. package/src/setupMFA/setupMFA.module.d.ts +12 -0
  31. package/src/setupMFA/setupMFAButton.component.d.ts +26 -0
  32. package/src/setupMFA/setupMFAModal.component.d.ts +20 -0
  33. package/src/setupMFA.page.d.ts +10 -0
  34. package/src/signIn.page.d.ts +9 -51
  35. package/src/signUp.page.d.ts +8 -29
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, NgModule } from '@angular/core';
2
+ import { Injectable, Component, EventEmitter, Input, Output, NgModule } from '@angular/core';
3
3
  import * as i4 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i5 from '@angular/forms';
@@ -11,9 +11,10 @@ import { RouterModule } from '@angular/router';
11
11
  import * as i2 from '@idea-ionic/common';
12
12
  import { IDEATranslationsModule } from '@idea-ionic/common';
13
13
  import { Browser } from '@capacitor/browser';
14
- import { environment } from '@env';
15
14
  import { CognitoUserPool, AuthenticationDetails, CognitoUser, CognitoUserAttribute, CognitoRefreshToken } from 'amazon-cognito-identity-js';
15
+ import { environment } from '@env';
16
16
  import { isEmpty } from 'idea-toolbox';
17
+ import { toCanvas } from 'qrcode';
17
18
 
18
19
  /**
19
20
  * The name of the Cognito's user attribute which contains the key of the last device to login in this project.
@@ -27,6 +28,7 @@ const DEVICE_KEY_ATTRIBUTE = 'custom:'.concat(environment.idea.project);
27
28
  class IDEAAuthService {
28
29
  constructor(storage) {
29
30
  this.storage = storage;
31
+ this.mfaProjectName = environment.idea.app.title ?? environment.idea.project;
30
32
  this.userPool = new CognitoUserPool({
31
33
  UserPoolId: environment.aws.cognito.userPoolId,
32
34
  ClientId: environment.aws.cognito.userPoolClientId
@@ -55,33 +57,63 @@ class IDEAAuthService {
55
57
  */
56
58
  login(username, password) {
57
59
  return new Promise((resolve, reject) => {
58
- // get a cognito user and try to authenticate
59
- this.prepareCognitoUser(username).authenticateUser(this.prepareAuthDetails(username, password), {
60
- onSuccess: () => resolve(false),
60
+ const user = this.prepareCognitoUser(username);
61
+ user.authenticateUser(this.prepareAuthDetails(username, password), {
62
+ onSuccess: () => resolve(environment.idea.auth.forceLoginWithMFA ? LoginOutcomeActions.MFA_SETUP : LoginOutcomeActions.NONE),
61
63
  onFailure: (err) => reject(err),
62
- newPasswordRequired: () => resolve(true)
64
+ newPasswordRequired: () => {
65
+ this.challengeUsername = username;
66
+ this.challengePassword = password;
67
+ resolve(LoginOutcomeActions.NEW_PASSWORD);
68
+ },
69
+ totpRequired: () => {
70
+ this.challengeUsername = username;
71
+ this.challengePassword = password;
72
+ resolve(LoginOutcomeActions.MFA_CHALLENGE);
73
+ }
63
74
  });
64
75
  });
65
76
  }
66
77
  /**
67
- * Complete a complete new password flow in the authentication.
78
+ * Complete the new password flow in the authentication.
68
79
  */
69
- confirmNewPassword(username, tempPassword, newPassword) {
80
+ confirmNewPassword(newPassword) {
70
81
  return new Promise((resolve, reject) => {
71
- // login with the old password
72
- const user = this.prepareCognitoUser(username);
73
- user.authenticateUser(this.prepareAuthDetails(username, tempPassword), {
82
+ const user = this.prepareCognitoUser(this.challengeUsername);
83
+ user.authenticateUser(this.prepareAuthDetails(this.challengeUsername, this.challengePassword), {
74
84
  onSuccess: () => resolve(),
75
85
  onFailure: (err) => reject(err),
76
- newPasswordRequired: () =>
77
- // complete the new password challenge
78
- user.completeNewPasswordChallenge(newPassword, {}, {
79
- onSuccess: () => resolve(),
86
+ newPasswordRequired: () => user.completeNewPasswordChallenge(newPassword, {}, {
87
+ onSuccess: () => {
88
+ this.challengeUsername = null;
89
+ this.challengePassword = null;
90
+ resolve();
91
+ },
80
92
  onFailure: (err) => reject(err)
81
93
  })
82
94
  });
83
95
  });
84
96
  }
97
+ /**
98
+ * Complete the MFA challenge flow in the authentication.
99
+ */
100
+ completeMFAChallenge(otpCode) {
101
+ return new Promise((resolve, reject) => {
102
+ const user = this.prepareCognitoUser(this.challengeUsername);
103
+ user.authenticateUser(this.prepareAuthDetails(this.challengeUsername, this.challengePassword), {
104
+ onSuccess: () => resolve(),
105
+ onFailure: (err) => reject(err),
106
+ totpRequired: (challengeName) => user.sendMFACode(otpCode, {
107
+ onSuccess: () => {
108
+ this.challengeUsername = null;
109
+ this.challengePassword = null;
110
+ resolve();
111
+ },
112
+ onFailure: err => reject(err)
113
+ }, challengeName)
114
+ });
115
+ });
116
+ }
85
117
  /**
86
118
  * Register a new user a set its default attributes.
87
119
  */
@@ -97,9 +129,20 @@ class IDEAAuthService {
97
129
  if (!attributes.email)
98
130
  attrs.push(this.prepareUserAttribute('email', username));
99
131
  // register the new user to the pool
100
- this.userPool.signUp(username, password, attrs, null, (err, res) => err ? reject(err) : resolve(res.user));
132
+ this.userPool.signUp(username, password, attrs, null, (err, res) => {
133
+ if (err)
134
+ return reject(err);
135
+ this.newAccountJustRegistered = username;
136
+ resolve(res.user);
137
+ });
101
138
  });
102
139
  }
140
+ /**
141
+ * In case new account has just been registered, return the username.
142
+ */
143
+ getNewAccountJustRegistered() {
144
+ return this.newAccountJustRegistered;
145
+ }
103
146
  /**
104
147
  * Confirm a new registration through the confirmation code sent by Cognito.
105
148
  */
@@ -162,13 +205,80 @@ class IDEAAuthService {
162
205
  */
163
206
  confirmPassword(username, code, newPwd) {
164
207
  return new Promise((resolve, reject) => {
165
- // get the user and confirm a new password
166
208
  this.prepareCognitoUser(username).confirmPassword(code, newPwd, {
167
209
  onSuccess: () => resolve(),
168
210
  onFailure: (err) => reject(err)
169
211
  });
170
212
  });
171
213
  }
214
+ /**
215
+ * Gets the URL for enabling MFA. This URL can be used to generate a QR Code to read with an authenticator app.
216
+ */
217
+ getURLForEnablingMFA() {
218
+ return new Promise((resolve, reject) => {
219
+ const user = this.userPool.getCurrentUser();
220
+ if (!user)
221
+ return reject();
222
+ user.getSession((err) => {
223
+ if (err)
224
+ return reject(err);
225
+ user.associateSoftwareToken({
226
+ associateSecretCode: (secretCode) => resolve(`otpauth://totp/${encodeURI(this.mfaProjectName)}?secret=${secretCode}`),
227
+ onFailure: (err) => reject(err)
228
+ });
229
+ });
230
+ });
231
+ }
232
+ /**
233
+ * Check whether the user has MFA enabled.
234
+ */
235
+ checkIfUserHasMFAEnabled(bypassCache = false) {
236
+ return new Promise((resolve, reject) => {
237
+ const user = this.userPool.getCurrentUser();
238
+ if (!user)
239
+ return reject();
240
+ user.getSession((err) => {
241
+ if (err)
242
+ return reject(err);
243
+ user.getUserData((err, data) => {
244
+ if (err)
245
+ return reject(err);
246
+ const isMFAEnabled = !!(data.UserMFASettingList && data.UserMFASettingList.includes('SOFTWARE_TOKEN_MFA'));
247
+ resolve(isMFAEnabled);
248
+ }, { bypassCache });
249
+ });
250
+ });
251
+ }
252
+ /**
253
+ * Configure a MFA device for the user.
254
+ */
255
+ setMFADevice(otp, mfaDeviceName, enabled = true, preferred = true) {
256
+ return new Promise((resolve, reject) => {
257
+ const user = this.userPool.getCurrentUser();
258
+ if (!user)
259
+ return reject();
260
+ user.getSession((err) => {
261
+ if (err)
262
+ return reject(err);
263
+ user.verifySoftwareToken(otp, mfaDeviceName, {
264
+ onSuccess: () => user.setUserMfaPreference(null, { Enabled: enabled, PreferredMfa: preferred }, (err) => err ? reject(err) : resolve()),
265
+ onFailure: (err) => reject(err)
266
+ });
267
+ });
268
+ });
269
+ }
270
+ /**
271
+ * Enable a new MFA device for the user by inserting an OTP code generated by it.
272
+ */
273
+ enableMFA(otp, mfaDeviceName = 'default') {
274
+ return this.setMFADevice(otp, mfaDeviceName, true, true);
275
+ }
276
+ /**
277
+ * Disable MFA for a user by inserting an OTP code generated by it.
278
+ */
279
+ disableMFA(otp, mfaDeviceName = 'default') {
280
+ return this.setMFADevice(otp, mfaDeviceName, false, false);
281
+ }
172
282
  /**
173
283
  * Check if a user is currently authenticated.
174
284
  * @param offlineAllowed if set and if offline, skip authentication and retrieve data locally
@@ -190,33 +300,39 @@ class IDEAAuthService {
190
300
  user.getSession((err, session) => {
191
301
  if (err)
192
302
  return reject(err);
193
- // get user attributes
194
- user.getUserAttributes((e, attributes) => {
195
- if (e)
196
- return reject(e);
197
- // remap user attributes
198
- const userDetails = {};
199
- attributes.forEach((a) => (userDetails[a.getName()] = a.getValue()));
200
- // add the user's groups to the attributes
201
- const sessionInfo = session.getAccessToken().decodePayload();
202
- const groups = sessionInfo['cognito:groups'] || [];
203
- userDetails['groups'] = groups;
204
- // run some checks considering the user's groups and devices (based on the project's configuration)
205
- this.runPostAuthChecks(userDetails, err => {
206
- // in case some check failed, reject the authorisation flow
207
- if (err)
208
- return reject(err);
209
- // (async) save the refresh token so it can be accessed by other procedures
210
- this.storage.set('AuthRefreshToken', session.getRefreshToken().getToken());
211
- // set a timer to manage the autorefresh of the idToken (through the refreshToken)
212
- setTimeout(() => this.refreshSession(user, session.getRefreshToken().getToken(), getFreshIdTokenOnExp), 15 * 60 * 1000); // every 15 minutes
213
- // (async) if offlineAllowed, save data locally, to use it next time we'll be offline
214
- if (offlineAllowed)
215
- this.storage.set('AuthUserDetails', userDetails);
216
- // return the idToken (to use with API)
217
- resolve({ idToken: session.getIdToken().getJwtToken(), userDetails });
303
+ user.getUserData((err, data) => {
304
+ if (err)
305
+ return reject(err);
306
+ const isMFAEnabled = !!(data.UserMFASettingList && data.UserMFASettingList.includes('SOFTWARE_TOKEN_MFA'));
307
+ if (!isMFAEnabled && environment.idea.auth.forceLoginWithMFA)
308
+ return reject(new Error(LoginOutcomeActions.MFA_SETUP));
309
+ user.getUserAttributes((e, attributes) => {
310
+ if (e)
311
+ return reject(e);
312
+ // remap user attributes
313
+ const userDetails = {};
314
+ attributes.forEach((a) => (userDetails[a.getName()] = a.getValue()));
315
+ // add the user's groups to the attributes
316
+ const sessionInfo = session.getAccessToken().decodePayload();
317
+ const groups = sessionInfo['cognito:groups'] || [];
318
+ userDetails['groups'] = groups;
319
+ // run some checks considering the user's groups and devices (based on the project's configuration)
320
+ this.runPostAuthChecks(userDetails, err => {
321
+ // in case some check failed, reject the authorisation flow
322
+ if (err)
323
+ return reject(err);
324
+ // (async) save the refresh token so it can be accessed by other procedures
325
+ this.storage.set('AuthRefreshToken', session.getRefreshToken().getToken());
326
+ // set a timer to manage the autorefresh of the idToken (through the refreshToken)
327
+ setTimeout(() => this.refreshSession(user, session.getRefreshToken().getToken(), getFreshIdTokenOnExp), 15 * 60 * 1000); // every 15 minutes
328
+ // (async) if offlineAllowed, save data locally, to use it next time we'll be offline
329
+ if (offlineAllowed)
330
+ this.storage.set('AuthUserDetails', userDetails);
331
+ // return the idToken (to use with API)
332
+ resolve({ idToken: session.getIdToken().getJwtToken(), userDetails });
333
+ });
218
334
  });
219
- });
335
+ }, { bypassCache: true });
220
336
  });
221
337
  }
222
338
  });
@@ -327,205 +443,182 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
327
443
  type: Injectable,
328
444
  args: [{ providedIn: 'root' }]
329
445
  }], ctorParameters: function () { return [{ type: i2.IDEAStorageService }]; } });
446
+ /**
447
+ * The possible actions following a successful login.
448
+ */
449
+ var LoginOutcomeActions;
450
+ (function (LoginOutcomeActions) {
451
+ LoginOutcomeActions["NONE"] = "none";
452
+ LoginOutcomeActions["NEW_PASSWORD"] = "newPassword";
453
+ LoginOutcomeActions["MFA_CHALLENGE"] = "mfaChallenge";
454
+ LoginOutcomeActions["MFA_SETUP"] = "mfaSetup";
455
+ })(LoginOutcomeActions || (LoginOutcomeActions = {}));
330
456
 
331
457
  class IDEASignInPage {
332
- constructor(navCtrl, tc, message, loading, auth, t) {
458
+ constructor(navCtrl, message, loading, auth, t) {
333
459
  this.navCtrl = navCtrl;
334
- this.tc = tc;
335
460
  this.message = message;
336
461
  this.loading = loading;
337
462
  this.auth = auth;
338
463
  this.t = t;
339
- this.darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
340
464
  this.title = environment.idea.app.title;
341
465
  this.registrationPossible = environment.idea.auth.registrationIsPossible;
342
466
  this.hasIntroPage = environment.idea.app.hasIntroPage;
343
467
  this.website = environment.idea.website;
344
468
  this.agreementsCheck = true;
469
+ this.newAccountRegistered = false;
470
+ this.darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
345
471
  }
346
472
  ionViewDidEnter() {
347
473
  // manage the scenario in which we just created a new account (show a explanatory message: email must be confirmed)
348
- if (this.tc.get('newAccountRegistered')) {
349
- this.newAccountRegistered = true;
350
- this.email = this.tc.get('newAccountRegistered', true);
351
- }
474
+ this.newAccountRegistered = !!this.auth.getNewAccountJustRegistered();
475
+ if (this.newAccountRegistered)
476
+ this.email = this.auth.getNewAccountJustRegistered();
352
477
  }
353
- /**
354
- * Sign-in with the auth details provided.
355
- */
356
478
  async login() {
357
479
  if (!this.agreementsCheck)
358
480
  return;
359
- this.errorMsg = null;
360
- await this.loading.show();
361
- this.auth
362
- .login(this.email, this.password)
363
- .then(needNewPassword => {
364
- if (needNewPassword) {
365
- this.tc.set('email', this.email);
366
- this.tc.set('password', this.password);
367
- this.navCtrl.navigateForward(['auth/new-password']);
368
- }
481
+ try {
482
+ this.errorMsg = null;
483
+ await this.loading.show();
484
+ const loginAction = await this.auth.login(this.email, this.password);
485
+ if (loginAction === LoginOutcomeActions.NEW_PASSWORD)
486
+ this.navCtrl.navigateForward(['auth', 'new-password']);
487
+ else if (loginAction === LoginOutcomeActions.MFA_CHALLENGE)
488
+ this.navCtrl.navigateForward(['auth', 'mfa-challenge']);
489
+ else if (loginAction === LoginOutcomeActions.MFA_SETUP)
490
+ this.navCtrl.navigateForward(['auth', 'setup-mfa']);
369
491
  else
370
- window.location.assign(''); // hard reload
371
- })
372
- .catch(err => {
492
+ window.location.assign('');
493
+ }
494
+ catch (err) {
373
495
  if (err.name === 'UserNotConfirmedException')
374
496
  this.errorMsg = this.t._('IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN');
375
- else if (err.name === 'UserLambdaValidationException' && err.message?.includes('@IDEA_COGNITO_TRANSITION'))
497
+ else if (err.name === 'UserLambdaValidationException' &&
498
+ err.message?.includes('@IDEA_COGNITO_TRANSITION'))
376
499
  this.errorMsg = this.t._('IDEA_AUTH.CHANGE_YOUR_PASSWORD_TO_LOGIN');
377
500
  this.message.error('IDEA_AUTH.AUTHENTICATION_FAILED');
378
- })
379
- .finally(() => this.loading.hide());
501
+ }
502
+ finally {
503
+ this.loading.hide();
504
+ }
380
505
  }
381
- /**
382
- * Go to the homepage.
383
- */
384
506
  goToIntro() {
385
507
  this.navCtrl.navigateBack(['intro']);
386
508
  }
387
- /**
388
- * Go to the forgot password page.
389
- */
390
509
  goToForgotPassword() {
391
510
  this.navCtrl.navigateForward(['auth/forgot-password']);
392
511
  }
393
- /**
394
- * Go to registration page.
395
- */
396
512
  goToRegistration() {
397
- this.tc.set('email', this.email);
398
- this.tc.set('password', this.password);
399
513
  this.navCtrl.navigateForward(['auth', 'sign-up']);
400
514
  }
401
- /**
402
- * Open a URL in the browser.
403
- */
404
- openLink(url) {
405
- Browser.open({ url });
515
+ translationExists(key) {
516
+ return !!this.t._(key);
517
+ }
518
+ async openLink(url) {
519
+ await Browser.open({ url });
406
520
  }
407
521
  }
408
- IDEASignInPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignInPage, deps: [{ token: i1.NavController }, { token: i2.IDEATinCanService }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
409
- IDEASignInPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASignInPage, selector: "idea-sign-in", ngImport: i0, template: "<ion-content>\n <ion-card color=\"warning\" *ngIf=\"newAccountRegistered\">\n <ion-card-content>{{ 'IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN' | translate }}</ion-card-content>\n </ion-card>\n <form class=\"flexBox\">\n <div>\n <ion-card class=\"authCard\">\n <ion-img\n [title]=\"t._('IDEA_AUTH.SERVICE_LOGO')\"\n [src]=\"darkMode ? 'assets/icons/icon-auth-alt.svg' : 'assets/icons/icon-auth.svg'\"\n ></ion-img>\n <ion-card-header>\n <ion-card-title color=\"primary\" *ngIf=\"title\">{{ title }}</ion-card-title>\n <ion-card-subtitle *ngIf=\"t._('IDEA_VARIABLES.TAGLINE')\">\n {{ 'IDEA_VARIABLES.TAGLINE' | translate }}\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\"><b>{{ 'IDEA_AUTH.WARNING' | translate }}.</b> {{ errorMsg }}</p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n id=\"current-password\"\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"current-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.PASSWORD_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"\n !registrationPossible &&\n (t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL'))\n \"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_LOGIN' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.SIGN_IN_HINT')\"\n (click)=\"login()\"\n >\n {{ 'IDEA_AUTH.SIGN_IN' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n *ngIf=\"registrationPossible\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"goToRegistration()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.I_FORGOT_MY_PASSWORD_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.I_FORGOT_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n color=\"medium\"\n class=\"smallCaseButton\"\n *ngIf=\"hasIntroPage\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_INTRO_HINT')\"\n (click)=\"goToIntro()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_INTRO' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n <ion-img\n class=\"ideaLogo\"\n *ngIf=\"website\"\n [src]=\"darkMode ? './assets/icons/idea-alt.png' : './assets/icons/idea.png'\"\n [title]=\"t._('IDEA_AUTH.IDEA_TAGLINE')\"\n (click)=\"openLink(website)\"\n ></ion-img>\n </div>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }, { kind: "component", type: i1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonImg, selector: "ion-img", inputs: ["alt", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonRow, selector: "ion-row" }, { kind: "component", type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
522
+ IDEASignInPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignInPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
523
+ IDEASignInPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASignInPage, selector: "idea-sign-in", ngImport: i0, template: "<ion-content>\n <ion-card color=\"warning\" *ngIf=\"newAccountRegistered\">\n <ion-card-content>{{ 'IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN' | translate }}</ion-card-content>\n </ion-card>\n <form class=\"flexBox\">\n <div>\n <ion-card class=\"authCard\">\n <ion-img\n [title]=\"'IDEA_AUTH.SERVICE_LOGO' | translate\"\n [src]=\"darkMode ? 'assets/icons/icon-auth-alt.svg' : 'assets/icons/icon-auth.svg'\"\n ></ion-img>\n <ion-card-header>\n <ion-card-title color=\"primary\" *ngIf=\"title\">{{ title }}</ion-card-title>\n <ion-card-subtitle *ngIf=\"translationExists('IDEA_VARIABLES.TAGLINE')\">\n {{ 'IDEA_VARIABLES.TAGLINE' | translate }}\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\"><b>{{ 'IDEA_AUTH.WARNING' | translate }}.</b> {{ errorMsg }}</p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n id=\"current-password\"\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"current-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.PASSWORD_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"\n !registrationPossible &&\n (translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL'))\n \"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_LOGIN' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"'IDEA_AUTH.TERMS_AND_CONDITIONS_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL' | translate\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL') && translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"'IDEA_AUTH.PRIVACY_POLICY_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.PRIVACY_POLICY_URL' | translate\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"'IDEA_AUTH.SIGN_IN_HINT' | translate\"\n (click)=\"login()\"\n >\n {{ 'IDEA_AUTH.SIGN_IN' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n *ngIf=\"registrationPossible\"\n [title]=\"'IDEA_AUTH.CREATE_AN_ACCOUNT_HINT' | translate\"\n (click)=\"goToRegistration()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.I_FORGOT_MY_PASSWORD_HINT' | translate\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.I_FORGOT_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n color=\"medium\"\n class=\"smallCaseButton\"\n *ngIf=\"hasIntroPage\"\n [title]=\"'IDEA_AUTH.BACK_TO_INTRO_HINT' | translate\"\n (click)=\"goToIntro()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_INTRO' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n <ion-img\n class=\"ideaLogo\"\n *ngIf=\"website\"\n [src]=\"darkMode ? './assets/icons/idea-alt.png' : './assets/icons/idea.png'\"\n [title]=\"'IDEA_AUTH.IDEA_TAGLINE' | translate\"\n (click)=\"openLink(website)\"\n ></ion-img>\n </div>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }, { kind: "component", type: i1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonImg, selector: "ion-img", inputs: ["alt", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonRow, selector: "ion-row" }, { kind: "component", type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
410
524
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignInPage, decorators: [{
411
525
  type: Component,
412
- args: [{ selector: 'idea-sign-in', template: "<ion-content>\n <ion-card color=\"warning\" *ngIf=\"newAccountRegistered\">\n <ion-card-content>{{ 'IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN' | translate }}</ion-card-content>\n </ion-card>\n <form class=\"flexBox\">\n <div>\n <ion-card class=\"authCard\">\n <ion-img\n [title]=\"t._('IDEA_AUTH.SERVICE_LOGO')\"\n [src]=\"darkMode ? 'assets/icons/icon-auth-alt.svg' : 'assets/icons/icon-auth.svg'\"\n ></ion-img>\n <ion-card-header>\n <ion-card-title color=\"primary\" *ngIf=\"title\">{{ title }}</ion-card-title>\n <ion-card-subtitle *ngIf=\"t._('IDEA_VARIABLES.TAGLINE')\">\n {{ 'IDEA_VARIABLES.TAGLINE' | translate }}\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\"><b>{{ 'IDEA_AUTH.WARNING' | translate }}.</b> {{ errorMsg }}</p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n id=\"current-password\"\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"current-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.PASSWORD_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"\n !registrationPossible &&\n (t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL'))\n \"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_LOGIN' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.SIGN_IN_HINT')\"\n (click)=\"login()\"\n >\n {{ 'IDEA_AUTH.SIGN_IN' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n *ngIf=\"registrationPossible\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"goToRegistration()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.I_FORGOT_MY_PASSWORD_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.I_FORGOT_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n color=\"medium\"\n class=\"smallCaseButton\"\n *ngIf=\"hasIntroPage\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_INTRO_HINT')\"\n (click)=\"goToIntro()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_INTRO' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n <ion-img\n class=\"ideaLogo\"\n *ngIf=\"website\"\n [src]=\"darkMode ? './assets/icons/idea-alt.png' : './assets/icons/idea.png'\"\n [title]=\"t._('IDEA_AUTH.IDEA_TAGLINE')\"\n (click)=\"openLink(website)\"\n ></ion-img>\n </div>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
413
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEATinCanService }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
526
+ args: [{ selector: 'idea-sign-in', template: "<ion-content>\n <ion-card color=\"warning\" *ngIf=\"newAccountRegistered\">\n <ion-card-content>{{ 'IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN' | translate }}</ion-card-content>\n </ion-card>\n <form class=\"flexBox\">\n <div>\n <ion-card class=\"authCard\">\n <ion-img\n [title]=\"'IDEA_AUTH.SERVICE_LOGO' | translate\"\n [src]=\"darkMode ? 'assets/icons/icon-auth-alt.svg' : 'assets/icons/icon-auth.svg'\"\n ></ion-img>\n <ion-card-header>\n <ion-card-title color=\"primary\" *ngIf=\"title\">{{ title }}</ion-card-title>\n <ion-card-subtitle *ngIf=\"translationExists('IDEA_VARIABLES.TAGLINE')\">\n {{ 'IDEA_VARIABLES.TAGLINE' | translate }}\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\"><b>{{ 'IDEA_AUTH.WARNING' | translate }}.</b> {{ errorMsg }}</p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n id=\"current-password\"\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"current-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.PASSWORD_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"\n !registrationPossible &&\n (translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL'))\n \"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_LOGIN' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"'IDEA_AUTH.TERMS_AND_CONDITIONS_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL' | translate\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL') && translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"'IDEA_AUTH.PRIVACY_POLICY_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.PRIVACY_POLICY_URL' | translate\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"'IDEA_AUTH.SIGN_IN_HINT' | translate\"\n (click)=\"login()\"\n >\n {{ 'IDEA_AUTH.SIGN_IN' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n *ngIf=\"registrationPossible\"\n [title]=\"'IDEA_AUTH.CREATE_AN_ACCOUNT_HINT' | translate\"\n (click)=\"goToRegistration()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.I_FORGOT_MY_PASSWORD_HINT' | translate\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.I_FORGOT_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n color=\"medium\"\n class=\"smallCaseButton\"\n *ngIf=\"hasIntroPage\"\n [title]=\"'IDEA_AUTH.BACK_TO_INTRO_HINT' | translate\"\n (click)=\"goToIntro()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_INTRO' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n <ion-img\n class=\"ideaLogo\"\n *ngIf=\"website\"\n [src]=\"darkMode ? './assets/icons/idea-alt.png' : './assets/icons/idea.png'\"\n [title]=\"'IDEA_AUTH.IDEA_TAGLINE' | translate\"\n (click)=\"openLink(website)\"\n ></ion-img>\n </div>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
527
+ }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
414
528
 
415
529
  class IDEASignUpPage {
416
- constructor(navCtrl, tc, message, loading, auth, t) {
530
+ constructor(navCtrl, message, loading, auth, t) {
417
531
  this.navCtrl = navCtrl;
418
- this.tc = tc;
419
532
  this.message = message;
420
533
  this.loading = loading;
421
534
  this.auth = auth;
422
535
  this.t = t;
423
- this.email = this.tc.get('email', true);
424
- this.password = this.tc.get('password', true);
425
536
  this.agreementsCheck = false;
426
537
  }
427
538
  ngOnInit() {
428
539
  if (!environment.idea.auth.registrationIsPossible)
429
540
  return this.goToAuth();
430
- // if there isn't any agreement to agree to, set the check true
431
541
  this.agreementsCheck =
432
542
  this.t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || this.t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')
433
543
  ? this.agreementsCheck
434
544
  : true;
435
545
  }
436
- /**
437
- * Register the new user in cognito (note DynamoDB still need to be managed).
438
- */
439
546
  async register() {
440
547
  this.errorMsg = null;
441
- // check the fields
442
548
  if (isEmpty(this.email, 'email'))
443
549
  this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
444
550
  else if (!this.password || this.password.length < 8)
445
551
  this.errorMsg = this.t._('IDEA_AUTH.PASSWORD_POLICY_VIOLATION', { n: 8 });
446
- // output the error, if there was one
447
552
  if (this.errorMsg)
448
553
  return this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
449
- // start the registration
450
- await this.loading.show();
451
- this.auth
452
- .register(this.email, this.password)
453
- .then(() => {
554
+ try {
555
+ await this.loading.show();
556
+ await this.auth.register(this.email, this.password);
454
557
  this.message.success('IDEA_AUTH.REGISTRATION_COMPLETED');
455
- this.tc.set('newAccountRegistered', this.email);
456
558
  this.goToAuth();
457
- })
458
- .catch(err => {
459
- // show the unexpected error on screen (english)
559
+ }
560
+ catch (err) {
460
561
  this.errorMsg = err.message;
461
562
  this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
462
- })
463
- .finally(() => this.loading.hide());
563
+ }
564
+ finally {
565
+ this.loading.hide();
566
+ }
567
+ }
568
+ translationExists(key) {
569
+ return !!this.t._(key);
464
570
  }
465
- /**
466
- * Go to the resend link page.
467
- */
468
571
  goToResendLink() {
469
572
  this.navCtrl.navigateForward(['auth/resend-link']);
470
573
  }
471
- /**
472
- * Go to auth page.
473
- */
474
574
  goToAuth() {
475
575
  this.navCtrl.navigateBack(['auth']);
476
576
  }
477
577
  }
478
- IDEASignUpPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignUpPage, deps: [{ token: i1.NavController }, { token: i2.IDEATinCanService }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
479
- IDEASignUpPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASignUpPage, selector: "idea-sign-up", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.NEW_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.REGISTER_A_NEW_ACCOUNT_TO_THE_SYSTEM' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.REGISTRATION_EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_REGISTRATION' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"register()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK_HINT')\"\n (click)=\"goToResendLink()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }, { kind: "component", type: i1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonRow, selector: "ion-row" }, { kind: "component", type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
578
+ IDEASignUpPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignUpPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
579
+ IDEASignUpPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASignUpPage, selector: "idea-sign-up", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.NEW_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.REGISTER_A_NEW_ACCOUNT_TO_THE_SYSTEM' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.REGISTRATION_EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_REGISTRATION' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"'IDEA_AUTH.TERMS_AND_CONDITIONS_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL' | translate\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL') && translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"'IDEA_AUTH.PRIVACY_POLICY_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.PRIVACY_POLICY_URL' | translate\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"'IDEA_AUTH.CREATE_AN_ACCOUNT_HINT' | translate\"\n (click)=\"register()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK_HINT' | translate\"\n (click)=\"goToResendLink()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }, { kind: "component", type: i1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonRow, selector: "ion-row" }, { kind: "component", type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
480
580
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignUpPage, decorators: [{
481
581
  type: Component,
482
- args: [{ selector: 'idea-sign-up', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.NEW_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.REGISTER_A_NEW_ACCOUNT_TO_THE_SYSTEM' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.REGISTRATION_EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_REGISTRATION' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"register()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK_HINT')\"\n (click)=\"goToResendLink()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
483
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEATinCanService }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
582
+ args: [{ selector: 'idea-sign-up', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.NEW_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.REGISTER_A_NEW_ACCOUNT_TO_THE_SYSTEM' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.REGISTRATION_EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_REGISTRATION' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"'IDEA_AUTH.TERMS_AND_CONDITIONS_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL' | translate\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL') && translationExists('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"translationExists('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"'IDEA_AUTH.PRIVACY_POLICY_HINT' | translate\"\n [href]=\"'IDEA_VARIABLES.PRIVACY_POLICY_URL' | translate\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"'IDEA_AUTH.CREATE_AN_ACCOUNT_HINT' | translate\"\n (click)=\"register()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK_HINT' | translate\"\n (click)=\"goToResendLink()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
583
+ }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
484
584
 
485
585
  class IDEANewPasswordPage {
486
- constructor(navCtrl, tc, message, loading, auth, t) {
586
+ constructor(navCtrl, message, loading, auth, t) {
487
587
  this.navCtrl = navCtrl;
488
- this.tc = tc;
489
588
  this.message = message;
490
589
  this.loading = loading;
491
590
  this.auth = auth;
492
591
  this.t = t;
493
592
  }
494
593
  ngOnInit() {
495
- this.email = this.tc.get('email', true);
496
- this.password = this.tc.get('password', true);
497
- if (!this.email || !this.password)
594
+ if (!this.auth.challengeUsername)
498
595
  this.goToAuth();
499
596
  }
500
- /**
501
- * Confirm a new password (auth flow that follows a registration or a password reset).
502
- */
503
597
  async confirmNewPassword() {
504
- this.errorMsg = null;
505
- await this.loading.show();
506
- this.auth
507
- .confirmNewPassword(this.email, this.password, this.newPassword)
508
- // we are logged in
509
- .then(() => window.location.assign(''))
510
- .catch(() => {
598
+ try {
599
+ this.errorMsg = null;
600
+ await this.loading.show();
601
+ await this.auth.confirmNewPassword(this.newPassword);
602
+ window.location.assign('');
603
+ }
604
+ catch (error) {
511
605
  this.errorMsg = this.t._('IDEA_AUTH.PASSWORD_POLICY_VIOLATION', { n: 8 });
512
606
  this.message.error(this.errorMsg, true);
513
- })
514
- .finally(() => this.loading.hide());
607
+ }
608
+ finally {
609
+ this.loading.hide();
610
+ }
515
611
  }
516
- /**
517
- * Go to auth page.
518
- */
519
612
  goToAuth() {
520
613
  this.navCtrl.navigateBack(['auth']);
521
614
  }
522
615
  }
523
- IDEANewPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEANewPasswordPage, deps: [{ token: i1.NavController }, { token: i2.IDEATinCanService }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
524
- IDEANewPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEANewPasswordPage, selector: "idea-new-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.YOU_NEED_TO_CHOOSE_A_NEW_PASSWORD' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmNewPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CONFIRM_NEW_PASSWORD_HINT')\" (click)=\"confirmNewPassword()\">\n {{ 'IDEA_AUTH.CONFIRM_NEW_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
616
+ IDEANewPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEANewPasswordPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
617
+ IDEANewPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEANewPasswordPage, selector: "idea-new-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.YOU_NEED_TO_CHOOSE_A_NEW_PASSWORD' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmNewPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.CONFIRM_NEW_PASSWORD_HINT' | translate\"\n (click)=\"confirmNewPassword()\"\n >\n {{ 'IDEA_AUTH.CONFIRM_NEW_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
525
618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEANewPasswordPage, decorators: [{
526
619
  type: Component,
527
- args: [{ selector: 'idea-new-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.YOU_NEED_TO_CHOOSE_A_NEW_PASSWORD' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmNewPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CONFIRM_NEW_PASSWORD_HINT')\" (click)=\"confirmNewPassword()\">\n {{ 'IDEA_AUTH.CONFIRM_NEW_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
528
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEATinCanService }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
620
+ args: [{ selector: 'idea-new-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.YOU_NEED_TO_CHOOSE_A_NEW_PASSWORD' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmNewPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.CONFIRM_NEW_PASSWORD_HINT' | translate\"\n (click)=\"confirmNewPassword()\"\n >\n {{ 'IDEA_AUTH.CONFIRM_NEW_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
621
+ }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
529
622
 
530
623
  class IDEAResendLinkPage {
531
624
  constructor(navCtrl, message, loading, auth, t) {
@@ -535,9 +628,6 @@ class IDEAResendLinkPage {
535
628
  this.auth = auth;
536
629
  this.t = t;
537
630
  }
538
- /**
539
- * Resend the link to confirm the email address.
540
- */
541
631
  async resendConfirmationLink() {
542
632
  this.errorMsg = null;
543
633
  if (!this.email) {
@@ -545,74 +635,65 @@ class IDEAResendLinkPage {
545
635
  this.message.error('IDEA_AUTH.SENDING_FAILED');
546
636
  return;
547
637
  }
548
- await this.loading.show();
549
- this.auth
550
- .resendConfirmationCode(this.email)
551
- .then(() => {
638
+ try {
639
+ await this.loading.show();
640
+ await this.auth.resendConfirmationCode(this.email);
552
641
  this.message.success('IDEA_AUTH.CONFIRMATION_LINK_SENT');
553
642
  this.goToAuth();
554
- })
555
- .catch(() => {
643
+ }
644
+ catch (error) {
556
645
  this.errorMsg = this.t._('IDEA_AUTH.IS_THE_EMAIL_CORRECT');
557
646
  this.message.error('IDEA_AUTH.SENDING_FAILED');
558
- })
559
- .finally(() => this.loading.hide());
647
+ }
648
+ finally {
649
+ this.loading.hide();
650
+ }
560
651
  }
561
- /**
562
- * Go to auth page.
563
- */
564
652
  goToAuth() {
565
653
  this.navCtrl.navigateBack(['auth']);
566
654
  }
567
655
  }
568
656
  IDEAResendLinkPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAResendLinkPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
569
- IDEAResendLinkPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAResendLinkPage, selector: "idea-resend-link", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CONFIRM_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.RESEND_CONFIRMATION_LINK_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"resendConfirmationLink()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESEND_LINK_HINT')\" (click)=\"resendConfirmationLink()\">\n {{ 'IDEA_AUTH.RESEND_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
657
+ IDEAResendLinkPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAResendLinkPage, selector: "idea-resend-link", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CONFIRM_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.RESEND_CONFIRMATION_LINK_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"resendConfirmationLink()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.RESEND_LINK_HINT' | translate\"\n (click)=\"resendConfirmationLink()\"\n >\n {{ 'IDEA_AUTH.RESEND_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
570
658
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAResendLinkPage, decorators: [{
571
659
  type: Component,
572
- args: [{ selector: 'idea-resend-link', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CONFIRM_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.RESEND_CONFIRMATION_LINK_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"resendConfirmationLink()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESEND_LINK_HINT')\" (click)=\"resendConfirmationLink()\">\n {{ 'IDEA_AUTH.RESEND_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
660
+ args: [{ selector: 'idea-resend-link', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CONFIRM_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.RESEND_CONFIRMATION_LINK_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"resendConfirmationLink()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.RESEND_LINK_HINT' | translate\"\n (click)=\"resendConfirmationLink()\"\n >\n {{ 'IDEA_AUTH.RESEND_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
573
661
  }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
574
662
 
575
663
  class IDEAForgotPasswordPage {
576
- constructor(navCtrl, message, loading, auth, t) {
664
+ constructor(navCtrl, message, loading, auth) {
577
665
  this.navCtrl = navCtrl;
578
666
  this.message = message;
579
667
  this.loading = loading;
580
668
  this.auth = auth;
581
- this.t = t;
582
669
  }
583
- /**
584
- * "I forgot my password" procedure.
585
- */
586
670
  async forgotPassword() {
587
- await this.loading.show();
588
- this.auth
589
- .forgotPassword(this.email)
590
- .then(() => {
671
+ try {
672
+ await this.loading.show();
673
+ await this.auth.forgotPassword(this.email);
591
674
  this.message.success('IDEA_AUTH.PASSWORD_RESET_CODE_SENT');
592
675
  this.goToConfirmPassword();
593
- })
594
- .catch(() => this.message.error('IDEA_AUTH.USER_NOT_FOUND'))
595
- .finally(() => this.loading.hide());
676
+ }
677
+ catch (error) {
678
+ this.message.error('IDEA_AUTH.USER_NOT_FOUND');
679
+ }
680
+ finally {
681
+ this.loading.hide();
682
+ }
596
683
  }
597
- /**
598
- * Go to the confirm password page.
599
- */
600
684
  goToConfirmPassword() {
601
- this.navCtrl.navigateForward(['auth/confirm-password'], { queryParams: { email: this.email || null } });
685
+ this.navCtrl.navigateForward(['auth/confirm-password'], { queryParams: { email: this.email ?? null } });
602
686
  }
603
- /**
604
- * Go to auth page.
605
- */
606
687
  goToAuth() {
607
688
  this.navCtrl.navigateBack(['auth']);
608
689
  }
609
690
  }
610
- IDEAForgotPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAForgotPasswordPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
611
- IDEAForgotPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAForgotPasswordPage, selector: "idea-forgot-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.PASSWORD_RESET' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.PASSWORD_RESET_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"forgotPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESET_MY_PASSWORD_HINT')\" (click)=\"forgotPassword()\">\n {{ 'IDEA_AUTH.RESET_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE_HINT')\"\n (click)=\"goToConfirmPassword()\"\n >\n {{ 'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
691
+ IDEAForgotPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAForgotPasswordPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }], target: i0.ɵɵFactoryTarget.Component });
692
+ IDEAForgotPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAForgotPasswordPage, selector: "idea-forgot-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.PASSWORD_RESET' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.PASSWORD_RESET_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"forgotPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"'IDEA_AUTH.RESET_MY_PASSWORD_HINT' | translate\" (click)=\"forgotPassword()\">\n {{ 'IDEA_AUTH.RESET_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE_HINT' | translate\"\n (click)=\"goToConfirmPassword()\"\n >\n {{ 'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
612
693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAForgotPasswordPage, decorators: [{
613
694
  type: Component,
614
- args: [{ selector: 'idea-forgot-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.PASSWORD_RESET' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.PASSWORD_RESET_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"forgotPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESET_MY_PASSWORD_HINT')\" (click)=\"forgotPassword()\">\n {{ 'IDEA_AUTH.RESET_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE_HINT')\"\n (click)=\"goToConfirmPassword()\"\n >\n {{ 'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
615
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
695
+ args: [{ selector: 'idea-forgot-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.PASSWORD_RESET' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.PASSWORD_RESET_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"forgotPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"'IDEA_AUTH.RESET_MY_PASSWORD_HINT' | translate\" (click)=\"forgotPassword()\">\n {{ 'IDEA_AUTH.RESET_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE_HINT' | translate\"\n (click)=\"goToConfirmPassword()\"\n >\n {{ 'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
696
+ }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }]; } });
616
697
 
617
698
  class IDEAConfirmPasswordPage {
618
699
  constructor(navCtrl, route, message, loading, auth, t) {
@@ -622,49 +703,218 @@ class IDEAConfirmPasswordPage {
622
703
  this.loading = loading;
623
704
  this.auth = auth;
624
705
  this.t = t;
625
- this.email = this.route.snapshot.queryParamMap.get('email') || null;
706
+ }
707
+ ngOnInit() {
708
+ this.email = this.route.snapshot.queryParamMap.get('email') ?? null;
626
709
  if (!this.email && this.route.snapshot.queryParams.user)
627
710
  this.email = decodeURIComponent(this.route.snapshot.queryParams.user);
628
711
  this.code = this.route.snapshot.queryParams.code;
629
712
  }
630
- /**
631
- * Confirm new password.
632
- */
633
713
  async confirmPassword() {
634
- this.errorMsg = null;
635
- await this.loading.show();
636
- this.auth
637
- .confirmPassword(this.email, this.code, this.newPassword)
638
- .then(() => {
714
+ try {
715
+ this.errorMsg = null;
716
+ await this.loading.show();
717
+ await this.auth.confirmPassword(this.email, this.code, this.newPassword);
639
718
  this.message.success('IDEA_AUTH.PASSWORD_CHANGED');
640
719
  this.goToAuth();
641
- })
642
- .catch(() => {
720
+ }
721
+ catch (error) {
643
722
  this.errorMsg = this.t._('IDEA_AUTH.CONFIRM_PASSWORD_ERROR', { n: 8 });
644
723
  this.message.error(this.errorMsg, true);
645
- })
646
- .finally(() => this.loading.hide());
724
+ }
725
+ finally {
726
+ this.loading.hide();
727
+ }
647
728
  }
648
- /**
649
- * Go to forgot password page.
650
- */
651
729
  goToForgotPassword() {
652
730
  this.navCtrl.navigateBack(['auth/forgot-password']);
653
731
  }
654
- /**
655
- * Go to auth page.
656
- */
657
732
  goToAuth() {
658
733
  this.navCtrl.navigateBack(['auth']);
659
734
  }
660
735
  }
661
736
  IDEAConfirmPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAConfirmPasswordPage, deps: [{ token: i1.NavController }, { token: i2$1.ActivatedRoute }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
662
- IDEAConfirmPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAConfirmPasswordPage, selector: "idea-confirm-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD_HINT' | translate: { n: 8 } }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"disc\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"text\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.RESET_CODE')\"\n [title]=\"t._('IDEA_AUTH.RESET_CODE_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"code\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.NEW_PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CHANGE_MY_PASSWORD_HINT')\" (click)=\"confirmPassword()\">\n {{ 'IDEA_AUTH.CHANGE_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
737
+ IDEAConfirmPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAConfirmPasswordPage, selector: "idea-confirm-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD_HINT' | translate: { n: 8 } }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"disc\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"text\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"'IDEA_AUTH.RESET_CODE' | translate\"\n [title]=\"'IDEA_AUTH.RESET_CODE_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"code\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.NEW_PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.CHANGE_MY_PASSWORD_HINT' | translate\"\n (click)=\"confirmPassword()\"\n >\n {{ 'IDEA_AUTH.CHANGE_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE_HINT' | translate\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
663
738
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAConfirmPasswordPage, decorators: [{
664
739
  type: Component,
665
- args: [{ selector: 'idea-confirm-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD_HINT' | translate: { n: 8 } }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"disc\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"text\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.RESET_CODE')\"\n [title]=\"t._('IDEA_AUTH.RESET_CODE_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"code\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.NEW_PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CHANGE_MY_PASSWORD_HINT')\" (click)=\"confirmPassword()\">\n {{ 'IDEA_AUTH.CHANGE_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
740
+ args: [{ selector: 'idea-confirm-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD_HINT' | translate: { n: 8 } }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"'IDEA_AUTH.EMAIL' | translate\"\n [title]=\"'IDEA_AUTH.EMAIL_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"disc\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"text\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"'IDEA_AUTH.RESET_CODE' | translate\"\n [title]=\"'IDEA_AUTH.RESET_CODE_HINT' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"code\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"'IDEA_AUTH.NEW_PASSWORD' | translate\"\n [title]=\"'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.CHANGE_MY_PASSWORD_HINT' | translate\"\n (click)=\"confirmPassword()\"\n >\n {{ 'IDEA_AUTH.CHANGE_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE_HINT' | translate\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
666
741
  }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2$1.ActivatedRoute }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
667
742
 
743
+ class IDEAMFAChallengePage {
744
+ constructor(navCtrl, message, loading, auth, t) {
745
+ this.navCtrl = navCtrl;
746
+ this.message = message;
747
+ this.loading = loading;
748
+ this.auth = auth;
749
+ this.t = t;
750
+ }
751
+ ngOnInit() {
752
+ if (!this.auth.challengeUsername)
753
+ this.goToAuth();
754
+ }
755
+ async completeMFAChallenge() {
756
+ try {
757
+ this.errorMsg = null;
758
+ await this.loading.show();
759
+ await this.auth.completeMFAChallenge(this.otpCode);
760
+ window.location.assign('');
761
+ }
762
+ catch (error) {
763
+ this.errorMsg = this.t._('IDEA_AUTH.INVALID_OTP_CODE');
764
+ this.message.error(this.errorMsg, true);
765
+ }
766
+ finally {
767
+ this.loading.hide();
768
+ }
769
+ }
770
+ goToAuth() {
771
+ this.navCtrl.navigateBack(['auth']);
772
+ }
773
+ }
774
+ IDEAMFAChallengePage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAMFAChallengePage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
775
+ IDEAMFAChallengePage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEAMFAChallengePage, selector: "idea-mfa-challenge", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.ENTER_OTP_CODE' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.ENTER_OTP_CODE_I' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b>{{ 'IDEA_AUTH.ERROR' | translate }}.</b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n inputmode=\"numeric\"\n [placeholder]=\"'IDEA_AUTH.OTP_CODE' | translate\"\n [title]=\"'IDEA_AUTH.ENTER_OTP_CODE' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"otpCode\"\n (keyup.enter)=\"completeMFAChallenge()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.CONFIRM_OTP_CODE_HINT' | translate\"\n (click)=\"completeMFAChallenge()\"\n >\n {{ 'IDEA_AUTH.CONFIRM_OTP_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
776
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAMFAChallengePage, decorators: [{
777
+ type: Component,
778
+ args: [{ selector: 'idea-mfa-challenge', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.ENTER_OTP_CODE' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.ENTER_OTP_CODE_I' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b>{{ 'IDEA_AUTH.ERROR' | translate }}.</b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n inputmode=\"numeric\"\n [placeholder]=\"'IDEA_AUTH.OTP_CODE' | translate\"\n [title]=\"'IDEA_AUTH.ENTER_OTP_CODE' | translate\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"otpCode\"\n (keyup.enter)=\"completeMFAChallenge()\"\n ></ion-input>\n </ion-item>\n <ion-button\n expand=\"block\"\n [title]=\"'IDEA_AUTH.CONFIRM_OTP_CODE_HINT' | translate\"\n (click)=\"completeMFAChallenge()\"\n >\n {{ 'IDEA_AUTH.CONFIRM_OTP_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
779
+ }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
780
+
781
+ class IDEASetupMFAModalComponent {
782
+ constructor(modalCtrl, loading, message, auth) {
783
+ this.modalCtrl = modalCtrl;
784
+ this.loading = loading;
785
+ this.message = message;
786
+ this.auth = auth;
787
+ }
788
+ async ngOnInit() {
789
+ try {
790
+ await this.loading.show();
791
+ this.isMFAEnabled = await this.auth.checkIfUserHasMFAEnabled(true);
792
+ if (!this.isMFAEnabled) {
793
+ const url = await this.auth.getURLForEnablingMFA();
794
+ await this.generateQRCodeCanvasByURL(url);
795
+ }
796
+ }
797
+ catch (error) {
798
+ this.message.error('COMMON.OPERATION_FAILED');
799
+ }
800
+ finally {
801
+ this.loading.hide();
802
+ }
803
+ }
804
+ generateQRCodeCanvasByURL(url) {
805
+ return new Promise((resolve, reject) => {
806
+ const container = document.getElementById('qrCodeContainer');
807
+ container.innerHTML = '';
808
+ toCanvas(url, { errorCorrectionLevel: 'L' }, (err, canvas) => {
809
+ if (err)
810
+ return reject(err);
811
+ canvas.style.width = '100%';
812
+ canvas.style.height = '100%';
813
+ canvas.style.borderRadius = '4px';
814
+ container.appendChild(canvas);
815
+ resolve();
816
+ });
817
+ });
818
+ }
819
+ async setMFA(enable) {
820
+ if (!this.otpCode)
821
+ return;
822
+ try {
823
+ await this.loading.show();
824
+ if (enable)
825
+ await this.auth.enableMFA(this.otpCode);
826
+ else
827
+ await this.auth.disableMFA(this.otpCode);
828
+ this.isMFAEnabled = enable;
829
+ this.message.success('COMMON.OPERATION_COMPLETED');
830
+ this.modalCtrl.dismiss({ enabled: enable });
831
+ }
832
+ catch (error) {
833
+ this.message.error('COMMON.OPERATION_FAILED');
834
+ }
835
+ finally {
836
+ this.loading.hide();
837
+ }
838
+ }
839
+ close() {
840
+ this.modalCtrl.dismiss();
841
+ }
842
+ }
843
+ IDEASetupMFAModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModalComponent, deps: [{ token: i1.ModalController }, { token: i2.IDEALoadingService }, { token: i2.IDEAMessageService }, { token: IDEAAuthService }], target: i0.ɵɵFactoryTarget.Component });
844
+ IDEASetupMFAModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASetupMFAModalComponent, selector: "idea-setup-mfa-modal", ngImport: i0, template: "<ion-header>\n <ion-toolbar color=\"ideaToolbar\">\n <ion-buttons slot=\"start\">\n <ion-button [title]=\"'COMMON.CLOSE' | translate\" (click)=\"close()\">\n <ion-icon name=\"close-circle-outline\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-buttons>\n <ion-title>{{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA' : 'IDEA_AUTH.SETUP_MFA') | translate }}</ion-title>\n </ion-toolbar>\n</ion-header>\n<ion-content class=\"ion-padding\">\n <ion-list class=\"aList\">\n <ion-list-header>\n <ion-label class=\"ion-text-center\">\n <h2>{{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA_I' : 'IDEA_AUTH.SETUP_MFA_I') | translate }}</h2>\n <p>{{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA_II' : 'IDEA_AUTH.SETUP_MFA_II') | translate }}</p>\n </ion-label>\n </ion-list-header>\n <ion-card color=\"white\">\n <ion-card-content>\n <div id=\"qrCodeContainer\" *ngIf=\"!isMFAEnabled\"></div>\n <ion-item color=\"light\">\n <ion-label position=\"floating\">{{ 'IDEA_AUTH.OTP_CODE' | translate }}</ion-label>\n <ion-input type=\"text\" inputmode=\"numeric\" [(ngModel)]=\"otpCode\"></ion-input>\n </ion-item>\n <ion-button expand=\"block\" class=\"ion-margin-top\" [disabled]=\"!otpCode\" (click)=\"setMFA(!isMFAEnabled)\">\n {{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA' : 'IDEA_AUTH.ENABLE_MFA') | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </ion-list>\n</ion-content>\n", styles: ["ion-list.aList{padding-top:0}ion-list.aList ion-card{margin:10px auto;max-width:300px}ion-list.aList #qrCodeContainer{width:180px;margin:10px auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: i1.IonListHeader, selector: "ion-list-header", inputs: ["color", "lines", "mode"] }, { kind: "component", type: i1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
845
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModalComponent, decorators: [{
846
+ type: Component,
847
+ args: [{ selector: 'idea-setup-mfa-modal', template: "<ion-header>\n <ion-toolbar color=\"ideaToolbar\">\n <ion-buttons slot=\"start\">\n <ion-button [title]=\"'COMMON.CLOSE' | translate\" (click)=\"close()\">\n <ion-icon name=\"close-circle-outline\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-buttons>\n <ion-title>{{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA' : 'IDEA_AUTH.SETUP_MFA') | translate }}</ion-title>\n </ion-toolbar>\n</ion-header>\n<ion-content class=\"ion-padding\">\n <ion-list class=\"aList\">\n <ion-list-header>\n <ion-label class=\"ion-text-center\">\n <h2>{{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA_I' : 'IDEA_AUTH.SETUP_MFA_I') | translate }}</h2>\n <p>{{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA_II' : 'IDEA_AUTH.SETUP_MFA_II') | translate }}</p>\n </ion-label>\n </ion-list-header>\n <ion-card color=\"white\">\n <ion-card-content>\n <div id=\"qrCodeContainer\" *ngIf=\"!isMFAEnabled\"></div>\n <ion-item color=\"light\">\n <ion-label position=\"floating\">{{ 'IDEA_AUTH.OTP_CODE' | translate }}</ion-label>\n <ion-input type=\"text\" inputmode=\"numeric\" [(ngModel)]=\"otpCode\"></ion-input>\n </ion-item>\n <ion-button expand=\"block\" class=\"ion-margin-top\" [disabled]=\"!otpCode\" (click)=\"setMFA(!isMFAEnabled)\">\n {{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA' : 'IDEA_AUTH.ENABLE_MFA') | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </ion-list>\n</ion-content>\n", styles: ["ion-list.aList{padding-top:0}ion-list.aList ion-card{margin:10px auto;max-width:300px}ion-list.aList #qrCodeContainer{width:180px;margin:10px auto}\n"] }]
848
+ }], ctorParameters: function () { return [{ type: i1.ModalController }, { type: i2.IDEALoadingService }, { type: i2.IDEAMessageService }, { type: IDEAAuthService }]; } });
849
+
850
+ class IDEASetupMFAButtonComponent {
851
+ constructor(modalCtrl, auth) {
852
+ this.modalCtrl = modalCtrl;
853
+ this.auth = auth;
854
+ /**
855
+ * Trigger then the MFA setup changes.
856
+ */
857
+ this.change = new EventEmitter();
858
+ }
859
+ async ngOnInit() {
860
+ this.isMFAEnabled = await this.auth.checkIfUserHasMFAEnabled(true);
861
+ }
862
+ async openMFAModal() {
863
+ const modal = await this.modalCtrl.create({ component: IDEASetupMFAModalComponent, backdropDismiss: false });
864
+ modal.onDidDismiss().then(({ data }) => {
865
+ if (data) {
866
+ this.isMFAEnabled = data.enabled;
867
+ this.change.emit(data.enabled);
868
+ }
869
+ });
870
+ await modal.present();
871
+ }
872
+ }
873
+ IDEASetupMFAButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAButtonComponent, deps: [{ token: i1.ModalController }, { token: IDEAAuthService }], target: i0.ɵɵFactoryTarget.Component });
874
+ IDEASetupMFAButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASetupMFAButtonComponent, selector: "idea-setup-mfa-button", inputs: { color: "color", fill: "fill" }, outputs: { change: "change" }, ngImport: i0, template: "<ion-button *ngIf=\"isMFAEnabled !== undefined\" [color]=\"color\" [fill]=\"fill\" (click)=\"openMFAModal()\">\n {{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA' : 'IDEA_AUTH.SETUP_MFA') | translate }}\n</ion-button>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAButtonComponent, decorators: [{
876
+ type: Component,
877
+ args: [{ selector: 'idea-setup-mfa-button', template: "<ion-button *ngIf=\"isMFAEnabled !== undefined\" [color]=\"color\" [fill]=\"fill\" (click)=\"openMFAModal()\">\n {{ (isMFAEnabled ? 'IDEA_AUTH.DISABLE_MFA' : 'IDEA_AUTH.SETUP_MFA') | translate }}\n</ion-button>\n" }]
878
+ }], ctorParameters: function () { return [{ type: i1.ModalController }, { type: IDEAAuthService }]; }, propDecorators: { color: [{
879
+ type: Input
880
+ }], fill: [{
881
+ type: Input
882
+ }], change: [{
883
+ type: Output
884
+ }] } });
885
+
886
+ class IDEASetupMFAPage {
887
+ constructor(navCtrl) {
888
+ this.navCtrl = navCtrl;
889
+ }
890
+ reloadApp() {
891
+ window.location.assign('');
892
+ }
893
+ goToAuth() {
894
+ this.navCtrl.navigateBack(['auth']);
895
+ }
896
+ }
897
+ IDEASetupMFAPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAPage, deps: [{ token: i1.NavController }], target: i0.ɵɵFactoryTarget.Component });
898
+ IDEASetupMFAPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IDEASetupMFAPage, selector: "idea-mfa-setup", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.SETUP_MFA' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.MFA_IS_MANDATORY' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <idea-setup-mfa-button (change)=\"reloadApp()\"></idea-setup-mfa-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IDEASetupMFAButtonComponent, selector: "idea-setup-mfa-button", inputs: ["color", "fill"], outputs: ["change"] }, { kind: "pipe", type: i2.IDEATranslatePipe, name: "translate" }] });
899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAPage, decorators: [{
900
+ type: Component,
901
+ args: [{ selector: 'idea-mfa-setup', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.SETUP_MFA' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.MFA_IS_MANDATORY' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <idea-setup-mfa-button (change)=\"reloadApp()\"></idea-setup-mfa-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"'IDEA_AUTH.BACK_TO_SIGN_IN_HINT' | translate\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--idea-auth-background-color, var(--ion-color-white-shade))}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--idea-auth-card-background-color, var(--ion-color-white));border:1px solid var(--idea-auth-card-border-color, var(--ion-color-light));border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--idea-auth-card-background-color, var(--ion-color-white));--border-color: var(--idea-auth-card-border-color, var(--ion-color-light))}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
902
+ }], ctorParameters: function () { return [{ type: i1.NavController }]; } });
903
+
904
+ class IDEASetupMFAModule {
905
+ }
906
+ IDEASetupMFAModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
907
+ IDEASetupMFAModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, declarations: [IDEASetupMFAModalComponent, IDEASetupMFAButtonComponent], imports: [CommonModule, FormsModule, IonicModule, IDEATranslationsModule], exports: [IDEASetupMFAModalComponent, IDEASetupMFAButtonComponent] });
908
+ IDEASetupMFAModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, imports: [CommonModule, FormsModule, IonicModule, IDEATranslationsModule] });
909
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, decorators: [{
910
+ type: NgModule,
911
+ args: [{
912
+ imports: [CommonModule, FormsModule, IonicModule, IDEATranslationsModule],
913
+ declarations: [IDEASetupMFAModalComponent, IDEASetupMFAButtonComponent],
914
+ exports: [IDEASetupMFAModalComponent, IDEASetupMFAButtonComponent]
915
+ }]
916
+ }] });
917
+
668
918
  class IDEAAuthModule {
669
919
  }
670
920
  IDEAAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -673,10 +923,12 @@ IDEAAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
673
923
  IDEANewPasswordPage,
674
924
  IDEAResendLinkPage,
675
925
  IDEAForgotPasswordPage,
676
- IDEAConfirmPasswordPage], imports: [CommonModule,
926
+ IDEAConfirmPasswordPage,
927
+ IDEAMFAChallengePage,
928
+ IDEASetupMFAPage], imports: [CommonModule,
677
929
  FormsModule,
678
930
  IonicModule,
679
- IDEATranslationsModule, i2$1.RouterModule] });
931
+ IDEATranslationsModule, i2$1.RouterModule, IDEASetupMFAModule] });
680
932
  IDEAAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, imports: [CommonModule,
681
933
  FormsModule,
682
934
  IonicModule,
@@ -686,10 +938,13 @@ IDEAAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
686
938
  { path: 'sign-in', component: IDEASignInPage },
687
939
  { path: 'sign-up', component: IDEASignUpPage },
688
940
  { path: 'new-password', component: IDEANewPasswordPage },
941
+ { path: 'mfa-challenge', component: IDEAMFAChallengePage },
942
+ { path: 'setup-mfa', component: IDEASetupMFAPage },
689
943
  { path: 'resend-link', component: IDEAResendLinkPage },
690
944
  { path: 'forgot-password', component: IDEAForgotPasswordPage },
691
945
  { path: 'confirm-password', component: IDEAConfirmPasswordPage }
692
- ])] });
946
+ ]),
947
+ IDEASetupMFAModule] });
693
948
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, decorators: [{
694
949
  type: NgModule,
695
950
  args: [{
@@ -703,10 +958,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
703
958
  { path: 'sign-in', component: IDEASignInPage },
704
959
  { path: 'sign-up', component: IDEASignUpPage },
705
960
  { path: 'new-password', component: IDEANewPasswordPage },
961
+ { path: 'mfa-challenge', component: IDEAMFAChallengePage },
962
+ { path: 'setup-mfa', component: IDEASetupMFAPage },
706
963
  { path: 'resend-link', component: IDEAResendLinkPage },
707
964
  { path: 'forgot-password', component: IDEAForgotPasswordPage },
708
965
  { path: 'confirm-password', component: IDEAConfirmPasswordPage }
709
- ])
966
+ ]),
967
+ IDEASetupMFAModule
710
968
  ],
711
969
  declarations: [
712
970
  IDEASignInPage,
@@ -714,7 +972,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
714
972
  IDEANewPasswordPage,
715
973
  IDEAResendLinkPage,
716
974
  IDEAForgotPasswordPage,
717
- IDEAConfirmPasswordPage
975
+ IDEAConfirmPasswordPage,
976
+ IDEAMFAChallengePage,
977
+ IDEASetupMFAPage
718
978
  ]
719
979
  }]
720
980
  }] });
@@ -723,6 +983,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
723
983
  * Generated bundle index. Do not edit.
724
984
  */
725
985
 
726
- export { IDEAAuthModule, IDEAAuthService };
727
- //# sourceMappingURL=idea-ionic-auth.mjs.map
986
+ export { IDEAAuthModule, IDEAAuthService, IDEASetupMFAButtonComponent, IDEASetupMFAModalComponent, IDEASetupMFAModule, LoginOutcomeActions };
728
987
  //# sourceMappingURL=idea-ionic-auth.mjs.map