@rangs/auth0-lib 0.0.16 → 0.0.17

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,8 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, computed, Injectable, effect, NgModule } from '@angular/core';
2
+ import { signal, computed, Injectable, effect, NgModule, Component } from '@angular/core';
3
3
  import * as i1 from '@auth0/auth0-angular';
4
4
  import { AuthModule as AuthModule$1 } from '@auth0/auth0-angular';
5
5
  import { BehaviorSubject, firstValueFrom } from 'rxjs';
6
+ import { CommonModule } from '@angular/common';
6
7
 
7
8
  class CredentialingService {
8
9
  store = new Map();
@@ -52,6 +53,9 @@ class RoleContextService {
52
53
  /** For opening side Nav after tenant/role switch */
53
54
  sidNav = new BehaviorSubject(null);
54
55
  sidNav$ = this.sidNav.asObservable();
56
+ // Store role context in signal (without permissions)
57
+ cloudFrontUrlSignal = signal(this.getCloudFrontUrl(), ...(ngDevMode ? [{ debugName: "cloudFrontUrlSignal" }] : []));
58
+ cloudFrontUrl = this.cloudFrontUrlSignal;
55
59
  constructor() {
56
60
  /** Sync from BroadcastChannel */
57
61
  this.bc.onmessage = (ev) => {
@@ -120,6 +124,11 @@ class RoleContextService {
120
124
  const raw = localStorage.getItem(this.STORAGE_KEY);
121
125
  return raw ? JSON.parse(raw) : null;
122
126
  }
127
+ // Load Cloud Front URL
128
+ getCloudFrontUrl() {
129
+ const raw = localStorage.getItem(this.STORAGE_KEY);
130
+ return raw ?? null;
131
+ }
123
132
  // Role check used by directive
124
133
  hasAnyRole(roles) {
125
134
  return computed(() => {
@@ -218,27 +227,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
218
227
 
219
228
  class AuthModule {
220
229
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
221
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: AuthModule, imports: [
222
- // NgxPermissionsModule,
223
- AuthModule$1] });
224
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AuthModule, providers: [RoleContextService, TokenService], imports: [
225
- // NgxPermissionsModule,
226
- AuthModule$1] });
230
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: AuthModule, imports: [AuthModule$1,
231
+ TermsConditionsComponent] });
232
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AuthModule, providers: [RoleContextService, TokenService], imports: [AuthModule$1,
233
+ TermsConditionsComponent] });
227
234
  }
228
235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AuthModule, decorators: [{
229
236
  type: NgModule,
230
237
  args: [{
231
238
  imports: [
232
- // NgxPermissionsModule,
233
- AuthModule$1
239
+ AuthModule$1,
240
+ TermsConditionsComponent,
234
241
  ],
235
242
  providers: [RoleContextService, TokenService]
236
243
  }]
237
244
  }] });
238
245
 
