@idea-ionic/auth 6.12.3 → 7.0.1

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 (43) hide show
  1. package/environment.d.ts +7 -0
  2. package/esm2022/environment.mjs +34 -0
  3. package/esm2022/src/auth.module.mjs +84 -0
  4. package/esm2022/src/auth.service.mjs +479 -0
  5. package/esm2022/src/confirmPassword.page.mjs +70 -0
  6. package/esm2022/src/forgotPassword.page.mjs +41 -0
  7. package/{esm2020 → esm2022}/src/mfaChallenge.page.mjs +5 -5
  8. package/esm2022/src/newPassword.page.mjs +62 -0
  9. package/esm2022/src/passwordPolicy.component.mjs +64 -0
  10. package/esm2022/src/resendLink.page.mjs +47 -0
  11. package/{esm2020 → esm2022}/src/setupMFA/setupMFA.module.mjs +5 -5
  12. package/{esm2020 → esm2022}/src/setupMFA/setupMFAButton.component.mjs +4 -4
  13. package/{esm2020 → esm2022}/src/setupMFA/setupMFAModal.component.mjs +4 -4
  14. package/esm2022/src/setupMFA.page.mjs +24 -0
  15. package/esm2022/src/signIn.page.mjs +82 -0
  16. package/esm2022/src/signUp.page.mjs +79 -0
  17. package/fesm2022/idea-ionic-auth.mjs +1126 -0
  18. package/fesm2022/idea-ionic-auth.mjs.map +1 -0
  19. package/package.json +17 -23
  20. package/src/auth.module.d.ts +8 -7
  21. package/src/auth.service.d.ts +11 -0
  22. package/src/confirmPassword.page.d.ts +12 -3
  23. package/src/newPassword.page.d.ts +12 -3
  24. package/src/passwordPolicy.component.d.ts +13 -0
  25. package/src/setupMFA/setupMFAButton.component.d.ts +1 -1
  26. package/src/signIn.page.d.ts +2 -2
  27. package/src/signUp.page.d.ts +12 -3
  28. package/esm2020/environment.mjs +0 -26
  29. package/esm2020/src/auth.module.mjs +0 -81
  30. package/esm2020/src/auth.service.mjs +0 -443
  31. package/esm2020/src/confirmPassword.page.mjs +0 -53
  32. package/esm2020/src/forgotPassword.page.mjs +0 -41
  33. package/esm2020/src/newPassword.page.mjs +0 -45
  34. package/esm2020/src/resendLink.page.mjs +0 -47
  35. package/esm2020/src/setupMFA.page.mjs +0 -24
  36. package/esm2020/src/signIn.page.mjs +0 -82
  37. package/esm2020/src/signUp.page.mjs +0 -65
  38. package/fesm2015/idea-ionic-auth.mjs +0 -1019
  39. package/fesm2015/idea-ionic-auth.mjs.map +0 -1
  40. package/fesm2020/idea-ionic-auth.mjs +0 -988
  41. package/fesm2020/idea-ionic-auth.mjs.map +0 -1
  42. /package/{esm2020 → esm2022}/idea-ionic-auth.mjs +0 -0
  43. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,1019 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Component, EventEmitter, Input, Output, NgModule } from '@angular/core';
