@acorex-platform/module-auth-client 1.0.1 → 1.0.2
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.
- package/fesm2022/{acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs → acorex-platform-module-auth-client-acorex-platform-module-auth-client-CBRlR1xT.mjs} +106 -80
- package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-CBRlR1xT.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-nSUtqF_D.mjs → acorex-platform-module-auth-client-app-chooser.component-DpGdObrH.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-app-chooser.component-nSUtqF_D.mjs.map → acorex-platform-module-auth-client-app-chooser.component-DpGdObrH.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-change-password.command-Bman8avz.mjs → acorex-platform-module-auth-client-change-password.command-Bt4yOMMt.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-change-password.command-Bman8avz.mjs.map → acorex-platform-module-auth-client-change-password.command-Bt4yOMMt.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-DFS8TE__.mjs → acorex-platform-module-auth-client-change-photo.command-tZ3TnzBz.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-change-photo.command-DFS8TE__.mjs.map → acorex-platform-module-auth-client-change-photo.command-tZ3TnzBz.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-ZTJMfhir.mjs → acorex-platform-module-auth-client-get-user-activity.query-BxoUkan6.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-get-user-activity.query-ZTJMfhir.mjs.map → acorex-platform-module-auth-client-get-user-activity.query-BxoUkan6.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-CUs7Q6yh.mjs → acorex-platform-module-auth-client-lock-screen.command-QXW3UCik.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-lock-screen.command-CUs7Q6yh.mjs.map → acorex-platform-module-auth-client-lock-screen.command-QXW3UCik.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-login.module-DFWtA7S3.mjs → acorex-platform-module-auth-client-login.module-dy4_aiwN.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-login.module-DFWtA7S3.mjs.map → acorex-platform-module-auth-client-login.module-dy4_aiwN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-manage-two-factor.command-BXK7Lvpw.mjs → acorex-platform-module-auth-client-manage-two-factor.command-Cal6EJe0.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-manage-two-factor.command-BXK7Lvpw.mjs.map → acorex-platform-module-auth-client-manage-two-factor.command-Cal6EJe0.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-DToDT9eb.mjs → acorex-platform-module-auth-client-open-sessions.command-ZG33hlfh.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-open-sessions.command-DToDT9eb.mjs.map → acorex-platform-module-auth-client-open-sessions.command-ZG33hlfh.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-password.component-DAp_-zko.mjs → acorex-platform-module-auth-client-password.component-D0pwQEaB.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-password.component-DAp_-zko.mjs.map → acorex-platform-module-auth-client-password.component-D0pwQEaB.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-CLW52NUu.mjs → acorex-platform-module-auth-client-profile-activity-chart.component-DJKJdwUC.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-profile-activity-chart.component-CLW52NUu.mjs.map → acorex-platform-module-auth-client-profile-activity-chart.component-DJKJdwUC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-D5xhGDPH.mjs → acorex-platform-module-auth-client-profile-page-component.provider-CSNCpJTo.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-profile-page-component.provider-D5xhGDPH.mjs.map → acorex-platform-module-auth-client-profile-page-component.provider-CSNCpJTo.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-Dc7gRTQD.mjs → acorex-platform-module-auth-client-profile-page.component-BM6a4K1A.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-profile-page.component-Dc7gRTQD.mjs.map → acorex-platform-module-auth-client-profile-page.component-BM6a4K1A.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-register-password.component-C4zu5hpL.mjs → acorex-platform-module-auth-client-register-password.component-BxQNY-Nh.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-register-password.component-C4zu5hpL.mjs.map → acorex-platform-module-auth-client-register-password.component-BxQNY-Nh.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-register.module-Dz-SOKXN.mjs → acorex-platform-module-auth-client-register.module-BLQWaJky.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-register.module-Dz-SOKXN.mjs.map → acorex-platform-module-auth-client-register.module-BLQWaJky.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-LKjypQTk.mjs → acorex-platform-module-auth-client-remove-pin-code.command-DyO4Oj2C.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-remove-pin-code.command-LKjypQTk.mjs.map → acorex-platform-module-auth-client-remove-pin-code.command-DyO4Oj2C.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-routes-Dw8YhBrw.mjs → acorex-platform-module-auth-client-routes-DAwpb1Ca.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-routes-Dw8YhBrw.mjs.map → acorex-platform-module-auth-client-routes-DAwpb1Ca.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-PQ91EQjh.mjs → acorex-platform-module-auth-client-session-lock-overlay.component-5opoeMsk.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-session-lock-overlay.component-PQ91EQjh.mjs.map → acorex-platform-module-auth-client-session-lock-overlay.component-5opoeMsk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-BdtPwfLH.mjs → acorex-platform-module-auth-client-set-pin-code.command-CRb8NATb.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.command-BdtPwfLH.mjs.map → acorex-platform-module-auth-client-set-pin-code.command-CRb8NATb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs → acorex-platform-module-auth-client-set-pin-code.component-6NqaEKMs.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-auth-client-set-pin-code.component-L3DlTawo.mjs.map → acorex-platform-module-auth-client-set-pin-code.component-6NqaEKMs.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-cRTVB-7T.mjs → acorex-platform-module-auth-client-tenant-chooser.component-C8AopfZ4.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-tenant-chooser.component-cRTVB-7T.mjs.map → acorex-platform-module-auth-client-tenant-chooser.component-C8AopfZ4.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-tenant-request.component-B-qx-HIi.mjs → acorex-platform-module-auth-client-tenant-request.component-CG74dqMX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-tenant-request.component-B-qx-HIi.mjs.map → acorex-platform-module-auth-client-tenant-request.component-CG74dqMX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs → acorex-platform-module-auth-client-two-factor-code.component-DAMphXPJ.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs.map → acorex-platform-module-auth-client-two-factor-code.component-DAMphXPJ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-BC8AJTp4.mjs → acorex-platform-module-auth-client-two-factor.module-xzAzTU4n.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-two-factor.module-BC8AJTp4.mjs.map → acorex-platform-module-auth-client-two-factor.module-xzAzTU4n.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-EHXTmZtV.mjs → acorex-platform-module-auth-client-view-login-history.command-CLWGDmsI.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-view-login-history.command-EHXTmZtV.mjs.map → acorex-platform-module-auth-client-view-login-history.command-CLWGDmsI.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding-page.component-CQUpjsZw.mjs → acorex-platform-module-auth-client-welcome-onboarding-page.component-CdgoC07Q.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding-page.component-CQUpjsZw.mjs.map → acorex-platform-module-auth-client-welcome-onboarding-page.component-CdgoC07Q.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding.command-D8cyXb5q.mjs → acorex-platform-module-auth-client-welcome-onboarding.command-BNOEiB5l.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-auth-client-welcome-onboarding.command-D8cyXb5q.mjs.map → acorex-platform-module-auth-client-welcome-onboarding.command-BNOEiB5l.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-auth-client.mjs +1 -1
- package/i18n/en-AU/auth.json +2 -1
- package/i18n/en-US/auth.json +2 -1
- package/i18n/fa-IR/auth.json +2 -1
- package/package.json +3 -3
- package/fesm2022/acorex-platform-module-auth-client-acorex-platform-module-auth-client-Dgo6MzxI.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-tenant-chooser.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-tenant-chooser.component-C8AopfZ4.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/account/tenant-chooser/tenant-chooser.component.ts","../../../../libs/modules/auth/client/src/lib/pages/account/tenant-chooser/tenant-chooser.component.html"],"sourcesContent":["import { Component, ViewEncapsulation, inject, ChangeDetectionStrategy, signal } from '@angular/core';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXImageModule } from '@acorex/components/image';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPPlatformBrandingService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPUserAvatarComponent } from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { AXPTenantChooserListComponent } from './tenant-chooser-list.component';\n\n@Component({\n selector: 'axp-auth-tenant-chooser',\n templateUrl: './tenant-chooser.component.html',\n styleUrls: ['../shared/auth-chooser.layout.css', './tenant-chooser.component.css'],\n imports: [\n CommonModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXCheckBoxModule,\n AXImageModule,\n AXDecoratorModule,\n AXPLogoComponent,\n AXLoadingModule,\n AXSkeletonModule,\n AXTranslationModule,\n AXPUserAvatarComponent,\n AXPTenantChooserListComponent,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPAuthTenantChooserComponent {\n private router = inject(Router);\n private readonly platformBranding = inject(AXPPlatformBrandingService);\n protected readonly platformTitle = signal('');\n private sessionService = inject(AXPSessionService);\n\n constructor() {\n void this.platformBranding.resolvePlatformTitle().then((title) => this.platformTitle.set(title));\n }\n\n protected user = this.sessionService.user;\n protected catalogLoading = signal(true);\n\n handleCatalogLoading(loading: boolean): void {\n this.catalogLoading.set(loading);\n }\n\n async handleSignout() {\n await this.sessionService.signout();\n this.router.navigate(['/auth/login']);\n }\n}\n","<main *translate=\"let t\" class=\"axp-auth-chooser\">\n <div class=\"axp-auth-chooser__inner\">\n <!-- ----- Platform branding ----- -->\n <section class=\"axp-auth-chooser__brand\">\n <axp-logo\n logoKey=\"platform\"\n appearance=\"colored\"\n format=\"full\"\n [size]=\"260\"\n [attr.alt]=\"platformTitle()\"\n ></axp-logo>\n </section>\n <!-- ----- Tenant selection card ----- -->\n <section class=\"axp-auth-chooser__card-wrap\">\n <div class=\"axp-auth-chooser__card\">\n <!-- ----- Profile header while catalog loads ----- -->\n @if (catalogLoading()) {\n <ax-skeleton [animated]=\"true\" class=\"size-[72px] rounded-full shrink-0\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-6 w-56 max-w-full\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"h-4 w-64 max-w-full\"></ax-skeleton>\n } @else {\n <axp-user-avatar\n [size]=\"72\"\n [userId]=\"$safeNavigationMigration(user?.id)!\"\n [showPresence]=\"false\"\n ></axp-user-avatar>\n <h2 class=\"md:text-lg font-medium\">\n {{ '@auth:welcome.message' | translate | async }}, {{ user?.title }}\n </h2>\n <p class=\"text-neutral-500 text-sm md:text-base font-medium\">\n {{ '@auth:tenant-chooser.description' | translate | async }}\n </p>\n }\n <div class=\"mt-3 w-full\">\n <axp-tenant-chooser-list (loadingChange)=\"handleCatalogLoading($event)\"></axp-tenant-chooser-list>\n </div>\n </div>\n </section>\n <!-- ----- Sign-out footer ----- -->\n <section class=\"axp-auth-chooser__footer\">\n <p class=\"text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a (click)=\"handleSignout()\" class=\"text-primary cursor-pointer hover:underline font-medium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,EACnB,sBAAsB,wIACtB,6BAA6B,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAD,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAKpB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAvBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAG1B;wBACP,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,aAAa;wBACb,iBAAiB;wBACjB,gBAAgB;wBAChB,eAAe;wBACf,gBAAgB;wBAChB,mBAAmB;wBACnB,sBAAsB;wBACtB,6BAA6B;AAC9B,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2hEAAA,EAAA,MAAA,EAAA,CAAA,4yIAAA,EAAA,4QAAA,CAAA,EAAA;;;"}
|
|
@@ -234,7 +234,7 @@ class AXPTenantRequestComponent {
|
|
|
234
234
|
this.toast.show({ color, title: toastTitle, content, timeOut });
|
|
235
235
|
}
|
|
236
236
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPTenantRequestComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
237
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPTenantRequestComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form axp-tenant-request-form\">\n <!-- ----- Success state after request is submitted ----- -->\n @if (submitted()) {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.success.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.success.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:backLogin' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Request form ----- -->\n @else {\n <div class=\"mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"axp-tenant-request-grid\">\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Company Name (title + name slug) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.company-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"organization\"\n id=\"tenant-request-organization\"\n [autoComplete]=\"'organization'\"\n [(value)]=\"title\"\n [disabled]=\"submitting()\"\n (onBlur)=\"onCompanyNameBlur()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.fields.company-name-hint' | translate | async }}\n </p>\n <!-- ----- Inline hint when the unique name is already taken ----- -->\n @if (nameAvailable() === false) {\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.error.name-taken' | translate | async }}\n </p>\n }\n <!-- ----- Inline hint while availability is being checked ----- -->\n @if (checkingName()) {\n <p class=\"mt-1 text-xs text-neutral-400\">\n {{ '@auth:tenant-request.checking-name' | translate | async }}\n </p>\n }\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Email ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"email\"\n id=\"tenant-request-email\"\n [autoComplete]=\"'email'\"\n [(value)]=\"email\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Confirm Email (form-only, not stored) ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.confirm-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"confirmEmail\"\n id=\"tenant-request-confirm-email\"\n [autoComplete]=\"'off'\"\n [(value)]=\"confirmEmail\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Business Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"tel\"\n id=\"tenant-request-phone\"\n [autoComplete]=\"'tel'\"\n [(value)]=\"phone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: First Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.first-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"given-name\"\n id=\"tenant-request-first-name\"\n [autoComplete]=\"'given-name'\"\n [(value)]=\"firstName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Last Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.last-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"family-name\"\n id=\"tenant-request-last-name\"\n [autoComplete]=\"'family-name'\"\n [(value)]=\"lastName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Mobile Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.mobile-phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"mobile\"\n id=\"tenant-request-mobile\"\n [autoComplete]=\"'tel-national'\"\n [(value)]=\"mobilePhone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Street Address ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.street1' | translate | async }}</ax-label>\n <ax-text-box\n name=\"street-address\"\n id=\"tenant-request-street\"\n [autoComplete]=\"'street-address'\"\n [(value)]=\"street1\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Suburb ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.suburb' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level2\"\n id=\"tenant-request-suburb\"\n [autoComplete]=\"'address-level2'\"\n [(value)]=\"suburb\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: State ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.state' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level1\"\n id=\"tenant-request-state\"\n [autoComplete]=\"'address-level1'\"\n [(value)]=\"state\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Post Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.postal-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"postal-code\"\n id=\"tenant-request-postal-code\"\n [autoComplete]=\"'postal-code'\"\n [(value)]=\"postalCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Country ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.country' | translate | async }}</ax-label>\n <ax-select-box\n name=\"country\"\n [(value)]=\"country\"\n [dataSource]=\"countryOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n ></ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Referral Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.referral-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"referral-code\"\n id=\"tenant-request-referral\"\n [autoComplete]=\"'off'\"\n [(value)]=\"referralCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Subscription Plan (required by request flow) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.plan' | translate | async }}</ax-label>\n <ax-select-box\n name=\"planId\"\n [(value)]=\"planId\"\n [dataSource]=\"planOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n [placeholder]=\"('@auth:tenant-request.fields.plan-placeholder' | translate | async) ?? ''\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Terms ----- -->\n <div class=\"axp-span-full flex items-start gap-2 mt-1\">\n <ax-check-box [(ngModel)]=\"termsAccepted\" [disabled]=\"submitting()\"></ax-check-box>\n <ax-label class=\"mb-0 text-sm leading-snug\">\n {{ '@auth:tenant-request.extra.terms-label' | translate | async }}\n </ax-label>\n </div>\n </div>\n\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:tenant-request.submit' | translate | async\"\n [disabled]=\"\n submitting() ||\n !title.trim() ||\n !planId.trim() ||\n !email.trim() ||\n !confirmEmail.trim() ||\n !firstName.trim() ||\n !lastName.trim() ||\n !termsAccepted ||\n nameAvailable() === false\n \"\n (onClick)=\"submit()\"\n ></ax-button>\n\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n", styles: [":host{display:block;width:100%}.axp-auth-form{width:100%;margin-inline:auto}@media(min-width:768px){.axp-tenant-request-form{width:min(48rem,100%);max-width:100%}}.axp-auth-form ax-form,.axp-auth-form ax-form-field,.axp-auth-form ax-text-box,.axp-auth-form ax-select-box{display:block;width:100%}.axp-tenant-request-grid{display:grid;grid-template-columns:1fr;gap:1rem}@media(min-width:768px){.axp-tenant-request-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem 1.25rem}.axp-span-full{grid-column:1 / -1}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i1$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i1$1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i1$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i4.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i7.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
237
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPTenantRequestComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form axp-tenant-request-form\">\n <!-- ----- Success state after request is submitted ----- -->\n @if (submitted()) {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.success.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.success.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:backLogin' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Request form ----- -->\n @else {\n <div class=\"mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"axp-tenant-request-grid\">\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Company Name (title + name slug) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.company-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"organization\"\n id=\"tenant-request-organization\"\n [autoComplete]=\"'organization'\"\n [(value)]=\"title\"\n [disabled]=\"submitting()\"\n (onBlur)=\"onCompanyNameBlur()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.fields.company-name-hint' | translate | async }}\n </p>\n <!-- ----- Inline hint when the unique name is already taken ----- -->\n @if (nameAvailable() === false) {\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.error.name-taken' | translate | async }}\n </p>\n }\n <!-- ----- Inline hint while availability is being checked ----- -->\n @if (checkingName()) {\n <p class=\"mt-1 text-xs text-neutral-400\">\n {{ '@auth:tenant-request.checking-name' | translate | async }}\n </p>\n }\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Email ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"email\"\n id=\"tenant-request-email\"\n [autoComplete]=\"'email'\"\n [(value)]=\"email\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Confirm Email (form-only, not stored) ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.confirm-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"confirmEmail\"\n id=\"tenant-request-confirm-email\"\n [autoComplete]=\"'off'\"\n [(value)]=\"confirmEmail\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Business Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"tel\"\n id=\"tenant-request-phone\"\n [autoComplete]=\"'tel'\"\n [(value)]=\"phone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: First Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.first-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"given-name\"\n id=\"tenant-request-first-name\"\n [autoComplete]=\"'given-name'\"\n [(value)]=\"firstName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Last Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.last-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"family-name\"\n id=\"tenant-request-last-name\"\n [autoComplete]=\"'family-name'\"\n [(value)]=\"lastName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Mobile Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.mobile-phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"mobile\"\n id=\"tenant-request-mobile\"\n [autoComplete]=\"'tel-national'\"\n [(value)]=\"mobilePhone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Street Address ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.street1' | translate | async }}</ax-label>\n <ax-text-box\n name=\"street-address\"\n id=\"tenant-request-street\"\n [autoComplete]=\"'street-address'\"\n [(value)]=\"street1\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Suburb ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.suburb' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level2\"\n id=\"tenant-request-suburb\"\n [autoComplete]=\"'address-level2'\"\n [(value)]=\"suburb\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: State ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.state' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level1\"\n id=\"tenant-request-state\"\n [autoComplete]=\"'address-level1'\"\n [(value)]=\"state\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Post Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.postal-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"postal-code\"\n id=\"tenant-request-postal-code\"\n [autoComplete]=\"'postal-code'\"\n [(value)]=\"postalCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Country ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.country' | translate | async }}</ax-label>\n <ax-select-box\n name=\"country\"\n [(value)]=\"country\"\n [dataSource]=\"countryOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n ></ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Referral Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.referral-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"referral-code\"\n id=\"tenant-request-referral\"\n [autoComplete]=\"'off'\"\n [(value)]=\"referralCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Subscription Plan (required by request flow) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.plan' | translate | async }}</ax-label>\n <ax-select-box\n name=\"planId\"\n [(value)]=\"planId\"\n [dataSource]=\"planOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n [placeholder]=\"('@auth:tenant-request.fields.plan-placeholder' | translate | async) ?? ''\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Terms ----- -->\n <div class=\"axp-span-full flex items-start gap-2 mt-1\">\n <ax-check-box [(ngModel)]=\"termsAccepted\" [disabled]=\"submitting()\"></ax-check-box>\n <ax-label class=\"mb-0 text-sm leading-snug\">\n {{ '@auth:tenant-request.extra.terms-label' | translate | async }}\n </ax-label>\n </div>\n </div>\n\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:tenant-request.submit' | translate | async\"\n [disabled]=\"\n submitting() ||\n !title.trim() ||\n !planId.trim() ||\n !email.trim() ||\n !confirmEmail.trim() ||\n !firstName.trim() ||\n !lastName.trim() ||\n !termsAccepted ||\n nameAvailable() === false\n \"\n (onClick)=\"submit()\"\n ></ax-button>\n\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n", styles: [":host{display:block;width:100%}.axp-auth-form{width:100%;margin-inline:auto}@media(min-width:768px){.axp-tenant-request-form{width:min(48rem,100%);max-width:100%}}.axp-auth-form ax-form,.axp-auth-form ax-form-field,.axp-auth-form ax-text-box,.axp-auth-form ax-select-box{display:block;width:100%}.axp-tenant-request-grid{display:grid;grid-template-columns:1fr;gap:1rem}@media(min-width:768px){.axp-tenant-request-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem 1.25rem}.axp-span-full{grid-column:1 / -1}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i1$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i1$1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i1$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i4.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "dropdownAnchor", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i7.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
238
238
|
}
|
|
239
239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPTenantRequestComponent, decorators: [{
|
|
240
240
|
type: Component,
|
|
@@ -253,4 +253,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
253
253
|
}] });
|
|
254
254
|
|
|
255
255
|
export { AXPTenantRequestComponent };
|
|
256
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-tenant-request.component-
|
|
256
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-tenant-request.component-CG74dqMX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-tenant-request.component-B-qx-HIi.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/tenant-request/tenant-request.component.ts","../../../../libs/modules/auth/client/src/lib/pages/tenant-request/tenant-request.component.html"],"sourcesContent":["import { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXMTenantManagementServerCommands,\n type AXMCheckTenantNameAvailableResult,\n type AXMListPublicSubscriptionPlansResult,\n type AXMPublicSubscriptionPlanItem,\n} from '@acorex-platform/module-tenant-management-client/contracts';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport {\n AXTranslationModule,\n AXTranslationService,\n resolveMultiLanguageString,\n} from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterModule } from '@angular/router';\n\n//#region ----- Types -----\n\ninterface PlanOption {\n id: string;\n title: string;\n}\n\ninterface CountryOption {\n id: string;\n title: string;\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\n/** Slug for Tenant.name from company title (letters/digits/hyphens only). */\nfunction slugifyTenantName(companyName: string): string {\n return companyName\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 64);\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n templateUrl: './tenant-request.component.html',\n styleUrls: ['./tenant-request.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXSelectBoxModule,\n AXCheckBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXTranslationModule,\n RouterModule,\n ],\n})\nexport class AXPTenantRequestComponent implements OnInit {\n //#region ----- Services & Dependencies -----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly toast = inject(AXToastService);\n private readonly translation = inject(AXTranslationService);\n private readonly router = inject(Router);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly submitting = signal(false);\n protected readonly submitted = signal(false);\n protected readonly checkingName = signal(false);\n protected readonly nameAvailable = signal<boolean | null>(null);\n protected readonly planOptions = signal<PlanOption[]>([]);\n protected readonly countryOptions = signal<CountryOption[]>([]);\n\n //#endregion\n\n //#region ----- Form model (Tenant static + Extra) -----\n\n /** Company Name → Tenant.title; also drives Tenant.name slug. */\n protected title = '';\n protected planId = '';\n protected email = '';\n protected confirmEmail = '';\n protected phone = '';\n protected street1 = '';\n protected postalCode = '';\n\n /** Extra bag fields (Safetyminder). */\n protected firstName = '';\n protected lastName = '';\n protected mobilePhone = '';\n protected suburb = '';\n protected state = '';\n protected country = 'Australia';\n protected referralCode = '';\n protected termsAccepted = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n async ngOnInit(): Promise<void> {\n await Promise.all([this.loadPlans(), this.loadCountryOptions()]);\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected goToLogin(): void {\n void this.router.navigate(['/auth/login']);\n }\n\n protected async onCompanyNameBlur(): Promise<void> {\n const name = slugifyTenantName(this.title);\n if (!name) {\n this.nameAvailable.set(null);\n return;\n }\n this.checkingName.set(true);\n try {\n const result = await this.commandService.execute(\n AXMTenantManagementServerCommands.CheckTenantNameAvailable,\n { name },\n );\n if (!result?.success) {\n this.nameAvailable.set(null);\n return;\n }\n const data = (result as { data?: AXMCheckTenantNameAvailableResult }).data;\n this.nameAvailable.set(data?.available === true);\n } catch {\n this.nameAvailable.set(null);\n } finally {\n this.checkingName.set(false);\n }\n }\n\n protected async submit(): Promise<void> {\n const title = this.title.trim();\n const name = slugifyTenantName(title);\n const planId = this.planId.trim();\n const email = this.email.trim().toLowerCase();\n const confirmEmail = this.confirmEmail.trim().toLowerCase();\n const phone = this.phone.trim();\n const street1 = this.street1.trim();\n const postalCode = this.postalCode.trim();\n\n if (!name || !title || !planId || !email || this.submitting() || this.submitted()) {\n return;\n }\n if (email !== confirmEmail) {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.email-mismatch',\n 'Request Failed',\n 'Email and confirm email do not match.',\n );\n return;\n }\n if (!this.termsAccepted) {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.terms-required',\n 'Request Failed',\n 'Please accept the terms to continue.',\n );\n return;\n }\n if (this.nameAvailable() === false) {\n await this.showNameTakenToast();\n return;\n }\n\n const extra: Record<string, unknown> = {\n firstName: this.firstName.trim(),\n lastName: this.lastName.trim(),\n mobilePhone: this.mobilePhone.trim(),\n suburb: this.suburb.trim(),\n state: this.state.trim(),\n country: String(this.country ?? '').trim(),\n referralCode: this.referralCode.trim(),\n termsAccepted: this.termsAccepted === true,\n };\n\n this.submitting.set(true);\n try {\n const result = await this.commandService.execute(\n AXMTenantManagementServerCommands.RequestTenantCreation,\n {\n name,\n title,\n planId,\n email,\n ...(phone ? { phone } : {}),\n ...(street1 ? { street1 } : {}),\n ...(postalCode ? { postalCode } : {}),\n extra,\n webOrigin: typeof window !== 'undefined' ? window.location.origin : undefined,\n },\n );\n if (!result?.success) {\n const code = typeof result?.message?.code === 'string' ? result.message.code : '';\n if (code === 'TENANT_REQUEST_NAME_TAKEN') {\n this.nameAvailable.set(false);\n await this.showNameTakenToast();\n return;\n }\n throw new Error('request failed');\n }\n this.submitted.set(true);\n await this.showToast(\n '@auth:tenant-request.success.title',\n '@auth:tenant-request.success.description',\n 'Request Submitted',\n 'We received your request. You will get an email when it is reviewed.',\n 'success',\n 5000,\n );\n } catch {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.description',\n 'Request Failed',\n 'Unable to submit your request. Please try again later.',\n );\n } finally {\n this.submitting.set(false);\n }\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadPlans(): Promise<void> {\n try {\n const result = await this.commandService.execute(\n AXMTenantManagementServerCommands.ListPublicSubscriptionPlans,\n {},\n );\n if (!result?.success) {\n this.planOptions.set([]);\n return;\n }\n const payload = (result as { data?: AXMListPublicSubscriptionPlansResult }).data;\n const items = Array.isArray(payload?.items) ? payload.items : [];\n const locale = this.translation.getActiveLang?.() ?? 'en-US';\n this.planOptions.set(\n items\n .map((item: AXMPublicSubscriptionPlanItem) => {\n const id = String(item?.id ?? '').trim();\n if (!id) {\n return null;\n }\n const planTitle =\n resolveMultiLanguageString(item.title as never, locale).trim() ||\n String(item.code ?? id);\n return { id, title: planTitle };\n })\n .filter((row): row is PlanOption => row != null),\n );\n } catch {\n this.planOptions.set([]);\n }\n }\n\n private async loadCountryOptions(): Promise<void> {\n const [australia, newZealand, other] = await Promise.all([\n this.translation\n .translateAsync('@auth:tenant-request.extra.country-options.australia')\n .catch(() => 'Australia'),\n this.translation\n .translateAsync('@auth:tenant-request.extra.country-options.new-zealand')\n .catch(() => 'New Zealand'),\n this.translation\n .translateAsync('@auth:tenant-request.extra.country-options.other')\n .catch(() => 'Other'),\n ]);\n this.countryOptions.set([\n { id: 'Australia', title: australia },\n { id: 'New Zealand', title: newZealand },\n { id: 'Other', title: other },\n ]);\n }\n\n private async showNameTakenToast(): Promise<void> {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.name-taken',\n 'Request Failed',\n 'This organization name is already taken. Please choose another.',\n );\n }\n\n private async showToast(\n titleKey: string,\n contentKey: string,\n titleFallback: string,\n contentFallback: string,\n color: 'success' | 'danger' = 'danger',\n timeOut = 4000,\n ): Promise<void> {\n const [toastTitle, content] = await Promise.all([\n this.translation.translateAsync(titleKey).catch(() => titleFallback),\n this.translation.translateAsync(contentKey).catch(() => contentFallback),\n ]);\n this.toast.show({ color, title: toastTitle, content, timeOut });\n }\n\n //#endregion\n}\n\n//#endregion\n","<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form axp-tenant-request-form\">\n <!-- ----- Success state after request is submitted ----- -->\n @if (submitted()) {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.success.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.success.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:backLogin' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Request form ----- -->\n @else {\n <div class=\"mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"axp-tenant-request-grid\">\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Company Name (title + name slug) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.company-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"organization\"\n id=\"tenant-request-organization\"\n [autoComplete]=\"'organization'\"\n [(value)]=\"title\"\n [disabled]=\"submitting()\"\n (onBlur)=\"onCompanyNameBlur()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.fields.company-name-hint' | translate | async }}\n </p>\n <!-- ----- Inline hint when the unique name is already taken ----- -->\n @if (nameAvailable() === false) {\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.error.name-taken' | translate | async }}\n </p>\n }\n <!-- ----- Inline hint while availability is being checked ----- -->\n @if (checkingName()) {\n <p class=\"mt-1 text-xs text-neutral-400\">\n {{ '@auth:tenant-request.checking-name' | translate | async }}\n </p>\n }\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Email ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"email\"\n id=\"tenant-request-email\"\n [autoComplete]=\"'email'\"\n [(value)]=\"email\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Confirm Email (form-only, not stored) ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.confirm-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"confirmEmail\"\n id=\"tenant-request-confirm-email\"\n [autoComplete]=\"'off'\"\n [(value)]=\"confirmEmail\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Business Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"tel\"\n id=\"tenant-request-phone\"\n [autoComplete]=\"'tel'\"\n [(value)]=\"phone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: First Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.first-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"given-name\"\n id=\"tenant-request-first-name\"\n [autoComplete]=\"'given-name'\"\n [(value)]=\"firstName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Last Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.last-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"family-name\"\n id=\"tenant-request-last-name\"\n [autoComplete]=\"'family-name'\"\n [(value)]=\"lastName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Mobile Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.mobile-phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"mobile\"\n id=\"tenant-request-mobile\"\n [autoComplete]=\"'tel-national'\"\n [(value)]=\"mobilePhone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Street Address ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.street1' | translate | async }}</ax-label>\n <ax-text-box\n name=\"street-address\"\n id=\"tenant-request-street\"\n [autoComplete]=\"'street-address'\"\n [(value)]=\"street1\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Suburb ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.suburb' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level2\"\n id=\"tenant-request-suburb\"\n [autoComplete]=\"'address-level2'\"\n [(value)]=\"suburb\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: State ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.state' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level1\"\n id=\"tenant-request-state\"\n [autoComplete]=\"'address-level1'\"\n [(value)]=\"state\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Post Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.postal-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"postal-code\"\n id=\"tenant-request-postal-code\"\n [autoComplete]=\"'postal-code'\"\n [(value)]=\"postalCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Country ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.country' | translate | async }}</ax-label>\n <ax-select-box\n name=\"country\"\n [(value)]=\"country\"\n [dataSource]=\"countryOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n ></ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Referral Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.referral-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"referral-code\"\n id=\"tenant-request-referral\"\n [autoComplete]=\"'off'\"\n [(value)]=\"referralCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Subscription Plan (required by request flow) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.plan' | translate | async }}</ax-label>\n <ax-select-box\n name=\"planId\"\n [(value)]=\"planId\"\n [dataSource]=\"planOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n [placeholder]=\"('@auth:tenant-request.fields.plan-placeholder' | translate | async) ?? ''\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Terms ----- -->\n <div class=\"axp-span-full flex items-start gap-2 mt-1\">\n <ax-check-box [(ngModel)]=\"termsAccepted\" [disabled]=\"submitting()\"></ax-check-box>\n <ax-label class=\"mb-0 text-sm leading-snug\">\n {{ '@auth:tenant-request.extra.terms-label' | translate | async }}\n </ax-label>\n </div>\n </div>\n\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:tenant-request.submit' | translate | async\"\n [disabled]=\"\n submitting() ||\n !title.trim() ||\n !planId.trim() ||\n !email.trim() ||\n !confirmEmail.trim() ||\n !firstName.trim() ||\n !lastName.trim() ||\n !termsAccepted ||\n nameAvailable() === false\n \"\n (onClick)=\"submit()\"\n ></ax-button>\n\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n"],"names":["i2","i5","i7","i8","i9","i10"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;AAEA;AAEA;AACA,SAAS,iBAAiB,CAAC,WAAmB,EAAA;AAC5C,IAAA,OAAO;AACJ,SAAA,IAAI;AACJ,SAAA,WAAW;AACX,SAAA,OAAO,CAAC,aAAa,EAAE,GAAG;AAC1B,SAAA,OAAO,CAAC,UAAU,EAAE,EAAE;AACtB,SAAA,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;AACjB;AAEA;AAEA;MAmBa,yBAAyB,CAAA;AAjBtC,IAAA,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,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAF,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAGH,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAjBrC,SAAS;sCAGS,uBAAuB,CAAC,KAAK,EAAA,OAAA,EACrC;wBACP,YAAY;wBACZ,WAAW;wBACX,YAAY;wBACZ,eAAe;wBACf,iBAAiB;wBACjB,gBAAgB;wBAChB,cAAc;wBACd,aAAa;wBACb,mBAAmB;wBACnB,YAAY;AACb,qBAAA,EAAA,QAAA,EAAA,w0XAAA,EAAA,MAAA,EAAA,CAAA,2kBAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-tenant-request.component-CG74dqMX.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/tenant-request/tenant-request.component.ts","../../../../libs/modules/auth/client/src/lib/pages/tenant-request/tenant-request.component.html"],"sourcesContent":["import { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXMTenantManagementServerCommands,\n type AXMCheckTenantNameAvailableResult,\n type AXMListPublicSubscriptionPlansResult,\n type AXMPublicSubscriptionPlanItem,\n} from '@acorex-platform/module-tenant-management-client/contracts';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport {\n AXTranslationModule,\n AXTranslationService,\n resolveMultiLanguageString,\n} from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterModule } from '@angular/router';\n\n//#region ----- Types -----\n\ninterface PlanOption {\n id: string;\n title: string;\n}\n\ninterface CountryOption {\n id: string;\n title: string;\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\n/** Slug for Tenant.name from company title (letters/digits/hyphens only). */\nfunction slugifyTenantName(companyName: string): string {\n return companyName\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 64);\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n templateUrl: './tenant-request.component.html',\n styleUrls: ['./tenant-request.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXSelectBoxModule,\n AXCheckBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXTranslationModule,\n RouterModule,\n ],\n})\nexport class AXPTenantRequestComponent implements OnInit {\n //#region ----- Services & Dependencies -----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly toast = inject(AXToastService);\n private readonly translation = inject(AXTranslationService);\n private readonly router = inject(Router);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly submitting = signal(false);\n protected readonly submitted = signal(false);\n protected readonly checkingName = signal(false);\n protected readonly nameAvailable = signal<boolean | null>(null);\n protected readonly planOptions = signal<PlanOption[]>([]);\n protected readonly countryOptions = signal<CountryOption[]>([]);\n\n //#endregion\n\n //#region ----- Form model (Tenant static + Extra) -----\n\n /** Company Name → Tenant.title; also drives Tenant.name slug. */\n protected title = '';\n protected planId = '';\n protected email = '';\n protected confirmEmail = '';\n protected phone = '';\n protected street1 = '';\n protected postalCode = '';\n\n /** Extra bag fields (Safetyminder). */\n protected firstName = '';\n protected lastName = '';\n protected mobilePhone = '';\n protected suburb = '';\n protected state = '';\n protected country = 'Australia';\n protected referralCode = '';\n protected termsAccepted = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n async ngOnInit(): Promise<void> {\n await Promise.all([this.loadPlans(), this.loadCountryOptions()]);\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected goToLogin(): void {\n void this.router.navigate(['/auth/login']);\n }\n\n protected async onCompanyNameBlur(): Promise<void> {\n const name = slugifyTenantName(this.title);\n if (!name) {\n this.nameAvailable.set(null);\n return;\n }\n this.checkingName.set(true);\n try {\n const result = await this.commandService.execute(\n AXMTenantManagementServerCommands.CheckTenantNameAvailable,\n { name },\n );\n if (!result?.success) {\n this.nameAvailable.set(null);\n return;\n }\n const data = (result as { data?: AXMCheckTenantNameAvailableResult }).data;\n this.nameAvailable.set(data?.available === true);\n } catch {\n this.nameAvailable.set(null);\n } finally {\n this.checkingName.set(false);\n }\n }\n\n protected async submit(): Promise<void> {\n const title = this.title.trim();\n const name = slugifyTenantName(title);\n const planId = this.planId.trim();\n const email = this.email.trim().toLowerCase();\n const confirmEmail = this.confirmEmail.trim().toLowerCase();\n const phone = this.phone.trim();\n const street1 = this.street1.trim();\n const postalCode = this.postalCode.trim();\n\n if (!name || !title || !planId || !email || this.submitting() || this.submitted()) {\n return;\n }\n if (email !== confirmEmail) {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.email-mismatch',\n 'Request Failed',\n 'Email and confirm email do not match.',\n );\n return;\n }\n if (!this.termsAccepted) {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.terms-required',\n 'Request Failed',\n 'Please accept the terms to continue.',\n );\n return;\n }\n if (this.nameAvailable() === false) {\n await this.showNameTakenToast();\n return;\n }\n\n const extra: Record<string, unknown> = {\n firstName: this.firstName.trim(),\n lastName: this.lastName.trim(),\n mobilePhone: this.mobilePhone.trim(),\n suburb: this.suburb.trim(),\n state: this.state.trim(),\n country: String(this.country ?? '').trim(),\n referralCode: this.referralCode.trim(),\n termsAccepted: this.termsAccepted === true,\n };\n\n this.submitting.set(true);\n try {\n const result = await this.commandService.execute(\n AXMTenantManagementServerCommands.RequestTenantCreation,\n {\n name,\n title,\n planId,\n email,\n ...(phone ? { phone } : {}),\n ...(street1 ? { street1 } : {}),\n ...(postalCode ? { postalCode } : {}),\n extra,\n webOrigin: typeof window !== 'undefined' ? window.location.origin : undefined,\n },\n );\n if (!result?.success) {\n const code = typeof result?.message?.code === 'string' ? result.message.code : '';\n if (code === 'TENANT_REQUEST_NAME_TAKEN') {\n this.nameAvailable.set(false);\n await this.showNameTakenToast();\n return;\n }\n throw new Error('request failed');\n }\n this.submitted.set(true);\n await this.showToast(\n '@auth:tenant-request.success.title',\n '@auth:tenant-request.success.description',\n 'Request Submitted',\n 'We received your request. You will get an email when it is reviewed.',\n 'success',\n 5000,\n );\n } catch {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.description',\n 'Request Failed',\n 'Unable to submit your request. Please try again later.',\n );\n } finally {\n this.submitting.set(false);\n }\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadPlans(): Promise<void> {\n try {\n const result = await this.commandService.execute(\n AXMTenantManagementServerCommands.ListPublicSubscriptionPlans,\n {},\n );\n if (!result?.success) {\n this.planOptions.set([]);\n return;\n }\n const payload = (result as { data?: AXMListPublicSubscriptionPlansResult }).data;\n const items = Array.isArray(payload?.items) ? payload.items : [];\n const locale = this.translation.getActiveLang?.() ?? 'en-US';\n this.planOptions.set(\n items\n .map((item: AXMPublicSubscriptionPlanItem) => {\n const id = String(item?.id ?? '').trim();\n if (!id) {\n return null;\n }\n const planTitle =\n resolveMultiLanguageString(item.title as never, locale).trim() ||\n String(item.code ?? id);\n return { id, title: planTitle };\n })\n .filter((row): row is PlanOption => row != null),\n );\n } catch {\n this.planOptions.set([]);\n }\n }\n\n private async loadCountryOptions(): Promise<void> {\n const [australia, newZealand, other] = await Promise.all([\n this.translation\n .translateAsync('@auth:tenant-request.extra.country-options.australia')\n .catch(() => 'Australia'),\n this.translation\n .translateAsync('@auth:tenant-request.extra.country-options.new-zealand')\n .catch(() => 'New Zealand'),\n this.translation\n .translateAsync('@auth:tenant-request.extra.country-options.other')\n .catch(() => 'Other'),\n ]);\n this.countryOptions.set([\n { id: 'Australia', title: australia },\n { id: 'New Zealand', title: newZealand },\n { id: 'Other', title: other },\n ]);\n }\n\n private async showNameTakenToast(): Promise<void> {\n await this.showToast(\n '@auth:tenant-request.error.title',\n '@auth:tenant-request.error.name-taken',\n 'Request Failed',\n 'This organization name is already taken. Please choose another.',\n );\n }\n\n private async showToast(\n titleKey: string,\n contentKey: string,\n titleFallback: string,\n contentFallback: string,\n color: 'success' | 'danger' = 'danger',\n timeOut = 4000,\n ): Promise<void> {\n const [toastTitle, content] = await Promise.all([\n this.translation.translateAsync(titleKey).catch(() => titleFallback),\n this.translation.translateAsync(contentKey).catch(() => contentFallback),\n ]);\n this.toast.show({ color, title: toastTitle, content, timeOut });\n }\n\n //#endregion\n}\n\n//#endregion\n","<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form axp-tenant-request-form\">\n <!-- ----- Success state after request is submitted ----- -->\n @if (submitted()) {\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.success.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.success.description' | translate | async }}\n </p>\n </div>\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:backLogin' | translate | async\"\n (onClick)=\"goToLogin()\"\n ></ax-button>\n }\n <!-- ----- Request form ----- -->\n @else {\n <div class=\"mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:tenant-request.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:tenant-request.hint' | translate | async }}\n </p>\n </div>\n <ax-form>\n <div class=\"axp-tenant-request-grid\">\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Company Name (title + name slug) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.company-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"organization\"\n id=\"tenant-request-organization\"\n [autoComplete]=\"'organization'\"\n [(value)]=\"title\"\n [disabled]=\"submitting()\"\n (onBlur)=\"onCompanyNameBlur()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.fields.company-name-hint' | translate | async }}\n </p>\n <!-- ----- Inline hint when the unique name is already taken ----- -->\n @if (nameAvailable() === false) {\n <p class=\"mt-1 text-xs text-danger-600\">\n {{ '@auth:tenant-request.error.name-taken' | translate | async }}\n </p>\n }\n <!-- ----- Inline hint while availability is being checked ----- -->\n @if (checkingName()) {\n <p class=\"mt-1 text-xs text-neutral-400\">\n {{ '@auth:tenant-request.checking-name' | translate | async }}\n </p>\n }\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Email ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"email\"\n id=\"tenant-request-email\"\n [autoComplete]=\"'email'\"\n [(value)]=\"email\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Confirm Email (form-only, not stored) ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.confirm-email' | translate | async }}</ax-label>\n <ax-text-box\n name=\"confirmEmail\"\n id=\"tenant-request-confirm-email\"\n [autoComplete]=\"'off'\"\n [(value)]=\"confirmEmail\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n <ax-validation-rule rule=\"email\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Business Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"tel\"\n id=\"tenant-request-phone\"\n [autoComplete]=\"'tel'\"\n [(value)]=\"phone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: First Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.first-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"given-name\"\n id=\"tenant-request-first-name\"\n [autoComplete]=\"'given-name'\"\n [(value)]=\"firstName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Last Name ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.last-name' | translate | async }}</ax-label>\n <ax-text-box\n name=\"family-name\"\n id=\"tenant-request-last-name\"\n [autoComplete]=\"'family-name'\"\n [(value)]=\"lastName\"\n [disabled]=\"submitting()\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Mobile Phone ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.mobile-phone' | translate | async }}</ax-label>\n <ax-text-box\n name=\"mobile\"\n id=\"tenant-request-mobile\"\n [autoComplete]=\"'tel-national'\"\n [(value)]=\"mobilePhone\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Street Address ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.street1' | translate | async }}</ax-label>\n <ax-text-box\n name=\"street-address\"\n id=\"tenant-request-street\"\n [autoComplete]=\"'street-address'\"\n [(value)]=\"street1\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Suburb ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.suburb' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level2\"\n id=\"tenant-request-suburb\"\n [autoComplete]=\"'address-level2'\"\n [(value)]=\"suburb\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: State ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.state' | translate | async }}</ax-label>\n <ax-text-box\n name=\"address-level1\"\n id=\"tenant-request-state\"\n [autoComplete]=\"'address-level1'\"\n [(value)]=\"state\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Post Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.fields.postal-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"postal-code\"\n id=\"tenant-request-postal-code\"\n [autoComplete]=\"'postal-code'\"\n [(value)]=\"postalCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Country ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.country' | translate | async }}</ax-label>\n <ax-select-box\n name=\"country\"\n [(value)]=\"country\"\n [dataSource]=\"countryOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n ></ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Referral Code ----- -->\n <ax-form-field>\n <ax-label>{{ '@auth:tenant-request.extra.referral-code' | translate | async }}</ax-label>\n <ax-text-box\n name=\"referral-code\"\n id=\"tenant-request-referral\"\n [autoComplete]=\"'off'\"\n [(value)]=\"referralCode\"\n [disabled]=\"submitting()\"\n ></ax-text-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Tenant: Subscription Plan (required by request flow) ----- -->\n <ax-form-field class=\"axp-span-full\">\n <ax-label>{{ '@auth:tenant-request.fields.plan' | translate | async }}</ax-label>\n <ax-select-box\n name=\"planId\"\n [(value)]=\"planId\"\n [dataSource]=\"planOptions()\"\n textField=\"title\"\n valueField=\"id\"\n [disabled]=\"submitting()\"\n [placeholder]=\"('@auth:tenant-request.fields.plan-placeholder' | translate | async) ?? ''\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-select-box>\n </ax-form-field>\n\n <!--------------------------------------------------------------->\n <!-- ----- Extra: Terms ----- -->\n <div class=\"axp-span-full flex items-start gap-2 mt-1\">\n <ax-check-box [(ngModel)]=\"termsAccepted\" [disabled]=\"submitting()\"></ax-check-box>\n <ax-label class=\"mb-0 text-sm leading-snug\">\n {{ '@auth:tenant-request.extra.terms-label' | translate | async }}\n </ax-label>\n </div>\n </div>\n\n <ax-button\n color=\"primary\"\n class=\"mt-4 lg:mt-6 w-full\"\n [text]=\"'@auth:tenant-request.submit' | translate | async\"\n [disabled]=\"\n submitting() ||\n !title.trim() ||\n !planId.trim() ||\n !email.trim() ||\n !confirmEmail.trim() ||\n !firstName.trim() ||\n !lastName.trim() ||\n !termsAccepted ||\n nameAvailable() === false\n \"\n (onClick)=\"submit()\"\n ></ax-button>\n\n <p class=\"text-center mt-6 text-neutral-400 text-sm\">\n {{ '@auth:tenant-chooser.footer' | translate | async }}\n <a\n [routerLink]=\"['/auth/login']\"\n class=\"text-primary font-medium cursor-pointer hover:underline\"\n >\n {{ '@auth:backLogin' | translate | async }}\n </a>\n </p>\n </ax-form>\n }\n </div>\n</ng-container>\n"],"names":["i2","i5","i7","i8","i9","i10"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;AAEA;AAEA;AACA,SAAS,iBAAiB,CAAC,WAAmB,EAAA;AAC5C,IAAA,OAAO;AACJ,SAAA,IAAI;AACJ,SAAA,WAAW;AACX,SAAA,OA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AA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAF,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAGH,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAjBrC,SAAS;sCAGS,uBAAuB,CAAC,KAAK,EAAA,OAAA,EACrC;wBACP,YAAY;wBACZ,WAAW;wBACX,YAAY;wBACZ,eAAe;wBACf,iBAAiB;wBACjB,gBAAgB;wBAChB,cAAc;wBACd,aAAa;wBACb,mBAAmB;wBACnB,YAAY;AACb,qBAAA,EAAA,QAAA,EAAA,w0XAAA,EAAA,MAAA,EAAA,CAAA,2kBAAA,CAAA,EAAA;;;"}
|
|
@@ -23,7 +23,7 @@ import { inject, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Componen
|
|
|
23
23
|
import { FormsModule } from '@angular/forms';
|
|
24
24
|
import { RouterModule, Router, ActivatedRoute } from '@angular/router';
|
|
25
25
|
import { BehaviorSubject, firstValueFrom } from 'rxjs';
|
|
26
|
-
import { x as AXMAuthPlatformSettingsService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-
|
|
26
|
+
import { x as AXMAuthPlatformSettingsService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CBRlR1xT.mjs';
|
|
27
27
|
import { r as readTwoFactorChallenge, c as clearTwoFactorChallenge } from './acorex-platform-module-auth-client-two-factor-challenge.storage-mi0UD7Sc.mjs';
|
|
28
28
|
|
|
29
29
|
//#region ----- Constants -----
|
|
@@ -197,4 +197,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
197
197
|
}] } });
|
|
198
198
|
|
|
199
199
|
export { AXPAuthTwoFactorCodeComponent };
|
|
200
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-two-factor-code.component-
|
|
200
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-two-factor-code.component-DAMphXPJ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-two-factor-code.component-DDzjCHid.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-code/two-factor-code.component.ts","../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-code/two-factor-code.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPHomePageService } from '@acorex-platform/framework-client/common';\nimport { AXM_TWO_FACTOR_ERROR_CODES } from '@acorex-platform/module-security-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\n\nimport { AXMAuthPlatformSettingsService } from '../../../auth-platform-settings.service';\nimport {\n clearTwoFactorChallenge,\n readTwoFactorChallenge,\n} from '../two-factor-challenge.storage';\n\n//#region ----- Constants -----\n\nconst TWO_FACTOR_ERROR_I18N: Record<string, string> = {\n [AXM_TWO_FACTOR_ERROR_CODES.InvalidInput]: '@auth:twofactor.errors.invalid-input',\n [AXM_TWO_FACTOR_ERROR_CODES.IncorrectCode]: '@auth:twofactor.errors.incorrect-code',\n [AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired]: '@auth:twofactor.errors.challenge-expired',\n [AXM_TWO_FACTOR_ERROR_CODES.RateLimited]: '@auth:twofactor.errors.rate-limited',\n [AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration]: '@auth:twofactor.errors.invalid-configuration',\n [AXM_TWO_FACTOR_ERROR_CODES.NotEnabled]: '@auth:twofactor.errors.not-enabled',\n};\n\nconst CHALLENGE_CLEARING_CODES = new Set<string>([\n AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired,\n AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration,\n AXM_TWO_FACTOR_ERROR_CODES.NotEnabled,\n]);\n\n//#endregion\n\n//#region ----- Module Imports -----\n\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXLoadingModule,\n RouterModule,\n AXValidationModule,\n];\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axp-auth-two-factor-code',\n templateUrl: './two-factor-code.component.html',\n imports: [...MODULES],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPAuthTwoFactorCodeComponent implements OnInit {\n //#region ----- Services & Dependencies -----\n\n private readonly sessionService = inject(AXPSessionService);\n private readonly authPlatformSettings = inject(AXMAuthPlatformSettingsService);\n private readonly homePageService = inject(AXPHomePageService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly router = inject(Router);\n private readonly activateRoute = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ----- Form References -----\n\n @ViewChild(AXFormComponent)\n private form!: AXFormComponent;\n\n //#endregion\n\n //#region ----- State -----\n\n protected code = '';\n protected isLoading$ = new BehaviorSubject<boolean>(false);\n protected submitText = 'twofactor.submit';\n private challengeId = '';\n private rememberMe = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n ngOnInit(): void {\n const stored = readTwoFactorChallenge();\n if (!stored?.challengeId) {\n void this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n return;\n }\n\n this.challengeId = stored.challengeId;\n this.rememberMe = stored.rememberMe;\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleBackToLogin(): void {\n clearTwoFactorChallenge();\n void this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n }\n\n protected handleVerifyClick(): void {\n const strategyName = this.authPlatformSettings.defaultStrategyName();\n this.sessionService.setStrategy(strategyName);\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n\n void this.form.validate().then(async (form) => {\n if (!form.result) {\n return;\n }\n\n const trimmedCode = this.code.trim();\n if (!trimmedCode || !this.challengeId) {\n return;\n }\n\n this.isLoading$.next(true);\n this.submitText = 'processing';\n\n try {\n await this.sessionService.signin({\n strategy: strategyName,\n username: '',\n password: '',\n challengeId: this.challengeId,\n code: trimmedCode,\n rememberMe: this.rememberMe,\n });\n\n const isAuthenticated = await firstValueFrom(this.sessionService.isAuthenticated$);\n if (!isAuthenticated) {\n throw new Error('Authentication failed after two-factor verification');\n }\n\n clearTwoFactorChallenge();\n await this.navigateAfterAuth(redirectUrl);\n } catch (error: unknown) {\n await this.handleVerifyError(error);\n } finally {\n this.submitText = 'twofactor.submit';\n this.isLoading$.next(false);\n }\n });\n }\n\n //#endregion\n\n //#region ----- Private Helpers -----\n\n private async navigateAfterAuth(redirectUrl?: string): Promise<void> {\n if (this.sessionService.tenant?.id == null) {\n await this.router.navigate(['/auth/account/tenant-chooser']);\n return;\n }\n\n if (this.sessionService.application?.id == null) {\n await this.router.navigate(['/auth/account/app-chooser']);\n return;\n }\n\n if (redirectUrl) {\n await this.router.navigate([redirectUrl]);\n return;\n }\n\n await this.homePageService.navigateTo();\n }\n\n private async handleVerifyError(error: unknown): Promise<void> {\n const apiError = this.extractApiError(error);\n const errorCode =\n (typeof apiError?.['error'] === 'string' && apiError['error']) ||\n (typeof apiError?.['code'] === 'string' && apiError['code']) ||\n '';\n\n const messageKey = TWO_FACTOR_ERROR_I18N[errorCode] ?? '@auth:twofactor.errors.verify-failed';\n const content = await this.translateService.translateAsync(messageKey);\n\n this.toastService.show({\n color: 'danger',\n content,\n timeOut: 5000,\n });\n\n this.code = '';\n\n if (CHALLENGE_CLEARING_CODES.has(errorCode)) {\n clearTwoFactorChallenge();\n await this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n }\n }\n\n private extractApiError(error: unknown): Record<string, unknown> | null {\n if (!error || typeof error !== 'object') {\n return null;\n }\n\n const err = error as Record<string, unknown>;\n if (err['apiError'] && typeof err['apiError'] === 'object') {\n return err['apiError'] as Record<string, unknown>;\n }\n\n if (err['error'] && typeof err['error'] === 'object') {\n return err['error'] as Record<string, unknown>;\n }\n\n return null;\n }\n\n //#endregion\n}\n\n//#endregion\n","<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:twofactor.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:twofactor.hint' | translate | async }}\n </p>\n </div>\n <div class=\"w-full lg:w-96 mx-auto\">\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label class=\"text-start\">{{ '@auth:twofactor.textBoxHint' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'twoFactorCode'\"\n id=\"twoFactorCode\"\n [autoComplete]=\"'one-time-code'\"\n [(value)]=\"code\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-button\n class=\"w-full\"\n [text]=\"('@auth:' + submitText) | translate | async\"\n color=\"primary\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleVerifyClick()\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n <ax-button\n class=\"w-full\"\n look=\"outline\"\n [text]=\"'@auth:twofactor.back-to-login' | translate | async\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleBackToLogin()\"\n >\n </ax-button>\n </div>\n </ax-form>\n </div>\n </div>\n</ng-container>\n"],"names":["i3","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AAEA,MAAM,qBAAqB,GAA2B;AACpD,IAAA,CAAC,0BAA0B,CAAC,YAAY,GAAG,sCAAsC;AACjF,IAAA,CAAC,0BAA0B,CAAC,aAAa,GAAG,uCAAuC;AACnF,IAAA,CAAC,0BAA0B,CAAC,gBAAgB,GAAG,0CAA0C;AACzF,IAAA,CAAC,0BAA0B,CAAC,WAAW,GAAG,qCAAqC;AAC/E,IAAA,CAAC,0BAA0B,CAAC,oBAAoB,GAAG,8CAA8C;AACjG,IAAA,CAAC,0BAA0B,CAAC,UAAU,GAAG,oCAAoC;CAC9E;AAED,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAS;AAC/C,IAAA,0BAA0B,CAAC,gBAAgB;AAC3C,IAAA,0BAA0B,CAAC,oBAAoB;AAC/C,IAAA,0BAA0B,CAAC,UAAU;AACtC,CAAA,CAAC;AAEF;AAEA;AAEA,MAAM,OAAO,GAAG;IACd,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,eAAe;IACf,cAAc;IACd,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,kBAAkB;CACnB;AAED;AAEA;MASa,6BAA6B,CAAA;AAP1C,IAAA,WAAA,GAAA;;AAUmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,C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A,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,OAAA,EAE3B,CAAC,GAAG,OAAO,CAAC,EAAA,eAAA,EACJ,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,oqDAAA,EAAA;;sBAiBpC,SAAS;uBAAC,eAAe;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-two-factor-code.component-DAMphXPJ.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-code/two-factor-code.component.ts","../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor-code/two-factor-code.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPHomePageService } from '@acorex-platform/framework-client/common';\nimport { AXM_TWO_FACTOR_ERROR_CODES } from '@acorex-platform/module-security-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\n\nimport { AXMAuthPlatformSettingsService } from '../../../auth-platform-settings.service';\nimport {\n clearTwoFactorChallenge,\n readTwoFactorChallenge,\n} from '../two-factor-challenge.storage';\n\n//#region ----- Constants -----\n\nconst TWO_FACTOR_ERROR_I18N: Record<string, string> = {\n [AXM_TWO_FACTOR_ERROR_CODES.InvalidInput]: '@auth:twofactor.errors.invalid-input',\n [AXM_TWO_FACTOR_ERROR_CODES.IncorrectCode]: '@auth:twofactor.errors.incorrect-code',\n [AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired]: '@auth:twofactor.errors.challenge-expired',\n [AXM_TWO_FACTOR_ERROR_CODES.RateLimited]: '@auth:twofactor.errors.rate-limited',\n [AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration]: '@auth:twofactor.errors.invalid-configuration',\n [AXM_TWO_FACTOR_ERROR_CODES.NotEnabled]: '@auth:twofactor.errors.not-enabled',\n};\n\nconst CHALLENGE_CLEARING_CODES = new Set<string>([\n AXM_TWO_FACTOR_ERROR_CODES.ChallengeExpired,\n AXM_TWO_FACTOR_ERROR_CODES.InvalidConfiguration,\n AXM_TWO_FACTOR_ERROR_CODES.NotEnabled,\n]);\n\n//#endregion\n\n//#region ----- Module Imports -----\n\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXLoadingModule,\n RouterModule,\n AXValidationModule,\n];\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axp-auth-two-factor-code',\n templateUrl: './two-factor-code.component.html',\n imports: [...MODULES],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPAuthTwoFactorCodeComponent implements OnInit {\n //#region ----- Services & Dependencies -----\n\n private readonly sessionService = inject(AXPSessionService);\n private readonly authPlatformSettings = inject(AXMAuthPlatformSettingsService);\n private readonly homePageService = inject(AXPHomePageService);\n private readonly toastService = inject(AXToastService);\n private readonly translateService = inject(AXTranslationService);\n private readonly router = inject(Router);\n private readonly activateRoute = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ----- Form References -----\n\n @ViewChild(AXFormComponent)\n private form!: AXFormComponent;\n\n //#endregion\n\n //#region ----- State -----\n\n protected code = '';\n protected isLoading$ = new BehaviorSubject<boolean>(false);\n protected submitText = 'twofactor.submit';\n private challengeId = '';\n private rememberMe = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n ngOnInit(): void {\n const stored = readTwoFactorChallenge();\n if (!stored?.challengeId) {\n void this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n return;\n }\n\n this.challengeId = stored.challengeId;\n this.rememberMe = stored.rememberMe;\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleBackToLogin(): void {\n clearTwoFactorChallenge();\n void this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n }\n\n protected handleVerifyClick(): void {\n const strategyName = this.authPlatformSettings.defaultStrategyName();\n this.sessionService.setStrategy(strategyName);\n const redirectUrl = this.activateRoute.snapshot.queryParams['redirectUrl'];\n\n void this.form.validate().then(async (form) => {\n if (!form.result) {\n return;\n }\n\n const trimmedCode = this.code.trim();\n if (!trimmedCode || !this.challengeId) {\n return;\n }\n\n this.isLoading$.next(true);\n this.submitText = 'processing';\n\n try {\n await this.sessionService.signin({\n strategy: strategyName,\n username: '',\n password: '',\n challengeId: this.challengeId,\n code: trimmedCode,\n rememberMe: this.rememberMe,\n });\n\n const isAuthenticated = await firstValueFrom(this.sessionService.isAuthenticated$);\n if (!isAuthenticated) {\n throw new Error('Authentication failed after two-factor verification');\n }\n\n clearTwoFactorChallenge();\n await this.navigateAfterAuth(redirectUrl);\n } catch (error: unknown) {\n await this.handleVerifyError(error);\n } finally {\n this.submitText = 'twofactor.submit';\n this.isLoading$.next(false);\n }\n });\n }\n\n //#endregion\n\n //#region ----- Private Helpers -----\n\n private async navigateAfterAuth(redirectUrl?: string): Promise<void> {\n if (this.sessionService.tenant?.id == null) {\n await this.router.navigate(['/auth/account/tenant-chooser']);\n return;\n }\n\n if (this.sessionService.application?.id == null) {\n await this.router.navigate(['/auth/account/app-chooser']);\n return;\n }\n\n if (redirectUrl) {\n await this.router.navigate([redirectUrl]);\n return;\n }\n\n await this.homePageService.navigateTo();\n }\n\n private async handleVerifyError(error: unknown): Promise<void> {\n const apiError = this.extractApiError(error);\n const errorCode =\n (typeof apiError?.['error'] === 'string' && apiError['error']) ||\n (typeof apiError?.['code'] === 'string' && apiError['code']) ||\n '';\n\n const messageKey = TWO_FACTOR_ERROR_I18N[errorCode] ?? '@auth:twofactor.errors.verify-failed';\n const content = await this.translateService.translateAsync(messageKey);\n\n this.toastService.show({\n color: 'danger',\n content,\n timeOut: 5000,\n });\n\n this.code = '';\n\n if (CHALLENGE_CLEARING_CODES.has(errorCode)) {\n clearTwoFactorChallenge();\n await this.router.navigate(['/auth/login'], {\n queryParams: this.activateRoute.snapshot.queryParams,\n });\n }\n }\n\n private extractApiError(error: unknown): Record<string, unknown> | null {\n if (!error || typeof error !== 'object') {\n return null;\n }\n\n const err = error as Record<string, unknown>;\n if (err['apiError'] && typeof err['apiError'] === 'object') {\n return err['apiError'] as Record<string, unknown>;\n }\n\n if (err['error'] && typeof err['error'] === 'object') {\n return err['error'] as Record<string, unknown>;\n }\n\n return null;\n }\n\n //#endregion\n}\n\n//#endregion\n","<ng-container *translate=\"let t\">\n <div class=\"axp-auth-form\">\n <div class=\"text-center mb-3 lg:mb-5\">\n <h1 class=\"font-bold text-xl mb-1 lg:mb-2\">\n {{ '@auth:twofactor.title' | translate | async }}\n </h1>\n <p class=\"text-base text-neutral-600\">\n {{ '@auth:twofactor.hint' | translate | async }}\n </p>\n </div>\n <div class=\"w-full lg:w-96 mx-auto\">\n <ax-form>\n <div class=\"flex flex-col gap-4 lg:gap-6\">\n <ax-form-field>\n <ax-label class=\"text-start\">{{ '@auth:twofactor.textBoxHint' | translate | async }}</ax-label>\n <ax-text-box\n [name]=\"'twoFactorCode'\"\n id=\"twoFactorCode\"\n [autoComplete]=\"'one-time-code'\"\n [(value)]=\"code\"\n >\n <ax-validation-rule rule=\"required\"></ax-validation-rule>\n </ax-text-box>\n </ax-form-field>\n <ax-button\n class=\"w-full\"\n [text]=\"('@auth:' + submitText) | translate | async\"\n color=\"primary\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleVerifyClick()\"\n >\n @if (isLoading$ | async) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n <ax-button\n class=\"w-full\"\n look=\"outline\"\n [text]=\"'@auth:twofactor.back-to-login' | translate | async\"\n [disabled]=\"isLoading$ | async\"\n (onClick)=\"handleBackToLogin()\"\n >\n </ax-button>\n </div>\n </ax-form>\n </div>\n </div>\n</ng-container>\n"],"names":["i3","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AAEA,MAAM,qBAAqB,GAA2B;AACpD,IAAA,CAAC,0BAA0B,CAAC,YAAY,GAAG,sCAAsC;AACjF,IAAA,CAAC,0BAA0B,CAAC,aAAa,GAAG,uCAAuC;AACnF,IAAA,CAAC,0BAA0B,CAAC,gBAAgB,GAAG,0CAA0C;AACzF,IAAA,CAAC,0BAA0B,CAAC,WAAW,GAAG,qCAAqC;AAC/E,IAAA,CAAC,0BAA0B,CAAC,oBAAoB,GAAG,8CAA8C;AACjG,IAAA,CAAC,0BAA0B,CAAC,UAAU,GAAG,oCAAoC;CAC9E;AAED,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAS;AAC/C,IAAA,0BAA0B,CAAC,gBAAgB;AAC3C,IAAA,0BAA0B,CAAC,oBAAoB;AAC/C,IAAA,0BAA0B,CAAC,UAAU;AACtC,CAAA,CAAC;AAEF;AAEA;AAEA,MAAM,OAAO,GAAG;IACd,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,eAAe;IACf,cAAc;IACd,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,kBAAkB;CACnB;AAED;AAEA;MASa,6BAA6B,CAAA;AAP1C,IAAA,WAAA,GAAA;;AAUmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBA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EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,OAAA,EAE3B,CAAC,GAAG,OAAO,CAAC,EAAA,eAAA,EACJ,uBAAuB,CAAC,KAAK,EAAA,aAAA,EAC/B,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,oqDAAA,EAAA;;sBAiBpC,SAAS;uBAAC,eAAe;;;"}
|
|
@@ -6,7 +6,7 @@ function routesFactory() {
|
|
|
6
6
|
const routes = [
|
|
7
7
|
{
|
|
8
8
|
path: 'twofactor',
|
|
9
|
-
loadComponent: () => import('./acorex-platform-module-auth-client-two-factor-code.component-
|
|
9
|
+
loadComponent: () => import('./acorex-platform-module-auth-client-two-factor-code.component-DAMphXPJ.mjs').then((c) => c.AXPAuthTwoFactorCodeComponent),
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
path: 'two-step',
|
|
@@ -44,4 +44,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
44
44
|
}] });
|
|
45
45
|
|
|
46
46
|
export { AXPTwoFactorModule };
|
|
47
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-two-factor.module-
|
|
47
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-two-factor.module-xzAzTU4n.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-two-factor.module-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-two-factor.module-xzAzTU4n.mjs","sources":["../../../../libs/modules/auth/client/src/lib/pages/two-factor/two-factor.module.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { ROUTES, Routes } from '@angular/router';\n\nfunction routesFactory() {\n const routes: Routes = [\n {\n path: 'twofactor',\n loadComponent: () =>\n import('./two-factor-code/two-factor-code.component').then((c) => c.AXPAuthTwoFactorCodeComponent),\n },\n {\n path: 'two-step',\n redirectTo: 'twofactor',\n pathMatch: 'full',\n },\n ];\n return routes;\n}\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n providers: [\n {\n provide: ROUTES,\n multi: true,\n useFactory: routesFactory,\n },\n ],\n})\nexport class AXPTwoFactorModule {}\n"],"names":[],"mappings":";;;;AAGA,SAAS,aAAa,GAAA;AACpB,IAAA,MAAM,MAAM,GAAW;AACrB,QAAA;AACE,YAAA,IAAI,EAAE,WAAW;AACjB,YAAA,aAAa,EAAE,MACb,OAAO,6EAA6C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA6B,CAAC;AACrG,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,UAAU,EAAE,WAAW;AACvB,YAAA,SAAS,EAAE,MAAM;AAClB,SAAA;KACF;AACD,IAAA,OAAO,MAAM;AACf;MAca,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAlB,kBAAkB,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,SAAA,EARlB;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;AACf,gBAAA,KAAK,EAAE,IAAI;AACX,gBAAA,UAAU,EAAE,aAAa;AAC1B,aAAA;AACF,SAAA,EAAA,CAAA,CAAA;;2FAEU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,UAAU,EAAE,aAAa;AAC1B,yBAAA;AACF,qBAAA;AACF,iBAAA;;;"}
|
|
@@ -3,7 +3,7 @@ import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layou
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, Injectable } from '@angular/core';
|
|
5
5
|
import { isEmpty } from 'lodash';
|
|
6
|
-
import { t as AXPLoginHistoryService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-
|
|
6
|
+
import { t as AXPLoginHistoryService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CBRlR1xT.mjs';
|
|
7
7
|
|
|
8
8
|
//#region ---- View login history command ----
|
|
9
9
|
/** Opens a read-only dialog listing recent sign-in attempts for the current user. */
|
|
@@ -104,4 +104,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
104
104
|
}] });
|
|
105
105
|
|
|
106
106
|
export { AXPViewLoginHistoryCommand };
|
|
107
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-view-login-history.command-
|
|
107
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-view-login-history.command-CLWGDmsI.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-auth-client-view-login-history.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-auth-client-view-login-history.command-CLWGDmsI.mjs","sources":["../../../../libs/modules/auth/client/src/lib/commands/view-login-history.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\n\nimport { inject, Injectable } from '@angular/core';\nimport { isEmpty } from 'lodash';\nimport { AXPLoginHistoryEntry, AXPLoginHistoryService } from '../shared/services/login-history.service';\n\n//#region ---- View login history command ----\n\n/** Opens a read-only dialog listing recent sign-in attempts for the current user. */\n@Injectable({ providedIn: 'root' })\nexport class AXPViewLoginHistoryCommand implements AXPCommand {\n //#region ---- Services & Dependencies ----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly loginHistoryService = inject(AXPLoginHistoryService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(): AXPCommandExecuteResultPromise<void> {\n const entries = await this.loginHistoryService.getEntries();\n const rows = await this.buildRows(entries);\n\n const dialogTitle = await this.translateService.translateAsync(\n '@auth:profile-page.commands.view-login-history.dialog.title',\n );\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog.setTitle(dialogTitle).setSize('lg').setCloseButton(true);\n\n if (isEmpty(rows)) {\n dialog.setMessage('@auth:profile-page.commands.view-login-history.empty');\n } else {\n dialog.content((layout) => {\n layout.list((list) => {\n list\n .setDataSource(rows)\n .setColumns([\n {\n name: 'lastLoginDate',\n title: '@auth:profile-page.commands.view-login-history.columns.date',\n width: '180px',\n widget: {\n type: 'date-time-editor',\n path: 'lastLoginDate',\n options: { format: 'datetime', readOnly: true },\n },\n },\n {\n name: 'device',\n title: '@auth:profile-page.commands.view-login-history.columns.device',\n widget: { type: 'text-editor', path: 'device', options: { readOnly: true } },\n },\n {\n name: 'location',\n title: '@auth:profile-page.commands.view-login-history.columns.location',\n widget: { type: 'text-editor', path: 'location', options: { readOnly: true } },\n },\n {\n name: 'ipAddress',\n title: '@auth:profile-page.commands.view-login-history.columns.ip-address',\n width: '140px',\n widget: { type: 'text-editor', path: 'ipAddress', options: { readOnly: true } },\n },\n {\n name: 'browser',\n title: '@auth:profile-page.commands.view-login-history.columns.browser',\n widget: { type: 'text-editor', path: 'browser', options: { readOnly: true } },\n },\n {\n name: 'statusLabel',\n title: '@auth:profile-page.commands.view-login-history.columns.status',\n width: '120px',\n widget: { type: 'text-editor', path: 'statusLabel', options: { readOnly: true } },\n },\n ])\n .setPaging(true)\n .setShowHeader(true)\n .setAllowSelection(false)\n .setMinHeight(360);\n });\n });\n }\n })\n .show();\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ---- Utility Methods ----\n\n private async buildRows(\n entries: AXPLoginHistoryEntry[],\n ): Promise<Array<AXPLoginHistoryEntry & { statusLabel: string }>> {\n return Promise.all(\n entries.map(async (entry) => ({\n ...entry,\n statusLabel: await this.translateService.translateAsync(\n `@auth:profile-page.commands.view-login-history.status.${entry.status}`,\n ),\n })),\n );\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAQA;AAEA;MAEa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACpD,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqGjE,IAAA;;;AA/FC,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE;QAC3D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAE1C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAC5D,6DAA6D,CAC9D;QAED,MAAM,IAAI,CAAC;AACR,aAAA,MAAM;AACN,aAAA,MAAM,CAAC,CAAC,MAAM,KAAI;AACjB,YAAA,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC;AAE/D,YAAA,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;AACjB,gBAAA,MAAM,CAAC,UAAU,CAAC,sDAAsD,CAAC;YAC3E;iB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A,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -16,7 +16,7 @@ import { CommonModule } from '@angular/common';
|
|
|
16
16
|
import * as i0 from '@angular/core';
|
|
17
17
|
import { inject, DestroyRef, signal, viewChild, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
18
18
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
19
|
-
import { u as AXPWelcomeOnboardingFlowService, D as AXPOnboardingProgressService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-
|
|
19
|
+
import { u as AXPWelcomeOnboardingFlowService, D as AXPOnboardingProgressService } from './acorex-platform-module-auth-client-acorex-platform-module-auth-client-CBRlR1xT.mjs';
|
|
20
20
|
|
|
21
21
|
//#region ----- Scoped palette CSS -----
|
|
22
22
|
const WELCOME_PALETTE_SCOPE = '.axp-welcome-onboarding';
|
|
@@ -810,4 +810,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
810
810
|
}], propDecorators: { formScrollHost: [{ type: i0.ViewChild, args: ['formScrollHost', { isSignal: true }] }], confettiHost: [{ type: i0.ViewChild, args: ['confettiHost', { isSignal: true }] }] } });
|
|
811
811
|
|
|
812
812
|
export { AXPAuthWelcomeOnboardingPageComponent };
|
|
813
|
-
//# sourceMappingURL=acorex-platform-module-auth-client-welcome-onboarding-page.component-
|
|
813
|
+
//# sourceMappingURL=acorex-platform-module-auth-client-welcome-onboarding-page.component-CdgoC07Q.mjs.map
|