246
+ class LegalService {
247
+ _config = signal({
248
+ companyName: 'Inspection Depot, Inc',
249
+ companyType: 'LLC',
250
+ websiteUrl: 'https://www.bootog.com',
251
+ supportEmail: 'support@bootog.com',
252
+ privacyEmail: 'privacy@bootog.com',
253
+ address: '3131 St Johns Bluff Rd S, Jacksonville, FL 32246',
254
+ country: 'United States',
255
+ privacyLastUpdated: 'September 30, 2025',
256
+ termsLastUpdated: 'October 18, 2025'
257
+ }, ...(ngDevMode ? [{ debugName: "_config" }] : []));
258
+ config = this._config.asReadonly();
259
+ /** Optional: update dynamically from API / env / tenant */
260
+ update(config) {
261
+ this._config.update(c => ({ ...c, ...config }));
262
+ }
263
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LegalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
264
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LegalService, providedIn: 'root' });
265
+ }
266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LegalService, decorators: [{
267
+ type: Injectable,
268
+ args: [{ providedIn: 'root' }]
269
+ }] });
270
+
271
+ class PrivacyPolicyComponent {
272
+ legal;
273
+ website = computed(() => this.config().websiteUrl, ...(ngDevMode ? [{ debugName: "website" }] : []));
274
+ privacyEmail = computed(() => this.config().privacyEmail, ...(ngDevMode ? [{ debugName: "privacyEmail" }] : []));
275
+ constructor(legal) {
276
+ this.legal = legal;
277
+ }
278
+ get config() {
279
+ return this.legal.config;
280
+ }
281
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: PrivacyPolicyComponent, deps: [{ token: LegalService }], target: i0.ɵɵFactoryTarget.Component });
282
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: PrivacyPolicyComponent, isStandalone: true, selector: "app-privacy-policy", ngImport: i0, template: "<section class=\"legal-container\">\r\n\r\n <h1>Website Privacy Policy</h1>\r\n <p class=\"updated\">\r\n Last Updated: {{ config().privacyLastUpdated }}\r\n </p>\r\n\r\n <h2>Introduction</h2>\r\n <p>\r\n {{ config().companyName }}, a {{ config().companyType }},\r\n respects your privacy and is committed to protecting it.\r\n This policy explains how we collect, use, and safeguard information\r\n when you visit\r\n <a [href]=\"website()\" target=\"_blank\">{{ website() }}</a>.\r\n </p>\r\n\r\n <h2>Children Under the Age of 16</h2>\r\n <p>\r\n Our Website is not intended for children under 16 years of age.\r\n We do not knowingly collect personal information from children.\r\n If you believe we have collected such information, contact us at\r\n <a [href]=\"'mailto:' + privacyEmail()\">\r\n {{ privacyEmail() }}\r\n </a>.\r\n </p>\r\n\r\n <h2>Information We Collect</h2>\r\n <ul>\r\n <li>Personal identifiers (name, email, phone)</li>\r\n <li>Internet and device information</li>\r\n <li>Usage and interaction data</li>\r\n </ul>\r\n\r\n <h2>How We Use Information</h2>\r\n <ul>\r\n <li>To operate and maintain services</li>\r\n <li>To communicate with users</li>\r\n <li>To improve performance and security</li>\r\n <li>To comply with legal obligations</li>\r\n </ul>\r\n\r\n <h2>Disclosure of Information</h2>\r\n <p>\r\n We may share information with service providers, affiliates,\r\n or when required by law.\r\n </p>\r\n\r\n <h2>Data Security</h2>\r\n <p>\r\n While we implement reasonable safeguards, no system is 100% secure.\r\n </p>\r\n\r\n <h2>Contact Information</h2>\r\n <address>\r\n {{ config().companyName }}<br />\r\n {{ config().address }}<br />\r\n {{ config().country }}<br />\r\n Email:\r\n <a [href]=\"'mailto:' + config().supportEmail\">\r\n {{ config().supportEmail }}\r\n </a>\r\n </address>\r\n\r\n</section>", styles: [".legal-container{max-width:920px;margin:auto;padding:48px 24px;font-family:Inter,Roboto,sans-serif;line-height:1.75;color:#2c2c2c}.legal-container h1{font-size:34px;margin-bottom:8px}.legal-container .updated{font-size:13px;color:#777;margin-bottom:32px}.legal-container h2{margin-top:36px;font-size:20px;color:#1f4fd8}.legal-container ul{padding-left:22px}.legal-container a{color:#1f4fd8;text-decoration:none;font-weight:500}.legal-container address{margin-top:20px;font-style:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
283
+ }
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: PrivacyPolicyComponent, decorators: [{
285
+ type: Component,
286
+ args: [{ imports: [
287
+ CommonModule
288
+ ], standalone: true, selector: 'app-privacy-policy', template: "<section class=\"legal-container\">\r\n\r\n <h1>Website Privacy Policy</h1>\r\n <p class=\"updated\">\r\n Last Updated: {{ config().privacyLastUpdated }}\r\n </p>\r\n\r\n <h2>Introduction</h2>\r\n <p>\r\n {{ config().companyName }}, a {{ config().companyType }},\r\n respects your privacy and is committed to protecting it.\r\n This policy explains how we collect, use, and safeguard information\r\n when you visit\r\n <a [href]=\"website()\" target=\"_blank\">{{ website() }}</a>.\r\n </p>\r\n\r\n <h2>Children Under the Age of 16</h2>\r\n <p>\r\n Our Website is not intended for children under 16 years of age.\r\n We do not knowingly collect personal information from children.\r\n If you believe we have collected such information, contact us at\r\n <a [href]=\"'mailto:' + privacyEmail()\">\r\n {{ privacyEmail() }}\r\n </a>.\r\n </p>\r\n\r\n <h2>Information We Collect</h2>\r\n <ul>\r\n <li>Personal identifiers (name, email, phone)</li>\r\n <li>Internet and device information</li>\r\n <li>Usage and interaction data</li>\r\n </ul>\r\n\r\n <h2>How We Use Information</h2>\r\n <ul>\r\n <li>To operate and maintain services</li>\r\n <li>To communicate with users</li>\r\n <li>To improve performance and security</li>\r\n <li>To comply with legal obligations</li>\r\n </ul>\r\n\r\n <h2>Disclosure of Information</h2>\r\n <p>\r\n We may share information with service providers, affiliates,\r\n or when required by law.\r\n </p>\r\n\r\n <h2>Data Security</h2>\r\n <p>\r\n While we implement reasonable safeguards, no system is 100% secure.\r\n </p>\r\n\r\n <h2>Contact Information</h2>\r\n <address>\r\n {{ config().companyName }}<br />\r\n {{ config().address }}<br />\r\n {{ config().country }}<br />\r\n Email:\r\n <a [href]=\"'mailto:' + config().supportEmail\">\r\n {{ config().supportEmail }}\r\n </a>\r\n </address>\r\n\r\n</section>", styles: [".legal-container{max-width:920px;margin:auto;padding:48px 24px;font-family:Inter,Roboto,sans-serif;line-height:1.75;color:#2c2c2c}.legal-container h1{font-size:34px;margin-bottom:8px}.legal-container .updated{font-size:13px;color:#777;margin-bottom:32px}.legal-container h2{margin-top:36px;font-size:20px;color:#1f4fd8}.legal-container ul{padding-left:22px}.legal-container a{color:#1f4fd8;text-decoration:none;font-weight:500}.legal-container address{margin-top:20px;font-style:normal}\n"] }]
289
+ }], ctorParameters: () => [{ type: LegalService }] });
290
+
291
+ class TermsConditionsComponent {
292
+ legal;
293
+ constructor(legal) {
294
+ this.legal = legal;
295
+ }
296
+ get config() {
297
+ return this.legal.config;
298
+ }
299
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TermsConditionsComponent, deps: [{ token: LegalService }], target: i0.ɵɵFactoryTarget.Component });
300
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: TermsConditionsComponent, isStandalone: true, selector: "app-terms-conditions", ngImport: i0, template: "<section class=\"legal-container\">\r\n\r\n <h1>Website Terms of Use</h1>\r\n <p class=\"updated\">\r\n Last Updated: {{ config().termsLastUpdated }}\r\n </p>\r\n\r\n <h2>Acceptance of Terms</h2>\r\n <p>\r\n By accessing {{ config().websiteUrl }},\r\n you agree to be bound by these Terms of Use\r\n provided by {{ config().companyName }}.\r\n </p>\r\n\r\n <h2>Eligibility</h2>\r\n <p>\r\n This Website is available only to users 18 years or older\r\n residing in the United States.\r\n </p>\r\n\r\n <h2>Intellectual Property</h2>\r\n <p>\r\n All content is owned by {{ config().companyName }}\r\n and protected by intellectual property laws.\r\n </p>\r\n\r\n <h2>Limitation of Liability</h2>\r\n <p>\r\n {{ config().companyName }} shall not be liable for damages\r\n arising from the use of this Website.\r\n </p>\r\n\r\n <h2>Governing Law</h2>\r\n <p>\r\n These terms are governed by the laws of the State of Florida.\r\n </p>\r\n\r\n <h2>Contact</h2>\r\n <p>\r\n Questions may be sent to\r\n <a [href]=\"'mailto:' + config().supportEmail\">\r\n {{ config().supportEmail }}\r\n </a>\r\n </p>\r\n\r\n</section>", styles: [".legal-container{max-width:920px;margin:auto;padding:48px 24px;font-family:Inter,Roboto,sans-serif;line-height:1.75;color:#2c2c2c}.legal-container h1{font-size:34px;margin-bottom:8px}.legal-container .updated{font-size:13px;color:#777;margin-bottom:32px}.legal-container h2{margin-top:36px;font-size:20px;color:#1f4fd8}.legal-container ul{padding-left:22px}.legal-container a{color:#1f4fd8;text-decoration:none;font-weight:500}.legal-container address{margin-top:20px;font-style:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
301
+ }
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TermsConditionsComponent, decorators: [{
303
+ type: Component,
304
+ args: [{ imports: [
305
+ CommonModule
306
+ ], standalone: true, selector: 'app-terms-conditions', template: "<section class=\"legal-container\">\r\n\r\n <h1>Website Terms of Use</h1>\r\n <p class=\"updated\">\r\n Last Updated: {{ config().termsLastUpdated }}\r\n </p>\r\n\r\n <h2>Acceptance of Terms</h2>\r\n <p>\r\n By accessing {{ config().websiteUrl }},\r\n you agree to be bound by these Terms of Use\r\n provided by {{ config().companyName }}.\r\n </p>\r\n\r\n <h2>Eligibility</h2>\r\n <p>\r\n This Website is available only to users 18 years or older\r\n residing in the United States.\r\n </p>\r\n\r\n <h2>Intellectual Property</h2>\r\n <p>\r\n All content is owned by {{ config().companyName }}\r\n and protected by intellectual property laws.\r\n </p>\r\n\r\n <h2>Limitation of Liability</h2>\r\n <p>\r\n {{ config().companyName }} shall not be liable for damages\r\n arising from the use of this Website.\r\n </p>\r\n\r\n <h2>Governing Law</h2>\r\n <p>\r\n These terms are governed by the laws of the State of Florida.\r\n </p>\r\n\r\n <h2>Contact</h2>\r\n <p>\r\n Questions may be sent to\r\n <a [href]=\"'mailto:' + config().supportEmail\">\r\n {{ config().supportEmail }}\r\n </a>\r\n </p>\r\n\r\n</section>", styles: [".legal-container{max-width:920px;margin:auto;padding:48px 24px;font-family:Inter,Roboto,sans-serif;line-height:1.75;color:#2c2c2c}.legal-container h1{font-size:34px;margin-bottom:8px}.legal-container .updated{font-size:13px;color:#777;margin-bottom:32px}.legal-container h2{margin-top:36px;font-size:20px;color:#1f4fd8}.legal-container ul{padding-left:22px}.legal-container a{color:#1f4fd8;text-decoration:none;font-weight:500}.legal-container address{margin-top:20px;font-style:normal}\n"] }]
307
+ }], ctorParameters: () => [{ type: LegalService }] });
308
+
239
309
  /**
240
310
  * Generated bundle index. Do not edit.
241
311
  */