3
- import * as i4 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i5 from '@angular/forms';
6
- import { FormsModule } from '@angular/forms';
7
- import * as i1 from '@ionic/angular';
8
- import { IonicModule } from '@ionic/angular';
9
- import * as i2$1 from '@angular/router';
10
- import { RouterModule } from '@angular/router';
11
- import * as i2 from '@idea-ionic/common';
12
- import { IDEATranslationsModule } from '@idea-ionic/common';
13
- import { __awaiter } from 'tslib';
14
- import { Browser } from '@capacitor/browser';
15
- import { CognitoUserPool, AuthenticationDetails, CognitoUser, CognitoUserAttribute, CognitoRefreshToken } from 'amazon-cognito-identity-js';
16
- import { environment } from '@env';
17
- import { isEmpty } from 'idea-toolbox';
18
- import { toCanvas } from 'qrcode';
19
-
20
- /**
21
- * The name of the Cognito's user attribute which contains the key of the last device to login in this project.
22
- */
23
- const DEVICE_KEY_ATTRIBUTE = 'custom:'.concat(environment.idea.project);
24
- /**
25
- * Cognito wrapper to manage the authentication flow.
26
- *
27
- * Note: in IDEA's Cognito users pools, the email is an alias of the username.
28
- */
29
- class IDEAAuthService {
30
- constructor(storage) {
31
- var _a;
32
- this.storage = storage;
33
- this.mfaProjectName = (_a = environment.idea.app.title) !== null && _a !== void 0 ? _a : environment.idea.project;
34
- this.userPool = new CognitoUserPool({
35
- UserPoolId: environment.aws.cognito.userPoolId,
36
- ClientId: environment.aws.cognito.userPoolClientId
37
- });
38
- }
39
- /**
40
- * Prepare the necessary structure to get authorized in Cognito.
41
- */
42
- prepareAuthDetails(username, pwd) {
43
- return new AuthenticationDetails({ Username: username, Password: pwd });
44
- }
45
- /**
46
- * Prepare the necessary structure to identify a Cognito user.
47
- */
48
- prepareCognitoUser(username) {
49
- return new CognitoUser({ Username: username, Pool: this.userPool });
50
- }
51
- /**
52
- * Prepare a user attribute (they are all strings) in Cognito's format.
53
- */
54
- prepareUserAttribute(name, value) {
55
- return new CognitoUserAttribute({ Name: name, Value: value });
56
- }
57
- /**
58
- * Perform a login through username and password.
59
- */
60
- login(username, password) {
61
- return new Promise((resolve, reject) => {
62
- const user = this.prepareCognitoUser(username);
63
- user.authenticateUser(this.prepareAuthDetails(username, password), {
64
- onSuccess: () => resolve(environment.idea.auth.forceLoginWithMFA ? LoginOutcomeActions.MFA_SETUP : LoginOutcomeActions.NONE),
65
- onFailure: (err) => reject(err),
66
- newPasswordRequired: () => {
67
- this.challengeUsername = username;
68
- this.challengePassword = password;
69
- resolve(LoginOutcomeActions.NEW_PASSWORD);
70
- },
71
- totpRequired: () => {
72
- this.challengeUsername = username;
73
- this.challengePassword = password;
74
- resolve(LoginOutcomeActions.MFA_CHALLENGE);
75
- }
76
- });
77
- });
78
- }
79
- /**
80
- * Complete the new password flow in the authentication.
81
- */
82
- confirmNewPassword(newPassword) {
83
- return new Promise((resolve, reject) => {
84
- const user = this.prepareCognitoUser(this.challengeUsername);
85
- user.authenticateUser(this.prepareAuthDetails(this.challengeUsername, this.challengePassword), {
86
- onSuccess: () => resolve(),
87
- onFailure: (err) => reject(err),
88
- newPasswordRequired: () => user.completeNewPasswordChallenge(newPassword, {}, {
89
- onSuccess: () => {
90
- this.challengeUsername = null;
91
- this.challengePassword = null;
92
- resolve();
93
- },
94
- onFailure: (err) => reject(err)
95
- })
96
- });
97
- });
98
- }
99
- /**
100
- * Complete the MFA challenge flow in the authentication.
101
- */
102
- completeMFAChallenge(otpCode) {
103
- return new Promise((resolve, reject) => {
104
- const user = this.prepareCognitoUser(this.challengeUsername);
105
- user.authenticateUser(this.prepareAuthDetails(this.challengeUsername, this.challengePassword), {
106
- onSuccess: () => resolve(),
107
- onFailure: (err) => reject(err),
108
- totpRequired: (challengeName) => user.sendMFACode(otpCode, {
109
- onSuccess: () => {
110
- this.challengeUsername = null;
111
- this.challengePassword = null;
112
- resolve();
113
- },
114
- onFailure: err => reject(err)
115
- }, challengeName)
116
- });
117
- });
118
- }
119
- /**
120
- * Register a new user a set its default attributes.
121
- */
122
- register(username, password, attributes) {
123
- attributes = attributes || {};
124
- return new Promise((resolve, reject) => {
125
- // add attributes like the email address and the fullname
126
- const attrs = [];
127
- for (const prop in attributes)
128
- if (attributes[prop])
129
- attrs.push(this.prepareUserAttribute(prop, attributes[prop]));
130
- // add the email, which is equal to the username for most of our Pools
131
- if (!attributes.email)
132
- attrs.push(this.prepareUserAttribute('email', username));
133
- // register the new user to the pool
134
- this.userPool.signUp(username, password, attrs, null, (err, res) => {
135
- if (err)
136
- return reject(err);
137
- this.newAccountJustRegistered = username;
138
- resolve(res.user);
139
- });
140
- });
141
- }
142
- /**
143
- * In case new account has just been registered, return the username.
144
- */
145
- getNewAccountJustRegistered() {
146
- return this.newAccountJustRegistered;
147
- }
148
- /**
149
- * Confirm a new registration through the confirmation code sent by Cognito.
150
- */
151
- confirmRegistration(username, code) {
152
- return new Promise((resolve, reject) => {
153
- this.prepareCognitoUser(username).confirmRegistration(code, true, (err) => err ? reject(err) : resolve());
154
- });
155
- }
156
- /**
157
- * Send again a confirmation code for a new registration.
158
- */
159
- resendConfirmationCode(username) {
160
- return new Promise((resolve, reject) => {
161
- this.prepareCognitoUser(username).resendConfirmationCode((err) => (err ? reject(err) : resolve()));
162
- });
163
- }
164
- /**
165
- * Logout the currently signed-in user.
166
- */
167
- logout(options) {
168
- options = Object.assign({ global: false }, options);
169
- return new Promise((resolve, reject) => {
170
- // remove the refresh token previosly saved
171
- this.storage.remove('AuthRefreshToken').then(() =>
172
- // remove the optional auth details
173
- this.storage.remove('AuthUserDetails').then(() => {
174
- // get the user and the session
175
- const user = this.userPool.getCurrentUser();
176
- user.getSession((err) => __awaiter(this, void 0, void 0, function* () {
177
- // if the session is active, run the online sign-out; otherwise, only the local data has been deleted
178
- if (err)
179
- return resolve();
180
- // if a reference to the device was saved, forget it
181
- if (environment.idea.auth.singleSimultaneousSession)
182
- yield this.setCurrentDeviceForProject(null);
183
- // sign-out from the pool (terminate the current session or all the sessions)
184
- if (options.global)
185
- user.globalSignOut({ onSuccess: () => resolve(), onFailure: err => reject(err) });
186
- else {
187
- user.signOut();
188
- resolve();
189
- }
190
- }));
191
- }));
192
- });
193
- }
194
- /**
195
- * Send a password reset request.
196
- */
197
- forgotPassword(username) {
198
- return new Promise((resolve, reject) => {
199
- this.prepareCognitoUser(username).forgotPassword({
200
- onSuccess: () => resolve(),
201
- onFailure: (err) => reject(err)
202
- });
203
- });
204
- }
205
- /**
206
- * Confirm a new password after a password reset request.
207
- */
208
- confirmPassword(username, code, newPwd) {
209
- return new Promise((resolve, reject) => {
210
- this.prepareCognitoUser(username).confirmPassword(code, newPwd, {
211
- onSuccess: () => resolve(),
212
- onFailure: (err) => reject(err)
213
- });
214
- });
215
- }
216
- /**
217
- * Gets the URL for enabling MFA. This URL can be used to generate a QR Code to read with an authenticator app.
218
- */
219
- getURLForEnablingMFA() {
220
- return new Promise((resolve, reject) => {
221
- const user = this.userPool.getCurrentUser();
222
- if (!user)
223
- return reject();
224
- user.getSession((err) => {
225
- if (err)
226
- return reject(err);
227
- user.associateSoftwareToken({
228
- associateSecretCode: (secretCode) => resolve(`otpauth://totp/${encodeURI(this.mfaProjectName)}?secret=${secretCode}`),
229
- onFailure: (err) => reject(err)
230
- });
231
- });
232
- });
233
- }
234
- /**
235
- * Check whether the user has MFA enabled.
236
- */
237
- checkIfUserHasMFAEnabled(bypassCache = false) {
238
- return new Promise((resolve, reject) => {
239
- const user = this.userPool.getCurrentUser();
240
- if (!user)
241
- return reject();
242
- user.getSession((err) => {
243
- if (err)
244
- return reject(err);
245
- user.getUserData((err, data) => {
246
- if (err)
247
- return reject(err);
248
- const isMFAEnabled = !!(data.UserMFASettingList && data.UserMFASettingList.includes('SOFTWARE_TOKEN_MFA'));
249
- resolve(isMFAEnabled);
250
- }, { bypassCache });
251
- });
252
- });
253
- }
254
- /**
255
- * Configure a MFA device for the user.
256
- */
257
- setMFADevice(otp, mfaDeviceName, enabled = true, preferred = true) {
258
- return new Promise((resolve, reject) => {
259
- const user = this.userPool.getCurrentUser();
260
- if (!user)
261
- return reject();
262
- user.getSession((err) => {
263
- if (err)
264
- return reject(err);
265
- user.verifySoftwareToken(otp, mfaDeviceName, {
266
- onSuccess: () => user.setUserMfaPreference(null, { Enabled: enabled, PreferredMfa: preferred }, (err) => err ? reject(err) : resolve()),
267
- onFailure: (err) => reject(err)
268
- });
269
- });
270
- });
271
- }
272
- /**
273
- * Enable a new MFA device for the user by inserting an OTP code generated by it.
274
- */
275
- enableMFA(otp, mfaDeviceName = 'default') {
276
- return this.setMFADevice(otp, mfaDeviceName, true, true);
277
- }
278
- /**
279
- * Disable MFA for a user by inserting an OTP code generated by it.
280
- */
281
- disableMFA(otp, mfaDeviceName = 'default') {
282
- return this.setMFADevice(otp, mfaDeviceName, false, false);
283
- }
284
- /**
285
- * Check if a user is currently authenticated.
286
- * @param offlineAllowed if set and if offline, skip authentication and retrieve data locally
287
- * @param getFreshIdTokenOnExp cb function to execute when the idToken is refreshed
288
- */
289
- isAuthenticated(offlineAllowed, getFreshIdTokenOnExp) {
290
- return new Promise((resolve, reject) => {
291
- if (offlineAllowed && !navigator.onLine) {
292
- this.storage.get('AuthUserDetails').then(userDetails => resolve({ idToken: null, userDetails }));
293
- // re-execute the method when back online, so that you can retrieve a token to make requests
294
- window.addEventListener('online', () => this.isAuthenticated(true, getFreshIdTokenOnExp)
295
- // set the new token as if it was refreshed
296
- .then(result => getFreshIdTokenOnExp(result.idToken)));
297
- }
298
- else {
299
- const user = this.userPool.getCurrentUser();
300
- if (!user)
301
- return reject();
302
- user.getSession((err, session) => {
303
- if (err)
304
- return reject(err);
305
- user.getUserData((err, data) => {
306
- if (err)
307
- return reject(err);
308
- const isMFAEnabled = !!(data.UserMFASettingList && data.UserMFASettingList.includes('SOFTWARE_TOKEN_MFA'));
309
- if (!isMFAEnabled && environment.idea.auth.forceLoginWithMFA)
310
- return reject(new Error(LoginOutcomeActions.MFA_SETUP));
311
- user.getUserAttributes((e, attributes) => {
312
- if (e)
313
- return reject(e);
314
- // remap user attributes
315
- const userDetails = {};
316
- attributes.forEach((a) => (userDetails[a.getName()] = a.getValue()));
317
- // add the user's groups to the attributes
318
- const sessionInfo = session.getAccessToken().decodePayload();
319
- const groups = sessionInfo['cognito:groups'] || [];
320
- userDetails['groups'] = groups;
321
- // run some checks considering the user's groups and devices (based on the project's configuration)
322
- this.runPostAuthChecks(userDetails, err => {
323
- // in case some check failed, reject the authorisation flow
324
- if (err)
325
- return reject(err);
326
- // (async) save the refresh token so it can be accessed by other procedures
327
- this.storage.set('AuthRefreshToken', session.getRefreshToken().getToken());
328
- // set a timer to manage the autorefresh of the idToken (through the refreshToken)
329
- setTimeout(() => this.refreshSession(user, session.getRefreshToken().getToken(), getFreshIdTokenOnExp), 15 * 60 * 1000); // every 15 minutes
330
- // (async) if offlineAllowed, save data locally, to use it next time we'll be offline
331
- if (offlineAllowed)
332
- this.storage.set('AuthUserDetails', userDetails);
333
- // return the idToken (to use with API)
334
- resolve({ idToken: session.getIdToken().getJwtToken(), userDetails });
335
- });
336
- });
337
- }, { bypassCache: true });
338
- });
339
- }
340
- });
341
- }
342
- /**
343
- * Helper to refresh the session every N minutes.
344
- */
345
- refreshSession(user, refreshToken, callback) {
346
- user.refreshSession(new CognitoRefreshToken({ RefreshToken: refreshToken }), (err, session) => {
347
- if (err) {
348
- // try again in 1 minute
349
- setTimeout(() => this.refreshSession(user, refreshToken, callback), 1 * 60 * 1000);
350
- }
351
- else {
352
- // (async) save the refresh token so it can be accessed by other procedures
353
- this.storage.set('AuthRefreshToken', session.getRefreshToken().getToken());
354
- // repeat every 15 minutes
355
- setTimeout(() => this.refreshSession(user, session.getRefreshToken().getToken(), callback), 15 * 60 * 1000);
356
- // run the callback action, if set
357
- if (callback)
358
- callback(session.getIdToken().getJwtToken());
359
- }
360
- });
361
- }
362
- /**
363
- * Run some post-auth checks, based on the users groups and on the app's configuration:
364
- * - users in the Cognito's "admins" grup skip all the following rules.
365
- * - users in the Cognito's "robots" group can't sign-into front-ends (they serve only back-end purposes).
366
- * - if `env.idea.auth.singleSimultaneousSession` is on, make sure there is only one active session per user.
367
- */
368
- runPostAuthChecks(userDetails, callback) {
369
- const groups = userDetails['groups'];
370
- // skip checks if the user is in the "admins" group
371
- const isAdmin = groups.some(x => x === 'admins');
372
- if (isAdmin)
373
- return callback();
374
- // users in the "robots" group can't sign-into front-ends (they serve only back-end purposes)
375
- const isRobot = groups.some(x => x === 'robots');
376
- if (isRobot)
377
- return callback(new Error('ROBOT_USER'));
378
- // in case the project limits each account to only one simultaneous session, run a check
379
- if (environment.idea.auth.singleSimultaneousSession)
380
- return this.checkForSimultaneousSessions(userDetails, callback);
381
- // otherwise, we're done
382
- callback();
383
- }
384
- /**
385
- * Check whether the user signed-into multiple devices.
386
- */
387
- checkForSimultaneousSessions(userDetails, callback) {
388
- return __awaiter(this, void 0, void 0, function* () {
389
- // get or create a key for the current device (~random)
390
- let currentDeviceKey = yield this.storage.get('AuthDeviceKey');
391
- if (!currentDeviceKey) {
392
- const randomKey = Math.random().toString(36).substring(10);
393
- currentDeviceKey = randomKey.concat(String(Date.now()));
394
- yield this.storage.set('AuthDeviceKey', currentDeviceKey);
395
- }
396
- // check whether the last device to sign-into this project (if any) is the current one
397
- const lastDeviceToSignIntoThisProject = userDetails[DEVICE_KEY_ATTRIBUTE];
398
- // if it's the first user's device to sign-in, save the reference in Cognito and resolve
399
- if (!lastDeviceToSignIntoThisProject) {
400
- this.setCurrentDeviceForProject(currentDeviceKey)
401
- .then(() => callback())
402
- .catch(() => callback(new Error('CANT_SET_DEVICE')));
403
- // if the device didn't change, resolve
404
- }
405
- else if (lastDeviceToSignIntoThisProject === currentDeviceKey)
406
- callback();
407
- // othwerwise, report there is more than one simultaneous session
408
- else
409
- callback(new Error('SIMULTANEOUS_SESSION'));
410
- });
411
- }
412
- /**
413
- * Set (or reset) the current user's device (by key) in the current project (stored in Cognito).
414
- */
415
- setCurrentDeviceForProject(deviceKey) {
416
- const attributes = {};
417
- // note: an empty string will remove the attribute from Cognito
418
- attributes[DEVICE_KEY_ATTRIBUTE] = deviceKey || '';
419
- return this.updateUserAttributes(attributes);
420
- }
421
- /**
422
- * Update the currently logged in user's attributes.
423
- */
424
- updateUserAttributes(attributes) {
425
- return new Promise((resolve, reject) => {
426
- // prepare the attributes we want to change
427
- const attrs = new Array();
428
- for (const prop in attributes)
429
- if (attributes[prop] !== undefined)
430
- attrs.push(this.prepareUserAttribute(prop, attributes[prop]));
431
- const user = this.userPool.getCurrentUser();
432
- if (!user)
433
- return reject();
434
- // we need to get the session before to make changes
435
- user.getSession((err) => {
436
- if (err)
437
- reject(err);
438
- else
439
- user.updateAttributes(attrs, (e) => (e ? reject(e) : resolve()));
440
- });
441
- });
442
- }
443
- }
444
- IDEAAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthService, deps: [{ token: i2.IDEAStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
445
- IDEAAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthService, providedIn: 'root' });
446
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthService, decorators: [{
447
- type: Injectable,
448
- args: [{ providedIn: 'root' }]
449
- }], ctorParameters: function () { return [{ type: i2.IDEAStorageService }]; } });
450
- /**
451
- * The possible actions following a successful login.
452
- */
453
- var LoginOutcomeActions;
454
- (function (LoginOutcomeActions) {
455
- LoginOutcomeActions["NONE"] = "none";
456
- LoginOutcomeActions["NEW_PASSWORD"] = "newPassword";
457
- LoginOutcomeActions["MFA_CHALLENGE"] = "mfaChallenge";
458
- LoginOutcomeActions["MFA_SETUP"] = "mfaSetup";
459
- })(LoginOutcomeActions || (LoginOutcomeActions = {}));
460
-
461
- class IDEASignInPage {
462
- constructor(navCtrl, message, loading, auth, t) {
463
- this.navCtrl = navCtrl;
464
- this.message = message;
465
- this.loading = loading;
466
- this.auth = auth;
467
- this.t = t;
468
- this.title = environment.idea.app.title;
469
- this.registrationPossible = environment.idea.auth.registrationIsPossible;
470
- this.hasIntroPage = environment.idea.app.hasIntroPage;
471
- this.website = environment.idea.website;
472
- this.agreementsCheck = true;
473
- this.newAccountRegistered = false;
474
- this.darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
475
- }
476
- ionViewDidEnter() {
477
- // manage the scenario in which we just created a new account (show a explanatory message: email must be confirmed)
478
- this.newAccountRegistered = !!this.auth.getNewAccountJustRegistered();
479
- if (this.newAccountRegistered)
480
- this.email = this.auth.getNewAccountJustRegistered();
481
- }
482
- login() {
483
- var _a;
484
- return __awaiter(this, void 0, void 0, function* () {
485
- if (!this.agreementsCheck)
486
- return;
487
- try {
488
- this.errorMsg = null;
489
- yield this.loading.show();
490
- const loginAction = yield this.auth.login(this.email, this.password);
491
- if (loginAction === LoginOutcomeActions.NEW_PASSWORD)
492
- this.navCtrl.navigateForward(['auth', 'new-password']);
493
- else if (loginAction === LoginOutcomeActions.MFA_CHALLENGE)
494
- this.navCtrl.navigateForward(['auth', 'mfa-challenge']);
495
- else if (loginAction === LoginOutcomeActions.MFA_SETUP)
496
- this.navCtrl.navigateForward(['auth', 'setup-mfa']);
497
- else
498
- window.location.assign('');
499
- }
500
- catch (err) {
501
- if (err.name === 'UserNotConfirmedException')
502
- this.errorMsg = this.t._('IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN');
503
- else if (err.name === 'UserLambdaValidationException' &&
504
- ((_a = err.message) === null || _a === void 0 ? void 0 : _a.includes('@IDEA_COGNITO_TRANSITION')))
505
- this.errorMsg = this.t._('IDEA_AUTH.CHANGE_YOUR_PASSWORD_TO_LOGIN');
506
- this.message.error('IDEA_AUTH.AUTHENTICATION_FAILED');
507
- }
508
- finally {
509
- this.loading.hide();
510
- }
511
- });
512
- }
513
- goToIntro() {
514
- this.navCtrl.navigateBack(['intro']);
515
- }
516
- goToForgotPassword() {
517
- this.navCtrl.navigateForward(['auth/forgot-password']);
518
- }
519
- goToRegistration() {
520
- this.navCtrl.navigateForward(['auth', 'sign-up']);
521
- }
522
- translationExists(key) {
523
- return !!this.t._(key);
524
- }
525
- openLink(url) {
526
- return __awaiter(this, void 0, void 0, function* () {
527
- yield Browser.open({ url });
528
- });
529
- }
530
- }
531
- 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 });
532
- 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" }] });
533
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignInPage, decorators: [{
534
- type: Component,
535
- 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"] }]
536
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
537
-
538
- class IDEASignUpPage {
539
- constructor(navCtrl, message, loading, auth, t) {
540
- this.navCtrl = navCtrl;
541
- this.message = message;
542
- this.loading = loading;
543
- this.auth = auth;
544
- this.t = t;
545
- this.agreementsCheck = false;
546
- }
547
- ngOnInit() {
548
- if (!environment.idea.auth.registrationIsPossible)
549
- return this.goToAuth();
550
- this.agreementsCheck =
551
- this.t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || this.t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')
552
- ? this.agreementsCheck
553
- : true;
554
- }
555
- register() {
556
- return __awaiter(this, void 0, void 0, function* () {
557
- this.errorMsg = null;
558
- if (isEmpty(this.email, 'email'))
559
- this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
560
- else if (!this.password || this.password.length < 8)
561
- this.errorMsg = this.t._('IDEA_AUTH.PASSWORD_POLICY_VIOLATION', { n: 8 });
562
- if (this.errorMsg)
563
- return this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
564
- try {
565
- yield this.loading.show();
566
- yield this.auth.register(this.email, this.password);
567
- this.message.success('IDEA_AUTH.REGISTRATION_COMPLETED');
568
- this.goToAuth();
569
- }
570
- catch (err) {
571
- this.errorMsg = err.message;
572
- this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
573
- }
574
- finally {
575
- this.loading.hide();
576
- }
577
- });
578
- }
579
- translationExists(key) {
580
- return !!this.t._(key);
581
- }
582
- goToResendLink() {
583
- this.navCtrl.navigateForward(['auth/resend-link']);
584
- }
585
- goToAuth() {
586
- this.navCtrl.navigateBack(['auth']);
587
- }
588
- }
589
- 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 });
590
- 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" }] });
591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASignUpPage, decorators: [{
592
- type: Component,
593
- 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"] }]
594
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
595
-
596
- class IDEANewPasswordPage {
597
- constructor(navCtrl, message, loading, auth, t) {
598
- this.navCtrl = navCtrl;
599
- this.message = message;
600
- this.loading = loading;
601
- this.auth = auth;
602
- this.t = t;
603
- }
604
- ngOnInit() {
605
- if (!this.auth.challengeUsername)
606
- this.goToAuth();
607
- }
608
- confirmNewPassword() {
609
- return __awaiter(this, void 0, void 0, function* () {
610
- try {
611
- this.errorMsg = null;
612
- yield this.loading.show();
613
- yield this.auth.confirmNewPassword(this.newPassword);
614
- window.location.assign('');
615
- }
616
- catch (error) {
617
- this.errorMsg = this.t._('IDEA_AUTH.PASSWORD_POLICY_VIOLATION', { n: 8 });
618
- this.message.error(this.errorMsg, true);
619
- }
620
- finally {
621
- this.loading.hide();
622
- }
623
- });
624
- }
625
- goToAuth() {
626
- this.navCtrl.navigateBack(['auth']);
627
- }
628
- }
629
- 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 });
630
- 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" }] });
631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEANewPasswordPage, decorators: [{
632
- type: Component,
633
- 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"] }]
634
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
635
-
636
- class IDEAResendLinkPage {
637
- constructor(navCtrl, message, loading, auth, t) {
638
- this.navCtrl = navCtrl;
639
- this.message = message;
640
- this.loading = loading;
641
- this.auth = auth;
642
- this.t = t;
643
- }
644
- resendConfirmationLink() {
645
- return __awaiter(this, void 0, void 0, function* () {
646
- this.errorMsg = null;
647
- if (!this.email) {
648
- this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
649
- this.message.error('IDEA_AUTH.SENDING_FAILED');
650
- return;
651
- }
652
- try {
653
- yield this.loading.show();
654
- yield this.auth.resendConfirmationCode(this.email);
655
- this.message.success('IDEA_AUTH.CONFIRMATION_LINK_SENT');
656
- this.goToAuth();
657
- }
658
- catch (error) {
659
- this.errorMsg = this.t._('IDEA_AUTH.IS_THE_EMAIL_CORRECT');
660
- this.message.error('IDEA_AUTH.SENDING_FAILED');
661
- }
662
- finally {
663
- this.loading.hide();
664
- }
665
- });
666
- }
667
- goToAuth() {
668
- this.navCtrl.navigateBack(['auth']);
669
- }
670
- }
671
- 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 });
672
- 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" }] });
673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAResendLinkPage, decorators: [{
674
- type: Component,
675
- 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"] }]
676
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
677
-
678
- class IDEAForgotPasswordPage {
679
- constructor(navCtrl, message, loading, auth) {
680
- this.navCtrl = navCtrl;
681
- this.message = message;
682
- this.loading = loading;
683
- this.auth = auth;
684
- }
685
- forgotPassword() {
686
- return __awaiter(this, void 0, void 0, function* () {
687
- try {
688
- yield this.loading.show();
689
- yield this.auth.forgotPassword(this.email);
690
- this.message.success('IDEA_AUTH.PASSWORD_RESET_CODE_SENT');
691
- this.goToConfirmPassword();
692
- }
693
- catch (error) {
694
- this.message.error('IDEA_AUTH.USER_NOT_FOUND');
695
- }
696
- finally {
697
- this.loading.hide();
698
- }
699
- });
700
- }
701
- goToConfirmPassword() {
702
- var _a;
703
- this.navCtrl.navigateForward(['auth/confirm-password'], { queryParams: { email: (_a = this.email) !== null && _a !== void 0 ? _a : null } });
704
- }
705
- goToAuth() {
706
- this.navCtrl.navigateBack(['auth']);
707
- }
708
- }
709
- 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 });
710
- 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" }] });
711
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAForgotPasswordPage, decorators: [{
712
- type: Component,
713
- 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"] }]
714
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }]; } });
715
-
716
- class IDEAConfirmPasswordPage {
717
- constructor(navCtrl, route, message, loading, auth, t) {
718
- this.navCtrl = navCtrl;
719
- this.route = route;
720
- this.message = message;
721
- this.loading = loading;
722
- this.auth = auth;
723
- this.t = t;
724
- }
725
- ngOnInit() {
726
- var _a;
727
- this.email = (_a = this.route.snapshot.queryParamMap.get('email')) !== null && _a !== void 0 ? _a : null;
728
- if (!this.email && this.route.snapshot.queryParams.user)
729
- this.email = decodeURIComponent(this.route.snapshot.queryParams.user);
730
- this.code = this.route.snapshot.queryParams.code;
731
- }
732
- confirmPassword() {
733
- return __awaiter(this, void 0, void 0, function* () {
734
- try {
735
- this.errorMsg = null;
736
- yield this.loading.show();
737
- yield this.auth.confirmPassword(this.email, this.code, this.newPassword);
738
- this.message.success('IDEA_AUTH.PASSWORD_CHANGED');
739
- this.goToAuth();
740
- }
741
- catch (error) {
742
- this.errorMsg = this.t._('IDEA_AUTH.CONFIRM_PASSWORD_ERROR', { n: 8 });
743
- this.message.error(this.errorMsg, true);
744
- }
745
- finally {
746
- this.loading.hide();
747
- }
748
- });
749
- }
750
- goToForgotPassword() {
751
- this.navCtrl.navigateBack(['auth/forgot-password']);
752
- }
753
- goToAuth() {
754
- this.navCtrl.navigateBack(['auth']);
755
- }
756
- }
757
- 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 });
758
- 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" }] });
759
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAConfirmPasswordPage, decorators: [{
760
- type: Component,
761
- 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"] }]
762
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2$1.ActivatedRoute }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
763
-
764
- class IDEAMFAChallengePage {
765
- constructor(navCtrl, message, loading, auth, t) {
766
- this.navCtrl = navCtrl;
767
- this.message = message;
768
- this.loading = loading;
769
- this.auth = auth;
770
- this.t = t;
771
- }
772
- ngOnInit() {
773
- if (!this.auth.challengeUsername)
774
- this.goToAuth();
775
- }
776
- completeMFAChallenge() {
777
- return __awaiter(this, void 0, void 0, function* () {
778
- try {
779
- this.errorMsg = null;
780
- yield this.loading.show();
781
- yield this.auth.completeMFAChallenge(this.otpCode);
782
- window.location.assign('');
783
- }
784
- catch (error) {
785
- this.errorMsg = this.t._('IDEA_AUTH.INVALID_OTP_CODE');
786
- this.message.error(this.errorMsg, true);
787
- }
788
- finally {
789
- this.loading.hide();
790
- }
791
- });
792
- }
793
- goToAuth() {
794
- this.navCtrl.navigateBack(['auth']);
795
- }
796
- }
797
- 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 });
798
- 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" }] });
799
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAMFAChallengePage, decorators: [{
800
- type: Component,
801
- 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"] }]
802
- }], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
803
-
804
- class IDEASetupMFAModalComponent {
805
- constructor(modalCtrl, loading, message, auth) {
806
- this.modalCtrl = modalCtrl;
807
- this.loading = loading;
808
- this.message = message;
809
- this.auth = auth;
810
- }
811
- ngOnInit() {
812
- return __awaiter(this, void 0, void 0, function* () {
813
- try {
814
- yield this.loading.show();
815
- this.isMFAEnabled = yield this.auth.checkIfUserHasMFAEnabled(true);
816
- if (!this.isMFAEnabled) {
817
- const url = yield this.auth.getURLForEnablingMFA();
818
- yield this.generateQRCodeCanvasByURL(url);
819
- }
820
- }
821
- catch (error) {
822
- this.message.error('COMMON.OPERATION_FAILED');
823
- }
824
- finally {
825
- this.loading.hide();
826
- }
827
- });
828
- }
829
- generateQRCodeCanvasByURL(url) {
830
- return new Promise((resolve, reject) => {
831
- const container = document.getElementById('qrCodeContainer');
832
- container.innerHTML = '';
833
- toCanvas(url, { errorCorrectionLevel: 'L' }, (err, canvas) => {
834
- if (err)
835
- return reject(err);
836
- canvas.style.width = '100%';
837
- canvas.style.height = '100%';
838
- canvas.style.borderRadius = '4px';
839
- container.appendChild(canvas);
840
- resolve();
841
- });
842
- });
843
- }
844
- setMFA(enable) {
845
- return __awaiter(this, void 0, void 0, function* () {
846
- if (!this.otpCode)
847
- return;
848
- try {
849
- yield this.loading.show();
850
- if (enable)
851
- yield this.auth.enableMFA(this.otpCode);
852
- else
853
- yield this.auth.disableMFA(this.otpCode);
854
- this.isMFAEnabled = enable;
855
- this.message.success('COMMON.OPERATION_COMPLETED');
856
- this.modalCtrl.dismiss({ enabled: enable });
857
- }
858
- catch (error) {
859
- this.message.error('COMMON.OPERATION_FAILED');
860
- }
861
- finally {
862
- this.loading.hide();
863
- }
864
- });
865
- }
866
- close() {
867
- this.modalCtrl.dismiss();
868
- }
869
- }
870
- 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 });
871
- 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" }] });
872
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModalComponent, decorators: [{
873
- type: Component,
874
- 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"] }]
875
- }], ctorParameters: function () { return [{ type: i1.ModalController }, { type: i2.IDEALoadingService }, { type: i2.IDEAMessageService }, { type: IDEAAuthService }]; } });
876
-
877
- class IDEASetupMFAButtonComponent {
878
- constructor(modalCtrl, auth) {
879
- this.modalCtrl = modalCtrl;
880
- this.auth = auth;
881
- /**
882
- * Trigger then the MFA setup changes.
883
- */
884
- this.change = new EventEmitter();
885
- }
886
- ngOnInit() {
887
- return __awaiter(this, void 0, void 0, function* () {
888
- this.isMFAEnabled = yield this.auth.checkIfUserHasMFAEnabled(true);
889
- });
890
- }
891
- openMFAModal() {
892
- return __awaiter(this, void 0, void 0, function* () {
893
- const modal = yield this.modalCtrl.create({ component: IDEASetupMFAModalComponent, backdropDismiss: false });
894
- modal.onDidDismiss().then(({ data }) => {
895
- if (data) {
896
- this.isMFAEnabled = data.enabled;
897
- this.change.emit(data.enabled);
898
- }
899
- });
900
- yield modal.present();
901
- });
902
- }
903
- }
904
- 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 });
905
- 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" }] });
906
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAButtonComponent, decorators: [{
907
- type: Component,
908
- 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" }]
909
- }], ctorParameters: function () { return [{ type: i1.ModalController }, { type: IDEAAuthService }]; }, propDecorators: { color: [{
910
- type: Input
911
- }], fill: [{
912
- type: Input
913
- }], change: [{
914
- type: Output
915
- }] } });
916
-
917
- class IDEASetupMFAPage {
918
- constructor(navCtrl) {
919
- this.navCtrl = navCtrl;
920
- }
921
- reloadApp() {
922
- window.location.assign('');
923
- }
924
- goToAuth() {
925
- this.navCtrl.navigateBack(['auth']);
926
- }
927
- }
928
- IDEASetupMFAPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAPage, deps: [{ token: i1.NavController }], target: i0.ɵɵFactoryTarget.Component });
929
- 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" }] });
930
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAPage, decorators: [{
931
- type: Component,
932
- 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"] }]
933
- }], ctorParameters: function () { return [{ type: i1.NavController }]; } });
934
-
935
- class IDEASetupMFAModule {
936
- }
937
- IDEASetupMFAModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
938
- 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] });
939
- IDEASetupMFAModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, imports: [CommonModule, FormsModule, IonicModule, IDEATranslationsModule] });
940
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEASetupMFAModule, decorators: [{
941
- type: NgModule,
942
- args: [{
943
- imports: [CommonModule, FormsModule, IonicModule, IDEATranslationsModule],
944
- declarations: [IDEASetupMFAModalComponent, IDEASetupMFAButtonComponent],
945
- exports: [IDEASetupMFAModalComponent, IDEASetupMFAButtonComponent]
946
- }]
947
- }] });
948
-
949
- class IDEAAuthModule {
950
- }
951
- IDEAAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
952
- IDEAAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, declarations: [IDEASignInPage,
953
- IDEASignUpPage,
954
- IDEANewPasswordPage,
955
- IDEAResendLinkPage,
956
- IDEAForgotPasswordPage,
957
- IDEAConfirmPasswordPage,
958
- IDEAMFAChallengePage,
959
- IDEASetupMFAPage], imports: [CommonModule,
960
- FormsModule,
961
- IonicModule,
962
- IDEATranslationsModule, i2$1.RouterModule, IDEASetupMFAModule] });
963
- IDEAAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, imports: [CommonModule,
964
- FormsModule,
965
- IonicModule,
966
- IDEATranslationsModule,
967
- RouterModule.forChild([
968
- { path: '', redirectTo: 'sign-in', pathMatch: 'full' },
969
- { path: 'sign-in', component: IDEASignInPage },
970
- { path: 'sign-up', component: IDEASignUpPage },
971
- { path: 'new-password', component: IDEANewPasswordPage },
972
- { path: 'mfa-challenge', component: IDEAMFAChallengePage },
973
- { path: 'setup-mfa', component: IDEASetupMFAPage },
974
- { path: 'resend-link', component: IDEAResendLinkPage },
975
- { path: 'forgot-password', component: IDEAForgotPasswordPage },
976
- { path: 'confirm-password', component: IDEAConfirmPasswordPage }
977
- ]),
978
- IDEASetupMFAModule] });
979
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IDEAAuthModule, decorators: [{
980
- type: NgModule,
981
- args: [{
982
- imports: [
983
- CommonModule,
984
- FormsModule,
985
- IonicModule,
986
- IDEATranslationsModule,
987
- RouterModule.forChild([
988
- { path: '', redirectTo: 'sign-in', pathMatch: 'full' },
989
- { path: 'sign-in', component: IDEASignInPage },
990
- { path: 'sign-up', component: IDEASignUpPage },
991
- { path: 'new-password', component: IDEANewPasswordPage },
992
- { path: 'mfa-challenge', component: IDEAMFAChallengePage },
993
- { path: 'setup-mfa', component: IDEASetupMFAPage },
994
- { path: 'resend-link', component: IDEAResendLinkPage },
995
- { path: 'forgot-password', component: IDEAForgotPasswordPage },
996
- { path: 'confirm-password', component: IDEAConfirmPasswordPage }
997
- ]),
998
- IDEASetupMFAModule
999
- ],
1000
- declarations: [
1001
- IDEASignInPage,
1002
- IDEASignUpPage,
1003
- IDEANewPasswordPage,
1004
- IDEAResendLinkPage,
1005
- IDEAForgotPasswordPage,
1006
- IDEAConfirmPasswordPage,
1007
- IDEAMFAChallengePage,
1008
- IDEASetupMFAPage
1009
- ]
1010
- }]
1011
- }] });
1012
-
1013
- /**
1014
- * Generated bundle index. Do not edit.
1015
- */
1016
-
1017
- export { IDEAAuthModule, IDEAAuthService, IDEASetupMFAButtonComponent, IDEASetupMFAModalComponent, IDEASetupMFAModule, LoginOutcomeActions };
1018
- //# sourceMappingURL=idea-ionic-auth.mjs.map
1019
- //# sourceMappingURL=idea-ionic-auth.mjs.map