@idea-ionic/auth 6.13.0 → 7.0.3

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