242
312
 
243
- export { AuthModule, CredentialingService, RoleContextService, TokenService };
313
+ export { AuthModule, CredentialingService, LegalService, PrivacyPolicyComponent, RoleContextService, TermsConditionsComponent, TokenService };
244
314
  //# sourceMappingURL=rangs-auth0-lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rangs-auth0-lib.mjs","sources":["../../../projects/auth0-lib/src/lib/services/credentialing.service.ts","../../../projects/auth0-lib/src/lib/services/role-context.service.ts","../../../projects/auth0-lib/src/lib/services/token.service.ts","../../../projects/auth0-lib/src/lib/auth.module.ts","../../../projects/auth0-lib/src/rangs-auth0-lib.ts"],"sourcesContent":["import { computed, Injectable, Signal, signal } from '@angular/core';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CredentialingService {\r\n\r\n\r\n private store = new Map<string, ReturnType<typeof signal<any>>>();\r\n\r\n /** Get signal for a key (auto-create if missing) */\r\n get<T>(key: string): Signal<T | null> {\r\n if (!this.store.has(key)) {\r\n this.store.set(key, signal<T | null>(null));\r\n }\r\n return computed(() => this.store.get(key)!());\r\n }\r\n\r\n /** Set value for a key */\r\n set<T>(key: string, value: T): void {\r\n if (!this.store.has(key)) {\r\n this.store.set(key, signal<T | null>(value));\r\n } else {\r\n this.store.get(key)!.set(value);\r\n }\r\n }\r\n\r\n /** Optional: clear single key */\r\n clear(key: string): void {\r\n this.store.delete(key);\r\n }\r\n\r\n /** Optional: clear everything */\r\n clearAll(): void {\r\n this.store.clear();\r\n }\r\n\r\n}\r\n","import { Injectable, signal, computed, effect } from '@angular/core';\r\nimport { RoleContextModel } from './role-context.model';\r\n//import { NgxPermissionsService } from 'ngx-permissions';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { TempUserModel } from './temp-user.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RoleContextService {\r\n\r\n private readonly STORAGE_KEY = 'im-role-context';\r\n private readonly bc = new BroadcastChannel('im-role-context-channel');\r\n\r\n // Store role context in signal (without permissions)\r\n private contextSignal = signal<RoleContextModel | null>(this.getStoredContext());\r\n context = this.contextSignal;\r\n\r\n // Store role context in signal (without permissions)\r\n private tempUserContextSignal = signal<TempUserModel | null>(null);\r\n tempUserContext = this.tempUserContextSignal;\r\n\r\n /** For opening side Nav after tenant/role switch */\r\n private sidNav = new BehaviorSubject<RoleContextModel | null>(null);\r\n readonly sidNav$ = this.sidNav.asObservable();\r\n\r\n constructor(\r\n // private permissionsService: NgxPermissionsService\r\n ) {\r\n\r\n /** Sync from BroadcastChannel */\r\n this.bc.onmessage = (ev) => {\r\n if (!this.isSameContext(ev.data)) {\r\n this.showCustomPopup();\r\n }\r\n };\r\n\r\n /** Sync from LocalStorage events (multi-tab) */\r\n window.addEventListener('storage', (ev) => {\r\n if (ev.key === this.STORAGE_KEY) {\r\n const newCtx = ev.newValue ? JSON.parse(ev.newValue) : null;\r\n if (!this.isSameContext(newCtx)) {\r\n this.showCustomPopup();\r\n }\r\n }\r\n });\r\n\r\n // 🔥 IMPORTANT: Load permissions in memory — DO NOT save them\r\n effect(() => {\r\n const ctx = this.contextSignal();\r\n\r\n \r\n });\r\n }\r\n\r\n isSameContext(newCtx: RoleContextModel | null): boolean {\r\n const current = this.contextSignal();\r\n return !!current && !!newCtx && current.roleName === newCtx.roleName && current.tenantId === newCtx.tenantId;\r\n }\r\n\r\n private showCustomPopup() {\r\n const modal = document.getElementById('roleChangeModal')!;\r\n modal.style.display = 'flex';\r\n\r\n const okBtn = document.getElementById('roleChangeOkBtn')!;\r\n okBtn.onclick = () => {\r\n window.location.href = window.location.origin;\r\n };\r\n }\r\n\r\n // Set role context WITHOUT saving permissions to storage\r\n setContext(ctx: RoleContextModel | null) {\r\n // Clone without permissions\r\n const saveCtx = ctx ? { ...ctx, permissions: undefined } : null;\r\n this.applyContext(saveCtx, true);\r\n\r\n // Notify subscribers\r\n this.sidNav.next(ctx);\r\n\r\n }\r\n\r\n clearContext() { \r\n this.applyContext(null, true);\r\n }\r\n\r\n clearTempUserContext() {\r\n this.applyTempUserContext(null);\r\n }\r\n\r\n\r\n // Internal store + broadcast\r\n private applyContext(ctx: RoleContextModel | null, broadcast: boolean) {\r\n if (ctx) {\r\n \r\n localStorage.setItem(this.STORAGE_KEY, JSON.stringify(ctx));\r\n } else {\r\n localStorage.removeItem(this.STORAGE_KEY);\r\n }\r\n\r\n this.contextSignal.set(ctx);\r\n\r\n if (broadcast) this.bc.postMessage(ctx);\r\n } \r\n\r\n // Internal store for Temp User Context\r\n applyTempUserContext(ctx: TempUserModel | null) { \r\n this.tempUserContextSignal.set(ctx);\r\n\r\n }\r\n // Load existing context (no permissions)\r\n private getStoredContext(): RoleContextModel | null {\r\n const raw = localStorage.getItem(this.STORAGE_KEY);\r\n return raw ? JSON.parse(raw) : null;\r\n }\r\n\r\n // Role check used by directive\r\n hasAnyRole(roles: string[]) {\r\n return computed(() => {\r\n const currentRole = this.contextSignal()?.roleName?.toLowerCase();\r\n return roles.some(r => r.toLowerCase() === currentRole);\r\n });\r\n }\r\n\r\n notAnyRole(roles: string[]) {\r\n return computed(() => !this.hasAnyRole(roles)());\r\n }\r\n\r\n hasRole(role: string) {\r\n return computed(() => {\r\n const currentRole = this.contextSignal()?.roleName?.toLowerCase();\r\n return currentRole === role.toLowerCase();\r\n });\r\n }\r\n\r\n\r\n}","import { Injectable } from '@angular/core';\r\nimport { AuthService } from '@auth0/auth0-angular';\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenService {\r\n\r\n constructor(private auth: AuthService) { }\r\n\r\n\r\n\r\n async isAuthenticated(): Promise<boolean> {\r\n return await firstValueFrom(this.auth.isAuthenticated$);\r\n }\r\n\r\n\r\n async getUserId(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n return user?.['user_id'] ?? null;\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return null;\r\n }\r\n }\r\n\r\n async getUserEmail(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n //console.log(user);\r\n return user?.email ?? null;\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return null;\r\n }\r\n }\r\n\r\n async getUserFirstName(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n return user?.given_name ?? '';\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return '';\r\n }\r\n }\r\n async getUserLastName(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n return user?.family_name ?? '';\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return '';\r\n }\r\n }\r\n\r\n async getUserFullName(): Promise<string> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n const fullName = `${user?.family_name ?? ''} ${user?.given_name ?? ''}`.trim();\r\n return fullName || '';\r\n } catch (err) {\r\n console.warn('User not available:', err);\r\n return '';\r\n }\r\n }\r\n\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\n//import { NgxPermissionsModule } from 'ngx-permissions';\r\nimport { AuthModule as OAuthModule } from '@auth0/auth0-angular';\r\nimport { RoleContextService,TokenService } from './services';\r\n\r\n@NgModule({\r\n imports: [\r\n // NgxPermissionsModule,\r\n OAuthModule\r\n ],\r\n providers: [RoleContextService, TokenService]\r\n})\r\nexport class AuthModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["OAuthModule"],"mappings":";;;;;;MAMa,oBAAoB,CAAA;AAGvB,IAAA,KAAK,GAAG,IAAI,GAAG,EAA0C;;AAGjE,IAAA,GAAG,CAAI,GAAW,EAAA;QAChB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AACxB,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAW,IAAI,CAAC,CAAC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EAAA,CAAA;AAIN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAAA,SAAA,EAFR,CAAC,kBAAkB,EAAE,YAAY,CAAC,EAAA,OAAA,EAAA;;YAFzCA,YAAW,CAAA,EAAA,CAAA;;4FAIN,UAAU,EAAA,UAAA,EAAA,CAAA;kBAPtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;;wBAELA;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE,CAAC,kBAAkB,EAAE,YAAY;AAC/C,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"rangs-auth0-lib.mjs","sources":["../../../projects/auth0-lib/src/lib/services/credentialing.service.ts","../../../projects/auth0-lib/src/lib/services/role-context.service.ts","../../../projects/auth0-lib/src/lib/services/token.service.ts","../../../projects/auth0-lib/src/lib/auth.module.ts","../../../projects/auth0-lib/src/lib/src/legal.service.ts","../../../projects/auth0-lib/src/lib/src/privacy-policy/privacy-policy.component.ts","../../../projects/auth0-lib/src/lib/src/privacy-policy/privacy-policy.component.html","../../../projects/auth0-lib/src/lib/src/terms-conditions/terms-conditions.component.ts","../../../projects/auth0-lib/src/lib/src/terms-conditions/terms-conditions.component.html","../../../projects/auth0-lib/src/rangs-auth0-lib.ts"],"sourcesContent":["import { computed, Injectable, Signal, signal } from '@angular/core';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CredentialingService {\r\n\r\n\r\n private store = new Map<string, ReturnType<typeof signal<any>>>();\r\n\r\n /** Get signal for a key (auto-create if missing) */\r\n get<T>(key: string): Signal<T | null> {\r\n if (!this.store.has(key)) {\r\n this.store.set(key, signal<T | null>(null));\r\n }\r\n return computed(() => this.store.get(key)!());\r\n }\r\n\r\n /** Set value for a key */\r\n set<T>(key: string, value: T): void {\r\n if (!this.store.has(key)) {\r\n this.store.set(key, signal<T | null>(value));\r\n } else {\r\n this.store.get(key)!.set(value);\r\n }\r\n }\r\n\r\n /** Optional: clear single key */\r\n clear(key: string): void {\r\n this.store.delete(key);\r\n }\r\n\r\n /** Optional: clear everything */\r\n clearAll(): void {\r\n this.store.clear();\r\n }\r\n\r\n}\r\n","import { Injectable, signal, computed, effect } from '@angular/core';\r\nimport { RoleContextModel } from './role-context.model';\r\n//import { NgxPermissionsService } from 'ngx-permissions';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { TempUserModel } from './temp-user.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RoleContextService {\r\n\r\n private readonly STORAGE_KEY = 'im-role-context';\r\n private readonly bc = new BroadcastChannel('im-role-context-channel');\r\n\r\n // Store role context in signal (without permissions)\r\n private contextSignal = signal<RoleContextModel | null>(this.getStoredContext());\r\n context = this.contextSignal;\r\n\r\n // Store role context in signal (without permissions)\r\n private tempUserContextSignal = signal<TempUserModel | null>(null);\r\n tempUserContext = this.tempUserContextSignal;\r\n\r\n /** For opening side Nav after tenant/role switch */\r\n private sidNav = new BehaviorSubject<RoleContextModel | null>(null);\r\n readonly sidNav$ = this.sidNav.asObservable();\r\n\r\n // Store role context in signal (without permissions)\r\n private cloudFrontUrlSignal = signal<string | null>(this.getCloudFrontUrl());\r\n cloudFrontUrl = this.cloudFrontUrlSignal;\r\n\r\n constructor(\r\n // private permissionsService: NgxPermissionsService\r\n ) {\r\n\r\n /** Sync from BroadcastChannel */\r\n this.bc.onmessage = (ev) => {\r\n if (!this.isSameContext(ev.data)) {\r\n this.showCustomPopup();\r\n }\r\n };\r\n\r\n /** Sync from LocalStorage events (multi-tab) */\r\n window.addEventListener('storage', (ev) => {\r\n if (ev.key === this.STORAGE_KEY) {\r\n const newCtx = ev.newValue ? JSON.parse(ev.newValue) : null;\r\n if (!this.isSameContext(newCtx)) {\r\n this.showCustomPopup();\r\n }\r\n }\r\n });\r\n\r\n // 🔥 IMPORTANT: Load permissions in memory — DO NOT save them\r\n effect(() => {\r\n const ctx = this.contextSignal();\r\n });\r\n }\r\n\r\n isSameContext(newCtx: RoleContextModel | null): boolean {\r\n const current = this.contextSignal();\r\n return !!current && !!newCtx && current.roleName === newCtx.roleName && current.tenantId === newCtx.tenantId;\r\n }\r\n\r\n private showCustomPopup() {\r\n const modal = document.getElementById('roleChangeModal')!;\r\n modal.style.display = 'flex';\r\n\r\n const okBtn = document.getElementById('roleChangeOkBtn')!;\r\n okBtn.onclick = () => {\r\n window.location.href = window.location.origin;\r\n };\r\n }\r\n\r\n // Set role context WITHOUT saving permissions to storage\r\n setContext(ctx: RoleContextModel | null) {\r\n // Clone without permissions\r\n const saveCtx = ctx ? { ...ctx, permissions: undefined } : null;\r\n this.applyContext(saveCtx, true);\r\n\r\n // Notify subscribers\r\n this.sidNav.next(ctx);\r\n\r\n }\r\n\r\n clearContext() {\r\n this.applyContext(null, true);\r\n }\r\n\r\n clearTempUserContext() {\r\n this.applyTempUserContext(null);\r\n }\r\n\r\n\r\n // Internal store + broadcast\r\n private applyContext(ctx: RoleContextModel | null, broadcast: boolean) {\r\n if (ctx) {\r\n\r\n localStorage.setItem(this.STORAGE_KEY, JSON.stringify(ctx));\r\n } else {\r\n localStorage.removeItem(this.STORAGE_KEY);\r\n }\r\n\r\n this.contextSignal.set(ctx);\r\n\r\n if (broadcast) this.bc.postMessage(ctx);\r\n }\r\n\r\n // Internal store for Temp User Context\r\n applyTempUserContext(ctx: TempUserModel | null) {\r\n this.tempUserContextSignal.set(ctx);\r\n\r\n }\r\n // Load existing context (no permissions)\r\n private getStoredContext(): RoleContextModel | null {\r\n const raw = localStorage.getItem(this.STORAGE_KEY);\r\n return raw ? JSON.parse(raw) : null;\r\n }\r\n\r\n // Load Cloud Front URL\r\n private getCloudFrontUrl(): string | null {\r\n const raw = localStorage.getItem(this.STORAGE_KEY);\r\n return raw ?? null;\r\n }\r\n\r\n // Role check used by directive\r\n hasAnyRole(roles: string[]) {\r\n return computed(() => {\r\n const currentRole = this.contextSignal()?.roleName?.toLowerCase();\r\n return roles.some(r => r.toLowerCase() === currentRole);\r\n });\r\n }\r\n\r\n notAnyRole(roles: string[]) {\r\n return computed(() => !this.hasAnyRole(roles)());\r\n }\r\n\r\n hasRole(role: string) {\r\n return computed(() => {\r\n const currentRole = this.contextSignal()?.roleName?.toLowerCase();\r\n return currentRole === role.toLowerCase();\r\n });\r\n }\r\n\r\n\r\n}","import { Injectable } from '@angular/core';\r\nimport { AuthService } from '@auth0/auth0-angular';\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenService {\r\n\r\n constructor(private auth: AuthService) { }\r\n\r\n\r\n\r\n async isAuthenticated(): Promise<boolean> {\r\n return await firstValueFrom(this.auth.isAuthenticated$);\r\n }\r\n\r\n\r\n async getUserId(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n return user?.['user_id'] ?? null;\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return null;\r\n }\r\n }\r\n\r\n async getUserEmail(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n //console.log(user);\r\n return user?.email ?? null;\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return null;\r\n }\r\n }\r\n\r\n async getUserFirstName(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n return user?.given_name ?? '';\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return '';\r\n }\r\n }\r\n async getUserLastName(): Promise<string | null> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n return user?.family_name ?? '';\r\n } catch (err) {\r\n console.warn('User ID not available:', err);\r\n return '';\r\n }\r\n }\r\n\r\n async getUserFullName(): Promise<string> {\r\n try {\r\n const user = await firstValueFrom(this.auth.user$);\r\n const fullName = `${user?.family_name ?? ''} ${user?.given_name ?? ''}`.trim();\r\n return fullName || '';\r\n } catch (err) {\r\n console.warn('User not available:', err);\r\n return '';\r\n }\r\n }\r\n\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { AuthModule as OAuthModule } from '@auth0/auth0-angular';\r\nimport { RoleContextService,TokenService } from './services';\r\nimport { TermsConditionsComponent } from '../public-api';\r\n\r\n@NgModule({\r\n imports: [\r\n OAuthModule,\r\n TermsConditionsComponent,\r\n \r\n ],\r\n providers: [RoleContextService, TokenService]\r\n})\r\nexport class AuthModule { }\r\n","import { Injectable, signal, WritableSignal } from '@angular/core';\r\nimport { LegalConfig } from './legal.config';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class LegalService {\r\n\r\n private readonly _config: WritableSignal<LegalConfig> = signal({\r\n companyName: 'Inspection Depot, Inc',\r\n companyType: 'LLC',\r\n websiteUrl: 'https://www.bootog.com',\r\n supportEmail: 'support@bootog.com',\r\n privacyEmail: 'privacy@bootog.com',\r\n address: '3131 St Johns Bluff Rd S, Jacksonville, FL 32246',\r\n country: 'United States',\r\n privacyLastUpdated: 'September 30, 2025',\r\n termsLastUpdated: 'October 18, 2025'\r\n });\r\n\r\n readonly config = this._config.asReadonly();\r\n\r\n /** Optional: update dynamically from API / env / tenant */\r\n update(config: Partial<LegalConfig>) {\r\n this._config.update(c => ({ ...c, ...config }));\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, computed, OnInit } from '@angular/core';\r\nimport { LegalService } from '../legal.service';\r\n@Component({\r\n imports: [\r\n CommonModule\r\n ],\r\n standalone: true,\r\n selector: 'app-privacy-policy',\r\n templateUrl: './privacy-policy.component.html',\r\n styleUrl: './privacy-policy.component.scss',\r\n})\r\nexport class PrivacyPolicyComponent {\r\n\r\n website = computed(() => this.config().websiteUrl);\r\n privacyEmail = computed(() => this.config().privacyEmail);\r\n\r\n constructor(private legal: LegalService) { }\r\n get config() {\r\n return this.legal.config;\r\n }\r\n\r\n}\r\n","<section class=\"legal-container\">\r\n\r\n <h1>Website Privacy Policy</h1>\r\n <p class=\"updated\">\r\n Last Updated: {{ config().privacyLastUpdated }}\r\n </p>\r\n\r\n <h2>Introduction</h2>\r\n <p>\r\n {{ config().companyName }}, a {{ config().companyType }},\r\n respects your privacy and is committed to protecting it.\r\n This policy explains how we collect, use, and safeguard information\r\n when you visit\r\n <a [href]=\"website()\" target=\"_blank\">{{ website() }}</a>.\r\n </p>\r\n\r\n <h2>Children Under the Age of 16</h2>\r\n <p>\r\n Our Website is not intended for children under 16 years of age.\r\n We do not knowingly collect personal information from children.\r\n If you believe we have collected such information, contact us at\r\n <a [href]=\"'mailto:' + privacyEmail()\">\r\n {{ privacyEmail() }}\r\n </a>.\r\n </p>\r\n\r\n <h2>Information We Collect</h2>\r\n <ul>\r\n <li>Personal identifiers (name, email, phone)</li>\r\n <li>Internet and device information</li>\r\n <li>Usage and interaction data</li>\r\n </ul>\r\n\r\n <h2>How We Use Information</h2>\r\n <ul>\r\n <li>To operate and maintain services</li>\r\n <li>To communicate with users</li>\r\n <li>To improve performance and security</li>\r\n <li>To comply with legal obligations</li>\r\n </ul>\r\n\r\n <h2>Disclosure of Information</h2>\r\n <p>\r\n We may share information with service providers, affiliates,\r\n or when required by law.\r\n </p>\r\n\r\n <h2>Data Security</h2>\r\n <p>\r\n While we implement reasonable safeguards, no system is 100% secure.\r\n </p>\r\n\r\n <h2>Contact Information</h2>\r\n <address>\r\n {{ config().companyName }}<br />\r\n {{ config().address }}<br />\r\n {{ config().country }}<br />\r\n Email:\r\n <a [href]=\"'mailto:' + config().supportEmail\">\r\n {{ config().supportEmail }}\r\n </a>\r\n </address>\r\n\r\n</section>","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { LegalService } from '../legal.service';\r\n@Component({\r\n imports: [\r\n CommonModule\r\n ],\r\n standalone: true,\r\n selector: 'app-terms-conditions',\r\n templateUrl: './terms-conditions.component.html',\r\n styleUrl: './terms-conditions.component.scss',\r\n})\r\nexport class TermsConditionsComponent {\r\n\r\n constructor(private legal: LegalService) { }\r\n\r\n get config() {\r\n return this.legal.config;\r\n }\r\n}\r\n","<section class=\"legal-container\">\r\n\r\n <h1>Website Terms of Use</h1>\r\n <p class=\"updated\">\r\n Last Updated: {{ config().termsLastUpdated }}\r\n </p>\r\n\r\n <h2>Acceptance of Terms</h2>\r\n <p>\r\n By accessing {{ config().websiteUrl }},\r\n you agree to be bound by these Terms of Use\r\n provided by {{ config().companyName }}.\r\n </p>\r\n\r\n <h2>Eligibility</h2>\r\n <p>\r\n This Website is available only to users 18 years or older\r\n residing in the United States.\r\n </p>\r\n\r\n <h2>Intellectual Property</h2>\r\n <p>\r\n All content is owned by {{ config().companyName }}\r\n and protected by intellectual property laws.\r\n </p>\r\n\r\n <h2>Limitation of Liability</h2>\r\n <p>\r\n {{ config().companyName }} shall not be liable for damages\r\n arising from the use of this Website.\r\n </p>\r\n\r\n <h2>Governing Law</h2>\r\n <p>\r\n These terms are governed by the laws of the State of Florida.\r\n </p>\r\n\r\n <h2>Contact</h2>\r\n <p>\r\n Questions may be sent to\r\n <a [href]=\"'mailto:' + config().supportEmail\">\r\n {{ config().supportEmail }}\r\n </a>\r\n </p>\r\n\r\n</section>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["OAuthModule","i1.LegalService"],"mappings":";;;;;;;MAMa,oBAAoB,CAAA;AAGvB,IAAA,KAAK,GAAG,IAAI,GAAG,EAA0C;;AAGjE,IAAA,GAAG,CAAI,GAAW,EAAA;QAChB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AACxB,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAW,IAAI,CAAC,CAAC;QAC7C;AACA,QAAA,OAAO,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,EAAE,CAAC;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auth0-angular';
