@idsoftsource/initial-process 4.1.1 → 4.1.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,19 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, signal, inject, Injectable, Optional, Inject, forwardRef, Input, Directive, NgModule, EventEmitter, Output, ViewChild, Component, ViewEncapsulation, computed, effect, ElementRef, Pipe, HostListener } from '@angular/core';
|
|
2
|
+
import { InjectionToken, signal, inject, Injectable, Optional, Inject, forwardRef, Input, Directive, NgModule, EventEmitter, Output, ViewChild, Component, ViewEncapsulation, computed, effect, ElementRef, Pipe, HostListener, DestroyRef, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import * as i11 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i7 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, COMPOSITION_BUFFER_MODE, FormsModule, ReactiveFormsModule, Validators, FormControl, FormGroup } from '@angular/forms';
|
|
7
7
|
import * as i2 from '@angular/router';
|
|
8
|
-
import { RouterModule } from '@angular/router';
|
|
8
|
+
import { RouterModule, Router } from '@angular/router';
|
|
9
9
|
import * as i1$1 from 'ngx-bootstrap/modal';
|
|
10
10
|
import { ModalModule } from 'ngx-bootstrap/modal';
|
|
11
11
|
import { catchError, throwError, shareReplay, map, Subject, takeUntil, of, firstValueFrom, tap as tap$1, Subscription, switchMap, finalize, EMPTY } from 'rxjs';
|
|
12
12
|
import * as i1 from '@angular/common/http';
|
|
13
13
|
import { HttpClient, HttpParams, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
14
14
|
import * as i9 from '@auth0/auth0-angular';
|
|
15
|
+
import { AuthService } from '@auth0/auth0-angular';
|
|
15
16
|
import * as i1$3 from '@rangs/auth0-lib';
|
|
16
|
-
import { RoleContextService, TokenService } from '@rangs/auth0-lib';
|
|
17
|
+
import { RoleContextService, TokenService, AuthLogoutService } from '@rangs/auth0-lib';
|
|
17
18
|
import * as i12 from '@ng-select/ng-select';
|
|
18
19
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
19
20
|
import * as i1$2 from '@angular/platform-browser';
|
|
@@ -32,6 +33,7 @@ import * as i3 from 'ngx-bootstrap/accordion';
|
|
|
32
33
|
import { AccordionModule } from 'ngx-bootstrap/accordion';
|
|
33
34
|
import * as i2$1 from 'ngx-bootstrap/tabs';
|
|
34
35
|
import { TabsModule } from 'ngx-bootstrap/tabs';
|
|
36
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
35
37
|
|
|
36
38
|
var ProviderType;
|
|
37
39
|
(function (ProviderType) {
|
|
@@ -40893,112 +40895,196 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
40893
40895
|
args: [{ selector: 'app-must-change-password', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule], template: "<div class=\"container\">\r\n <div class=\"row justify-content-center align-items-center vh-100\">\r\n <div class=\"col-md-6 col-lg-5\">\r\n <div class=\"card shadow-lg border-0\">\r\n <div class=\"card-body p-4\">\r\n <div class=\"text-center mb-4\">\r\n <!-- <span class=\"logout-wrapper\" (click)=\"logout()\">\r\n <span class=\"logout-icon\"></span>\r\n <span class=\"logout-text\">Logout</span>\r\n </span> -->\r\n <h4 class=\"fw-bold\">Change Your Password</h4>\r\n <p class=\"text-muted small\">\r\n For security reasons, you must change your password before continuing.\r\n </p>\r\n </div>\r\n <div *ngIf=\"errorMessage\" class=\"alert alert-danger\">\r\n {{ errorMessage }}\r\n </div>\r\n <form [formGroup]=\"changePasswordForm\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">New Password</label>\r\n <input type=\"password\" class=\"form-control\" formControlName=\"newPassword\"\r\n [ngClass]=\"{'is-invalid': submitted && f['newPassword'].errors}\">\r\n\r\n <div *ngIf=\"submitted && f['newPassword'].errors\" class=\"invalid-feedback\">\r\n <div *ngIf=\"f['newPassword'].errors['required']\">\r\n New password is required.\r\n </div>\r\n <div *ngIf=\"f['newPassword'].errors['minlength']\">\r\n Minimum 8 characters required.\r\n </div>\r\n <div *ngIf=\"f['newPassword'].errors['pattern']\">\r\n Must include uppercase, lowercase, number & symbol.\r\n </div>\r\n </div>\r\n\r\n <!-- Strength meter + checklist: shown only once the user starts typing -->\r\n <div class=\"password-strength\" *ngIf=\"passwordTouched\">\r\n <div class=\"strength-bar\">\r\n <span class=\"strength-segment\"\r\n *ngFor=\"let seg of [0,1,2,3]\"\r\n [class.filled]=\"isSegmentFilled(seg)\"\r\n [style.background]=\"isSegmentFilled(seg) ? strengthColor : null\">\r\n </span>\r\n </div>\r\n\r\n <div class=\"strength-label\" [style.color]=\"strengthColor\">{{ strengthLabel }}</div>\r\n\r\n <div class=\"password-checklist\">\r\n <div class=\"checklist-row\" [class.met]=\"passwordRules.minLength\">\r\n <span class=\"check-circle\"><i class=\"checkmark\" *ngIf=\"passwordRules.minLength\">✓</i></span>\r\n <span class=\"rule-text\">At least 8 characters</span>\r\n </div>\r\n <div class=\"checklist-row\" [class.met]=\"passwordRules.uppercase\">\r\n <span class=\"check-circle\"><i class=\"checkmark\" *ngIf=\"passwordRules.uppercase\">✓</i></span>\r\n <span class=\"rule-text\">One uppercase letter</span>\r\n </div>\r\n <div class=\"checklist-row\" [class.met]=\"passwordRules.number\">\r\n <span class=\"check-circle\"><i class=\"checkmark\" *ngIf=\"passwordRules.number\">✓</i></span>\r\n <span class=\"rule-text\">One number</span>\r\n </div>\r\n <div class=\"checklist-row\" [class.met]=\"passwordRules.specialChar\">\r\n <span class=\"check-circle\"><i class=\"checkmark\" *ngIf=\"passwordRules.specialChar\">✓</i></span>\r\n <span class=\"rule-text\">One special character (!@#$%^&*)</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Confirm Password</label>\r\n <input type=\"password\" class=\"form-control\" formControlName=\"confirmPassword\"\r\n [ngClass]=\"{'is-invalid': submitted && changePasswordForm.errors?.['mismatch']}\">\r\n\r\n <div *ngIf=\"submitted && changePasswordForm.errors?.['mismatch']\" class=\"invalid-feedback\">\r\n Passwords do not match.\r\n </div>\r\n </div>\r\n <div class=\"d-grid\">\r\n <button type=\"submit\" class=\"btn btn-primary\" style=\"background: #4077AD;color: white;border-radius: 5px;\"\r\n [disabled]=\"isSubmitDisabled\">\r\n <span *ngIf=\"isLoading\" class=\"spinner-border spinner-border-sm me-2\"></span>\r\n Update Password\r\n </button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n <div class=\"text-center mt-3\">\r\n <small class=\"text-muted\">\r\n If you face issues, contact your administrator.\r\n </small>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".logout-wrapper{display:inline-flex;align-items:center;gap:6px;cursor:pointer;color:#212529bf;font-weight:500;font-size:18px}.logout-wrapper:hover{color:#4077ad}.logout-icon{width:20px;height:20px;background:url(/assets/images/icons/logoutt.svg) no-repeat center;background-size:contain}.password-strength{margin-top:8px}.password-strength .strength-bar{display:flex;gap:8px}.password-strength .strength-bar .strength-segment{flex:1;height:4px;border-radius:2px;background:#e5e7eb;transition:background-color .2s ease}.password-strength .strength-label{margin-top:6px;font-size:12px;font-weight:600;text-align:left;transition:color .2s ease}.password-strength .password-checklist{margin-top:10px;background:#f5f7fa;border-radius:8px;padding:16px}.password-strength .password-checklist .checklist-row{display:flex;align-items:center;gap:10px}.password-strength .password-checklist .checklist-row+.checklist-row{margin-top:8px}.password-strength .password-checklist .checklist-row .check-circle{flex:0 0 auto;width:16px;height:16px;border-radius:50%;border:1.5px solid #9CA3AF;background:transparent;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease}.password-strength .password-checklist .checklist-row .check-circle .checkmark{font-style:normal;font-size:10px;line-height:1;color:#fff;opacity:0;transform:scale(.8);transition:opacity .2s ease,transform .2s ease}.password-strength .password-checklist .checklist-row .rule-text{font-size:14px;color:#9ca3af;transition:color .2s ease}.password-strength .password-checklist .checklist-row.met .check-circle{background:#0c1620;border-color:#0c1620}.password-strength .password-checklist .checklist-row.met .check-circle .checkmark{opacity:1;transform:scale(1)}.password-strength .password-checklist .checklist-row.met .rule-text{color:#374151}\n"] }]
|
|
40894
40896
|
}], ctorParameters: () => [{ type: i7.FormBuilder }, { type: i9.AuthService }, { type: UserDetailService }, { type: i1$3.TokenService }, { type: i1$3.RoleContextService }, { type: i1$3.AuthLogoutService }] });
|
|
40895
40897
|
|
|
40898
|
+
// app-type.enum.ts
|
|
40899
|
+
var AppType;
|
|
40900
|
+
(function (AppType) {
|
|
40901
|
+
AppType["AdjusterMatch"] = "AdjusterMatch";
|
|
40902
|
+
AppType["Ameripro"] = "Ameripro";
|
|
40903
|
+
AppType["Bootog"] = "Bootog";
|
|
40904
|
+
AppType["DroneSnap"] = "DroneSnap";
|
|
40905
|
+
AppType["IDClaims"] = "IDClaims";
|
|
40906
|
+
AppType["IDEnergy"] = "IDEnergy";
|
|
40907
|
+
AppType["InspectionDepot"] = "InspectionDepot";
|
|
40908
|
+
AppType["InspectorMatch"] = "InspectorMatch";
|
|
40909
|
+
AppType["MoldDepot"] = "MoldDepot";
|
|
40910
|
+
AppType["TermiteDepot"] = "TermiteDepot";
|
|
40911
|
+
AppType["VirtualInspector"] = "VirtualInspector";
|
|
40912
|
+
})(AppType || (AppType = {}));
|
|
40913
|
+
|
|
40914
|
+
const DEFAULT_BRANDING = {
|
|
40915
|
+
logo: 'assets/images/default-logo.svg',
|
|
40916
|
+
displayName: 'Our Platform'
|
|
40917
|
+
};
|
|
40918
|
+
const APP_BRANDING_MAP = {
|
|
40919
|
+
[AppType.AdjusterMatch]: { logo: 'assets/images/icons/adjuster-match-logo.svg', displayName: 'Adjuster Match' },
|
|
40920
|
+
[AppType.Ameripro]: { logo: 'assets/images/icons/ameripro-logo.svg', displayName: 'AmeriPro' },
|
|
40921
|
+
[AppType.Bootog]: { logo: 'assets/images/bootog_logo.png', displayName: 'BootOG' },
|
|
40922
|
+
[AppType.DroneSnap]: { logo: 'assets/images/drone-snap/drone-snap.svg', displayName: 'DroneSnap' },
|
|
40923
|
+
[AppType.IDClaims]: { logo: 'assets/images/clime-inspection/inspection-logo.png', displayName: 'ID Claims' },
|
|
40924
|
+
[AppType.IDEnergy]: { logo: 'assets/images/logo.png', displayName: 'ID Energy' },
|
|
40925
|
+
[AppType.InspectionDepot]: { logo: 'assets/images/icons/inspection-logo.svg', displayName: 'Inspection Depot' },
|
|
40926
|
+
[AppType.InspectorMatch]: { logo: 'assets/images/icons/logo.svg', displayName: 'Inspector Match' },
|
|
40927
|
+
[AppType.MoldDepot]: { logo: 'assets/images/logo.svg', displayName: 'Mold Depot' },
|
|
40928
|
+
[AppType.TermiteDepot]: { logo: 'assets/images/Termite-Depot-Site-Logo-R1.png', displayName: 'Termite Depot' },
|
|
40929
|
+
[AppType.VirtualInspector]: { logo: 'assets/images/vi-logo.png', displayName: 'Virtual Inspector' }
|
|
40930
|
+
};
|
|
40931
|
+
class MaintenanceComponent {
|
|
40932
|
+
branding;
|
|
40933
|
+
currentYear = new Date().getFullYear();
|
|
40934
|
+
constructor(libConfig) {
|
|
40935
|
+
const appType = libConfig?.appType;
|
|
40936
|
+
this.branding = (appType && APP_BRANDING_MAP[appType]) || DEFAULT_BRANDING;
|
|
40937
|
+
}
|
|
40938
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MaintenanceComponent, deps: [{ token: LIBRARY_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
40939
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MaintenanceComponent, isStandalone: true, selector: "app-maintenance", ngImport: i0, template: "<div class=\"maintenance-page\">\r\n\r\n <header class=\"header\">\r\n <img\r\n [src]=\"branding.logo\"\r\n [alt]=\"branding.displayName\"\r\n class=\"logo\"\r\n />\r\n </header>\r\n\r\n <main class=\"content\">\r\n\r\n <section class=\"maintenance-card\">\r\n\r\n <div class=\"icon-wrapper\">\r\n <div class=\"icon\">\uD83D\uDEE0\uFE0F</div>\r\n </div>\r\n\r\n <div class=\"badge\">\r\n <span class=\"badge-dot\"></span>\r\n Scheduled Maintenance\r\n </div>\r\n\r\n <h1>We'll be back shortly.</h1>\r\n\r\n <p class=\"description\">\r\n {{ branding.displayName }} is currently undergoing scheduled maintenance to improve\r\n performance, reliability, and your overall experience.\r\n We appreciate your patience while our team completes the update.\r\n </p>\r\n\r\n <div class=\"status-box\">\r\n\r\n <div>\r\n <div class=\"status-label\">\r\n Current Status\r\n </div>\r\n\r\n <div class=\"status-value\">\r\n System maintenance in progress\r\n </div>\r\n </div>\r\n\r\n <div class=\"status\">\r\n <span class=\"status-dot\"></span>\r\n Maintenance\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"progress-section\">\r\n\r\n <div class=\"progress-info\">\r\n <span>Updating {{ branding.displayName }}</span>\r\n <span>Please wait...</span>\r\n </div>\r\n\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\"></div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"footer-message\">\r\n Thank you for your patience.\r\n <strong>{{ branding.displayName }}</strong>\r\n </div>\r\n\r\n </section>\r\n\r\n </main>\r\n\r\n <footer>\r\n ©{{ currentYear }} {{ branding.displayName }}. All rights reserved.\r\n </footer>\r\n\r\n</div>", styles: [":host{display:block}*{box-sizing:border-box}.maintenance-page{min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;background:radial-gradient(circle at 10% 10%,#e0ecff 0,transparent 30%),radial-gradient(circle at 90% 90%,#eef2ff 0,transparent 32%),#f8fafc;color:#111827;display:flex;flex-direction:column}.header{height:82px;padding:0 6%;display:flex;align-items:center;background:#fff;border-bottom:1px solid #e2e8f0}.logo{width:200px;max-height:55px;object-fit:contain}.content{flex:1;display:flex;justify-content:center;align-items:center;padding:50px 20px}.maintenance-card{width:100%;max-width:780px;padding:55px;background:#fffffff7;border:1px solid #e2e8f0;border-radius:24px;text-align:center;box-shadow:0 20px 50px #0f172a14,0 2px 8px #0f172a08}.icon-wrapper{width:90px;height:90px;margin:0 auto 28px;display:flex;align-items:center;justify-content:center;position:relative;border-radius:50%;background:#eff6ff}.icon-wrapper:after{content:\"\";position:absolute;width:108px;height:108px;border-radius:50%;border:1px solid #dbeafe}.icon{font-size:40px}.badge{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:18px;border-radius:30px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:700;letter-spacing:.7px;text-transform:uppercase}.badge-dot{width:7px;height:7px;border-radius:50%;background:#f59e0b}h1{margin:0 0 18px;font-size:clamp(30px,5vw,44px);line-height:1.15;letter-spacing:-1.5px;color:#111827}.description{max-width:590px;margin:0 auto;color:#64748b;font-size:16px;line-height:1.75}.status-box{margin-top:35px;padding:20px 25px;display:flex;align-items:center;justify-content:space-between;text-align:left;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px}.status-label{margin-bottom:5px;color:#64748b;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.status-value{color:#111827;font-size:15px;font-weight:600}.status{display:flex;align-items:center;gap:9px;color:#b45309;font-size:13px;font-weight:600}.status-dot{width:9px;height:9px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 4px #fef3c7;animation:pulse 1.5s infinite}@keyframes pulse{0%{box-shadow:0 0 #f59e0b73}70%{box-shadow:0 0 0 8px #f59e0b00}to{box-shadow:0 0 #f59e0b00}}.progress-section{margin-top:26px;text-align:left}.progress-info{display:flex;justify-content:space-between;margin-bottom:9px;color:#475569;font-size:13px;font-weight:600}.progress{width:100%;height:7px;overflow:hidden;background:#e2e8f0;border-radius:10px}.progress-bar{width:65%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#60a5fa);animation:maintenanceProgress 2.5s ease-in-out infinite alternate}@keyframes maintenanceProgress{0%{width:35%}to{width:85%}}.footer-message{margin-top:32px;padding-top:25px;border-top:1px solid #e2e8f0;color:#64748b;font-size:14px;line-height:1.7}.footer-message strong{display:block;margin-top:3px;color:#111827}footer{padding:22px;text-align:center;color:#94a3b8;font-size:12px}@media (max-width: 600px){.header{height:70px;padding:0 24px}.logo{width:160px}.content{padding:30px 16px}.maintenance-card{padding:40px 24px 32px;border-radius:18px}.status-box{flex-direction:column;align-items:flex-start;gap:16px}.description{font-size:15px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
40940
|
+
}
|
|
40941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MaintenanceComponent, decorators: [{
|
|
40942
|
+
type: Component,
|
|
40943
|
+
args: [{ selector: 'app-maintenance', standalone: true, imports: [CommonModule], template: "<div class=\"maintenance-page\">\r\n\r\n <header class=\"header\">\r\n <img\r\n [src]=\"branding.logo\"\r\n [alt]=\"branding.displayName\"\r\n class=\"logo\"\r\n />\r\n </header>\r\n\r\n <main class=\"content\">\r\n\r\n <section class=\"maintenance-card\">\r\n\r\n <div class=\"icon-wrapper\">\r\n <div class=\"icon\">\uD83D\uDEE0\uFE0F</div>\r\n </div>\r\n\r\n <div class=\"badge\">\r\n <span class=\"badge-dot\"></span>\r\n Scheduled Maintenance\r\n </div>\r\n\r\n <h1>We'll be back shortly.</h1>\r\n\r\n <p class=\"description\">\r\n {{ branding.displayName }} is currently undergoing scheduled maintenance to improve\r\n performance, reliability, and your overall experience.\r\n We appreciate your patience while our team completes the update.\r\n </p>\r\n\r\n <div class=\"status-box\">\r\n\r\n <div>\r\n <div class=\"status-label\">\r\n Current Status\r\n </div>\r\n\r\n <div class=\"status-value\">\r\n System maintenance in progress\r\n </div>\r\n </div>\r\n\r\n <div class=\"status\">\r\n <span class=\"status-dot\"></span>\r\n Maintenance\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"progress-section\">\r\n\r\n <div class=\"progress-info\">\r\n <span>Updating {{ branding.displayName }}</span>\r\n <span>Please wait...</span>\r\n </div>\r\n\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\"></div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"footer-message\">\r\n Thank you for your patience.\r\n <strong>{{ branding.displayName }}</strong>\r\n </div>\r\n\r\n </section>\r\n\r\n </main>\r\n\r\n <footer>\r\n ©{{ currentYear }} {{ branding.displayName }}. All rights reserved.\r\n </footer>\r\n\r\n</div>", styles: [":host{display:block}*{box-sizing:border-box}.maintenance-page{min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;background:radial-gradient(circle at 10% 10%,#e0ecff 0,transparent 30%),radial-gradient(circle at 90% 90%,#eef2ff 0,transparent 32%),#f8fafc;color:#111827;display:flex;flex-direction:column}.header{height:82px;padding:0 6%;display:flex;align-items:center;background:#fff;border-bottom:1px solid #e2e8f0}.logo{width:200px;max-height:55px;object-fit:contain}.content{flex:1;display:flex;justify-content:center;align-items:center;padding:50px 20px}.maintenance-card{width:100%;max-width:780px;padding:55px;background:#fffffff7;border:1px solid #e2e8f0;border-radius:24px;text-align:center;box-shadow:0 20px 50px #0f172a14,0 2px 8px #0f172a08}.icon-wrapper{width:90px;height:90px;margin:0 auto 28px;display:flex;align-items:center;justify-content:center;position:relative;border-radius:50%;background:#eff6ff}.icon-wrapper:after{content:\"\";position:absolute;width:108px;height:108px;border-radius:50%;border:1px solid #dbeafe}.icon{font-size:40px}.badge{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:18px;border-radius:30px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:700;letter-spacing:.7px;text-transform:uppercase}.badge-dot{width:7px;height:7px;border-radius:50%;background:#f59e0b}h1{margin:0 0 18px;font-size:clamp(30px,5vw,44px);line-height:1.15;letter-spacing:-1.5px;color:#111827}.description{max-width:590px;margin:0 auto;color:#64748b;font-size:16px;line-height:1.75}.status-box{margin-top:35px;padding:20px 25px;display:flex;align-items:center;justify-content:space-between;text-align:left;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px}.status-label{margin-bottom:5px;color:#64748b;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.status-value{color:#111827;font-size:15px;font-weight:600}.status{display:flex;align-items:center;gap:9px;color:#b45309;font-size:13px;font-weight:600}.status-dot{width:9px;height:9px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 4px #fef3c7;animation:pulse 1.5s infinite}@keyframes pulse{0%{box-shadow:0 0 #f59e0b73}70%{box-shadow:0 0 0 8px #f59e0b00}to{box-shadow:0 0 #f59e0b00}}.progress-section{margin-top:26px;text-align:left}.progress-info{display:flex;justify-content:space-between;margin-bottom:9px;color:#475569;font-size:13px;font-weight:600}.progress{width:100%;height:7px;overflow:hidden;background:#e2e8f0;border-radius:10px}.progress-bar{width:65%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#60a5fa);animation:maintenanceProgress 2.5s ease-in-out infinite alternate}@keyframes maintenanceProgress{0%{width:35%}to{width:85%}}.footer-message{margin-top:32px;padding-top:25px;border-top:1px solid #e2e8f0;color:#64748b;font-size:14px;line-height:1.7}.footer-message strong{display:block;margin-top:3px;color:#111827}footer{padding:22px;text-align:center;color:#94a3b8;font-size:12px}@media (max-width: 600px){.header{height:70px;padding:0 24px}.logo{width:160px}.content{padding:30px 16px}.maintenance-card{padding:40px 24px 32px;border-radius:18px}.status-box{flex-direction:column;align-items:flex-start;gap:16px}.description{font-size:15px}}\n"] }]
|
|
40944
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
40945
|
+
type: Optional
|
|
40946
|
+
}, {
|
|
40947
|
+
type: Inject,
|
|
40948
|
+
args: [LIBRARY_CONFIG]
|
|
40949
|
+
}] }] });
|
|
40950
|
+
|
|
40951
|
+
/** Seconds to wait before another resend is allowed. */
|
|
40952
|
+
const COOLDOWN_SECONDS = 30;
|
|
40953
|
+
/**
|
|
40954
|
+
* Where a signed-in user with an unverified email lands.
|
|
40955
|
+
*
|
|
40956
|
+
* - **Re-checks on arrival and on demand.** Verification happens in the
|
|
40957
|
+
* user's mail client, in another tab, so the claim in this tab's token is
|
|
40958
|
+
* stale by definition. `getAccessTokenSilently({ cacheMode: 'off' })`
|
|
40959
|
+
* re-issues it, and a fresh `email_verified` moves them straight on — via
|
|
40960
|
+
* `replaceUrl`, so this page doesn't sit in their back history.
|
|
40961
|
+
* - **Rate-limits the resend.** A 30-second cooldown after each successful
|
|
40962
|
+
* send, because the button is otherwise an open invitation to spam their
|
|
40963
|
+
* own inbox (and our sending reputation).
|
|
40964
|
+
*/
|
|
40896
40965
|
class VerifyEmailComponent {
|
|
40897
40966
|
libConfig;
|
|
40898
|
-
|
|
40899
|
-
|
|
40900
|
-
|
|
40901
|
-
|
|
40902
|
-
|
|
40903
|
-
|
|
40904
|
-
|
|
40905
|
-
|
|
40906
|
-
|
|
40907
|
-
|
|
40908
|
-
|
|
40909
|
-
|
|
40910
|
-
|
|
40967
|
+
auth = inject(AuthService);
|
|
40968
|
+
tokenService = inject(TokenService);
|
|
40969
|
+
userService = inject(UserDetailService);
|
|
40970
|
+
authLogoutService = inject(AuthLogoutService);
|
|
40971
|
+
router = inject(Router);
|
|
40972
|
+
destroyRef = inject(DestroyRef);
|
|
40973
|
+
email = signal('', ...(ngDevMode ? [{ debugName: "email" }] : []));
|
|
40974
|
+
pageLoader = signal(true, ...(ngDevMode ? [{ debugName: "pageLoader" }] : []));
|
|
40975
|
+
checking = signal(false, ...(ngDevMode ? [{ debugName: "checking" }] : []));
|
|
40976
|
+
sending = signal(false, ...(ngDevMode ? [{ debugName: "sending" }] : []));
|
|
40977
|
+
sent = signal(false, ...(ngDevMode ? [{ debugName: "sent" }] : []));
|
|
40978
|
+
error = signal('', ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
40979
|
+
failures = signal([], ...(ngDevMode ? [{ debugName: "failures" }] : []));
|
|
40980
|
+
cooldown = signal(0, ...(ngDevMode ? [{ debugName: "cooldown" }] : []));
|
|
40981
|
+
timer = null;
|
|
40982
|
+
constructor(libConfig) {
|
|
40911
40983
|
this.libConfig = libConfig;
|
|
40912
|
-
this.
|
|
40913
|
-
|
|
40914
|
-
this.
|
|
40915
|
-
this.
|
|
40916
|
-
this.auth = auth;
|
|
40984
|
+
void this.tokenService.getUserEmail().then(email => this.email.set(email ?? ''));
|
|
40985
|
+
// The claim may already have flipped — e.g. they verified, then came back
|
|
40986
|
+
// to this tab. Check once on arrival before showing them anything to do.
|
|
40987
|
+
void this.recheck(true);
|
|
40917
40988
|
}
|
|
40918
|
-
|
|
40919
|
-
|
|
40920
|
-
if (await this.tokenService.isEmailVerified()) {
|
|
40921
|
-
console.log('Email is verified, redirecting...' + this.libConfig?.navigateUrl);
|
|
40922
|
-
console.log('Email is verified, redirecting to dashboard...' + this.libConfig?.dashboardUrl);
|
|
40923
|
-
var url = this.libConfig?.navigateUrl ?? this.libConfig?.dashboardUrl ?? '/';
|
|
40924
|
-
this.router.navigate([url]);
|
|
40925
|
-
}
|
|
40926
|
-
else {
|
|
40927
|
-
this.pageLoader = false;
|
|
40928
|
-
}
|
|
40989
|
+
ngOnDestroy() {
|
|
40990
|
+
this.stopTimer();
|
|
40929
40991
|
}
|
|
40930
|
-
|
|
40931
|
-
|
|
40932
|
-
|
|
40992
|
+
/**
|
|
40993
|
+
* Re-read the auth0 claims and leave once the address is verified.
|
|
40994
|
+
* `silent` keeps the page loader/error off the initial check, which
|
|
40995
|
+
* shouldn't look like an action the user started.
|
|
40996
|
+
*/
|
|
40997
|
+
recheck(silent = false) {
|
|
40998
|
+
if (this.checking())
|
|
40933
40999
|
return;
|
|
40934
|
-
this.
|
|
40935
|
-
|
|
40936
|
-
|
|
40937
|
-
|
|
40938
|
-
|
|
40939
|
-
|
|
40940
|
-
|
|
40941
|
-
|
|
40942
|
-
|
|
41000
|
+
this.checking.set(true);
|
|
41001
|
+
if (!silent) {
|
|
41002
|
+
this.error.set('');
|
|
41003
|
+
}
|
|
41004
|
+
this.auth
|
|
41005
|
+
.getAccessTokenSilently({ cacheMode: 'off' })
|
|
41006
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
41007
|
+
.subscribe({
|
|
41008
|
+
next: async () => {
|
|
41009
|
+
const verified = await this.tokenService.isEmailVerified();
|
|
41010
|
+
this.checking.set(false);
|
|
41011
|
+
this.pageLoader.set(false);
|
|
41012
|
+
if (verified) {
|
|
41013
|
+
const url = this.libConfig?.navigateUrl ?? this.libConfig?.dashboardUrl ?? '/';
|
|
41014
|
+
void this.router.navigate([url], { replaceUrl: true });
|
|
41015
|
+
return;
|
|
40943
41016
|
}
|
|
40944
|
-
|
|
40945
|
-
this.
|
|
41017
|
+
if (!silent) {
|
|
41018
|
+
this.error.set("That email still isn't verified. Open the link in the message, then check again.");
|
|
40946
41019
|
}
|
|
40947
41020
|
},
|
|
40948
41021
|
error: () => {
|
|
40949
|
-
this.
|
|
40950
|
-
this.
|
|
40951
|
-
}
|
|
41022
|
+
this.checking.set(false);
|
|
41023
|
+
this.pageLoader.set(false);
|
|
41024
|
+
},
|
|
40952
41025
|
});
|
|
40953
41026
|
}
|
|
40954
|
-
|
|
40955
|
-
|
|
40956
|
-
|
|
40957
|
-
this.
|
|
40958
|
-
|
|
40959
|
-
|
|
40960
|
-
|
|
40961
|
-
|
|
40962
|
-
|
|
41027
|
+
resend() {
|
|
41028
|
+
if (this.sending() || this.cooldown() > 0)
|
|
41029
|
+
return;
|
|
41030
|
+
this.sending.set(true);
|
|
41031
|
+
this.sent.set(false);
|
|
41032
|
+
this.error.set('');
|
|
41033
|
+
this.failures.set([]);
|
|
41034
|
+
this.userService
|
|
41035
|
+
.reSendVerificationEmail()
|
|
41036
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
41037
|
+
.subscribe({
|
|
41038
|
+
next: (result) => {
|
|
41039
|
+
this.sending.set(false);
|
|
41040
|
+
if (result?.failed) {
|
|
41041
|
+
this.showFailure(result);
|
|
41042
|
+
return;
|
|
41043
|
+
}
|
|
41044
|
+
this.sent.set(true);
|
|
41045
|
+
this.startCooldown();
|
|
41046
|
+
},
|
|
41047
|
+
error: () => {
|
|
41048
|
+
this.sending.set(false);
|
|
41049
|
+
this.error.set("We couldn't send the email just now. Please try again in a moment.");
|
|
41050
|
+
},
|
|
41051
|
+
});
|
|
40963
41052
|
}
|
|
40964
41053
|
async logout() {
|
|
40965
41054
|
try {
|
|
40966
|
-
|
|
41055
|
+
this.authLogoutService.logout();
|
|
40967
41056
|
window.localStorage.clear();
|
|
40968
41057
|
}
|
|
40969
41058
|
finally { }
|
|
40970
41059
|
}
|
|
40971
|
-
|
|
40972
|
-
|
|
40973
|
-
|
|
40974
|
-
|
|
41060
|
+
startCooldown() {
|
|
41061
|
+
this.stopTimer();
|
|
41062
|
+
this.cooldown.set(COOLDOWN_SECONDS);
|
|
41063
|
+
this.timer = setInterval(() => {
|
|
41064
|
+
this.cooldown.update(s => s - 1);
|
|
41065
|
+
if (this.cooldown() <= 0)
|
|
41066
|
+
this.stopTimer();
|
|
41067
|
+
}, 1000);
|
|
41068
|
+
}
|
|
41069
|
+
stopTimer() {
|
|
41070
|
+
if (this.timer)
|
|
41071
|
+
clearInterval(this.timer);
|
|
41072
|
+
this.timer = null;
|
|
41073
|
+
}
|
|
41074
|
+
showFailure(result) {
|
|
41075
|
+
this.error.set(result.message?.trim() || "We couldn't send the verification email. Please try again.");
|
|
41076
|
+
this.failures.set((result.failures ?? []).map(f => f.message).filter(Boolean));
|
|
40975
41077
|
}
|
|
40976
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: VerifyEmailComponent, deps: [{ token: LIBRARY_CONFIG }
|
|
40977
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: VerifyEmailComponent, isStandalone: true, selector: "app-verify-email", ngImport: i0, template: "@if(pageLoader){\
|
|
41078
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: VerifyEmailComponent, deps: [{ token: LIBRARY_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
41079
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: VerifyEmailComponent, isStandalone: true, selector: "app-verify-email", ngImport: i0, template: "@if(pageLoader()){\n<div class=\"align-content-center text-center\" style=\"height: 100vh;\">\n <loader [show]=\"true\"></loader>\n <div class=\"fs-5 fw-bolder\">Loading... Please wait !</div>\n</div>\n}@else{\n<div class=\"container d-flex justify-content-center align-items-center mt-5 mb-5\">\n <div class=\"card shadow p-4 text-center\" style=\"max-width: 420px; width: 100%;\">\n\n <div class=\"ve-badge\" aria-hidden=\"true\">\u2709\uFE0F</div>\n\n <h4 class=\"mb-3\">Verify your email</h4>\n\n <p class=\"text-muted auth-sub\">\n We sent a verification link to <strong>{{ email() || 'your email address' }}</strong>.\n Open it to activate your account, then come back here.\n </p>\n\n @if (error()) {\n <div class=\"alert alert-danger text-start\">{{ error() }}</div>\n }\n @if (failures().length) {\n <ul class=\"alert alert-danger auth-alert--list\">\n @for (f of failures(); track f) {\n <li>{{ f }}</li>\n }\n </ul>\n }\n @if (sent()) {\n <div class=\"ve-ok\">\n \u2705 Verification email sent \u2014 check your inbox, and your spam folder.\n </div>\n }\n\n <button class=\"btn btn-primary w-100\" type=\"button\" (click)=\"recheck()\" [disabled]=\"checking()\">\n {{ checking() ? 'Checking...' : \"I've verified \u2014 continue\" }}\n </button>\n\n <button class=\"btn btn-outline-warning w-100 ve-resend\" type=\"button\" (click)=\"resend()\" [disabled]=\"sending() || cooldown() > 0\">\n\n <!-- Normal -->\n @if (!sending() && cooldown() === 0) {\n <span>Resend Verification Email</span>\n }\n\n <!-- Loading -->\n @if (sending()) {\n <span>Sending...</span>\n }\n\n <!-- Cooldown -->\n @if (cooldown() > 0 && !sending()) {\n <span>Retry in {{ cooldown() }}s</span>\n }\n\n </button>\n\n <button class=\"auth-link\" type=\"button\" (click)=\"logout()\">\n Sign out\n </button>\n\n </div>\n</div>\n}\n", styles: [".ve-badge{display:grid;place-items:center;width:3rem;height:3rem;margin:0 auto 1rem;border-radius:50%;background:#f5f7fa;color:#4077ad;font-size:1.4rem;line-height:1}.auth-sub strong{color:#212529;word-break:break-all}.auth-alert--list{margin:0 0 1rem;padding-left:1.75rem;list-style:disc;text-align:left}.auth-alert--list li+li{margin-top:.25rem}.ve-ok{background:#237b4b1a;color:#237b4b;border-radius:6px;padding:.65rem .8rem;font-size:.9rem;margin-bottom:1rem}.ve-resend{margin-top:.75rem}.auth-link{display:block;margin:1.25rem auto 0;background:none;border:0;padding:0;color:#6c757d;font-size:.9rem;text-decoration:underline;cursor:pointer}.auth-link:hover{color:#212529}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: LoaderModule }, { kind: "component", type: LoaderComponent, selector: "loader", inputs: ["show", "small"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
40978
41080
|
}
|
|
40979
41081
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: VerifyEmailComponent, decorators: [{
|
|
40980
41082
|
type: Component,
|
|
40981
|
-
args: [{ selector: 'app-verify-email', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, LoaderModule], template: "@if(pageLoader){\
|
|
41083
|
+
args: [{ selector: 'app-verify-email', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, ReactiveFormsModule, LoaderModule], template: "@if(pageLoader()){\n<div class=\"align-content-center text-center\" style=\"height: 100vh;\">\n <loader [show]=\"true\"></loader>\n <div class=\"fs-5 fw-bolder\">Loading... Please wait !</div>\n</div>\n}@else{\n<div class=\"container d-flex justify-content-center align-items-center mt-5 mb-5\">\n <div class=\"card shadow p-4 text-center\" style=\"max-width: 420px; width: 100%;\">\n\n <div class=\"ve-badge\" aria-hidden=\"true\">\u2709\uFE0F</div>\n\n <h4 class=\"mb-3\">Verify your email</h4>\n\n <p class=\"text-muted auth-sub\">\n We sent a verification link to <strong>{{ email() || 'your email address' }}</strong>.\n Open it to activate your account, then come back here.\n </p>\n\n @if (error()) {\n <div class=\"alert alert-danger text-start\">{{ error() }}</div>\n }\n @if (failures().length) {\n <ul class=\"alert alert-danger auth-alert--list\">\n @for (f of failures(); track f) {\n <li>{{ f }}</li>\n }\n </ul>\n }\n @if (sent()) {\n <div class=\"ve-ok\">\n \u2705 Verification email sent \u2014 check your inbox, and your spam folder.\n </div>\n }\n\n <button class=\"btn btn-primary w-100\" type=\"button\" (click)=\"recheck()\" [disabled]=\"checking()\">\n {{ checking() ? 'Checking...' : \"I've verified \u2014 continue\" }}\n </button>\n\n <button class=\"btn btn-outline-warning w-100 ve-resend\" type=\"button\" (click)=\"resend()\" [disabled]=\"sending() || cooldown() > 0\">\n\n <!-- Normal -->\n @if (!sending() && cooldown() === 0) {\n <span>Resend Verification Email</span>\n }\n\n <!-- Loading -->\n @if (sending()) {\n <span>Sending...</span>\n }\n\n <!-- Cooldown -->\n @if (cooldown() > 0 && !sending()) {\n <span>Retry in {{ cooldown() }}s</span>\n }\n\n </button>\n\n <button class=\"auth-link\" type=\"button\" (click)=\"logout()\">\n Sign out\n </button>\n\n </div>\n</div>\n}\n", styles: [".ve-badge{display:grid;place-items:center;width:3rem;height:3rem;margin:0 auto 1rem;border-radius:50%;background:#f5f7fa;color:#4077ad;font-size:1.4rem;line-height:1}.auth-sub strong{color:#212529;word-break:break-all}.auth-alert--list{margin:0 0 1rem;padding-left:1.75rem;list-style:disc;text-align:left}.auth-alert--list li+li{margin-top:.25rem}.ve-ok{background:#237b4b1a;color:#237b4b;border-radius:6px;padding:.65rem .8rem;font-size:.9rem;margin-bottom:1rem}.ve-resend{margin-top:.75rem}.auth-link{display:block;margin:1.25rem auto 0;background:none;border:0;padding:0;color:#6c757d;font-size:.9rem;text-decoration:underline;cursor:pointer}.auth-link:hover{color:#212529}\n"] }]
|
|
40982
41084
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
40983
41085
|
type: Inject,
|
|
40984
41086
|
args: [LIBRARY_CONFIG]
|
|
40985
|
-
}] }
|
|
40986
|
-
|
|
40987
|
-
// app-type.enum.ts
|
|
40988
|
-
var AppType;
|
|
40989
|
-
(function (AppType) {
|
|
40990
|
-
AppType["AdjusterMatch"] = "AdjusterMatch";
|
|
40991
|
-
AppType["Ameripro"] = "Ameripro";
|
|
40992
|
-
AppType["Bootog"] = "Bootog";
|
|
40993
|
-
AppType["DroneSnap"] = "DroneSnap";
|
|
40994
|
-
AppType["IDClaims"] = "IDClaims";
|
|
40995
|
-
AppType["IDEnergy"] = "IDEnergy";
|
|
40996
|
-
AppType["InspectionDepot"] = "InspectionDepot";
|
|
40997
|
-
AppType["InspectorMatch"] = "InspectorMatch";
|
|
40998
|
-
AppType["MoldDepot"] = "MoldDepot";
|
|
40999
|
-
AppType["TermiteDepot"] = "TermiteDepot";
|
|
41000
|
-
AppType["VirtualInspector"] = "VirtualInspector";
|
|
41001
|
-
})(AppType || (AppType = {}));
|
|
41087
|
+
}] }] });
|
|
41002
41088
|
|
|
41003
41089
|
// export * from './lib/initial-process.module';
|
|
41004
41090
|
// export * from './lib/src/must-change-password/must-change-password.component';
|
|
@@ -41011,5 +41097,5 @@ var AppType;
|
|
|
41011
41097
|
* Generated bundle index. Do not edit.
|
|
41012
41098
|
*/
|
|
41013
41099
|
|
|
41014
|
-
export { AddressVerifyFieldComponent, AddressVerifyFieldModule, AppType, ClaimProcessComponent, InitialProcessComponent, InitialProcessModule, LIBRARY_CONFIG, MustChangePasswordComponent, PreviewComponent, PrivacyPolicyComponent, TermsConditionsComponent, VerifyEmailComponent, extractGoogleAddressComponents };
|
|
41100
|
+
export { AddressVerifyFieldComponent, AddressVerifyFieldModule, AppType, ClaimProcessComponent, InitialProcessComponent, InitialProcessModule, LIBRARY_CONFIG, MaintenanceComponent, MustChangePasswordComponent, PreviewComponent, PrivacyPolicyComponent, TermsConditionsComponent, VerifyEmailComponent, extractGoogleAddressComponents };
|
|
41015
41101
|
//# sourceMappingURL=idsoftsource-initial-process.mjs.map
|