4
4
  import { AuthService } from '@auth0/auth0-angular';
5
+ import * as _rangs_auth0_lib from '@rangs/auth0-lib';
5
6
  import * as rxjs from 'rxjs';
6
7
 
8
+ interface LegalConfig {
9
+ companyName: string;
10
+ companyType: string;
11
+ websiteUrl: string;
12
+ supportEmail: string;
13
+ privacyEmail: string;
14
+ address: string;
15
+ country: string;
16
+ privacyLastUpdated: string;
17
+ termsLastUpdated: string;
18
+ }
19
+
20
+ declare class LegalService {
21
+ private readonly _config;
22
+ readonly config: i0.Signal<LegalConfig>;
23
+ /** Optional: update dynamically from API / env / tenant */
24
+ update(config: Partial<LegalConfig>): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<LegalService, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<LegalService>;
27
+ }
28
+
29
+ declare class TermsConditionsComponent {
30
+ private legal;
31
+ constructor(legal: LegalService);
32
+ get config(): i0.Signal<_rangs_auth0_lib.LegalConfig>;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TermsConditionsComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<TermsConditionsComponent, "app-terms-conditions", never, {}, {}, never, never, true, never>;
35
+ }
36
+
7
37
  declare class AuthModule {
8
38
  static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, never, [typeof i1.AuthModule], never>;
39
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, never, [typeof i1.AuthModule, typeof TermsConditionsComponent], never>;
10
40
  static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
11
41
  }
12
42
 
@@ -64,6 +94,8 @@ declare class RoleContextService {
64
94
  /** For opening side Nav after tenant/role switch */
65
95
  private sidNav;
66
96
  readonly sidNav$: rxjs.Observable<RoleContextModel | null>;
97
+ private cloudFrontUrlSignal;
98
+ cloudFrontUrl: i0.WritableSignal<string | null>;
67
99
  constructor();
68
100
  isSameContext(newCtx: RoleContextModel | null): boolean;
69
101
  private showCustomPopup;
@@ -73,6 +105,7 @@ declare class RoleContextService {
73
105
  private applyContext;
74
106
  applyTempUserContext(ctx: TempUserModel | null): void;
75
107
  private getStoredContext;
108
+ private getCloudFrontUrl;
76
109
  hasAnyRole(roles: string[]): i0.Signal<boolean>;
77
110
  notAnyRole(roles: string[]): i0.Signal<boolean>;
78
111
  hasRole(role: string): i0.Signal<boolean>;
@@ -107,5 +140,15 @@ declare class CredentialingService {
107
140
  static ɵprov: i0.ɵɵInjectableDeclaration<CredentialingService>;
108
141
  }
109
142
 
110
- export { AuthModule, CredentialingService, RoleContextService, TokenService };
111
- export type { RoleContextModel, TempUserModel };
143
+ declare class PrivacyPolicyComponent {
144
+ private legal;
145
+ website: i0.Signal<string>;
146
+ privacyEmail: i0.Signal<string>;
147
+ constructor(legal: LegalService);
148
+ get config(): i0.Signal<_rangs_auth0_lib.LegalConfig>;
149
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrivacyPolicyComponent, never>;
150
+ static ɵcmp: i0.ɵɵComponentDeclaration<PrivacyPolicyComponent, "app-privacy-policy", never, {}, {}, never, never, true, never>;
151
+ }
152
+
153
+ export { AuthModule, CredentialingService, LegalService, PrivacyPolicyComponent, RoleContextService, TermsConditionsComponent, TokenService };
154
+ export type { LegalConfig, RoleContextModel, TempUserModel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rangs/auth0-lib",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0",