verben-authentication-ui 0.3.3 → 0.3.4
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/esm2022/lib/components/button/button.component.mjs +46 -0
- package/esm2022/lib/components/button/button.module.mjs +20 -0
- package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +2 -0
- package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +86 -0
- package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +34 -0
- package/esm2022/lib/components/mail/mail.component.mjs +69 -0
- package/esm2022/lib/components/mail/mail.module.mjs +21 -0
- package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +108 -0
- package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +34 -0
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +45 -0
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +19 -0
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +75 -0
- package/esm2022/lib/components/otp-input/otp-input.module.mjs +23 -0
- package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +2 -0
- package/esm2022/lib/components/reset-password/reset-password.component.mjs +107 -0
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +34 -0
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +240 -0
- package/esm2022/lib/components/sign-in/sign-in.module.mjs +24 -0
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +223 -0
- package/esm2022/lib/components/sign-up/sign-up.module.mjs +24 -0
- package/esm2022/lib/components/sso/base-table-style.mjs +53 -0
- package/esm2022/lib/components/sso/helper.mjs +14 -0
- package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +74 -0
- package/esm2022/lib/components/sso/sso.columns.mjs +29 -0
- package/esm2022/lib/components/sso/sso.component.mjs +236 -0
- package/esm2022/lib/components/sso/sso.module.mjs +63 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +228 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +22 -0
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +90 -0
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +19 -0
- package/esm2022/lib/components/user-management/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-management/helper.mjs +26 -0
- package/esm2022/lib/components/user-management/useer-management.module.mjs +68 -0
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +57 -0
- package/esm2022/lib/components/user-management/user-management.columns.mjs +43 -0
- package/esm2022/lib/components/user-management/user-management.component.mjs +323 -0
- package/esm2022/lib/components/user-request/user-request.component.mjs +206 -0
- package/esm2022/lib/components/user-request/user-request.module.mjs +34 -0
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +24 -0
- package/esm2022/lib/components/user-request-approval/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +128 -0
- package/esm2022/lib/components/user-request-approval/helper.mjs +35 -0
- package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +72 -0
- package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +59 -0
- package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +26 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +251 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +77 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +32 -0
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +64 -0
- package/esm2022/lib/models/ErrorResponse.mjs +11 -0
- package/esm2022/lib/models/PasswordRequestParam.mjs +2 -0
- package/esm2022/lib/models/ResponseKeyValue.mjs +2 -0
- package/esm2022/lib/models/UserRequest.mjs +2 -0
- package/esm2022/lib/models/auth-mechanism.mjs +8 -0
- package/esm2022/lib/models/base.mjs +2 -0
- package/esm2022/lib/models/log-in.mjs +2 -0
- package/esm2022/lib/models/mainUser.mjs +2 -0
- package/esm2022/lib/models/object-state.mjs +8 -0
- package/esm2022/lib/models/otpValue.mjs +2 -0
- package/esm2022/lib/models/paged.mjs +2 -0
- package/esm2022/lib/models/query-params.mjs +2 -0
- package/esm2022/lib/models/request-status.mjs +5 -0
- package/esm2022/lib/models/resend-otp-data.mjs +2 -0
- package/esm2022/lib/models/sign-up.mjs +2 -0
- package/esm2022/lib/models/single-sign-on.mjs +2 -0
- package/esm2022/lib/models/status.mjs +6 -0
- package/esm2022/lib/models/user-access-request-status.mjs +7 -0
- package/esm2022/lib/models/user-access-request.mjs +2 -0
- package/esm2022/lib/models/user.mjs +2 -0
- package/esm2022/lib/services/environment.service.mjs +26 -0
- package/esm2022/lib/services/http-web-request.service.mjs +82 -0
- package/esm2022/lib/services/util.service.mjs +32 -0
- package/esm2022/public-api.mjs +43 -0
- package/esm2022/verben-authentication-ui.mjs +5 -0
- package/fesm2022/verben-authentication-ui.mjs +3622 -0
- package/fesm2022/verben-authentication-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +17 -0
- package/lib/components/button/button.module.d.ts +10 -0
- package/{src/lib/components/forgot-password/ForgotPasswordData.ts → lib/components/forgot-password/ForgotPasswordData.d.ts} +1 -1
- package/lib/components/forgot-password/forgot-password.component.d.ts +28 -0
- package/lib/components/forgot-password/forgot-password.module.d.ts +10 -0
- package/lib/components/mail/mail.component.d.ts +32 -0
- package/lib/components/mail/mail.module.d.ts +11 -0
- package/lib/components/mail-validation/mail-validation.component.d.ts +42 -0
- package/lib/components/mail-validation/mail-validation.module.d.ts +10 -0
- package/lib/components/o-auth/o-auth.component.d.ts +18 -0
- package/lib/components/o-auth/o-auth.module.d.ts +9 -0
- package/lib/components/otp-input/otp-input.component.d.ts +20 -0
- package/lib/components/otp-input/otp-input.module.d.ts +13 -0
- package/lib/components/reset-password/ResetPasswordData.d.ts +5 -0
- package/lib/components/reset-password/reset-password.component.d.ts +30 -0
- package/lib/components/reset-password/reset-password.module.d.ts +10 -0
- package/lib/components/sign-in/sign-in.component.d.ts +81 -0
- package/lib/components/sign-in/sign-in.module.d.ts +13 -0
- package/lib/components/sign-up/sign-up.component.d.ts +66 -0
- package/lib/components/sign-up/sign-up.module.d.ts +13 -0
- package/lib/components/sso/base-table-style.d.ts +1 -0
- package/lib/components/sso/helper.d.ts +2 -0
- package/lib/components/sso/sso-form/sso-form.component.d.ts +21 -0
- package/lib/components/sso/sso.columns.d.ts +3 -0
- package/lib/components/sso/sso.component.d.ts +54 -0
- package/lib/components/sso/sso.module.d.ts +11 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +67 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +12 -0
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +39 -0
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +9 -0
- package/lib/components/user-management/base-table-style.d.ts +1 -0
- package/lib/components/user-management/helper.d.ts +2 -0
- package/lib/components/user-management/useer-management.module.d.ts +11 -0
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +20 -0
- package/lib/components/user-management/user-management.columns.d.ts +3 -0
- package/lib/components/user-management/user-management.component.d.ts +60 -0
- package/lib/components/user-request/user-request.component.d.ts +60 -0
- package/lib/components/user-request/user-request.module.d.ts +10 -0
- package/lib/components/user-request-approval/access-request.columns.d.ts +3 -0
- package/lib/components/user-request-approval/base-table-style.d.ts +1 -0
- package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +23 -0
- package/lib/components/user-request-approval/helper.d.ts +6 -0
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +50 -0
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +21 -0
- package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.component.d.ts +59 -0
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.service.d.ts +18 -0
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +21 -0
- package/lib/models/ErrorResponse.d.ts +6 -0
- package/lib/models/PasswordRequestParam.d.ts +5 -0
- package/lib/models/ResponseKeyValue.d.ts +5 -0
- package/lib/models/UserRequest.d.ts +24 -0
- package/lib/models/auth-mechanism.d.ts +13 -0
- package/lib/models/base.d.ts +10 -0
- package/lib/models/log-in.d.ts +7 -0
- package/{src/lib/models/mainUser.ts → lib/models/mainUser.d.ts} +2 -3
- package/lib/models/object-state.d.ts +6 -0
- package/{src/lib/models/otpValue.ts → lib/models/otpValue.d.ts} +1 -3
- package/lib/models/paged.d.ts +9 -0
- package/lib/models/query-params.d.ts +7 -0
- package/lib/models/request-status.d.ts +3 -0
- package/lib/models/resend-otp-data.d.ts +8 -0
- package/lib/models/sign-up.d.ts +9 -0
- package/lib/models/single-sign-on.d.ts +7 -0
- package/lib/models/status.d.ts +4 -0
- package/lib/models/user-access-request-status.d.ts +5 -0
- package/{src/lib/models/user-access-request.ts → lib/models/user-access-request.d.ts} +3 -4
- package/lib/models/user.d.ts +23 -0
- package/lib/services/environment.service.d.ts +16 -0
- package/lib/services/http-web-request.service.d.ts +23 -0
- package/lib/services/util.service.d.ts +8 -0
- package/package.json +14 -8
- package/{src/public-api.ts → public-api.d.ts} +0 -21
- package/ng-package.json +0 -8
- package/src/lib/components/button/button.component.css +0 -3
- package/src/lib/components/button/button.component.html +0 -13
- package/src/lib/components/button/button.component.spec.ts +0 -23
- package/src/lib/components/button/button.component.ts +0 -24
- package/src/lib/components/button/button.module.ts +0 -11
- package/src/lib/components/forgot-password/forgot-password.component.css +0 -29
- package/src/lib/components/forgot-password/forgot-password.component.html +0 -13
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +0 -23
- package/src/lib/components/forgot-password/forgot-password.component.ts +0 -86
- package/src/lib/components/forgot-password/forgot-password.module.ts +0 -18
- package/src/lib/components/mail/mail.component.css +0 -0
- package/src/lib/components/mail/mail.component.html +0 -11
- package/src/lib/components/mail/mail.component.spec.ts +0 -23
- package/src/lib/components/mail/mail.component.ts +0 -47
- package/src/lib/components/mail/mail.module.ts +0 -13
- package/src/lib/components/mail-validation/mail-validation.component.css +0 -59
- package/src/lib/components/mail-validation/mail-validation.component.html +0 -37
- package/src/lib/components/mail-validation/mail-validation.component.spec.ts +0 -23
- package/src/lib/components/mail-validation/mail-validation.component.ts +0 -66
- package/src/lib/components/mail-validation/mail-validation.module.ts +0 -18
- package/src/lib/components/o-auth/o-auth.component.css +0 -21
- package/src/lib/components/o-auth/o-auth.component.html +0 -60
- package/src/lib/components/o-auth/o-auth.component.spec.ts +0 -23
- package/src/lib/components/o-auth/o-auth.component.ts +0 -43
- package/src/lib/components/o-auth/o-auth.module.ts +0 -11
- package/src/lib/components/otp-input/otp-input.component.css +0 -19
- package/src/lib/components/otp-input/otp-input.component.html +0 -14
- package/src/lib/components/otp-input/otp-input.component.spec.ts +0 -23
- package/src/lib/components/otp-input/otp-input.component.ts +0 -73
- package/src/lib/components/otp-input/otp-input.module.ts +0 -15
- package/src/lib/components/reset-password/ResetPasswordData.ts +0 -5
- package/src/lib/components/reset-password/reset-password.component.css +0 -29
- package/src/lib/components/reset-password/reset-password.component.html +0 -22
- package/src/lib/components/reset-password/reset-password.component.spec.ts +0 -23
- package/src/lib/components/reset-password/reset-password.component.ts +0 -108
- package/src/lib/components/reset-password/reset-password.module.ts +0 -18
- package/src/lib/components/sign-in/sign-in.component.css +0 -21
- package/src/lib/components/sign-in/sign-in.component.html +0 -84
- package/src/lib/components/sign-in/sign-in.component.spec.ts +0 -23
- package/src/lib/components/sign-in/sign-in.component.ts +0 -184
- package/src/lib/components/sign-in/sign-in.module.ts +0 -17
- package/src/lib/components/sign-up/sign-up.component.css +0 -36
- package/src/lib/components/sign-up/sign-up.component.html +0 -132
- package/src/lib/components/sign-up/sign-up.component.spec.ts +0 -23
- package/src/lib/components/sign-up/sign-up.component.ts +0 -176
- package/src/lib/components/sign-up/sign-up.module.ts +0 -15
- package/src/lib/components/sso/base-table-style.ts +0 -52
- package/src/lib/components/sso/helper.ts +0 -15
- package/src/lib/components/sso/sso-form/sso-form.component.css +0 -13
- package/src/lib/components/sso/sso-form/sso-form.component.html +0 -109
- package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +0 -23
- package/src/lib/components/sso/sso-form/sso-form.component.ts +0 -70
- package/src/lib/components/sso/sso.columns.ts +0 -32
- package/src/lib/components/sso/sso.component.css +0 -47
- package/src/lib/components/sso/sso.component.html +0 -208
- package/src/lib/components/sso/sso.component.spec.ts +0 -23
- package/src/lib/components/sso/sso.component.ts +0 -261
- package/src/lib/components/sso/sso.module.ts +0 -40
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +0 -8
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +0 -30
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +0 -23
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +0 -183
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +0 -15
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +0 -17
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +0 -45
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +0 -23
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +0 -57
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +0 -11
- package/src/lib/components/user-management/base-table-style.ts +0 -52
- package/src/lib/components/user-management/helper.ts +0 -29
- package/src/lib/components/user-management/index.ts +0 -4
- package/src/lib/components/user-management/useer-management.module.ts +0 -48
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +0 -61
- package/src/lib/components/user-management/user-management-form/user-management-form.component.css +0 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.html +0 -91
- package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +0 -23
- package/src/lib/components/user-management/user-management.columns.ts +0 -45
- package/src/lib/components/user-management/user-management.component.css +0 -26
- package/src/lib/components/user-management/user-management.component.html +0 -275
- package/src/lib/components/user-management/user-management.component.spec.ts +0 -23
- package/src/lib/components/user-management/user-management.component.ts +0 -380
- package/src/lib/components/user-management/user-management.service.ts +0 -42
- package/src/lib/components/user-request/user-request.component.css +0 -91
- package/src/lib/components/user-request/user-request.component.html +0 -165
- package/src/lib/components/user-request/user-request.component.spec.ts +0 -23
- package/src/lib/components/user-request/user-request.component.ts +0 -167
- package/src/lib/components/user-request/user-request.module.ts +0 -18
- package/src/lib/components/user-request-approval/access-request.columns.ts +0 -26
- package/src/lib/components/user-request-approval/base-table-style.ts +0 -52
- package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +0 -152
- package/src/lib/components/user-request-approval/helper.ts +0 -39
- package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +0 -16
- package/src/lib/components/user-request-approval/services/user-access-request.service.ts +0 -87
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +0 -65
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.css +0 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.html +0 -7
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +0 -23
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +0 -22
- package/src/lib/components/user-request-approval/user-request-approval.component.css +0 -1
- package/src/lib/components/user-request-approval/user-request-approval.component.html +0 -218
- package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +0 -23
- package/src/lib/components/user-request-approval/user-request-approval.component.ts +0 -301
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +0 -52
- package/src/lib/components/user-request-approval/user-request-approval.service.spec.ts +0 -16
- package/src/lib/components/user-request-approval/user-request-approval.service.ts +0 -58
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +0 -66
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css +0 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html +0 -97
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +0 -23
- package/src/lib/models/ErrorResponse.ts +0 -7
- package/src/lib/models/PasswordRequestParam.ts +0 -5
- package/src/lib/models/ResponseKeyValue.ts +0 -5
- package/src/lib/models/UserRequest.ts +0 -28
- package/src/lib/models/auth-mechanism.ts +0 -14
- package/src/lib/models/base.ts +0 -11
- package/src/lib/models/log-in.ts +0 -7
- package/src/lib/models/object-state.ts +0 -6
- package/src/lib/models/paged.ts +0 -9
- package/src/lib/models/query-params.ts +0 -7
- package/src/lib/models/request-status.ts +0 -4
- package/src/lib/models/resend-otp-data.ts +0 -8
- package/src/lib/models/resource.ts +0 -27
- package/src/lib/models/sign-up.ts +0 -11
- package/src/lib/models/single-sign-on.ts +0 -9
- package/src/lib/models/status.ts +0 -5
- package/src/lib/models/user-access-request-status.ts +0 -5
- package/src/lib/models/user.ts +0 -24
- package/src/lib/services/environment.service.spec.ts +0 -16
- package/src/lib/services/environment.service.ts +0 -23
- package/src/lib/services/http-web-request.service.spec.ts +0 -16
- package/src/lib/services/http-web-request.service.ts +0 -101
- package/src/lib/services/util.service.spec.ts +0 -16
- package/src/lib/services/util.service.ts +0 -28
- package/src/styles.css +0 -96
- package/src/theme/tailwind-setup.css +0 -3
- package/src/theme/tailwind.css +0 -980
- package/tailwind.config.js +0 -20
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -0,0 +1,3622 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Inject, Optional, EventEmitter, Component, Input, Output, NgModule, ViewChild, signal, computed } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/forms';
|
|
4
|
+
import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import * as i1 from '@angular/common/http';
|
|
6
|
+
import * as i2 from 'verben-ng-ui';
|
|
7
|
+
import { UTIL_SERVICE, VerbenaInputModule, VerbenaButtonModule, SvgModule, DataFilterType, DataViewModule, TableFilterModule, SortTableModule, DataExportModule, VisibleColumnModule, CardDataViewModule, VerbenaTextareaModule, DataTableModule, CardModule, VerbenaBadgeModule, DropDownModule } from 'verben-ng-ui';
|
|
8
|
+
import * as i1$2 from '@angular/common';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
|
+
import * as i6 from '@angular/router';
|
|
11
|
+
import { RouterLink } from '@angular/router';
|
|
12
|
+
import { BehaviorSubject, lastValueFrom } from 'rxjs';
|
|
13
|
+
|
|
14
|
+
class ErrorResponse {
|
|
15
|
+
ErrorMsg;
|
|
16
|
+
StatusCode;
|
|
17
|
+
FullLog;
|
|
18
|
+
constructor(ErrorMsg, StatusCode, FullLog) {
|
|
19
|
+
this.ErrorMsg = ErrorMsg;
|
|
20
|
+
this.StatusCode = StatusCode;
|
|
21
|
+
this.FullLog = FullLog;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// In your library's services/environment.service.ts
|
|
26
|
+
// import { ENVIRONMENT } from '../models/ENVIRONMENT_TOKEN';
|
|
27
|
+
const ENVIRONMENT = new InjectionToken('environment');
|
|
28
|
+
class EnvironmentService {
|
|
29
|
+
env;
|
|
30
|
+
constructor(env) {
|
|
31
|
+
this.env = env;
|
|
32
|
+
}
|
|
33
|
+
get environment() {
|
|
34
|
+
return this.env;
|
|
35
|
+
}
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, deps: [{ token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
37
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, providedIn: 'root' });
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
40
|
+
type: Injectable,
|
|
41
|
+
args: [{
|
|
42
|
+
providedIn: 'root',
|
|
43
|
+
}]
|
|
44
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
45
|
+
type: Inject,
|
|
46
|
+
args: [ENVIRONMENT]
|
|
47
|
+
}] }] });
|
|
48
|
+
|
|
49
|
+
class HttpWebRequestService {
|
|
50
|
+
http;
|
|
51
|
+
envSvc;
|
|
52
|
+
notificationService;
|
|
53
|
+
isProd;
|
|
54
|
+
constructor(http, envSvc, notificationService) {
|
|
55
|
+
this.http = http;
|
|
56
|
+
this.envSvc = envSvc;
|
|
57
|
+
this.notificationService = notificationService;
|
|
58
|
+
this.isProd = this.envSvc.environment.production;
|
|
59
|
+
}
|
|
60
|
+
buildHeaders() {
|
|
61
|
+
return {
|
|
62
|
+
'Content-Type': 'application/json',
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
buildUrl(url, baseUrl) {
|
|
66
|
+
return `${baseUrl}/${url}`;
|
|
67
|
+
}
|
|
68
|
+
handleError(err) {
|
|
69
|
+
const msg = err.error?.ErrorMsg ||
|
|
70
|
+
err.error?.errors?.values?.toString() ||
|
|
71
|
+
`${err.status} ${err.statusText}`;
|
|
72
|
+
this.notificationService.error(msg, { timeout: 3000 });
|
|
73
|
+
return new ErrorResponse(msg);
|
|
74
|
+
}
|
|
75
|
+
request(method, url, body, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
76
|
+
const options = {
|
|
77
|
+
headers: this.buildHeaders(),
|
|
78
|
+
};
|
|
79
|
+
const requestUrl = this.buildUrl(url, baseUrl);
|
|
80
|
+
switch (method) {
|
|
81
|
+
case 'GET':
|
|
82
|
+
return new Promise((resolve) => this.http.get(requestUrl, options).subscribe({
|
|
83
|
+
next: resolve,
|
|
84
|
+
error: (err) => resolve(this.handleError(err)),
|
|
85
|
+
}));
|
|
86
|
+
case 'POST':
|
|
87
|
+
return new Promise((resolve) => this.http.post(requestUrl, body, options).subscribe({
|
|
88
|
+
next: resolve,
|
|
89
|
+
error: (err) => resolve(this.handleError(err)),
|
|
90
|
+
}));
|
|
91
|
+
case 'PUT':
|
|
92
|
+
return this.http.put(requestUrl, body, options);
|
|
93
|
+
case 'DELETE':
|
|
94
|
+
return this.http.delete(requestUrl, options);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
get(url, baseUrl) {
|
|
98
|
+
return this.request('GET', url, undefined, baseUrl);
|
|
99
|
+
}
|
|
100
|
+
post(url, body, baseUrl) {
|
|
101
|
+
return this.request('POST', url, JSON.stringify(body), baseUrl);
|
|
102
|
+
}
|
|
103
|
+
postFile(url, formData, baseUrl) {
|
|
104
|
+
return new Promise((resolve) => this.http.post(this.buildUrl(url, baseUrl || this.envSvc.environment.AuthenticationAPI), formData).subscribe({
|
|
105
|
+
next: resolve,
|
|
106
|
+
error: (err) => resolve(this.handleError(err)),
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
put(url, body, baseUrl) {
|
|
110
|
+
return this.request('PUT', url, body, baseUrl);
|
|
111
|
+
}
|
|
112
|
+
delete(url, baseUrl) {
|
|
113
|
+
return this.request('DELETE', url, undefined, baseUrl);
|
|
114
|
+
}
|
|
115
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, deps: [{ token: i1.HttpClient }, { token: EnvironmentService }, { token: i2.NotificationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
116
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, providedIn: 'root' });
|
|
117
|
+
}
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, decorators: [{
|
|
119
|
+
type: Injectable,
|
|
120
|
+
args: [{
|
|
121
|
+
providedIn: 'root',
|
|
122
|
+
}]
|
|
123
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: EnvironmentService }, { type: i2.NotificationService }] });
|
|
124
|
+
|
|
125
|
+
class UtilService {
|
|
126
|
+
parentUtilService;
|
|
127
|
+
constructor(parentUtilService) {
|
|
128
|
+
this.parentUtilService = parentUtilService;
|
|
129
|
+
}
|
|
130
|
+
sendBI(state) {
|
|
131
|
+
console.log({ Service: this.parentUtilService });
|
|
132
|
+
if (this.parentUtilService && this.parentUtilService.sendBI) {
|
|
133
|
+
this.parentUtilService.sendBI(state);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
console.warn('Util Service is not provided');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, deps: [{ token: UTIL_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, providedIn: 'root' });
|
|
141
|
+
}
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, decorators: [{
|
|
143
|
+
type: Injectable,
|
|
144
|
+
args: [{
|
|
145
|
+
providedIn: 'root',
|
|
146
|
+
}]
|
|
147
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
148
|
+
type: Optional
|
|
149
|
+
}, {
|
|
150
|
+
type: Inject,
|
|
151
|
+
args: [UTIL_SERVICE]
|
|
152
|
+
}] }] });
|
|
153
|
+
|
|
154
|
+
class ResetPasswordComponent {
|
|
155
|
+
fb;
|
|
156
|
+
server;
|
|
157
|
+
utilService;
|
|
158
|
+
title = 'Reset Password';
|
|
159
|
+
subTitle = 'Create a New Password';
|
|
160
|
+
buttonCaption = 'Submit';
|
|
161
|
+
buttonTextColor;
|
|
162
|
+
buttonBackgroundColor;
|
|
163
|
+
showOldPassword = false;
|
|
164
|
+
token;
|
|
165
|
+
onSubmit = new EventEmitter();
|
|
166
|
+
onSubmitEnd = new EventEmitter();
|
|
167
|
+
resetPasswordForm;
|
|
168
|
+
constructor(fb, server, utilService) {
|
|
169
|
+
this.fb = fb;
|
|
170
|
+
this.server = server;
|
|
171
|
+
this.utilService = utilService;
|
|
172
|
+
this.resetPasswordForm = this.fb.group({
|
|
173
|
+
OldPassword: new FormControl(null, this.oldPasswordValidator.bind(this)),
|
|
174
|
+
Password: new FormControl(null, Validators.required),
|
|
175
|
+
ConfirmPassword: new FormControl(null, [
|
|
176
|
+
Validators.required,
|
|
177
|
+
this.confirmPasswordValidator.bind(this),
|
|
178
|
+
]),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
checkForm() {
|
|
182
|
+
return this.resetPasswordForm.valid;
|
|
183
|
+
}
|
|
184
|
+
oldPasswordValidator(control) {
|
|
185
|
+
if (this.showOldPassword && control.value == null) {
|
|
186
|
+
return { customValidation: true };
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
confirmPasswordValidator(control) {
|
|
191
|
+
if (this.resetPasswordForm &&
|
|
192
|
+
this.resetPasswordForm.controls['Password'] &&
|
|
193
|
+
this.resetPasswordForm.controls['Password'].value !== control.value) {
|
|
194
|
+
return { customValidation: true };
|
|
195
|
+
}
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
async submit() {
|
|
199
|
+
if (!this.checkForm()) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
var data = {
|
|
203
|
+
OldPassword: this.showOldPassword
|
|
204
|
+
? this.resetPasswordForm.controls['OldPassword'].value
|
|
205
|
+
: undefined,
|
|
206
|
+
Password: this.resetPasswordForm.controls['Password'].value,
|
|
207
|
+
ConfirmPassword: this.resetPasswordForm.controls['ConfirmPassword'].value,
|
|
208
|
+
};
|
|
209
|
+
this.onSubmit.emit(data);
|
|
210
|
+
var passwordRequest = {
|
|
211
|
+
NewPassword: data.Password,
|
|
212
|
+
OldPassword: data.OldPassword,
|
|
213
|
+
Token: this.token,
|
|
214
|
+
};
|
|
215
|
+
this.utilService.sendBI(true);
|
|
216
|
+
const res = await this.server.post(`User/CompleteChangePasswordRequest`, passwordRequest);
|
|
217
|
+
this.utilService.sendBI(false);
|
|
218
|
+
if (res instanceof ErrorResponse) {
|
|
219
|
+
this.onSubmitEnd.emit(res);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
var result = res;
|
|
223
|
+
this.onSubmitEnd.emit(result);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
227
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ResetPasswordComponent, selector: "verben-reset-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor", showOldPassword: "showOldPassword", token: "token" }, outputs: { onSubmit: "onSubmit", onSubmitEnd: "onSubmitEnd" }, ngImport: i0, template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"OldPassword\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Password\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"ConfirmPassword\"\n type=\"password\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordComponent, decorators: [{
|
|
230
|
+
type: Component,
|
|
231
|
+
args: [{ selector: 'verben-reset-password', template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"OldPassword\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Password\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"ConfirmPassword\"\n type=\"password\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"] }]
|
|
232
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { title: [{
|
|
233
|
+
type: Input
|
|
234
|
+
}], subTitle: [{
|
|
235
|
+
type: Input
|
|
236
|
+
}], buttonCaption: [{
|
|
237
|
+
type: Input
|
|
238
|
+
}], buttonTextColor: [{
|
|
239
|
+
type: Input
|
|
240
|
+
}], buttonBackgroundColor: [{
|
|
241
|
+
type: Input
|
|
242
|
+
}], showOldPassword: [{
|
|
243
|
+
type: Input
|
|
244
|
+
}], token: [{
|
|
245
|
+
type: Input
|
|
246
|
+
}], onSubmit: [{
|
|
247
|
+
type: Output
|
|
248
|
+
}], onSubmitEnd: [{
|
|
249
|
+
type: Output
|
|
250
|
+
}] } });
|
|
251
|
+
|
|
252
|
+
class ResetPasswordModule {
|
|
253
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
254
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, declarations: [ResetPasswordComponent], imports: [FormsModule,
|
|
255
|
+
ReactiveFormsModule,
|
|
256
|
+
VerbenaInputModule,
|
|
257
|
+
VerbenaButtonModule,
|
|
258
|
+
CommonModule], exports: [ResetPasswordComponent] });
|
|
259
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, imports: [FormsModule,
|
|
260
|
+
ReactiveFormsModule,
|
|
261
|
+
VerbenaInputModule,
|
|
262
|
+
VerbenaButtonModule,
|
|
263
|
+
CommonModule] });
|
|
264
|
+
}
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ResetPasswordModule, decorators: [{
|
|
266
|
+
type: NgModule,
|
|
267
|
+
args: [{
|
|
268
|
+
declarations: [ResetPasswordComponent],
|
|
269
|
+
imports: [
|
|
270
|
+
FormsModule,
|
|
271
|
+
ReactiveFormsModule,
|
|
272
|
+
VerbenaInputModule,
|
|
273
|
+
VerbenaButtonModule,
|
|
274
|
+
CommonModule,
|
|
275
|
+
],
|
|
276
|
+
exports: [ResetPasswordComponent],
|
|
277
|
+
}]
|
|
278
|
+
}] });
|
|
279
|
+
|
|
280
|
+
var ObjectState;
|
|
281
|
+
(function (ObjectState) {
|
|
282
|
+
ObjectState["New"] = "New";
|
|
283
|
+
ObjectState["Changed"] = "Changed";
|
|
284
|
+
ObjectState["Unchanged"] = "Unchanged";
|
|
285
|
+
ObjectState["Removed"] = "Removed";
|
|
286
|
+
})(ObjectState || (ObjectState = {}));
|
|
287
|
+
|
|
288
|
+
var Status;
|
|
289
|
+
(function (Status) {
|
|
290
|
+
Status["InActive"] = "InActive";
|
|
291
|
+
Status["Active"] = "Active";
|
|
292
|
+
})(Status || (Status = {}));
|
|
293
|
+
|
|
294
|
+
var RequestStatus;
|
|
295
|
+
(function (RequestStatus) {
|
|
296
|
+
RequestStatus["Pending"] = "Pending";
|
|
297
|
+
})(RequestStatus || (RequestStatus = {}));
|
|
298
|
+
|
|
299
|
+
class UserRequestComponent {
|
|
300
|
+
fb;
|
|
301
|
+
server;
|
|
302
|
+
utilService;
|
|
303
|
+
envSvc;
|
|
304
|
+
width = '500px';
|
|
305
|
+
headingTitle = 'Request an account';
|
|
306
|
+
headingClass = 'font-medium text-[2rem] leading-[48px] text-[#333]';
|
|
307
|
+
customClass = '';
|
|
308
|
+
bgColor = '#fff';
|
|
309
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
310
|
+
border = '1px solid #66666680';
|
|
311
|
+
borderRadius = '24px';
|
|
312
|
+
textColor = '#333';
|
|
313
|
+
height = 'auto';
|
|
314
|
+
pd = '32px 48px';
|
|
315
|
+
apiKey = '';
|
|
316
|
+
// Button Inputs
|
|
317
|
+
text = 'Send Request';
|
|
318
|
+
color = 'black';
|
|
319
|
+
btnBorder = '1px solid #FFE681';
|
|
320
|
+
btnBorderRadius = '40px';
|
|
321
|
+
btnBgColor = '#FFE681';
|
|
322
|
+
btnWidth = '100%';
|
|
323
|
+
btnPd = '10px 20px';
|
|
324
|
+
termsLink = '';
|
|
325
|
+
privacyLink = '';
|
|
326
|
+
routerLink = '';
|
|
327
|
+
formSubmit = new EventEmitter();
|
|
328
|
+
googleClick = new EventEmitter();
|
|
329
|
+
onSubmitSuccess = new EventEmitter();
|
|
330
|
+
appleClick = new EventEmitter();
|
|
331
|
+
onSubmitResponseEnd = new EventEmitter();
|
|
332
|
+
userRequestForm;
|
|
333
|
+
constructor(fb, server, utilService, envSvc) {
|
|
334
|
+
this.fb = fb;
|
|
335
|
+
this.server = server;
|
|
336
|
+
this.utilService = utilService;
|
|
337
|
+
this.envSvc = envSvc;
|
|
338
|
+
this.apiKey = this.envSvc.environment.APIKey;
|
|
339
|
+
this.userRequestForm = this.fb.group({
|
|
340
|
+
FirstName: [null, [Validators.required]],
|
|
341
|
+
LastName: [null, [Validators.required]],
|
|
342
|
+
Email: [null, [Validators.required, Validators.email]],
|
|
343
|
+
Password: [null, [Validators.required, Validators.minLength(8)]],
|
|
344
|
+
ConfirmPassword: [null, [Validators.required]],
|
|
345
|
+
}, { validators: this.passwordMatchValidator });
|
|
346
|
+
}
|
|
347
|
+
passwordMatchValidator(control) {
|
|
348
|
+
const password = control.get('Password')?.value;
|
|
349
|
+
const confirmPassword = control.get('ConfirmPassword')?.value;
|
|
350
|
+
return password === confirmPassword ? null : { passwordMismatch: true };
|
|
351
|
+
}
|
|
352
|
+
get passwordMismatchError() {
|
|
353
|
+
return this.userRequestForm.hasError('passwordMismatch');
|
|
354
|
+
}
|
|
355
|
+
get styles() {
|
|
356
|
+
return {
|
|
357
|
+
'background-color': this.bgColor,
|
|
358
|
+
'box-shadow': this.boxShadow,
|
|
359
|
+
border: this.border,
|
|
360
|
+
'border-radius': this.borderRadius,
|
|
361
|
+
color: this.textColor,
|
|
362
|
+
'max-width': this.width,
|
|
363
|
+
height: this.height,
|
|
364
|
+
padding: this.pd,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
checkForm() {
|
|
368
|
+
return this.userRequestForm.valid;
|
|
369
|
+
}
|
|
370
|
+
handleGoogleAuth() {
|
|
371
|
+
this.googleClick.emit();
|
|
372
|
+
}
|
|
373
|
+
handleAppleAuth() {
|
|
374
|
+
this.appleClick.emit();
|
|
375
|
+
}
|
|
376
|
+
async submitForm() {
|
|
377
|
+
if (!this.checkForm()) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
const payload = [
|
|
381
|
+
{
|
|
382
|
+
Code: '',
|
|
383
|
+
FirstName: this.userRequestForm.controls['FirstName'].value,
|
|
384
|
+
LastName: this.userRequestForm.controls['LastName'].value,
|
|
385
|
+
MailAddress: this.userRequestForm.controls['Email'].value,
|
|
386
|
+
Password: this.userRequestForm.controls['Password'].value,
|
|
387
|
+
PhoneNumber: '',
|
|
388
|
+
OtherName: '',
|
|
389
|
+
Role: [],
|
|
390
|
+
Tags: [],
|
|
391
|
+
Status: Status.Active,
|
|
392
|
+
RequestStatus: RequestStatus.Pending,
|
|
393
|
+
UpdatedAt: new Date(),
|
|
394
|
+
CreatedAt: new Date(),
|
|
395
|
+
Id: '',
|
|
396
|
+
DataState: ObjectState.New,
|
|
397
|
+
TenantId: '',
|
|
398
|
+
ServiceName: '',
|
|
399
|
+
ActionBy: '',
|
|
400
|
+
Comment: '',
|
|
401
|
+
},
|
|
402
|
+
];
|
|
403
|
+
// Emit payload if needed
|
|
404
|
+
this.formSubmit.emit(payload);
|
|
405
|
+
// Show loading indicator
|
|
406
|
+
this.utilService.sendBI(true);
|
|
407
|
+
try {
|
|
408
|
+
// Make the API call
|
|
409
|
+
const res = await this.server.post(`User/SaveUserAccessRequests`, payload);
|
|
410
|
+
// Hide loading indicator
|
|
411
|
+
this.utilService.sendBI(false);
|
|
412
|
+
if (res instanceof ErrorResponse) {
|
|
413
|
+
// Emit error response
|
|
414
|
+
this.onSubmitResponseEnd.emit(res);
|
|
415
|
+
console.log(res);
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
// Emit success response
|
|
419
|
+
const result = res;
|
|
420
|
+
this.onSubmitResponseEnd.emit(result);
|
|
421
|
+
// Emit success event
|
|
422
|
+
this.onSubmitSuccess.emit(result);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
catch (error) {
|
|
426
|
+
// Handle unexpected errors
|
|
427
|
+
this.utilService.sendBI(false);
|
|
428
|
+
console.error('Unexpected error:', error);
|
|
429
|
+
this.onSubmitResponseEnd.emit(error);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
433
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserRequestComponent, selector: "lib-user-request", inputs: { width: "width", headingTitle: "headingTitle", headingClass: "headingClass", customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", pd: "pd", text: "text", color: "color", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnBgColor: "btnBgColor", btnWidth: "btnWidth", btnPd: "btnPd", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", onSubmitSuccess: "onSubmitSuccess", appleClick: "appleClick", onSubmitResponseEnd: "onSubmitResponseEnd" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [customErrorMessages]=\"{\n required: 'Email address is required',\n email: 'Email address must be valid'\n }\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [passwordToggle]=\"true\"\n formControlName=\"Password\"\n [required]=\"true\"\n [type]=\"'password'\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"ConfirmPassword\"\n [showBorder]=\"true\"\n [passwordToggle]=\"true\"\n [bgColor]=\"'white'\"\n [minLength]=\"userRequestForm.controls['Password'].value?.length\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [customErrorMessages]=\"{\n minLength:'Confirm Password must match password',\n required: 'Confirm Password is required and must match password',\n password: 'Password does not match',\n }\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-button\n [class]=\"'mt-6'\"\n [disable]=\"!this.checkForm()\"\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [buttonClass]=\"'cursor-not-allowed'\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n [ngClass]=\"{\n 'cursor-not-allowed':!checkForm()\n }\"\n [width]=\"btnWidth\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n <div class=\"flex justify-center items-center OR\">\n <span></span>\n OR\n <span></span>\n </div>\n\n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n (click)=\"handleGoogleAuth()\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n ></verbena-button>\n\n <verbena-button\n svg=\"apple-logo\"\n (click)=\"handleAppleAuth()\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n ></verbena-button>\n </form>\n</section>\n", styles: [".flex{display:flex}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.justify-center{justify-content:center}.h-full{height:100%}.text-center{text-align:center}.underline{text-decoration:underline}.gap-5{gap:20px}.mt-4{margin-top:1rem}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.object-cover{object-fit:cover}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed!important}.accent{accent-color:#000}.OR{color:#666;gap:6px}.OR span{width:150px;border-top:2px solid #6666663d;display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
434
|
+
}
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestComponent, decorators: [{
|
|
436
|
+
type: Component,
|
|
437
|
+
args: [{ selector: 'lib-user-request', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [customErrorMessages]=\"{\n required: 'Email address is required',\n email: 'Email address must be valid'\n }\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [passwordToggle]=\"true\"\n formControlName=\"Password\"\n [required]=\"true\"\n [type]=\"'password'\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"ConfirmPassword\"\n [showBorder]=\"true\"\n [passwordToggle]=\"true\"\n [bgColor]=\"'white'\"\n [minLength]=\"userRequestForm.controls['Password'].value?.length\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [customErrorMessages]=\"{\n minLength:'Confirm Password must match password',\n required: 'Confirm Password is required and must match password',\n password: 'Password does not match',\n }\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-button\n [class]=\"'mt-6'\"\n [disable]=\"!this.checkForm()\"\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [buttonClass]=\"'cursor-not-allowed'\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n [ngClass]=\"{\n 'cursor-not-allowed':!checkForm()\n }\"\n [width]=\"btnWidth\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n <div class=\"flex justify-center items-center OR\">\n <span></span>\n OR\n <span></span>\n </div>\n\n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n (click)=\"handleGoogleAuth()\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n ></verbena-button>\n\n <verbena-button\n svg=\"apple-logo\"\n (click)=\"handleAppleAuth()\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n ></verbena-button>\n </form>\n</section>\n", styles: [".flex{display:flex}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.justify-center{justify-content:center}.h-full{height:100%}.text-center{text-align:center}.underline{text-decoration:underline}.gap-5{gap:20px}.mt-4{margin-top:1rem}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.object-cover{object-fit:cover}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed!important}.accent{accent-color:#000}.OR{color:#666;gap:6px}.OR span{width:150px;border-top:2px solid #6666663d;display:block}\n"] }]
|
|
438
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }, { type: EnvironmentService }], propDecorators: { width: [{
|
|
439
|
+
type: Input
|
|
440
|
+
}], headingTitle: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}], headingClass: [{
|
|
443
|
+
type: Input
|
|
444
|
+
}], customClass: [{
|
|
445
|
+
type: Input
|
|
446
|
+
}], bgColor: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}], boxShadow: [{
|
|
449
|
+
type: Input
|
|
450
|
+
}], border: [{
|
|
451
|
+
type: Input
|
|
452
|
+
}], borderRadius: [{
|
|
453
|
+
type: Input
|
|
454
|
+
}], textColor: [{
|
|
455
|
+
type: Input
|
|
456
|
+
}], height: [{
|
|
457
|
+
type: Input
|
|
458
|
+
}], pd: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}], text: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], color: [{
|
|
463
|
+
type: Input
|
|
464
|
+
}], btnBorder: [{
|
|
465
|
+
type: Input
|
|
466
|
+
}], btnBorderRadius: [{
|
|
467
|
+
type: Input
|
|
468
|
+
}], btnBgColor: [{
|
|
469
|
+
type: Input
|
|
470
|
+
}], btnWidth: [{
|
|
471
|
+
type: Input
|
|
472
|
+
}], btnPd: [{
|
|
473
|
+
type: Input
|
|
474
|
+
}], termsLink: [{
|
|
475
|
+
type: Input
|
|
476
|
+
}], privacyLink: [{
|
|
477
|
+
type: Input
|
|
478
|
+
}], routerLink: [{
|
|
479
|
+
type: Input
|
|
480
|
+
}], formSubmit: [{
|
|
481
|
+
type: Output
|
|
482
|
+
}], googleClick: [{
|
|
483
|
+
type: Output
|
|
484
|
+
}], onSubmitSuccess: [{
|
|
485
|
+
type: Output
|
|
486
|
+
}], appleClick: [{
|
|
487
|
+
type: Output
|
|
488
|
+
}], onSubmitResponseEnd: [{
|
|
489
|
+
type: Output
|
|
490
|
+
}] } });
|
|
491
|
+
|
|
492
|
+
class UserRequestModule {
|
|
493
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
494
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, declarations: [UserRequestComponent], imports: [FormsModule,
|
|
495
|
+
ReactiveFormsModule,
|
|
496
|
+
VerbenaInputModule,
|
|
497
|
+
VerbenaButtonModule,
|
|
498
|
+
CommonModule], exports: [UserRequestComponent] });
|
|
499
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, imports: [FormsModule,
|
|
500
|
+
ReactiveFormsModule,
|
|
501
|
+
VerbenaInputModule,
|
|
502
|
+
VerbenaButtonModule,
|
|
503
|
+
CommonModule] });
|
|
504
|
+
}
|
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestModule, decorators: [{
|
|
506
|
+
type: NgModule,
|
|
507
|
+
args: [{
|
|
508
|
+
declarations: [UserRequestComponent],
|
|
509
|
+
imports: [
|
|
510
|
+
FormsModule,
|
|
511
|
+
ReactiveFormsModule,
|
|
512
|
+
VerbenaInputModule,
|
|
513
|
+
VerbenaButtonModule,
|
|
514
|
+
CommonModule,
|
|
515
|
+
],
|
|
516
|
+
exports: [UserRequestComponent],
|
|
517
|
+
}]
|
|
518
|
+
}] });
|
|
519
|
+
|
|
520
|
+
class MailValidationComponent {
|
|
521
|
+
customClass = '';
|
|
522
|
+
bgColor = '#fff';
|
|
523
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
524
|
+
border = '1px solid #66666680';
|
|
525
|
+
borderRadius = '24px';
|
|
526
|
+
textColor = '#666666';
|
|
527
|
+
height = 'auto';
|
|
528
|
+
pd = '32px 48px';
|
|
529
|
+
width = '600px';
|
|
530
|
+
text = 'Login';
|
|
531
|
+
textAlign = 'center';
|
|
532
|
+
color = 'black';
|
|
533
|
+
textSize = '32px';
|
|
534
|
+
btnBorder = '1px solid #FFE681';
|
|
535
|
+
btnBorderRadius = "40px";
|
|
536
|
+
btnBgColor = '#FFE681';
|
|
537
|
+
btnWidth = '100%';
|
|
538
|
+
btnPd = '7px 10px';
|
|
539
|
+
resendOtp = new EventEmitter();
|
|
540
|
+
proceedToNextStep = new EventEmitter();
|
|
541
|
+
login = new EventEmitter();
|
|
542
|
+
currentStep = 'linkSent';
|
|
543
|
+
handleResendOtp() {
|
|
544
|
+
this.resendOtp.emit();
|
|
545
|
+
}
|
|
546
|
+
goToNextStep() {
|
|
547
|
+
switch (this.currentStep) {
|
|
548
|
+
case 'linkSent':
|
|
549
|
+
this.currentStep = 'verified';
|
|
550
|
+
this.proceedToNextStep.emit(this.currentStep);
|
|
551
|
+
break;
|
|
552
|
+
case 'verified':
|
|
553
|
+
this.currentStep = 'accessGranted';
|
|
554
|
+
this.proceedToNextStep.emit(this.currentStep);
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
get styles() {
|
|
559
|
+
return {
|
|
560
|
+
'background-color': this.bgColor,
|
|
561
|
+
'box-shadow': this.boxShadow,
|
|
562
|
+
'border': this.border,
|
|
563
|
+
'border-radius': this.borderRadius,
|
|
564
|
+
'color': this.textColor,
|
|
565
|
+
'max-width': this.width,
|
|
566
|
+
'margin': '0 auto',
|
|
567
|
+
'height': this.height,
|
|
568
|
+
'padding': this.pd,
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
handleLogin() {
|
|
572
|
+
this.login.emit();
|
|
573
|
+
}
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
575
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MailValidationComponent, selector: "lib-mail-validation", inputs: { customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", pd: "pd", width: "width", text: "text", textAlign: "textAlign", color: "color", textSize: "textSize", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnBgColor: "btnBgColor", btnWidth: "btnWidth", btnPd: "btnPd" }, outputs: { resendOtp: "resendOtp", proceedToNextStep: "proceedToNextStep", login: "login" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <div *ngIf=\"currentStep === 'linkSent'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Follow the link sent to your e-mail to verify your e-mail address\n </p>\n <p class=\"mt-4\" (click)=\"handleResendOtp()\">\n Didn't get a link? <a href=\"#\" class=\"underline resend\">Resend</a>\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'verified'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified! You will be notified when your access has\n been authorized\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'accessGranted'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified!\n </p>\n <div class=\"mt-4\">\n <verbena-button\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n (click)=\"handleLogin()\"\n [width]=\"btnWidth\"\n textSize=\"'22px'\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n </div>\n </div>\n</section>\n", styles: [".flex{display:flex}.overflow-hidden{overflow:hidden}.h-full{height:100%}.underline{text-decoration:underline}.mt-4{margin-top:1rem}.resend{color:#00f}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.w-full{width:100%}\n"], dependencies: [{ kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
576
|
+
}
|
|
577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationComponent, decorators: [{
|
|
578
|
+
type: Component,
|
|
579
|
+
args: [{ selector: 'lib-mail-validation', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <div *ngIf=\"currentStep === 'linkSent'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Follow the link sent to your e-mail to verify your e-mail address\n </p>\n <p class=\"mt-4\" (click)=\"handleResendOtp()\">\n Didn't get a link? <a href=\"#\" class=\"underline resend\">Resend</a>\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'verified'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified! You will be notified when your access has\n been authorized\n </p>\n </div>\n\n <div *ngIf=\"currentStep === 'accessGranted'\">\n <p [style.color]=\"textColor\" [style.font-size]=\"textSize\">\n Your e-mail has been verified!\n </p>\n <div class=\"mt-4\">\n <verbena-button\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n (click)=\"handleLogin()\"\n [width]=\"btnWidth\"\n textSize=\"'22px'\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n </div>\n </div>\n</section>\n", styles: [".flex{display:flex}.overflow-hidden{overflow:hidden}.h-full{height:100%}.underline{text-decoration:underline}.mt-4{margin-top:1rem}.resend{color:#00f}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.w-full{width:100%}\n"] }]
|
|
580
|
+
}], propDecorators: { customClass: [{
|
|
581
|
+
type: Input
|
|
582
|
+
}], bgColor: [{
|
|
583
|
+
type: Input
|
|
584
|
+
}], boxShadow: [{
|
|
585
|
+
type: Input
|
|
586
|
+
}], border: [{
|
|
587
|
+
type: Input
|
|
588
|
+
}], borderRadius: [{
|
|
589
|
+
type: Input
|
|
590
|
+
}], textColor: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], height: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], pd: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], width: [{
|
|
597
|
+
type: Input
|
|
598
|
+
}], text: [{
|
|
599
|
+
type: Input
|
|
600
|
+
}], textAlign: [{
|
|
601
|
+
type: Input
|
|
602
|
+
}], color: [{
|
|
603
|
+
type: Input
|
|
604
|
+
}], textSize: [{
|
|
605
|
+
type: Input
|
|
606
|
+
}], btnBorder: [{
|
|
607
|
+
type: Input
|
|
608
|
+
}], btnBorderRadius: [{
|
|
609
|
+
type: Input
|
|
610
|
+
}], btnBgColor: [{
|
|
611
|
+
type: Input
|
|
612
|
+
}], btnWidth: [{
|
|
613
|
+
type: Input
|
|
614
|
+
}], btnPd: [{
|
|
615
|
+
type: Input
|
|
616
|
+
}], resendOtp: [{
|
|
617
|
+
type: Output
|
|
618
|
+
}], proceedToNextStep: [{
|
|
619
|
+
type: Output
|
|
620
|
+
}], login: [{
|
|
621
|
+
type: Output
|
|
622
|
+
}] } });
|
|
623
|
+
|
|
624
|
+
class MailValidationModule {
|
|
625
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
626
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, declarations: [MailValidationComponent], imports: [FormsModule,
|
|
627
|
+
ReactiveFormsModule,
|
|
628
|
+
VerbenaInputModule,
|
|
629
|
+
VerbenaButtonModule,
|
|
630
|
+
CommonModule], exports: [MailValidationComponent] });
|
|
631
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, imports: [FormsModule,
|
|
632
|
+
ReactiveFormsModule,
|
|
633
|
+
VerbenaInputModule,
|
|
634
|
+
VerbenaButtonModule,
|
|
635
|
+
CommonModule] });
|
|
636
|
+
}
|
|
637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailValidationModule, decorators: [{
|
|
638
|
+
type: NgModule,
|
|
639
|
+
args: [{
|
|
640
|
+
declarations: [MailValidationComponent],
|
|
641
|
+
imports: [
|
|
642
|
+
FormsModule,
|
|
643
|
+
ReactiveFormsModule,
|
|
644
|
+
VerbenaInputModule,
|
|
645
|
+
VerbenaButtonModule,
|
|
646
|
+
CommonModule,
|
|
647
|
+
],
|
|
648
|
+
exports: [MailValidationComponent],
|
|
649
|
+
}]
|
|
650
|
+
}] });
|
|
651
|
+
|
|
652
|
+
class ButtonComponent {
|
|
653
|
+
text = '';
|
|
654
|
+
color = 'black';
|
|
655
|
+
border = '1px solid #FFE681';
|
|
656
|
+
borderRadius = "40px";
|
|
657
|
+
bgColor = '#FFE681';
|
|
658
|
+
width = '100%';
|
|
659
|
+
pd = '10px 20px';
|
|
660
|
+
buttonClass = '';
|
|
661
|
+
disabled = false;
|
|
662
|
+
buttonClick = new EventEmitter();
|
|
663
|
+
handleClick() {
|
|
664
|
+
this.buttonClick.emit();
|
|
665
|
+
}
|
|
666
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
667
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ButtonComponent, selector: "lib-button", inputs: { text: "text", color: "color", border: "border", borderRadius: "borderRadius", bgColor: "bgColor", width: "width", pd: "pd", buttonClass: "buttonClass", disabled: "disabled" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<verbena-button\n[text]=\"text\"\n[bgColor]=\"bgColor\"\n[textColor]=\"color\"\n[border]=\"border\"\n[borderRadius]=\"borderRadius\"\n[pd]=\"pd\"\n[width]=\"width\"\n[disable]=\"disabled\"\n[ngStyle]=\"{'cursor': disabled ? 'not-allowed' : 'pointer' }\"\nbuttonClass=\"font-medium text-[22px] leading-[33px] {{buttonClass}}\"\n(click)=\"handleClick()\"\n></verbena-button>\n", styles: [".disable-btn{cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
|
|
668
|
+
}
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
670
|
+
type: Component,
|
|
671
|
+
args: [{ selector: 'lib-button', template: "<verbena-button\n[text]=\"text\"\n[bgColor]=\"bgColor\"\n[textColor]=\"color\"\n[border]=\"border\"\n[borderRadius]=\"borderRadius\"\n[pd]=\"pd\"\n[width]=\"width\"\n[disable]=\"disabled\"\n[ngStyle]=\"{'cursor': disabled ? 'not-allowed' : 'pointer' }\"\nbuttonClass=\"font-medium text-[22px] leading-[33px] {{buttonClass}}\"\n(click)=\"handleClick()\"\n></verbena-button>\n", styles: [".disable-btn{cursor:not-allowed}\n"] }]
|
|
672
|
+
}], propDecorators: { text: [{
|
|
673
|
+
type: Input
|
|
674
|
+
}], color: [{
|
|
675
|
+
type: Input
|
|
676
|
+
}], border: [{
|
|
677
|
+
type: Input
|
|
678
|
+
}], borderRadius: [{
|
|
679
|
+
type: Input
|
|
680
|
+
}], bgColor: [{
|
|
681
|
+
type: Input
|
|
682
|
+
}], width: [{
|
|
683
|
+
type: Input
|
|
684
|
+
}], pd: [{
|
|
685
|
+
type: Input
|
|
686
|
+
}], buttonClass: [{
|
|
687
|
+
type: Input
|
|
688
|
+
}], disabled: [{
|
|
689
|
+
type: Input
|
|
690
|
+
}], buttonClick: [{
|
|
691
|
+
type: Output
|
|
692
|
+
}] } });
|
|
693
|
+
|
|
694
|
+
var MechanismType;
|
|
695
|
+
(function (MechanismType) {
|
|
696
|
+
MechanismType["InApp"] = "InApp";
|
|
697
|
+
MechanismType["Google"] = "Google";
|
|
698
|
+
MechanismType["Apple"] = "Apple";
|
|
699
|
+
MechanismType["MicrosoftAD"] = "MicrosoftAD";
|
|
700
|
+
})(MechanismType || (MechanismType = {}));
|
|
701
|
+
|
|
702
|
+
class OAuthComponent {
|
|
703
|
+
showGoogle = false;
|
|
704
|
+
showMicrosoft = false;
|
|
705
|
+
showApple = false;
|
|
706
|
+
authMechanisms = null;
|
|
707
|
+
microsoftClick = new EventEmitter();
|
|
708
|
+
googleClick = new EventEmitter();
|
|
709
|
+
appleClick = new EventEmitter();
|
|
710
|
+
ngOnInit() {
|
|
711
|
+
if (this.authMechanisms !== null) {
|
|
712
|
+
this.showMicrosoft = this.authMechanisms.some(item => item.AuthMechanism.includes(MechanismType.MicrosoftAD));
|
|
713
|
+
this.showGoogle = this.authMechanisms.some(item => item.AuthMechanism.includes(MechanismType.Google));
|
|
714
|
+
this.showApple = this.authMechanisms.some(item => item.AuthMechanism.includes(MechanismType.Apple));
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
oAuthWithMicrosoft() {
|
|
718
|
+
this.microsoftClick.emit();
|
|
719
|
+
}
|
|
720
|
+
oAuthWithGoogle() {
|
|
721
|
+
this.googleClick.emit();
|
|
722
|
+
}
|
|
723
|
+
oAuthWithApple() {
|
|
724
|
+
this.appleClick.emit();
|
|
725
|
+
}
|
|
726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
727
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OAuthComponent, selector: "verben-o-auth", inputs: { authMechanisms: "authMechanisms" }, outputs: { microsoftClick: "microsoftClick", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section class=\"oauthWrapper\"> \n <div class=\"OrFlexWrapper\">\n <hr/>\n <span>OR</span>\n <hr/>\n </div>\n <span *ngIf=\"showMicrosoft\"> \n <verbena-button\n svg=\"microsoft-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Microsoft\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithMicrosoft()\"\n ></verbena-button>\n </span> \n\n <span *ngIf=\"showGoogle\"> \n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithGoogle()\"\n ></verbena-button>\n </span>\n \n <span *ngIf=\"showApple\"> \n <verbena-button\n svg=\"apple-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithApple()\"\n ></verbena-button>\n </span>\n</section>\n", styles: ["hr{height:1px;margin:0;border:1px solid #66666640;flex:1}.OR{margin:0 2px;color:#666}.oauthWrapper{display:flex;flex-direction:column;gap:12px}.OrFlexWrapper{display:flex;align-items:center;gap:8px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
|
|
728
|
+
}
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthComponent, decorators: [{
|
|
730
|
+
type: Component,
|
|
731
|
+
args: [{ selector: 'verben-o-auth', template: "<section class=\"oauthWrapper\"> \n <div class=\"OrFlexWrapper\">\n <hr/>\n <span>OR</span>\n <hr/>\n </div>\n <span *ngIf=\"showMicrosoft\"> \n <verbena-button\n svg=\"microsoft-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Microsoft\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithMicrosoft()\"\n ></verbena-button>\n </span> \n\n <span *ngIf=\"showGoogle\"> \n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithGoogle()\"\n ></verbena-button>\n </span>\n \n <span *ngIf=\"showApple\"> \n <verbena-button\n svg=\"apple-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n (click)=\"oAuthWithApple()\"\n ></verbena-button>\n </span>\n</section>\n", styles: ["hr{height:1px;margin:0;border:1px solid #66666640;flex:1}.OR{margin:0 2px;color:#666}.oauthWrapper{display:flex;flex-direction:column;gap:12px}.OrFlexWrapper{display:flex;align-items:center;gap:8px}\n"] }]
|
|
732
|
+
}], propDecorators: { authMechanisms: [{
|
|
733
|
+
type: Input
|
|
734
|
+
}], microsoftClick: [{
|
|
735
|
+
type: Output
|
|
736
|
+
}], googleClick: [{
|
|
737
|
+
type: Output
|
|
738
|
+
}], appleClick: [{
|
|
739
|
+
type: Output
|
|
740
|
+
}] } });
|
|
741
|
+
|
|
742
|
+
class SignUpComponent {
|
|
743
|
+
fb;
|
|
744
|
+
server;
|
|
745
|
+
utilService;
|
|
746
|
+
headlingText = 'Create an account';
|
|
747
|
+
width = '';
|
|
748
|
+
maxWidth = '';
|
|
749
|
+
margin = '';
|
|
750
|
+
pd = '';
|
|
751
|
+
customClass = '';
|
|
752
|
+
headlingClass = '';
|
|
753
|
+
bgColor = '#fff';
|
|
754
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
755
|
+
border = '1px solid #66666680';
|
|
756
|
+
borderRadius = '24px';
|
|
757
|
+
height = 'auto';
|
|
758
|
+
textColor = '#333';
|
|
759
|
+
disabled = false;
|
|
760
|
+
// button styles
|
|
761
|
+
btnClass = '';
|
|
762
|
+
btnBgColor = '#FFE681';
|
|
763
|
+
btnColor = '';
|
|
764
|
+
btnBorder = '';
|
|
765
|
+
btnBorderRadius = '24px';
|
|
766
|
+
btnPd = '';
|
|
767
|
+
btnText = 'Create account';
|
|
768
|
+
//inputStyles
|
|
769
|
+
inputLabelColor = '';
|
|
770
|
+
inputBgColor = 'transparent';
|
|
771
|
+
inputBorder = '1px solid #66666659';
|
|
772
|
+
inputBorderRadius = '12px';
|
|
773
|
+
// links
|
|
774
|
+
termsLink = '';
|
|
775
|
+
privacyLink = '';
|
|
776
|
+
routerLink = '';
|
|
777
|
+
formSubmit = new EventEmitter();
|
|
778
|
+
onSubmitEnd = new EventEmitter();
|
|
779
|
+
googleClick = new EventEmitter();
|
|
780
|
+
appleClick = new EventEmitter();
|
|
781
|
+
signUpForm;
|
|
782
|
+
constructor(fb, server, utilService) {
|
|
783
|
+
this.fb = fb;
|
|
784
|
+
this.server = server;
|
|
785
|
+
this.utilService = utilService;
|
|
786
|
+
this.signUpForm = this.fb.group({
|
|
787
|
+
Firstname: new FormControl(null, Validators.required),
|
|
788
|
+
Lastname: new FormControl(null, Validators.required),
|
|
789
|
+
Email: new FormControl(null, [
|
|
790
|
+
Validators.required,
|
|
791
|
+
Validators.email,
|
|
792
|
+
]),
|
|
793
|
+
Password: new FormControl(null, [
|
|
794
|
+
Validators.required,
|
|
795
|
+
Validators.minLength(8),
|
|
796
|
+
]),
|
|
797
|
+
Confirmpassword: new FormControl(null, [
|
|
798
|
+
Validators.required,
|
|
799
|
+
Validators.minLength(8),
|
|
800
|
+
]),
|
|
801
|
+
Terms: new FormControl(false, [Validators.requiredTrue]),
|
|
802
|
+
}, { validators: this.passwordMatchValidator });
|
|
803
|
+
}
|
|
804
|
+
passwordMatchValidator = (group) => {
|
|
805
|
+
const password = group.get('Password')?.value;
|
|
806
|
+
const confirmPassword = group.get('Confirmpassword')?.value;
|
|
807
|
+
return password === confirmPassword ? null : { passwordMismatch: true };
|
|
808
|
+
};
|
|
809
|
+
checkForm() {
|
|
810
|
+
return this.signUpForm.valid;
|
|
811
|
+
}
|
|
812
|
+
async submit() {
|
|
813
|
+
if (!this.checkForm()) {
|
|
814
|
+
return;
|
|
815
|
+
}
|
|
816
|
+
const data = {
|
|
817
|
+
Firstname: this.signUpForm.controls['Firstname'].value,
|
|
818
|
+
Lastname: this.signUpForm.controls['Lastname'].value,
|
|
819
|
+
Email: this.signUpForm.controls['Email'].value,
|
|
820
|
+
Password: this.signUpForm.controls['Password'].value,
|
|
821
|
+
Terms: this.signUpForm.controls['Terms'].value,
|
|
822
|
+
Id: '61f7e48f0c651345677b7775',
|
|
823
|
+
CreatedAt: new Date(),
|
|
824
|
+
UpdatedAt: new Date(),
|
|
825
|
+
DataState: ObjectState.New,
|
|
826
|
+
id: '61f7e48f0c651345677b7775',
|
|
827
|
+
Tenant: 'James'
|
|
828
|
+
};
|
|
829
|
+
const payload = [
|
|
830
|
+
{
|
|
831
|
+
...data,
|
|
832
|
+
"Code": "123 ",
|
|
833
|
+
"ServiceName": "Test 1",
|
|
834
|
+
"MailAddress": data.Email,
|
|
835
|
+
"OtherName": "James",
|
|
836
|
+
"Status": "Inactive",
|
|
837
|
+
"PhoneNumber": "07012345678",
|
|
838
|
+
"TenantId": '61f7e48f0c651345677b7775',
|
|
839
|
+
"Role": ['tester'],
|
|
840
|
+
"Tags": [
|
|
841
|
+
{
|
|
842
|
+
"Name": "checker",
|
|
843
|
+
"IsOptional": true
|
|
844
|
+
}
|
|
845
|
+
],
|
|
846
|
+
}
|
|
847
|
+
];
|
|
848
|
+
this.formSubmit.emit(data);
|
|
849
|
+
this.utilService.sendBI(true);
|
|
850
|
+
const res = await this.server.post(`User/SaveUsers`, payload);
|
|
851
|
+
this.utilService.sendBI(false);
|
|
852
|
+
if (res instanceof ErrorResponse) {
|
|
853
|
+
this.onSubmitEnd.emit(res);
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
var result = res;
|
|
857
|
+
this.onSubmitEnd.emit(result);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
handleGoogleAuth() {
|
|
861
|
+
this.googleClick.emit();
|
|
862
|
+
}
|
|
863
|
+
handleAppleAuth() {
|
|
864
|
+
this.appleClick.emit();
|
|
865
|
+
}
|
|
866
|
+
get styles() {
|
|
867
|
+
return {
|
|
868
|
+
'background-color': this.bgColor,
|
|
869
|
+
'box-shadow': this.boxShadow,
|
|
870
|
+
'border': this.border,
|
|
871
|
+
'border-radius': this.borderRadius,
|
|
872
|
+
'color': this.textColor,
|
|
873
|
+
'width': this.width,
|
|
874
|
+
'max-width': this.maxWidth,
|
|
875
|
+
'margin': this.margin,
|
|
876
|
+
'height': this.height,
|
|
877
|
+
'padding': this.pd
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
881
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SignUpComponent, selector: "verben-sign-up", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", headlingClass: "headlingClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", height: "height", textColor: "textColor", disabled: "disabled", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText", inputLabelColor: "inputLabelColor", inputBgColor: "inputBgColor", inputBorder: "inputBorder", inputBorderRadius: "inputBorderRadius", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", onSubmitEnd: "onSubmitEnd", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Firstname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'First name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Lastname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'Last name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Confirmpassword\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"false\"\n [errorBorderColor]=\"'red'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <span *ngIf=\"signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty\"> \n <small class=\"error-text\">Passwords do not match.</small>\n </span>\n </div>\n <div> \n <div class=\"checkBoxWrapper\">\n <input type=\"checkbox\" id=\"terms\" formControlName=\"Terms\" class=\"checBoxInput\" />\n <label for=\"terms\" \n class=\"break-all font-normal leading-6\"\n >By creating an account, I agree to our <a [attr.href]=\"termsLink\">Terms of use</a> and\n <a [attr.href]=\"privacyLink\">Privacy Policy</a></label\n >\n </div>\n <p *ngIf=\"signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\"\n [disabled]=\"!this.checkForm()\"\n [ngStyle]=\"{'margin-top':'10px'}\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n <p>\n Already have an account?\n <a [routerLink]=\"routerLink\" class=\"\">Log in</a>\n </p>\n </form>\n </section>\n \n", styles: ["a{text-decoration:underline;cursor:pointer}input[type=checkbox]:checked{accent-color:#111}.flexWrapper{display:flex;flex-direction:column;gap:10px}.checkBoxWrapper{display:flex;align-items:start;gap:2px}.checBoxInput{margin-top:6px}.bigcheckboxWrapper{margin-top:.5rem;margin-bottom:1.5rem}.error-text{color:red}.disable-btn{cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: OAuthComponent, selector: "verben-o-auth", inputs: ["authMechanisms"], outputs: ["microsoftClick", "googleClick", "appleClick"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
882
|
+
}
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpComponent, decorators: [{
|
|
884
|
+
type: Component,
|
|
885
|
+
args: [{ selector: 'verben-sign-up', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Firstname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'First name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Lastname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'Last name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Confirmpassword\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"false\"\n [errorBorderColor]=\"'red'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <span *ngIf=\"signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty\"> \n <small class=\"error-text\">Passwords do not match.</small>\n </span>\n </div>\n <div> \n <div class=\"checkBoxWrapper\">\n <input type=\"checkbox\" id=\"terms\" formControlName=\"Terms\" class=\"checBoxInput\" />\n <label for=\"terms\" \n class=\"break-all font-normal leading-6\"\n >By creating an account, I agree to our <a [attr.href]=\"termsLink\">Terms of use</a> and\n <a [attr.href]=\"privacyLink\">Privacy Policy</a></label\n >\n </div>\n <p *ngIf=\"signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\"\n [disabled]=\"!this.checkForm()\"\n [ngStyle]=\"{'margin-top':'10px'}\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n <p>\n Already have an account?\n <a [routerLink]=\"routerLink\" class=\"\">Log in</a>\n </p>\n </form>\n </section>\n \n", styles: ["a{text-decoration:underline;cursor:pointer}input[type=checkbox]:checked{accent-color:#111}.flexWrapper{display:flex;flex-direction:column;gap:10px}.checkBoxWrapper{display:flex;align-items:start;gap:2px}.checBoxInput{margin-top:6px}.bigcheckboxWrapper{margin-top:.5rem;margin-bottom:1.5rem}.error-text{color:red}.disable-btn{cursor:not-allowed}\n"] }]
|
|
886
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { headlingText: [{
|
|
887
|
+
type: Input
|
|
888
|
+
}], width: [{
|
|
889
|
+
type: Input
|
|
890
|
+
}], maxWidth: [{
|
|
891
|
+
type: Input
|
|
892
|
+
}], margin: [{
|
|
893
|
+
type: Input
|
|
894
|
+
}], pd: [{
|
|
895
|
+
type: Input
|
|
896
|
+
}], customClass: [{
|
|
897
|
+
type: Input
|
|
898
|
+
}], headlingClass: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], bgColor: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], boxShadow: [{
|
|
903
|
+
type: Input
|
|
904
|
+
}], border: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], borderRadius: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], height: [{
|
|
909
|
+
type: Input
|
|
910
|
+
}], textColor: [{
|
|
911
|
+
type: Input
|
|
912
|
+
}], disabled: [{
|
|
913
|
+
type: Input
|
|
914
|
+
}], btnClass: [{
|
|
915
|
+
type: Input
|
|
916
|
+
}], btnBgColor: [{
|
|
917
|
+
type: Input
|
|
918
|
+
}], btnColor: [{
|
|
919
|
+
type: Input
|
|
920
|
+
}], btnBorder: [{
|
|
921
|
+
type: Input
|
|
922
|
+
}], btnBorderRadius: [{
|
|
923
|
+
type: Input
|
|
924
|
+
}], btnPd: [{
|
|
925
|
+
type: Input
|
|
926
|
+
}], btnText: [{
|
|
927
|
+
type: Input
|
|
928
|
+
}], inputLabelColor: [{
|
|
929
|
+
type: Input
|
|
930
|
+
}], inputBgColor: [{
|
|
931
|
+
type: Input
|
|
932
|
+
}], inputBorder: [{
|
|
933
|
+
type: Input
|
|
934
|
+
}], inputBorderRadius: [{
|
|
935
|
+
type: Input
|
|
936
|
+
}], termsLink: [{
|
|
937
|
+
type: Input
|
|
938
|
+
}], privacyLink: [{
|
|
939
|
+
type: Input
|
|
940
|
+
}], routerLink: [{
|
|
941
|
+
type: Input
|
|
942
|
+
}], formSubmit: [{
|
|
943
|
+
type: Output
|
|
944
|
+
}], onSubmitEnd: [{
|
|
945
|
+
type: Output
|
|
946
|
+
}], googleClick: [{
|
|
947
|
+
type: Output
|
|
948
|
+
}], appleClick: [{
|
|
949
|
+
type: Output
|
|
950
|
+
}] } });
|
|
951
|
+
|
|
952
|
+
class OAuthModule {
|
|
953
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
954
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, declarations: [OAuthComponent], imports: [CommonModule, VerbenaInputModule, VerbenaButtonModule], exports: [OAuthComponent] });
|
|
955
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, imports: [CommonModule, VerbenaInputModule, VerbenaButtonModule] });
|
|
956
|
+
}
|
|
957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OAuthModule, decorators: [{
|
|
958
|
+
type: NgModule,
|
|
959
|
+
args: [{
|
|
960
|
+
declarations: [OAuthComponent],
|
|
961
|
+
imports: [CommonModule, VerbenaInputModule, VerbenaButtonModule],
|
|
962
|
+
exports: [OAuthComponent]
|
|
963
|
+
}]
|
|
964
|
+
}] });
|
|
965
|
+
|
|
966
|
+
class ButtonModule {
|
|
967
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
968
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, VerbenaButtonModule, FormsModule], exports: [ButtonComponent] });
|
|
969
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, imports: [CommonModule, VerbenaButtonModule, FormsModule] });
|
|
970
|
+
}
|
|
971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonModule, decorators: [{
|
|
972
|
+
type: NgModule,
|
|
973
|
+
args: [{
|
|
974
|
+
declarations: [ButtonComponent],
|
|
975
|
+
imports: [CommonModule, VerbenaButtonModule, FormsModule],
|
|
976
|
+
exports: [ButtonComponent]
|
|
977
|
+
}]
|
|
978
|
+
}] });
|
|
979
|
+
|
|
980
|
+
class SignUpModule {
|
|
981
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
982
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, declarations: [SignUpComponent], imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule], exports: [SignUpComponent] });
|
|
983
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, imports: [CommonModule, FormsModule, VerbenaInputModule, ButtonModule, OAuthModule, ReactiveFormsModule] });
|
|
984
|
+
}
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignUpModule, decorators: [{
|
|
986
|
+
type: NgModule,
|
|
987
|
+
args: [{
|
|
988
|
+
declarations: [SignUpComponent],
|
|
989
|
+
imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule],
|
|
990
|
+
exports: [SignUpComponent]
|
|
991
|
+
}]
|
|
992
|
+
}] });
|
|
993
|
+
|
|
994
|
+
class SignInComponent {
|
|
995
|
+
fb;
|
|
996
|
+
server;
|
|
997
|
+
utilService;
|
|
998
|
+
envSvc;
|
|
999
|
+
headlingText = 'Sign in';
|
|
1000
|
+
width = '';
|
|
1001
|
+
maxWidth = '';
|
|
1002
|
+
margin = '';
|
|
1003
|
+
pd = '';
|
|
1004
|
+
customClass = '';
|
|
1005
|
+
headlingClass = '';
|
|
1006
|
+
bgColor = '#fff';
|
|
1007
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
1008
|
+
border = '1px solid #66666680';
|
|
1009
|
+
borderRadius = '24px';
|
|
1010
|
+
textColor = '#333';
|
|
1011
|
+
height = 'auto';
|
|
1012
|
+
forgetPasswordClass = '';
|
|
1013
|
+
requestAccessClass = '';
|
|
1014
|
+
createAccountClass = '';
|
|
1015
|
+
createAccountLinkClass = '';
|
|
1016
|
+
// links
|
|
1017
|
+
forgetPasswordLink = '';
|
|
1018
|
+
createAccountLink = '';
|
|
1019
|
+
requestAccessLink = '';
|
|
1020
|
+
// button styles
|
|
1021
|
+
btnClass = '';
|
|
1022
|
+
btnBgColor = '#FFE681';
|
|
1023
|
+
btnColor = '';
|
|
1024
|
+
btnBorder = '';
|
|
1025
|
+
btnBorderRadius = '24px';
|
|
1026
|
+
btnPd = '';
|
|
1027
|
+
btnText = 'Log in';
|
|
1028
|
+
//inputStyles
|
|
1029
|
+
inputLabelColor = '';
|
|
1030
|
+
inputBgColor = 'transparent';
|
|
1031
|
+
inputBorder = '1px solid #66666659';
|
|
1032
|
+
inputBorderRadius = '12px';
|
|
1033
|
+
termsErrorText = 'Please agree to the terms of use and privacy policy.';
|
|
1034
|
+
formSubmit = new EventEmitter();
|
|
1035
|
+
onSubmitEnd = new EventEmitter();
|
|
1036
|
+
googleClick = new EventEmitter();
|
|
1037
|
+
microsoftClick = new EventEmitter();
|
|
1038
|
+
appleClick = new EventEmitter();
|
|
1039
|
+
tenantDetails = null;
|
|
1040
|
+
AuthMechanisms = null;
|
|
1041
|
+
showform = false;
|
|
1042
|
+
loginForm;
|
|
1043
|
+
apiKey;
|
|
1044
|
+
secret;
|
|
1045
|
+
constructor(fb, server, utilService, envSvc) {
|
|
1046
|
+
this.fb = fb;
|
|
1047
|
+
this.server = server;
|
|
1048
|
+
this.utilService = utilService;
|
|
1049
|
+
this.envSvc = envSvc;
|
|
1050
|
+
this.loginForm = this.fb.group({
|
|
1051
|
+
Email: new FormControl(null, [
|
|
1052
|
+
Validators.required,
|
|
1053
|
+
Validators.email,
|
|
1054
|
+
]),
|
|
1055
|
+
Password: new FormControl(null, [
|
|
1056
|
+
Validators.required,
|
|
1057
|
+
Validators.minLength(5),
|
|
1058
|
+
]),
|
|
1059
|
+
});
|
|
1060
|
+
this.apiKey = this.envSvc.environment.APIKey;
|
|
1061
|
+
this.secret = this.envSvc.environment.Secret;
|
|
1062
|
+
}
|
|
1063
|
+
ngOnInit() {
|
|
1064
|
+
this.getTenantConfig();
|
|
1065
|
+
}
|
|
1066
|
+
async getTenantConfig() {
|
|
1067
|
+
const res = await this.server.get(`Tenant/GetTenantConfigByKey/${this.apiKey}`);
|
|
1068
|
+
this.tenantDetails = res;
|
|
1069
|
+
this.AuthMechanisms = this.tenantDetails?.AuthMechanisms;
|
|
1070
|
+
if (!this.tenantDetails?.AuthMechanism && this.tenantDetails?.AuthMechanism !== MechanismType.InApp) {
|
|
1071
|
+
this.showform = false;
|
|
1072
|
+
}
|
|
1073
|
+
else if (this.tenantDetails?.AuthMechanism === MechanismType.InApp) {
|
|
1074
|
+
this.showform = true;
|
|
1075
|
+
}
|
|
1076
|
+
else if (this.AuthMechanisms !== null) {
|
|
1077
|
+
this.showform = this.AuthMechanisms.some(item => item.AuthMechanism.includes(MechanismType.InApp));
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
checkForm() {
|
|
1081
|
+
return this.loginForm.valid;
|
|
1082
|
+
}
|
|
1083
|
+
async submit() {
|
|
1084
|
+
if (!this.checkForm()) {
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
const data = {
|
|
1088
|
+
MailAddress: this.loginForm.controls['Email'].value,
|
|
1089
|
+
Password: this.loginForm.controls['Password'].value,
|
|
1090
|
+
LoginType: this.tenantDetails?.AuthMechanism,
|
|
1091
|
+
APIKey: this.apiKey,
|
|
1092
|
+
Secrete: this.secret
|
|
1093
|
+
};
|
|
1094
|
+
this.formSubmit.emit(data);
|
|
1095
|
+
this.utilService.sendBI(true);
|
|
1096
|
+
const res = await this.server.post(`Authentication/Login`, data);
|
|
1097
|
+
this.utilService.sendBI(false);
|
|
1098
|
+
if (res instanceof ErrorResponse) {
|
|
1099
|
+
this.onSubmitEnd.emit(res);
|
|
1100
|
+
}
|
|
1101
|
+
else {
|
|
1102
|
+
var result = res;
|
|
1103
|
+
this.onSubmitEnd.emit(result);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
handleGoogleAuth() {
|
|
1107
|
+
if (this.AuthMechanisms !== null) {
|
|
1108
|
+
const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.Google);
|
|
1109
|
+
this.googleClick.emit();
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
handleMicrosoft() {
|
|
1113
|
+
if (this.AuthMechanisms !== null) {
|
|
1114
|
+
const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.MicrosoftAD);
|
|
1115
|
+
this.microsoftClick.emit();
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
handleAppleAuth() {
|
|
1119
|
+
if (this.AuthMechanisms !== null) {
|
|
1120
|
+
const data = this.AuthMechanisms.filter(item => item.AuthMechanism === MechanismType.Apple);
|
|
1121
|
+
this.appleClick.emit();
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
get styles() {
|
|
1125
|
+
return {
|
|
1126
|
+
'background-color': this.bgColor,
|
|
1127
|
+
'box-shadow': this.boxShadow,
|
|
1128
|
+
'border': this.border,
|
|
1129
|
+
'border-radius': this.borderRadius,
|
|
1130
|
+
'color': this.textColor,
|
|
1131
|
+
'width': this.width,
|
|
1132
|
+
'max-width': this.maxWidth,
|
|
1133
|
+
'margin': this.margin,
|
|
1134
|
+
'height': this.height,
|
|
1135
|
+
'padding': this.pd
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SignInComponent, selector: "verben-sign-in", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", headlingClass: "headlingClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", forgetPasswordClass: "forgetPasswordClass", requestAccessClass: "requestAccessClass", createAccountClass: "createAccountClass", createAccountLinkClass: "createAccountLinkClass", forgetPasswordLink: "forgetPasswordLink", createAccountLink: "createAccountLink", requestAccessLink: "requestAccessLink", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText", inputLabelColor: "inputLabelColor", inputBgColor: "inputBgColor", inputBorder: "inputBorder", inputBorderRadius: "inputBorderRadius", termsErrorText: "termsErrorText" }, outputs: { formSubmit: "formSubmit", onSubmitEnd: "onSubmitEnd", googleClick: "googleClick", microsoftClick: "microsoftClick", appleClick: "appleClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <div class=\"formWrapper\" *ngIf=\"showform\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n [customErrorMessages]=\"{\n password:'length must be 5 characters'\n }\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div class=\"pwdWrapper\"> \n <p clas=\"mb-0\"> <a [routerLink]=\"forgetPasswordLink\" class=\"{{forgetPasswordClass}}\">Forgot password</a></p>\n </div>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\" \n [disabled]=\"!this.checkForm()\"\n ></lib-button>\n </div>\n <div> \n <p *ngIf=\"requestAccessLink\">\n <a [routerLink]=\"requestAccessLink\" class=\"{{requestAccessClass}}\">Click here to request user access</a>\n </p>\n <div> \n <div *ngIf=\"AuthMechanisms !== null\"> \n <verben-o-auth \n [authMechanisms]=\"AuthMechanisms\"\n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n (microsoftClick)=\"handleMicrosoft()\"\n ></verben-o-auth>\n </div>\n <p class=\"{{createAccountClass}}\" *ngIf=\"createAccountLink\">\n Don't have an account?\n <a [routerLink]=\"createAccountLink\" class=\"{{createAccountLinkClass}}\">Create an account</a>\n </p>\n </div>\n </div>\n </form>\n </section>\n ", styles: ["a{text-decoration:underline}.flexWrapper{display:flex;flex-direction:column;gap:20px;margin-top:12px}.formWrapper{display:flex;flex-direction:column;gap:20px}.pwdWrapper{display:flex;justify-content:flex-end;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: OAuthComponent, selector: "verben-o-auth", inputs: ["authMechanisms"], outputs: ["microsoftClick", "googleClick", "appleClick"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1140
|
+
}
|
|
1141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInComponent, decorators: [{
|
|
1142
|
+
type: Component,
|
|
1143
|
+
args: [{ selector: 'verben-sign-in', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <div class=\"formWrapper\" *ngIf=\"showform\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n [passwordToggle]=\"true\"\n [customErrorMessages]=\"{\n password:'length must be 5 characters'\n }\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div class=\"pwdWrapper\"> \n <p clas=\"mb-0\"> <a [routerLink]=\"forgetPasswordLink\" class=\"{{forgetPasswordClass}}\">Forgot password</a></p>\n </div>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\" \n [disabled]=\"!this.checkForm()\"\n ></lib-button>\n </div>\n <div> \n <p *ngIf=\"requestAccessLink\">\n <a [routerLink]=\"requestAccessLink\" class=\"{{requestAccessClass}}\">Click here to request user access</a>\n </p>\n <div> \n <div *ngIf=\"AuthMechanisms !== null\"> \n <verben-o-auth \n [authMechanisms]=\"AuthMechanisms\"\n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n (microsoftClick)=\"handleMicrosoft()\"\n ></verben-o-auth>\n </div>\n <p class=\"{{createAccountClass}}\" *ngIf=\"createAccountLink\">\n Don't have an account?\n <a [routerLink]=\"createAccountLink\" class=\"{{createAccountLinkClass}}\">Create an account</a>\n </p>\n </div>\n </div>\n </form>\n </section>\n ", styles: ["a{text-decoration:underline}.flexWrapper{display:flex;flex-direction:column;gap:20px;margin-top:12px}.formWrapper{display:flex;flex-direction:column;gap:20px}.pwdWrapper{display:flex;justify-content:flex-end;cursor:pointer}\n"] }]
|
|
1144
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }, { type: EnvironmentService }], propDecorators: { headlingText: [{
|
|
1145
|
+
type: Input
|
|
1146
|
+
}], width: [{
|
|
1147
|
+
type: Input
|
|
1148
|
+
}], maxWidth: [{
|
|
1149
|
+
type: Input
|
|
1150
|
+
}], margin: [{
|
|
1151
|
+
type: Input
|
|
1152
|
+
}], pd: [{
|
|
1153
|
+
type: Input
|
|
1154
|
+
}], customClass: [{
|
|
1155
|
+
type: Input
|
|
1156
|
+
}], headlingClass: [{
|
|
1157
|
+
type: Input
|
|
1158
|
+
}], bgColor: [{
|
|
1159
|
+
type: Input
|
|
1160
|
+
}], boxShadow: [{
|
|
1161
|
+
type: Input
|
|
1162
|
+
}], border: [{
|
|
1163
|
+
type: Input
|
|
1164
|
+
}], borderRadius: [{
|
|
1165
|
+
type: Input
|
|
1166
|
+
}], textColor: [{
|
|
1167
|
+
type: Input
|
|
1168
|
+
}], height: [{
|
|
1169
|
+
type: Input
|
|
1170
|
+
}], forgetPasswordClass: [{
|
|
1171
|
+
type: Input
|
|
1172
|
+
}], requestAccessClass: [{
|
|
1173
|
+
type: Input
|
|
1174
|
+
}], createAccountClass: [{
|
|
1175
|
+
type: Input
|
|
1176
|
+
}], createAccountLinkClass: [{
|
|
1177
|
+
type: Input
|
|
1178
|
+
}], forgetPasswordLink: [{
|
|
1179
|
+
type: Input
|
|
1180
|
+
}], createAccountLink: [{
|
|
1181
|
+
type: Input
|
|
1182
|
+
}], requestAccessLink: [{
|
|
1183
|
+
type: Input
|
|
1184
|
+
}], btnClass: [{
|
|
1185
|
+
type: Input
|
|
1186
|
+
}], btnBgColor: [{
|
|
1187
|
+
type: Input
|
|
1188
|
+
}], btnColor: [{
|
|
1189
|
+
type: Input
|
|
1190
|
+
}], btnBorder: [{
|
|
1191
|
+
type: Input
|
|
1192
|
+
}], btnBorderRadius: [{
|
|
1193
|
+
type: Input
|
|
1194
|
+
}], btnPd: [{
|
|
1195
|
+
type: Input
|
|
1196
|
+
}], btnText: [{
|
|
1197
|
+
type: Input
|
|
1198
|
+
}], inputLabelColor: [{
|
|
1199
|
+
type: Input
|
|
1200
|
+
}], inputBgColor: [{
|
|
1201
|
+
type: Input
|
|
1202
|
+
}], inputBorder: [{
|
|
1203
|
+
type: Input
|
|
1204
|
+
}], inputBorderRadius: [{
|
|
1205
|
+
type: Input
|
|
1206
|
+
}], termsErrorText: [{
|
|
1207
|
+
type: Input
|
|
1208
|
+
}], formSubmit: [{
|
|
1209
|
+
type: Output
|
|
1210
|
+
}], onSubmitEnd: [{
|
|
1211
|
+
type: Output
|
|
1212
|
+
}], googleClick: [{
|
|
1213
|
+
type: Output
|
|
1214
|
+
}], microsoftClick: [{
|
|
1215
|
+
type: Output
|
|
1216
|
+
}], appleClick: [{
|
|
1217
|
+
type: Output
|
|
1218
|
+
}] } });
|
|
1219
|
+
|
|
1220
|
+
class SignInModule {
|
|
1221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1222
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, declarations: [SignInComponent], imports: [CommonModule, FormsModule, VerbenaInputModule, VerbenaButtonModule, RouterLink, OAuthModule, ButtonModule, ReactiveFormsModule], exports: [SignInComponent] });
|
|
1223
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, imports: [CommonModule, FormsModule, VerbenaInputModule, VerbenaButtonModule, OAuthModule, ButtonModule, ReactiveFormsModule] });
|
|
1224
|
+
}
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SignInModule, decorators: [{
|
|
1226
|
+
type: NgModule,
|
|
1227
|
+
args: [{
|
|
1228
|
+
declarations: [SignInComponent],
|
|
1229
|
+
imports: [CommonModule, FormsModule, VerbenaInputModule, VerbenaButtonModule, RouterLink, OAuthModule, ButtonModule, ReactiveFormsModule],
|
|
1230
|
+
exports: [SignInComponent]
|
|
1231
|
+
}]
|
|
1232
|
+
}] });
|
|
1233
|
+
|
|
1234
|
+
class OtpInputComponent {
|
|
1235
|
+
fb;
|
|
1236
|
+
length = 6;
|
|
1237
|
+
otpClass = '';
|
|
1238
|
+
otpChange = new EventEmitter();
|
|
1239
|
+
otpForm;
|
|
1240
|
+
constructor(fb) {
|
|
1241
|
+
this.fb = fb;
|
|
1242
|
+
}
|
|
1243
|
+
ngOnInit() {
|
|
1244
|
+
this.otpForm = this.fb.group({
|
|
1245
|
+
otpArray: this.fb.array(Array(this.length).fill('').map(() => new FormControl('')))
|
|
1246
|
+
});
|
|
1247
|
+
this.otpArray.valueChanges.subscribe(() => {
|
|
1248
|
+
this.emitOtp();
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
get otpArray() {
|
|
1252
|
+
return this.otpForm.get('otpArray');
|
|
1253
|
+
}
|
|
1254
|
+
handleInput(event, index) {
|
|
1255
|
+
const value = event.target.value;
|
|
1256
|
+
// /\d/.test(value)
|
|
1257
|
+
if (value.length > 0) {
|
|
1258
|
+
this.otpArray.at(index).setValue(value);
|
|
1259
|
+
if (index < this.length - 1) {
|
|
1260
|
+
this.focusNextInput(index);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
this.otpArray.at(index).setValue('');
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
handleKeydown(event, index) {
|
|
1268
|
+
if (event.key === 'Backspace') {
|
|
1269
|
+
const currentValue = this.otpArray.at(index).value;
|
|
1270
|
+
if (currentValue) {
|
|
1271
|
+
this.otpArray.at(index).setValue('');
|
|
1272
|
+
}
|
|
1273
|
+
else if (index > 0) {
|
|
1274
|
+
this.focusPreviousInput(index);
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
focusNextInput(index) {
|
|
1279
|
+
const nextInput = document.getElementById(`otp-input-${index + 1}`);
|
|
1280
|
+
nextInput?.focus();
|
|
1281
|
+
}
|
|
1282
|
+
focusPreviousInput(index) {
|
|
1283
|
+
const prevInput = document.getElementById(`otp-input-${index - 1}`);
|
|
1284
|
+
prevInput?.focus();
|
|
1285
|
+
}
|
|
1286
|
+
emitOtp() {
|
|
1287
|
+
const otp = this.otpArray.value.join('');
|
|
1288
|
+
this.otpChange.emit(otp);
|
|
1289
|
+
}
|
|
1290
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1291
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OtpInputComponent, selector: "verben-otp-input", inputs: { length: "length", otpClass: "otpClass" }, outputs: { otpChange: "otpChange" }, ngImport: i0, template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input {{otpClass}}\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
|
|
1292
|
+
}
|
|
1293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputComponent, decorators: [{
|
|
1294
|
+
type: Component,
|
|
1295
|
+
args: [{ selector: 'verben-otp-input', template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input {{otpClass}}\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"] }]
|
|
1296
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { length: [{
|
|
1297
|
+
type: Input
|
|
1298
|
+
}], otpClass: [{
|
|
1299
|
+
type: Input
|
|
1300
|
+
}], otpChange: [{
|
|
1301
|
+
type: Output
|
|
1302
|
+
}] } });
|
|
1303
|
+
|
|
1304
|
+
class TwoFactorAuthOtpComponent {
|
|
1305
|
+
fb;
|
|
1306
|
+
server;
|
|
1307
|
+
utilService;
|
|
1308
|
+
customClass = '';
|
|
1309
|
+
headlingClass = '';
|
|
1310
|
+
headlingText = 'Two Factor Authentication';
|
|
1311
|
+
paragraphClass = '';
|
|
1312
|
+
resendClass = '';
|
|
1313
|
+
width = '';
|
|
1314
|
+
maxWidth = '';
|
|
1315
|
+
margin = '';
|
|
1316
|
+
pd = '';
|
|
1317
|
+
bgColor = '#fff';
|
|
1318
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
1319
|
+
border = '1px solid #66666680';
|
|
1320
|
+
borderRadius = '24px';
|
|
1321
|
+
textColor = '#333';
|
|
1322
|
+
height = 'auto';
|
|
1323
|
+
length = 6;
|
|
1324
|
+
otpClass = '';
|
|
1325
|
+
resendOtpData = {
|
|
1326
|
+
MailAddress: "verbena@gmail.com",
|
|
1327
|
+
Password: "Default",
|
|
1328
|
+
LoginType: "InApp",
|
|
1329
|
+
APIKey: "PDLTC6",
|
|
1330
|
+
Secrete: "$White360$",
|
|
1331
|
+
RedirectUri: "/auth/otp"
|
|
1332
|
+
};
|
|
1333
|
+
User = {
|
|
1334
|
+
Code: '024',
|
|
1335
|
+
TenantId: '53b1c579bdf3de74f76bdac9',
|
|
1336
|
+
Id: '53b1c579bdf3de74f76bdac9',
|
|
1337
|
+
ServiceName: 'chinedu',
|
|
1338
|
+
MailAddress: 'nwaekwuchinedu@gmail.com',
|
|
1339
|
+
PhoneNumber: '070',
|
|
1340
|
+
FirstName: 'nwaekwu',
|
|
1341
|
+
LastName: 'chinedu',
|
|
1342
|
+
OtherName: 'chinedu',
|
|
1343
|
+
Role: [],
|
|
1344
|
+
Tags: [
|
|
1345
|
+
{
|
|
1346
|
+
Name: "tester",
|
|
1347
|
+
IsOptional: true
|
|
1348
|
+
}
|
|
1349
|
+
],
|
|
1350
|
+
Password: 'Default',
|
|
1351
|
+
Status: 'Active',
|
|
1352
|
+
CreatedAt: new Date(),
|
|
1353
|
+
UpdatedAt: new Date(),
|
|
1354
|
+
DataState: ObjectState.New
|
|
1355
|
+
};
|
|
1356
|
+
OtpData = {
|
|
1357
|
+
User: this.User,
|
|
1358
|
+
Token: '',
|
|
1359
|
+
ValidateUrl: '',
|
|
1360
|
+
Secret: '',
|
|
1361
|
+
OTP: '',
|
|
1362
|
+
Info: ''
|
|
1363
|
+
};
|
|
1364
|
+
btnClass = '';
|
|
1365
|
+
btnBgColor = '#FFE681';
|
|
1366
|
+
btnColor = '';
|
|
1367
|
+
btnBorder = '';
|
|
1368
|
+
btnBorderRadius = '24px';
|
|
1369
|
+
btnPd = '';
|
|
1370
|
+
btnText = 'Submit';
|
|
1371
|
+
otpValue = '';
|
|
1372
|
+
otpForm;
|
|
1373
|
+
buttonClick = new EventEmitter();
|
|
1374
|
+
otpChange = new EventEmitter();
|
|
1375
|
+
onSubmitEnd = new EventEmitter();
|
|
1376
|
+
resend = new EventEmitter();
|
|
1377
|
+
constructor(fb, server, utilService) {
|
|
1378
|
+
this.fb = fb;
|
|
1379
|
+
this.server = server;
|
|
1380
|
+
this.utilService = utilService;
|
|
1381
|
+
}
|
|
1382
|
+
ngOnInit() {
|
|
1383
|
+
this.otpForm = this.fb.group({
|
|
1384
|
+
otpValue: ['', [Validators.required, Validators.minLength(6)]]
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
onOtpChange(value) {
|
|
1388
|
+
this.otpValue = value;
|
|
1389
|
+
this.otpForm.get('otpValue')?.setValue(value);
|
|
1390
|
+
this.otpChange.emit(this.otpValue);
|
|
1391
|
+
}
|
|
1392
|
+
async submitData() {
|
|
1393
|
+
const data = {
|
|
1394
|
+
User: {
|
|
1395
|
+
...this.User
|
|
1396
|
+
},
|
|
1397
|
+
Token: this.OtpData.Token,
|
|
1398
|
+
ValidateUrl: this.OtpData.ValidateUrl,
|
|
1399
|
+
Secret: this.OtpData.Secret,
|
|
1400
|
+
OTP: this.OtpData.OTP,
|
|
1401
|
+
Info: this.OtpData.Info,
|
|
1402
|
+
};
|
|
1403
|
+
if (this.otpForm.valid) {
|
|
1404
|
+
// this.buttonClick.emit(this.otpForm.get('otpValue')?.value);
|
|
1405
|
+
this.utilService.sendBI(true);
|
|
1406
|
+
const res = await this.server.post(`Authentication/Validate`, data);
|
|
1407
|
+
this.utilService.sendBI(false);
|
|
1408
|
+
if (res instanceof ErrorResponse) {
|
|
1409
|
+
this.onSubmitEnd.emit(res);
|
|
1410
|
+
}
|
|
1411
|
+
else {
|
|
1412
|
+
var result = res;
|
|
1413
|
+
this.onSubmitEnd.emit(result);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
async resendOtp() {
|
|
1418
|
+
const data = {
|
|
1419
|
+
MailAddress: this.resendOtpData?.MailAddress,
|
|
1420
|
+
Password: this.resendOtpData?.Password,
|
|
1421
|
+
LoginType: this.resendOtpData?.LoginType,
|
|
1422
|
+
APIKey: this.resendOtpData?.APIKey,
|
|
1423
|
+
Secrete: this.resendOtpData?.Secrete,
|
|
1424
|
+
RedirectUri: this.resendOtpData?.RedirectUri
|
|
1425
|
+
};
|
|
1426
|
+
this.utilService.sendBI(true);
|
|
1427
|
+
const res = await this.server.post(`Authentication/ResendOTP`, data);
|
|
1428
|
+
this.utilService.sendBI(false);
|
|
1429
|
+
if (res instanceof ErrorResponse) {
|
|
1430
|
+
this.resend.emit(res);
|
|
1431
|
+
}
|
|
1432
|
+
else {
|
|
1433
|
+
var result = res;
|
|
1434
|
+
this.resend.emit(result);
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
get styles() {
|
|
1438
|
+
return {
|
|
1439
|
+
'background-color': this.bgColor,
|
|
1440
|
+
'box-shadow': this.boxShadow,
|
|
1441
|
+
'border': this.border,
|
|
1442
|
+
'border-radius': this.borderRadius,
|
|
1443
|
+
'color': this.textColor,
|
|
1444
|
+
'width': this.width,
|
|
1445
|
+
'max-width': this.maxWidth,
|
|
1446
|
+
'margin': this.margin,
|
|
1447
|
+
'height': this.height,
|
|
1448
|
+
'padding': this.pd
|
|
1449
|
+
};
|
|
1450
|
+
}
|
|
1451
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1452
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TwoFactorAuthOtpComponent, selector: "verben-auth-otp", inputs: { customClass: "customClass", headlingClass: "headlingClass", headlingText: "headlingText", paragraphClass: "paragraphClass", resendClass: "resendClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", length: "length", otpClass: "otpClass", resendOtpData: "resendOtpData", User: "User", OtpData: "OtpData", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText" }, outputs: { buttonClick: "buttonClick", otpChange: "otpChange", onSubmitEnd: "onSubmitEnd", resend: "resend" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"otpWrapper\"> \n <p class=\"{{paragraphClass}}\">Enter the {{length}} digit code sent to you</p>\n <verben-otp-input \n [length]=\"length\" \n (otpChange)=\"onOtpChange($event)\"\n [otpClass]=\"otpClass\"\n ></verben-otp-input>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n (buttonClick)=\"submitData()\"\n [disabled]=\"!otpForm.valid\"\n ></lib-button>\n <p class=\"resendWrapper\">\n Didn\u2019t get a code?\n <a class=\"{{resendClass}}\" (click)=\"resendOtp()\">Resend</a>\n </p>\n \n</section>", styles: [".otpWrapper{margin-bottom:20px;margin-top:15px}.resendWrapper{margin-top:10px;margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: OtpInputComponent, selector: "verben-otp-input", inputs: ["length", "otpClass"], outputs: ["otpChange"] }] });
|
|
1453
|
+
}
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpComponent, decorators: [{
|
|
1455
|
+
type: Component,
|
|
1456
|
+
args: [{ selector: 'verben-auth-otp', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"otpWrapper\"> \n <p class=\"{{paragraphClass}}\">Enter the {{length}} digit code sent to you</p>\n <verben-otp-input \n [length]=\"length\" \n (otpChange)=\"onOtpChange($event)\"\n [otpClass]=\"otpClass\"\n ></verben-otp-input>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n (buttonClick)=\"submitData()\"\n [disabled]=\"!otpForm.valid\"\n ></lib-button>\n <p class=\"resendWrapper\">\n Didn\u2019t get a code?\n <a class=\"{{resendClass}}\" (click)=\"resendOtp()\">Resend</a>\n </p>\n \n</section>", styles: [".otpWrapper{margin-bottom:20px;margin-top:15px}.resendWrapper{margin-top:10px;margin-bottom:0!important}\n"] }]
|
|
1457
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { customClass: [{
|
|
1458
|
+
type: Input
|
|
1459
|
+
}], headlingClass: [{
|
|
1460
|
+
type: Input
|
|
1461
|
+
}], headlingText: [{
|
|
1462
|
+
type: Input
|
|
1463
|
+
}], paragraphClass: [{
|
|
1464
|
+
type: Input
|
|
1465
|
+
}], resendClass: [{
|
|
1466
|
+
type: Input
|
|
1467
|
+
}], width: [{
|
|
1468
|
+
type: Input
|
|
1469
|
+
}], maxWidth: [{
|
|
1470
|
+
type: Input
|
|
1471
|
+
}], margin: [{
|
|
1472
|
+
type: Input
|
|
1473
|
+
}], pd: [{
|
|
1474
|
+
type: Input
|
|
1475
|
+
}], bgColor: [{
|
|
1476
|
+
type: Input
|
|
1477
|
+
}], boxShadow: [{
|
|
1478
|
+
type: Input
|
|
1479
|
+
}], border: [{
|
|
1480
|
+
type: Input
|
|
1481
|
+
}], borderRadius: [{
|
|
1482
|
+
type: Input
|
|
1483
|
+
}], textColor: [{
|
|
1484
|
+
type: Input
|
|
1485
|
+
}], height: [{
|
|
1486
|
+
type: Input
|
|
1487
|
+
}], length: [{
|
|
1488
|
+
type: Input
|
|
1489
|
+
}], otpClass: [{
|
|
1490
|
+
type: Input
|
|
1491
|
+
}], resendOtpData: [{
|
|
1492
|
+
type: Input
|
|
1493
|
+
}], User: [{
|
|
1494
|
+
type: Input
|
|
1495
|
+
}], OtpData: [{
|
|
1496
|
+
type: Input
|
|
1497
|
+
}], btnClass: [{
|
|
1498
|
+
type: Input
|
|
1499
|
+
}], btnBgColor: [{
|
|
1500
|
+
type: Input
|
|
1501
|
+
}], btnColor: [{
|
|
1502
|
+
type: Input
|
|
1503
|
+
}], btnBorder: [{
|
|
1504
|
+
type: Input
|
|
1505
|
+
}], btnBorderRadius: [{
|
|
1506
|
+
type: Input
|
|
1507
|
+
}], btnPd: [{
|
|
1508
|
+
type: Input
|
|
1509
|
+
}], btnText: [{
|
|
1510
|
+
type: Input
|
|
1511
|
+
}], buttonClick: [{
|
|
1512
|
+
type: Output
|
|
1513
|
+
}], otpChange: [{
|
|
1514
|
+
type: Output
|
|
1515
|
+
}], onSubmitEnd: [{
|
|
1516
|
+
type: Output
|
|
1517
|
+
}], resend: [{
|
|
1518
|
+
type: Output
|
|
1519
|
+
}] } });
|
|
1520
|
+
|
|
1521
|
+
class OtpInputModule {
|
|
1522
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1523
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, declarations: [OtpInputComponent], imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule], exports: [OtpInputComponent] });
|
|
1524
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, imports: [CommonModule, FormsModule, VerbenaInputModule, ButtonModule, OAuthModule, ReactiveFormsModule] });
|
|
1525
|
+
}
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OtpInputModule, decorators: [{
|
|
1527
|
+
type: NgModule,
|
|
1528
|
+
args: [{
|
|
1529
|
+
declarations: [OtpInputComponent],
|
|
1530
|
+
imports: [CommonModule, FormsModule, VerbenaInputModule, RouterLink, ButtonModule, OAuthModule, ReactiveFormsModule],
|
|
1531
|
+
exports: [OtpInputComponent]
|
|
1532
|
+
}]
|
|
1533
|
+
}] });
|
|
1534
|
+
|
|
1535
|
+
class TwoFactorAuthOtpModule {
|
|
1536
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1537
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, declarations: [TwoFactorAuthOtpComponent], imports: [CommonModule, ButtonModule, OtpInputModule, RouterLink, ReactiveFormsModule], exports: [TwoFactorAuthOtpComponent] });
|
|
1538
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, imports: [CommonModule, ButtonModule, OtpInputModule, ReactiveFormsModule] });
|
|
1539
|
+
}
|
|
1540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthOtpModule, decorators: [{
|
|
1541
|
+
type: NgModule,
|
|
1542
|
+
args: [{
|
|
1543
|
+
declarations: [TwoFactorAuthOtpComponent],
|
|
1544
|
+
imports: [CommonModule, ButtonModule, OtpInputModule, RouterLink, ReactiveFormsModule],
|
|
1545
|
+
exports: [TwoFactorAuthOtpComponent]
|
|
1546
|
+
}]
|
|
1547
|
+
}] });
|
|
1548
|
+
|
|
1549
|
+
class TwoFactorAuthSetupComponent {
|
|
1550
|
+
customClass = '';
|
|
1551
|
+
headlingClass = '';
|
|
1552
|
+
headlingText = 'Set Up Two Factor Authentication';
|
|
1553
|
+
paragraphClass = '';
|
|
1554
|
+
buttonClass = '';
|
|
1555
|
+
width = '';
|
|
1556
|
+
maxWidth = '';
|
|
1557
|
+
margin = '';
|
|
1558
|
+
pd = '';
|
|
1559
|
+
bgColor = '#fff';
|
|
1560
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
1561
|
+
border = '1px solid #66666680';
|
|
1562
|
+
borderRadius = '24px';
|
|
1563
|
+
textColor = '#333';
|
|
1564
|
+
height = '';
|
|
1565
|
+
smsClick = new EventEmitter();
|
|
1566
|
+
mailClick = new EventEmitter();
|
|
1567
|
+
skipClick = new EventEmitter();
|
|
1568
|
+
continueWithSMS() {
|
|
1569
|
+
this.smsClick.emit();
|
|
1570
|
+
}
|
|
1571
|
+
continueWithMail() {
|
|
1572
|
+
this.mailClick.emit();
|
|
1573
|
+
}
|
|
1574
|
+
handleSkip() {
|
|
1575
|
+
this.skipClick.emit();
|
|
1576
|
+
}
|
|
1577
|
+
get styles() {
|
|
1578
|
+
return {
|
|
1579
|
+
'background-color': this.bgColor,
|
|
1580
|
+
'box-shadow': this.boxShadow,
|
|
1581
|
+
'border': this.border,
|
|
1582
|
+
'border-radius': this.borderRadius,
|
|
1583
|
+
'color': this.textColor,
|
|
1584
|
+
'width': this.width,
|
|
1585
|
+
'max-width': this.maxWidth,
|
|
1586
|
+
'margin': this.margin,
|
|
1587
|
+
'height': this.height,
|
|
1588
|
+
'padding': this.pd
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1592
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TwoFactorAuthSetupComponent, selector: "verben-two-factor-auth-setup", inputs: { customClass: "customClass", headlingClass: "headlingClass", headlingText: "headlingText", paragraphClass: "paragraphClass", buttonClass: "buttonClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { smsClick: "smsClick", mailClick: "mailClick", skipClick: "skipClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"setUpBtnWrapper\">\n <verbena-button\n svg=\"2fa-mail\"\n [svgHeight]=\"16\"\n [svgWidth]=\"20\"\n text=\"Continue with Mail\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mb-2\"\n (click)=\"continueWithMail()\"\n ></verbena-button>\n <verbena-button\n svg=\"2fa-sms\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with SMS\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n (click)=\"continueWithSMS()\"\n ></verbena-button>\n <!-- <div class=\"iconWrapper\" (click)=\"handleSkip()\"> \n <p class=\"{{paragraphClass}}\">Skip for now</p>\n <verben-svg \n icon=\"skip-forward\"\n [height]=\"24\"\n [width]=\"24\"\n />\n </div> -->\n</div>\n</section>", styles: [".setUpBtnWrapper{display:flex;flex-direction:column;gap:12px;margin-top:40px}.iconWrapper{display:flex;cursor:pointer;align-items:center;justify-content:end;gap:12px;margin-bottom:50px}.custom-button{font-weight:500}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
|
|
1593
|
+
}
|
|
1594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupComponent, decorators: [{
|
|
1595
|
+
type: Component,
|
|
1596
|
+
args: [{ selector: 'verben-two-factor-auth-setup', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"setUpBtnWrapper\">\n <verbena-button\n svg=\"2fa-mail\"\n [svgHeight]=\"16\"\n [svgWidth]=\"20\"\n text=\"Continue with Mail\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mb-2\"\n (click)=\"continueWithMail()\"\n ></verbena-button>\n <verbena-button\n svg=\"2fa-sms\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with SMS\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n (click)=\"continueWithSMS()\"\n ></verbena-button>\n <!-- <div class=\"iconWrapper\" (click)=\"handleSkip()\"> \n <p class=\"{{paragraphClass}}\">Skip for now</p>\n <verben-svg \n icon=\"skip-forward\"\n [height]=\"24\"\n [width]=\"24\"\n />\n </div> -->\n</div>\n</section>", styles: [".setUpBtnWrapper{display:flex;flex-direction:column;gap:12px;margin-top:40px}.iconWrapper{display:flex;cursor:pointer;align-items:center;justify-content:end;gap:12px;margin-bottom:50px}.custom-button{font-weight:500}\n"] }]
|
|
1597
|
+
}], propDecorators: { customClass: [{
|
|
1598
|
+
type: Input
|
|
1599
|
+
}], headlingClass: [{
|
|
1600
|
+
type: Input
|
|
1601
|
+
}], headlingText: [{
|
|
1602
|
+
type: Input
|
|
1603
|
+
}], paragraphClass: [{
|
|
1604
|
+
type: Input
|
|
1605
|
+
}], buttonClass: [{
|
|
1606
|
+
type: Input
|
|
1607
|
+
}], width: [{
|
|
1608
|
+
type: Input
|
|
1609
|
+
}], maxWidth: [{
|
|
1610
|
+
type: Input
|
|
1611
|
+
}], margin: [{
|
|
1612
|
+
type: Input
|
|
1613
|
+
}], pd: [{
|
|
1614
|
+
type: Input
|
|
1615
|
+
}], bgColor: [{
|
|
1616
|
+
type: Input
|
|
1617
|
+
}], boxShadow: [{
|
|
1618
|
+
type: Input
|
|
1619
|
+
}], border: [{
|
|
1620
|
+
type: Input
|
|
1621
|
+
}], borderRadius: [{
|
|
1622
|
+
type: Input
|
|
1623
|
+
}], textColor: [{
|
|
1624
|
+
type: Input
|
|
1625
|
+
}], height: [{
|
|
1626
|
+
type: Input
|
|
1627
|
+
}], smsClick: [{
|
|
1628
|
+
type: Output
|
|
1629
|
+
}], mailClick: [{
|
|
1630
|
+
type: Output
|
|
1631
|
+
}], skipClick: [{
|
|
1632
|
+
type: Output
|
|
1633
|
+
}] } });
|
|
1634
|
+
|
|
1635
|
+
class TwoFactorAuthSetupModule {
|
|
1636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1637
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, declarations: [TwoFactorAuthSetupComponent], imports: [CommonModule, VerbenaButtonModule, SvgModule], exports: [TwoFactorAuthSetupComponent] });
|
|
1638
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, imports: [CommonModule, VerbenaButtonModule, SvgModule] });
|
|
1639
|
+
}
|
|
1640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TwoFactorAuthSetupModule, decorators: [{
|
|
1641
|
+
type: NgModule,
|
|
1642
|
+
args: [{
|
|
1643
|
+
declarations: [TwoFactorAuthSetupComponent],
|
|
1644
|
+
imports: [CommonModule, VerbenaButtonModule, SvgModule],
|
|
1645
|
+
exports: [TwoFactorAuthSetupComponent]
|
|
1646
|
+
}]
|
|
1647
|
+
}] });
|
|
1648
|
+
|
|
1649
|
+
class MailComponent {
|
|
1650
|
+
customClass = '';
|
|
1651
|
+
headlingClass = '';
|
|
1652
|
+
width = '';
|
|
1653
|
+
maxWidth = '';
|
|
1654
|
+
margin = '';
|
|
1655
|
+
pd = '';
|
|
1656
|
+
bgColor = '#fff';
|
|
1657
|
+
boxShadow = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
1658
|
+
border = '1px solid #66666680';
|
|
1659
|
+
borderRadius = '24px';
|
|
1660
|
+
textColor = '#333';
|
|
1661
|
+
height = 'auto';
|
|
1662
|
+
buttonClick = new EventEmitter();
|
|
1663
|
+
goToLogin() {
|
|
1664
|
+
this.buttonClick.emit();
|
|
1665
|
+
}
|
|
1666
|
+
get styles() {
|
|
1667
|
+
return {
|
|
1668
|
+
'background-color': this.bgColor,
|
|
1669
|
+
'box-shadow': this.boxShadow,
|
|
1670
|
+
'border': this.border,
|
|
1671
|
+
'border-radius': this.borderRadius,
|
|
1672
|
+
'color': this.textColor,
|
|
1673
|
+
'width': this.width,
|
|
1674
|
+
'max-width': this.maxWidth,
|
|
1675
|
+
'margin': this.margin,
|
|
1676
|
+
'height': this.height,
|
|
1677
|
+
'padding': this.pd
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1681
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MailComponent, selector: "verben-mail-message", inputs: { customClass: "customClass", headlingClass: "headlingClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">Your e-mail has been verified!</h3>\n <lib-button \n text=\"Login\" \n buttonClass=\"\"\n (click)=\"goToLogin()\"\n ></lib-button> \n</section>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }] });
|
|
1682
|
+
}
|
|
1683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailComponent, decorators: [{
|
|
1684
|
+
type: Component,
|
|
1685
|
+
args: [{ selector: 'verben-mail-message', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">Your e-mail has been verified!</h3>\n <lib-button \n text=\"Login\" \n buttonClass=\"\"\n (click)=\"goToLogin()\"\n ></lib-button> \n</section>\n" }]
|
|
1686
|
+
}], propDecorators: { customClass: [{
|
|
1687
|
+
type: Input
|
|
1688
|
+
}], headlingClass: [{
|
|
1689
|
+
type: Input
|
|
1690
|
+
}], width: [{
|
|
1691
|
+
type: Input
|
|
1692
|
+
}], maxWidth: [{
|
|
1693
|
+
type: Input
|
|
1694
|
+
}], margin: [{
|
|
1695
|
+
type: Input
|
|
1696
|
+
}], pd: [{
|
|
1697
|
+
type: Input
|
|
1698
|
+
}], bgColor: [{
|
|
1699
|
+
type: Input
|
|
1700
|
+
}], boxShadow: [{
|
|
1701
|
+
type: Input
|
|
1702
|
+
}], border: [{
|
|
1703
|
+
type: Input
|
|
1704
|
+
}], borderRadius: [{
|
|
1705
|
+
type: Input
|
|
1706
|
+
}], textColor: [{
|
|
1707
|
+
type: Input
|
|
1708
|
+
}], height: [{
|
|
1709
|
+
type: Input
|
|
1710
|
+
}], buttonClick: [{
|
|
1711
|
+
type: Output
|
|
1712
|
+
}] } });
|
|
1713
|
+
|
|
1714
|
+
class MailModule {
|
|
1715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1716
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MailModule, declarations: [MailComponent], imports: [CommonModule, FormsModule, RouterLink, ButtonModule], exports: [MailComponent] });
|
|
1717
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailModule, imports: [CommonModule, FormsModule, ButtonModule] });
|
|
1718
|
+
}
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MailModule, decorators: [{
|
|
1720
|
+
type: NgModule,
|
|
1721
|
+
args: [{
|
|
1722
|
+
declarations: [MailComponent],
|
|
1723
|
+
imports: [CommonModule, FormsModule, RouterLink, ButtonModule],
|
|
1724
|
+
exports: [MailComponent]
|
|
1725
|
+
}]
|
|
1726
|
+
}] });
|
|
1727
|
+
|
|
1728
|
+
class ForgotPasswordComponent {
|
|
1729
|
+
fb;
|
|
1730
|
+
server;
|
|
1731
|
+
utilService;
|
|
1732
|
+
title = 'Forgot Password';
|
|
1733
|
+
subTitle = 'Enter the e-mail you used during registration';
|
|
1734
|
+
buttonCaption = 'Submit';
|
|
1735
|
+
buttonTextColor;
|
|
1736
|
+
buttonBackgroundColor;
|
|
1737
|
+
onSubmit = new EventEmitter();
|
|
1738
|
+
onSubmitEnd = new EventEmitter();
|
|
1739
|
+
forgotPasswordForm;
|
|
1740
|
+
constructor(fb, server, utilService) {
|
|
1741
|
+
this.fb = fb;
|
|
1742
|
+
this.server = server;
|
|
1743
|
+
this.utilService = utilService;
|
|
1744
|
+
this.forgotPasswordForm = this.fb.group({
|
|
1745
|
+
Email: new FormControl(null, [
|
|
1746
|
+
Validators.required,
|
|
1747
|
+
this.emailValidator.bind(this),
|
|
1748
|
+
]),
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
isValidEmail(mail) {
|
|
1752
|
+
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
1753
|
+
return emailPattern.test(mail);
|
|
1754
|
+
}
|
|
1755
|
+
emailValidator(control) {
|
|
1756
|
+
const value = control.value;
|
|
1757
|
+
if (this.isValidEmail(value) == false) {
|
|
1758
|
+
return { customValidation: true };
|
|
1759
|
+
}
|
|
1760
|
+
return null;
|
|
1761
|
+
}
|
|
1762
|
+
checkForm() {
|
|
1763
|
+
return this.forgotPasswordForm.valid;
|
|
1764
|
+
}
|
|
1765
|
+
async submit() {
|
|
1766
|
+
if (!this.checkForm()) {
|
|
1767
|
+
return;
|
|
1768
|
+
}
|
|
1769
|
+
var data = {
|
|
1770
|
+
Email: this.forgotPasswordForm.controls['Email'].value,
|
|
1771
|
+
};
|
|
1772
|
+
this.onSubmit.emit(data);
|
|
1773
|
+
this.utilService.sendBI(true);
|
|
1774
|
+
const res = await this.server.get(`User/PasswordChangeRequest/${data.Email}`);
|
|
1775
|
+
this.utilService.sendBI(false);
|
|
1776
|
+
if (res instanceof ErrorResponse) {
|
|
1777
|
+
this.onSubmitEnd.emit(res);
|
|
1778
|
+
}
|
|
1779
|
+
else {
|
|
1780
|
+
var result = res;
|
|
1781
|
+
this.onSubmitEnd.emit(result);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1785
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ForgotPasswordComponent, selector: "verben-forgot-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor" }, outputs: { onSubmit: "onSubmit", onSubmitEnd: "onSubmitEnd" }, ngImport: i0, template: "<div [formGroup]=\"this.forgotPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Email</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Email\" type=\"email\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }] });
|
|
1786
|
+
}
|
|
1787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
1788
|
+
type: Component,
|
|
1789
|
+
args: [{ selector: 'verben-forgot-password', template: "<div [formGroup]=\"this.forgotPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Email</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Email\" type=\"email\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"] }]
|
|
1790
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }, { type: UtilService }], propDecorators: { title: [{
|
|
1791
|
+
type: Input
|
|
1792
|
+
}], subTitle: [{
|
|
1793
|
+
type: Input
|
|
1794
|
+
}], buttonCaption: [{
|
|
1795
|
+
type: Input
|
|
1796
|
+
}], buttonTextColor: [{
|
|
1797
|
+
type: Input
|
|
1798
|
+
}], buttonBackgroundColor: [{
|
|
1799
|
+
type: Input
|
|
1800
|
+
}], onSubmit: [{
|
|
1801
|
+
type: Output
|
|
1802
|
+
}], onSubmitEnd: [{
|
|
1803
|
+
type: Output
|
|
1804
|
+
}] } });
|
|
1805
|
+
|
|
1806
|
+
class ForgotPasswordModule {
|
|
1807
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1808
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, declarations: [ForgotPasswordComponent], imports: [FormsModule,
|
|
1809
|
+
ReactiveFormsModule,
|
|
1810
|
+
VerbenaInputModule,
|
|
1811
|
+
VerbenaButtonModule,
|
|
1812
|
+
CommonModule], exports: [ForgotPasswordComponent] });
|
|
1813
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, imports: [FormsModule,
|
|
1814
|
+
ReactiveFormsModule,
|
|
1815
|
+
VerbenaInputModule,
|
|
1816
|
+
VerbenaButtonModule,
|
|
1817
|
+
CommonModule] });
|
|
1818
|
+
}
|
|
1819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordModule, decorators: [{
|
|
1820
|
+
type: NgModule,
|
|
1821
|
+
args: [{
|
|
1822
|
+
declarations: [ForgotPasswordComponent],
|
|
1823
|
+
imports: [
|
|
1824
|
+
FormsModule,
|
|
1825
|
+
ReactiveFormsModule,
|
|
1826
|
+
VerbenaInputModule,
|
|
1827
|
+
VerbenaButtonModule,
|
|
1828
|
+
CommonModule,
|
|
1829
|
+
],
|
|
1830
|
+
exports: [ForgotPasswordComponent],
|
|
1831
|
+
}]
|
|
1832
|
+
}] });
|
|
1833
|
+
|
|
1834
|
+
const columns$2 = [
|
|
1835
|
+
{
|
|
1836
|
+
id: 'createdAt',
|
|
1837
|
+
header: 'Created',
|
|
1838
|
+
accessorKey: 'CreatedAt',
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
id: 'name',
|
|
1842
|
+
header: 'Name',
|
|
1843
|
+
accessorKey: 'Name',
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
id: 'description',
|
|
1847
|
+
header: 'Description',
|
|
1848
|
+
accessorKey: 'Description',
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
id: 'link',
|
|
1852
|
+
header: 'Link',
|
|
1853
|
+
accessorKey: 'Link',
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
id: 'logo',
|
|
1857
|
+
header: 'Logo',
|
|
1858
|
+
accessorKey: 'Logo',
|
|
1859
|
+
},
|
|
1860
|
+
{ id: 'actions', header: 'Actions', accessorKey: 'Name' },
|
|
1861
|
+
];
|
|
1862
|
+
|
|
1863
|
+
const mockData$2 = new Array(10).fill(1).map((id, i) => ({
|
|
1864
|
+
Name: `Name ${id + i}`,
|
|
1865
|
+
Id: id,
|
|
1866
|
+
id: id.toString(),
|
|
1867
|
+
Description: `Sign in option ${id + i}`,
|
|
1868
|
+
Logo: `./assets/images/test-logo.png`,
|
|
1869
|
+
Link: `Link ${id + i}`,
|
|
1870
|
+
CreatedAt: new Date(),
|
|
1871
|
+
UpdatedAt: new Date(),
|
|
1872
|
+
DataState: ObjectState.New,
|
|
1873
|
+
Tenant: `Tenant ${id + i}`,
|
|
1874
|
+
}));
|
|
1875
|
+
|
|
1876
|
+
const baseStyle$2 = {
|
|
1877
|
+
width: '100%',
|
|
1878
|
+
fontFamily: '"Fraunces", serif',
|
|
1879
|
+
fontSize: '125%',
|
|
1880
|
+
whiteSpace: 'nowrap',
|
|
1881
|
+
margin: '0',
|
|
1882
|
+
border: '1px solid #D4A007',
|
|
1883
|
+
borderRadius: '16px',
|
|
1884
|
+
borderCollapse: 'separate',
|
|
1885
|
+
borderSpacing: '0',
|
|
1886
|
+
tableLayout: 'fixed',
|
|
1887
|
+
overflow: 'hidden',
|
|
1888
|
+
rows: {
|
|
1889
|
+
even: {
|
|
1890
|
+
backgroundColor: '#FDFDFD',
|
|
1891
|
+
},
|
|
1892
|
+
odd: {
|
|
1893
|
+
backgroundColor: '#F1F4FB',
|
|
1894
|
+
},
|
|
1895
|
+
height: '68px',
|
|
1896
|
+
},
|
|
1897
|
+
cells: {
|
|
1898
|
+
padding: '0.5rem 1rem',
|
|
1899
|
+
},
|
|
1900
|
+
header: {
|
|
1901
|
+
stickyTop: true,
|
|
1902
|
+
zIndex: 2,
|
|
1903
|
+
backgroundColor: '#EFF2FB',
|
|
1904
|
+
fontWeight: 'bold',
|
|
1905
|
+
textAlign: 'left',
|
|
1906
|
+
padding: '12px 16px',
|
|
1907
|
+
height: '40px',
|
|
1908
|
+
},
|
|
1909
|
+
footer: {
|
|
1910
|
+
stickyBottom: true,
|
|
1911
|
+
zIndex: 2,
|
|
1912
|
+
padding: '3px',
|
|
1913
|
+
},
|
|
1914
|
+
// body: {
|
|
1915
|
+
// background: '#fff',
|
|
1916
|
+
// padding: '4px 5px',
|
|
1917
|
+
// textAlign: 'center',
|
|
1918
|
+
// },
|
|
1919
|
+
// firstColumn: {
|
|
1920
|
+
// stickyLeft: true,
|
|
1921
|
+
// zIndex: 1,
|
|
1922
|
+
// },
|
|
1923
|
+
lastColumn: {
|
|
1924
|
+
stickyRight: true,
|
|
1925
|
+
zIndex: 1,
|
|
1926
|
+
},
|
|
1927
|
+
};
|
|
1928
|
+
|
|
1929
|
+
class SsoFormComponent {
|
|
1930
|
+
fb;
|
|
1931
|
+
isUploading = false;
|
|
1932
|
+
uploadedFileName = null;
|
|
1933
|
+
fileUploadError = null;
|
|
1934
|
+
currentData = null;
|
|
1935
|
+
switchView = new EventEmitter();
|
|
1936
|
+
form;
|
|
1937
|
+
constructor(fb) {
|
|
1938
|
+
this.fb = fb;
|
|
1939
|
+
this.form = this.fb.group({
|
|
1940
|
+
Description: [''],
|
|
1941
|
+
Name: [''],
|
|
1942
|
+
Link: [''],
|
|
1943
|
+
Logo: [''],
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
ngOnInit() { }
|
|
1947
|
+
onSave() {
|
|
1948
|
+
if (this.form.valid) {
|
|
1949
|
+
// Emit save event with form value
|
|
1950
|
+
console.log('Form saved:', this.form.value);
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
onDelete() {
|
|
1954
|
+
// Emit delete event
|
|
1955
|
+
console.log('Delete requested');
|
|
1956
|
+
}
|
|
1957
|
+
onFileSelected(event) {
|
|
1958
|
+
const input = event.target;
|
|
1959
|
+
if (input.files && input.files.length > 0) {
|
|
1960
|
+
const file = input.files[0];
|
|
1961
|
+
this.fileUploadError = null;
|
|
1962
|
+
if (!file) {
|
|
1963
|
+
this.isUploading = true;
|
|
1964
|
+
}
|
|
1965
|
+
if (file.size > 5000000) {
|
|
1966
|
+
this.fileUploadError = 'File size exceeds 5MB limit.';
|
|
1967
|
+
this.uploadedFileName = null;
|
|
1968
|
+
this.isUploading = false; // Reset isUploading state
|
|
1969
|
+
}
|
|
1970
|
+
else {
|
|
1971
|
+
this.uploadedFileName = file.name;
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
else {
|
|
1975
|
+
this.isUploading = false;
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
removeFile() {
|
|
1979
|
+
this.uploadedFileName = null;
|
|
1980
|
+
this.fileUploadError = null;
|
|
1981
|
+
const fileInput = document.getElementById('attachment');
|
|
1982
|
+
if (fileInput) {
|
|
1983
|
+
fileInput.value = '';
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1987
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SsoFormComponent, selector: "lib-sso-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name:\"\n formControlName=\"Name\"\n [(ngModel)]=\"currentData?.data.Name\"\n />\n <verbena-input\n label=\"Description:\"\n name=\"Description\"\n formControlName=\"Description\"\n [(ngModel)]=\"currentData?.data.Description\"\n />\n <verbena-input\n label=\"Link:\"\n name=\"Link\"\n formControlName=\"Link\"\n [(ngModel)]=\"currentData?.data.Link\"\n/>\n<span class=\"block my-2 \">Logo</span>\n<label [style.background-color]=\"'#f9f9f9'\" class=\"border cursor-pointer border-secondary-200 rounded-md w-full px-4 py-2 flex justify-between\">\n <span *ngIf=\"!uploadedFileName\">{{isUploading?\"uploading...\":\"Upload a photo\"}}</span>\n <span *ngIf=\"fileUploadError\" class=\"error\">{{ fileUploadError }}</span>\n <div *ngIf=\"uploadedFileName\" class=\"flex items-center text-sm gap-2 border border-primary rounded-lg px-3 \">\n <span>{{ uploadedFileName }}</span>\n <button\n [style.color]=\"'black'\"\n type=\"button\"\n (click)=\"removeFile()\"\n >\n ✕\n </button>\n </div>\n <input\n id=\"logo\"\n[type]=\"'file'\"\n label=\"Logo:\"\n name=\"Logo\"\n accept=\"image/png\"\n formControlName=\"Logo\"\n (change)=\"onFileSelected($event)\"\n formControlName=\"Logo\"\n/>\n<span class=\"flex gap-2\">\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/cam.png\" class=\"icon-width\"/>\n</span>\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/file.png\" class=\"icon-width2\"/>\n</span>\n</span>\n</label>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n [bgColor]=\"'#999999'\"\n [textColor]=\"'#404040'\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Save\"\n bgColor=\"#28a745\"\n textColor=\"#404040\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n [bgColor]=\"'#FFE681'\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: ["#logo{display:none}.icon-width{width:20px}.icon-width2{width:15px}.icon-container{width:30px;height:30px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }] });
|
|
1988
|
+
}
|
|
1989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoFormComponent, decorators: [{
|
|
1990
|
+
type: Component,
|
|
1991
|
+
args: [{ selector: 'lib-sso-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name:\"\n formControlName=\"Name\"\n [(ngModel)]=\"currentData?.data.Name\"\n />\n <verbena-input\n label=\"Description:\"\n name=\"Description\"\n formControlName=\"Description\"\n [(ngModel)]=\"currentData?.data.Description\"\n />\n <verbena-input\n label=\"Link:\"\n name=\"Link\"\n formControlName=\"Link\"\n [(ngModel)]=\"currentData?.data.Link\"\n/>\n<span class=\"block my-2 \">Logo</span>\n<label [style.background-color]=\"'#f9f9f9'\" class=\"border cursor-pointer border-secondary-200 rounded-md w-full px-4 py-2 flex justify-between\">\n <span *ngIf=\"!uploadedFileName\">{{isUploading?\"uploading...\":\"Upload a photo\"}}</span>\n <span *ngIf=\"fileUploadError\" class=\"error\">{{ fileUploadError }}</span>\n <div *ngIf=\"uploadedFileName\" class=\"flex items-center text-sm gap-2 border border-primary rounded-lg px-3 \">\n <span>{{ uploadedFileName }}</span>\n <button\n [style.color]=\"'black'\"\n type=\"button\"\n (click)=\"removeFile()\"\n >\n ✕\n </button>\n </div>\n <input\n id=\"logo\"\n[type]=\"'file'\"\n label=\"Logo:\"\n name=\"Logo\"\n accept=\"image/png\"\n formControlName=\"Logo\"\n (change)=\"onFileSelected($event)\"\n formControlName=\"Logo\"\n/>\n<span class=\"flex gap-2\">\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/cam.png\" class=\"icon-width\"/>\n</span>\n<span class=\"bg-primary flex icon-container rounded-md justify-center items-center\">\n <img src=\"./assets/icons/file.png\" class=\"icon-width2\"/>\n</span>\n</span>\n</label>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n [bgColor]=\"'#999999'\"\n [textColor]=\"'#404040'\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Save\"\n bgColor=\"#28a745\"\n textColor=\"#404040\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n [bgColor]=\"'#FFE681'\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: ["#logo{display:none}.icon-width{width:20px}.icon-width2{width:15px}.icon-container{width:30px;height:30px}\n"] }]
|
|
1992
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
|
|
1993
|
+
type: Input
|
|
1994
|
+
}], switchView: [{
|
|
1995
|
+
type: Output
|
|
1996
|
+
}] } });
|
|
1997
|
+
|
|
1998
|
+
class SsoComponent {
|
|
1999
|
+
cardDataView;
|
|
2000
|
+
dataView;
|
|
2001
|
+
columns = columns$2;
|
|
2002
|
+
data = mockData$2;
|
|
2003
|
+
filteredColumns = columns$2;
|
|
2004
|
+
styles = baseStyle$2;
|
|
2005
|
+
currentData = null;
|
|
2006
|
+
isGridView = true;
|
|
2007
|
+
selected = null;
|
|
2008
|
+
cardData = mockData$2.map(({ Name, Description, Link, Logo }) => ({
|
|
2009
|
+
selected: false,
|
|
2010
|
+
title: Name,
|
|
2011
|
+
data: { Name, Description, Link, Logo },
|
|
2012
|
+
body: [
|
|
2013
|
+
{ title: 'Description', value: Description ?? '' },
|
|
2014
|
+
],
|
|
2015
|
+
children: [],
|
|
2016
|
+
}));
|
|
2017
|
+
openDetailView(name) {
|
|
2018
|
+
const cardItem = this.getCardDataByMailAddress(name);
|
|
2019
|
+
if (cardItem && this.cardDataView) {
|
|
2020
|
+
this.dataView.toggleView();
|
|
2021
|
+
this.cardData.forEach((item) => {
|
|
2022
|
+
item.selected = false;
|
|
2023
|
+
if (item.children) {
|
|
2024
|
+
item.children.forEach((child) => (child.selected = false));
|
|
2025
|
+
}
|
|
2026
|
+
});
|
|
2027
|
+
cardItem.selected = true;
|
|
2028
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
getCardDataByMailAddress(name) {
|
|
2032
|
+
return this.cardData.find(({ data }) => data.Name === name);
|
|
2033
|
+
}
|
|
2034
|
+
onViewChange(isGridView) {
|
|
2035
|
+
isGridView = isGridView;
|
|
2036
|
+
if (this.currentData) {
|
|
2037
|
+
this.cardDataView?.clearData();
|
|
2038
|
+
this.currentData = null;
|
|
2039
|
+
}
|
|
2040
|
+
if (this.selected) {
|
|
2041
|
+
this.cardDataView.onItemClick(this.selected);
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
openFormView(index) {
|
|
2045
|
+
const item = this.cardData[index];
|
|
2046
|
+
console.log('ITEM = ', item);
|
|
2047
|
+
}
|
|
2048
|
+
handleExport(exportedData) {
|
|
2049
|
+
console.log('Exported data:', exportedData);
|
|
2050
|
+
this.downloadCSV(exportedData);
|
|
2051
|
+
}
|
|
2052
|
+
/**
|
|
2053
|
+
*
|
|
2054
|
+
* @param data Simple csv export for testing
|
|
2055
|
+
*/
|
|
2056
|
+
downloadCSV(data) {
|
|
2057
|
+
const headers = Object.keys(data[0]);
|
|
2058
|
+
const csvContent = [
|
|
2059
|
+
headers.join(','),
|
|
2060
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
2061
|
+
].join('\n');
|
|
2062
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
2063
|
+
const link = document.createElement('a');
|
|
2064
|
+
if (link.download !== undefined) {
|
|
2065
|
+
const url = URL.createObjectURL(blob);
|
|
2066
|
+
link.setAttribute('href', url);
|
|
2067
|
+
link.setAttribute('download', 'export.csv');
|
|
2068
|
+
link.style.visibility = 'hidden';
|
|
2069
|
+
document.body.appendChild(link);
|
|
2070
|
+
link.click();
|
|
2071
|
+
document.body.removeChild(link);
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
onSelectionChange(selectedRows) {
|
|
2075
|
+
console.log('Selection changed:', selectedRows);
|
|
2076
|
+
// Handle the selection change
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Copied over from card view doc until I understand usage
|
|
2080
|
+
*/
|
|
2081
|
+
selectedColumnCount = 0;
|
|
2082
|
+
selectedFilterTableCount = 0;
|
|
2083
|
+
isOPen = true;
|
|
2084
|
+
selectedSortCount = 0;
|
|
2085
|
+
showColumn = false;
|
|
2086
|
+
showSort = false;
|
|
2087
|
+
showExport = false;
|
|
2088
|
+
selectedAll = false;
|
|
2089
|
+
showFilter = false;
|
|
2090
|
+
visibleColumns = columns$2.map((col) => ({
|
|
2091
|
+
checked: false,
|
|
2092
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
2093
|
+
type: DataFilterType.Bool,
|
|
2094
|
+
}));
|
|
2095
|
+
filterArray = [
|
|
2096
|
+
{
|
|
2097
|
+
name: 'Name',
|
|
2098
|
+
type: DataFilterType.String,
|
|
2099
|
+
checked: false,
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
name: 'Description',
|
|
2103
|
+
type: DataFilterType.String,
|
|
2104
|
+
checked: false,
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
name: 'Logo',
|
|
2108
|
+
type: DataFilterType.String,
|
|
2109
|
+
checked: false,
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
name: 'Link',
|
|
2113
|
+
type: DataFilterType.String,
|
|
2114
|
+
checked: false,
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
name: 'CreatedAt',
|
|
2118
|
+
type: DataFilterType.Date,
|
|
2119
|
+
checked: false,
|
|
2120
|
+
},
|
|
2121
|
+
];
|
|
2122
|
+
sortOptions = [
|
|
2123
|
+
{
|
|
2124
|
+
name: 'Name',
|
|
2125
|
+
type: DataFilterType.String,
|
|
2126
|
+
checked: false,
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
name: 'Description',
|
|
2130
|
+
type: DataFilterType.String,
|
|
2131
|
+
checked: false,
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
name: 'Link',
|
|
2135
|
+
type: DataFilterType.String,
|
|
2136
|
+
checked: false,
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
name: 'Logo',
|
|
2140
|
+
type: DataFilterType.String,
|
|
2141
|
+
checked: false,
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
name: 'CreatedAt',
|
|
2145
|
+
type: DataFilterType.Date,
|
|
2146
|
+
checked: false,
|
|
2147
|
+
},
|
|
2148
|
+
];
|
|
2149
|
+
clearData() {
|
|
2150
|
+
this.currentData = {};
|
|
2151
|
+
}
|
|
2152
|
+
loadMore() {
|
|
2153
|
+
this.cardData = this.cardData.concat(this.cardData);
|
|
2154
|
+
}
|
|
2155
|
+
onColumnChange(event) {
|
|
2156
|
+
this.showColumn = event;
|
|
2157
|
+
}
|
|
2158
|
+
onSortChange(event) {
|
|
2159
|
+
this.showSort = false;
|
|
2160
|
+
console.log(event);
|
|
2161
|
+
}
|
|
2162
|
+
onColumnsUpdated(updatedColumns) {
|
|
2163
|
+
this.showColumn = false;
|
|
2164
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
2165
|
+
if (updatedColumns) {
|
|
2166
|
+
// Filter columns to include only visible ones
|
|
2167
|
+
this.filteredColumns = this.columns.filter((col) => this.visibleColumns.find((filter) => filter.name === col.header && filter.checked));
|
|
2168
|
+
// Reorder columns based on the order in visibleColumns
|
|
2169
|
+
const visibleColumnOrder = this.visibleColumns
|
|
2170
|
+
.filter((filter) => filter.checked)
|
|
2171
|
+
.map((filter) => filter.name);
|
|
2172
|
+
this.columns.sort((a, b) => {
|
|
2173
|
+
const indexA = visibleColumnOrder.indexOf(a.header);
|
|
2174
|
+
const indexB = visibleColumnOrder.indexOf(b.header);
|
|
2175
|
+
return indexA - indexB;
|
|
2176
|
+
});
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
onFilterApplied(appliedFilter) {
|
|
2180
|
+
this.showFilter = false;
|
|
2181
|
+
if (Array.isArray(appliedFilter)) {
|
|
2182
|
+
this.selectedFilterTableCount = appliedFilter.length;
|
|
2183
|
+
}
|
|
2184
|
+
else {
|
|
2185
|
+
console.log('appliedFilter is not an array');
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
onSortUpdated(updatedSorts) {
|
|
2189
|
+
this.onSortChange(false);
|
|
2190
|
+
this.selectedSortCount = updatedSorts.length;
|
|
2191
|
+
console.log(updatedSorts);
|
|
2192
|
+
}
|
|
2193
|
+
onStateChange(event) {
|
|
2194
|
+
switch (event.key) {
|
|
2195
|
+
case 'column':
|
|
2196
|
+
this.showColumn = event.value;
|
|
2197
|
+
break;
|
|
2198
|
+
case 'sort':
|
|
2199
|
+
this.showSort = event.value;
|
|
2200
|
+
break;
|
|
2201
|
+
case 'export':
|
|
2202
|
+
this.showExport = event.value;
|
|
2203
|
+
break;
|
|
2204
|
+
case 'filter':
|
|
2205
|
+
this.showFilter = event.value;
|
|
2206
|
+
break;
|
|
2207
|
+
default:
|
|
2208
|
+
break;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2212
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SsoComponent, selector: "lib-sso", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedSortCount]=\"selectedSortCount\"\n [selectedColumnCount]=\"selectedColumnCount\"\n [selectedFilterTableCount]=\"selectedFilterTableCount\"\n [showColumnChild]=\"showColumn\"\n [showSortChild]=\"showSort\"\n [showFilterChild]=\"showFilter\"\n [isTableView]=\"false\"\n [selectedFilterTableCount]=\"0\"\n [cardIcon]=\"'list-view'\"\n [tableIcon]=\"'table-view'\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"filteredColumns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"logo\">\n <ng-template #cell let-value>\n <img class=\"logo-width\" [src]=\"value\"/>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex space-x-8\" style=\"display: flex; gap: 24px\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#3479E9\"\n fill=\"white\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#E20000\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"Link\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"Link\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex\">\n <span class=\"font-bold text-sm\">{{ item.data.Name }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"flex items-center justify-between gap-2\">\n <div>\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black text-xs font-semibold\">{{ item.data.Description }}</span>\n </div>\n <img class=\"logo-width\" [alt]=\"ciItem.title\" [src]=\"item.data.Logo\"/>\n </div>\n }\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-sso-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-sso-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2 mt-1\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n (filtersApplied)=\"onFilterApplied($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [".flex{display:flex}.w-full{width:100%}.bg-secondary-200{background-color:#e8eaf1}.flex-col{flex-direction:column}.items-center{align-items:center}.bg-primary{background-color:#d4a007}.border-primary{border:1px solid #d4a007}.rounded-lg{border-radius:20px}.w-3{width:6px}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.bg-secondary-100{background-color:#8080800e}.bg-secondary{background-color:#e8eaf1}.p-2{padding:6px}.logo-width{width:70px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "exportCustomClass", "selectCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: SsoFormComponent, selector: "lib-sso-form", inputs: ["currentData"], outputs: ["switchView"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
|
|
2213
|
+
}
|
|
2214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoComponent, decorators: [{
|
|
2215
|
+
type: Component,
|
|
2216
|
+
args: [{ selector: 'lib-sso', template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedSortCount]=\"selectedSortCount\"\n [selectedColumnCount]=\"selectedColumnCount\"\n [selectedFilterTableCount]=\"selectedFilterTableCount\"\n [showColumnChild]=\"showColumn\"\n [showSortChild]=\"showSort\"\n [showFilterChild]=\"showFilter\"\n [isTableView]=\"false\"\n [selectedFilterTableCount]=\"0\"\n [cardIcon]=\"'list-view'\"\n [tableIcon]=\"'table-view'\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"filteredColumns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"logo\">\n <ng-template #cell let-value>\n <img class=\"logo-width\" [src]=\"value\"/>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex space-x-8\" style=\"display: flex; gap: 24px\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#3479E9\"\n fill=\"white\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#E20000\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"Link\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"Link\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex\">\n <span class=\"font-bold text-sm\">{{ item.data.Name }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"flex items-center justify-between gap-2\">\n <div>\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black text-xs font-semibold\">{{ item.data.Description }}</span>\n </div>\n <img class=\"logo-width\" [alt]=\"ciItem.title\" [src]=\"item.data.Logo\"/>\n </div>\n }\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-sso-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-sso-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2 mt-1\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n (filtersApplied)=\"onFilterApplied($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [".flex{display:flex}.w-full{width:100%}.bg-secondary-200{background-color:#e8eaf1}.flex-col{flex-direction:column}.items-center{align-items:center}.bg-primary{background-color:#d4a007}.border-primary{border:1px solid #d4a007}.rounded-lg{border-radius:20px}.w-3{width:6px}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.bg-secondary-100{background-color:#8080800e}.bg-secondary{background-color:#e8eaf1}.p-2{padding:6px}.logo-width{width:70px}\n"] }]
|
|
2217
|
+
}], propDecorators: { cardDataView: [{
|
|
2218
|
+
type: ViewChild,
|
|
2219
|
+
args: ['vdcv']
|
|
2220
|
+
}], dataView: [{
|
|
2221
|
+
type: ViewChild,
|
|
2222
|
+
args: ['vdv']
|
|
2223
|
+
}] } });
|
|
2224
|
+
|
|
2225
|
+
class SsoModule {
|
|
2226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2227
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, declarations: [SsoComponent, SsoFormComponent], imports: [CommonModule,
|
|
2228
|
+
FormsModule,
|
|
2229
|
+
ReactiveFormsModule,
|
|
2230
|
+
DataViewModule,
|
|
2231
|
+
TableFilterModule,
|
|
2232
|
+
SortTableModule,
|
|
2233
|
+
DataExportModule,
|
|
2234
|
+
VisibleColumnModule,
|
|
2235
|
+
VerbenaButtonModule,
|
|
2236
|
+
CardDataViewModule,
|
|
2237
|
+
VerbenaInputModule,
|
|
2238
|
+
SvgModule,
|
|
2239
|
+
VerbenaTextareaModule,
|
|
2240
|
+
DataTableModule], exports: [SsoComponent] });
|
|
2241
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, imports: [CommonModule,
|
|
2242
|
+
FormsModule,
|
|
2243
|
+
ReactiveFormsModule,
|
|
2244
|
+
DataViewModule,
|
|
2245
|
+
TableFilterModule,
|
|
2246
|
+
SortTableModule,
|
|
2247
|
+
DataExportModule,
|
|
2248
|
+
VisibleColumnModule,
|
|
2249
|
+
VerbenaButtonModule,
|
|
2250
|
+
CardDataViewModule,
|
|
2251
|
+
VerbenaInputModule,
|
|
2252
|
+
SvgModule,
|
|
2253
|
+
VerbenaTextareaModule,
|
|
2254
|
+
DataTableModule] });
|
|
2255
|
+
}
|
|
2256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SsoModule, decorators: [{
|
|
2257
|
+
type: NgModule,
|
|
2258
|
+
args: [{
|
|
2259
|
+
declarations: [SsoComponent, SsoFormComponent],
|
|
2260
|
+
imports: [
|
|
2261
|
+
CommonModule,
|
|
2262
|
+
FormsModule,
|
|
2263
|
+
ReactiveFormsModule,
|
|
2264
|
+
DataViewModule,
|
|
2265
|
+
TableFilterModule,
|
|
2266
|
+
SortTableModule,
|
|
2267
|
+
DataExportModule,
|
|
2268
|
+
VisibleColumnModule,
|
|
2269
|
+
VerbenaButtonModule,
|
|
2270
|
+
CardDataViewModule,
|
|
2271
|
+
VerbenaInputModule,
|
|
2272
|
+
SvgModule,
|
|
2273
|
+
VerbenaTextareaModule,
|
|
2274
|
+
DataTableModule,
|
|
2275
|
+
],
|
|
2276
|
+
exports: [SsoComponent],
|
|
2277
|
+
}]
|
|
2278
|
+
}] });
|
|
2279
|
+
|
|
2280
|
+
const columns$1 = [
|
|
2281
|
+
{
|
|
2282
|
+
id: 'createdAt',
|
|
2283
|
+
header: 'Created',
|
|
2284
|
+
accessorKey: 'CreatedAt',
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
id: 'user',
|
|
2288
|
+
header: 'Name',
|
|
2289
|
+
accessorFn: (row) => `${row.FirstName} ${row.LastName}`,
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
id: 'mail',
|
|
2293
|
+
header: 'E-Mail',
|
|
2294
|
+
accessorKey: 'MailAddress',
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
id: 'phone',
|
|
2298
|
+
header: 'Phone Number',
|
|
2299
|
+
accessorKey: 'PhoneNumber',
|
|
2300
|
+
},
|
|
2301
|
+
{ id: 'actions', header: 'Actions', accessorKey: 'MailAddress' },
|
|
2302
|
+
];
|
|
2303
|
+
|
|
2304
|
+
const baseStyle$1 = {
|
|
2305
|
+
width: '100%',
|
|
2306
|
+
fontFamily: '"Fraunces", serif',
|
|
2307
|
+
fontSize: '125%',
|
|
2308
|
+
whiteSpace: 'nowrap',
|
|
2309
|
+
margin: '0',
|
|
2310
|
+
border: '1px solid #D4A007',
|
|
2311
|
+
borderRadius: '16px',
|
|
2312
|
+
borderCollapse: 'separate',
|
|
2313
|
+
borderSpacing: '0',
|
|
2314
|
+
tableLayout: 'fixed',
|
|
2315
|
+
overflow: 'hidden',
|
|
2316
|
+
rows: {
|
|
2317
|
+
even: {
|
|
2318
|
+
backgroundColor: '#FDFDFD',
|
|
2319
|
+
},
|
|
2320
|
+
odd: {
|
|
2321
|
+
backgroundColor: '#F1F4FB',
|
|
2322
|
+
},
|
|
2323
|
+
height: '68px',
|
|
2324
|
+
},
|
|
2325
|
+
cells: {
|
|
2326
|
+
padding: '0.5rem 1rem',
|
|
2327
|
+
},
|
|
2328
|
+
header: {
|
|
2329
|
+
// stickyTop: true,
|
|
2330
|
+
// zIndex: 2,
|
|
2331
|
+
backgroundColor: '#EFF2FB',
|
|
2332
|
+
fontWeight: 'bold',
|
|
2333
|
+
textAlign: 'left',
|
|
2334
|
+
padding: '12px 16px',
|
|
2335
|
+
height: '40px',
|
|
2336
|
+
},
|
|
2337
|
+
footer: {
|
|
2338
|
+
// stickyBottom: true,
|
|
2339
|
+
// zIndex: 2,
|
|
2340
|
+
padding: '3px',
|
|
2341
|
+
},
|
|
2342
|
+
// body: {
|
|
2343
|
+
// background: '#fff',
|
|
2344
|
+
// padding: '4px 5px',
|
|
2345
|
+
// textAlign: 'center',
|
|
2346
|
+
// },
|
|
2347
|
+
// firstColumn: {
|
|
2348
|
+
// stickyLeft: true,
|
|
2349
|
+
// zIndex: 1,
|
|
2350
|
+
// },
|
|
2351
|
+
lastColumn: {
|
|
2352
|
+
// stickyRight: true,
|
|
2353
|
+
// zIndex: 1,
|
|
2354
|
+
},
|
|
2355
|
+
};
|
|
2356
|
+
|
|
2357
|
+
class UserAccessRequestService {
|
|
2358
|
+
httpService;
|
|
2359
|
+
BASE_URL = 'User';
|
|
2360
|
+
constructor(httpService) {
|
|
2361
|
+
this.httpService = httpService;
|
|
2362
|
+
}
|
|
2363
|
+
/**
|
|
2364
|
+
* Get user access requests with pagination and sorting
|
|
2365
|
+
* @param skip Number of records to skip
|
|
2366
|
+
* @param limit Number of records to take
|
|
2367
|
+
* @param sortParam Sort parameter
|
|
2368
|
+
* @param sortOrder Sort order ('asc' or 'desc')
|
|
2369
|
+
* @returns Promise containing the user access requests
|
|
2370
|
+
*/
|
|
2371
|
+
getUserAccessRequests(skip, limit, sortParam, sortOrder) {
|
|
2372
|
+
const url = `${this.BASE_URL}/GetUserAccessRequests/${skip}/${limit}/${sortParam}/${sortOrder}`;
|
|
2373
|
+
return this.httpService.get(url);
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* Get user access requests with additional parameter, pagination and sorting
|
|
2377
|
+
* @param param Search parameter
|
|
2378
|
+
* @param skip Number of records to skip
|
|
2379
|
+
* @param limit Number of records to take
|
|
2380
|
+
* @param sortParam Sort parameter
|
|
2381
|
+
* @param sortOrder Sort order ('asc' or 'desc')
|
|
2382
|
+
* @returns Promise containing the filtered user access requests
|
|
2383
|
+
*/
|
|
2384
|
+
getUserAccessRequestWithParam(param, skip, limit, sortParam, sortOrder) {
|
|
2385
|
+
const url = `${this.BASE_URL}/GetUserAccessRequestWithParam/${param}/${skip}/${limit}/${sortParam}/${sortOrder}`;
|
|
2386
|
+
return this.httpService.get(url);
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Save multiple user access requests
|
|
2390
|
+
* @param requests Array of user access requests to save
|
|
2391
|
+
* @returns Promise containing the save operation result
|
|
2392
|
+
*/
|
|
2393
|
+
saveUserAccessRequests(requests) {
|
|
2394
|
+
const url = `${this.BASE_URL}/SaveUserAccessRequests`;
|
|
2395
|
+
return this.httpService.post(url, requests);
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* Approve or reject multiple user access requests
|
|
2399
|
+
* @param requests Array of user access requests to save
|
|
2400
|
+
* @param isApproval True for approval, false for decline
|
|
2401
|
+
* @returns Promise containing the save operation result
|
|
2402
|
+
*/
|
|
2403
|
+
processUserAccessRequests(requests, isApproval) {
|
|
2404
|
+
const url = `${this.BASE_URL}/UserAccessRequestAction/${isApproval}`;
|
|
2405
|
+
return this.httpService.post(url, requests);
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* Delete multiple user access requests
|
|
2409
|
+
* @param requestIds Array of request IDs to delete
|
|
2410
|
+
* @returns Observable containing the delete operation result
|
|
2411
|
+
*/
|
|
2412
|
+
deleteUserAccessRequests(requestIds) {
|
|
2413
|
+
const url = `${this.BASE_URL}/DeleteUserAccessRequests`;
|
|
2414
|
+
return this.httpService.delete(`${url}?data=${requestIds.join(',')}`);
|
|
2415
|
+
}
|
|
2416
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestService, deps: [{ token: HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2417
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestService, providedIn: 'root' });
|
|
2418
|
+
}
|
|
2419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestService, decorators: [{
|
|
2420
|
+
type: Injectable,
|
|
2421
|
+
args: [{
|
|
2422
|
+
providedIn: 'root',
|
|
2423
|
+
}]
|
|
2424
|
+
}], ctorParameters: () => [{ type: HttpWebRequestService }] });
|
|
2425
|
+
|
|
2426
|
+
class UserAccessRequestState {
|
|
2427
|
+
updating$ = new BehaviorSubject(false);
|
|
2428
|
+
requests$ = new BehaviorSubject([]);
|
|
2429
|
+
queryParams$ = new BehaviorSubject({
|
|
2430
|
+
skip: 0,
|
|
2431
|
+
limit: 10,
|
|
2432
|
+
sortParam: 'CreatedAt',
|
|
2433
|
+
sortOrder: 'asc',
|
|
2434
|
+
});
|
|
2435
|
+
isUpdating$() {
|
|
2436
|
+
return this.updating$.asObservable();
|
|
2437
|
+
}
|
|
2438
|
+
setUpdating(isUpdating) {
|
|
2439
|
+
this.updating$.next(isUpdating);
|
|
2440
|
+
}
|
|
2441
|
+
getRequests$() {
|
|
2442
|
+
return this.requests$.asObservable();
|
|
2443
|
+
}
|
|
2444
|
+
setRequests(requests) {
|
|
2445
|
+
this.requests$.next(requests);
|
|
2446
|
+
}
|
|
2447
|
+
getQueryParams$() {
|
|
2448
|
+
return this.queryParams$.asObservable();
|
|
2449
|
+
}
|
|
2450
|
+
getQueryParamsValue() {
|
|
2451
|
+
return this.queryParams$.getValue();
|
|
2452
|
+
}
|
|
2453
|
+
updateQueryParams(params) {
|
|
2454
|
+
this.queryParams$.next({ ...this.queryParams$.getValue(), ...params });
|
|
2455
|
+
}
|
|
2456
|
+
addRequest(request) {
|
|
2457
|
+
const currentValue = this.requests$.getValue();
|
|
2458
|
+
this.requests$.next([...currentValue, request]);
|
|
2459
|
+
}
|
|
2460
|
+
updateRequest(updatedRequest) {
|
|
2461
|
+
const requests = this.requests$.getValue();
|
|
2462
|
+
const index = requests.findIndex((r) => r.Id === updatedRequest.Id);
|
|
2463
|
+
if (index !== -1) {
|
|
2464
|
+
requests[index] = updatedRequest;
|
|
2465
|
+
this.requests$.next([...requests]);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
removeRequest(requestId) {
|
|
2469
|
+
const currentValue = this.requests$.getValue();
|
|
2470
|
+
this.requests$.next(currentValue.filter((r) => r.Id !== requestId));
|
|
2471
|
+
}
|
|
2472
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2473
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestState, providedIn: 'root' });
|
|
2474
|
+
}
|
|
2475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestState, decorators: [{
|
|
2476
|
+
type: Injectable,
|
|
2477
|
+
args: [{
|
|
2478
|
+
providedIn: 'root',
|
|
2479
|
+
}]
|
|
2480
|
+
}] });
|
|
2481
|
+
|
|
2482
|
+
class UserAccessRequestFacade {
|
|
2483
|
+
userAccessRequestService;
|
|
2484
|
+
userAccessRequestState;
|
|
2485
|
+
constructor(userAccessRequestService, userAccessRequestState) {
|
|
2486
|
+
this.userAccessRequestService = userAccessRequestService;
|
|
2487
|
+
this.userAccessRequestState = userAccessRequestState;
|
|
2488
|
+
}
|
|
2489
|
+
isUpdating$() {
|
|
2490
|
+
return this.userAccessRequestState.isUpdating$();
|
|
2491
|
+
}
|
|
2492
|
+
getRequests$() {
|
|
2493
|
+
return this.userAccessRequestState.getRequests$();
|
|
2494
|
+
}
|
|
2495
|
+
getQueryParams$() {
|
|
2496
|
+
return this.userAccessRequestState.getQueryParams$();
|
|
2497
|
+
}
|
|
2498
|
+
async loadRequests() {
|
|
2499
|
+
try {
|
|
2500
|
+
this.userAccessRequestState.setUpdating(true);
|
|
2501
|
+
const params = this.userAccessRequestState.getQueryParamsValue();
|
|
2502
|
+
const requests = await this.userAccessRequestService.getUserAccessRequests(params.skip, params.limit, params.sortParam || 'createdDate', params.sortOrder);
|
|
2503
|
+
this.userAccessRequestState.setRequests(requests.Result);
|
|
2504
|
+
}
|
|
2505
|
+
catch (error) {
|
|
2506
|
+
console.error('Failed to load requests:', error);
|
|
2507
|
+
throw error;
|
|
2508
|
+
}
|
|
2509
|
+
finally {
|
|
2510
|
+
this.userAccessRequestState.setUpdating(false);
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
async loadRequestsWithParam(param) {
|
|
2514
|
+
try {
|
|
2515
|
+
this.userAccessRequestState.setUpdating(true);
|
|
2516
|
+
const params = this.userAccessRequestState.getQueryParamsValue();
|
|
2517
|
+
const requests = await this.userAccessRequestService.getUserAccessRequestWithParam(param, params.skip, params.limit, params.sortParam || 'createdDate', params.sortOrder);
|
|
2518
|
+
this.userAccessRequestState.setRequests(requests.Result);
|
|
2519
|
+
}
|
|
2520
|
+
catch (error) {
|
|
2521
|
+
console.error('Failed to load requests with param:', error);
|
|
2522
|
+
throw error;
|
|
2523
|
+
}
|
|
2524
|
+
finally {
|
|
2525
|
+
this.userAccessRequestState.setUpdating(false);
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
updateQueryParams(params) {
|
|
2529
|
+
this.userAccessRequestState.updateQueryParams(params);
|
|
2530
|
+
this.loadRequests();
|
|
2531
|
+
}
|
|
2532
|
+
async addRequest(request) {
|
|
2533
|
+
try {
|
|
2534
|
+
this.userAccessRequestState.setUpdating(true);
|
|
2535
|
+
const newRequest = { ...request };
|
|
2536
|
+
this.userAccessRequestState.addRequest(newRequest);
|
|
2537
|
+
await this.userAccessRequestService.saveUserAccessRequests([newRequest]);
|
|
2538
|
+
await this.loadRequests(); // Reload to get server-side changes
|
|
2539
|
+
}
|
|
2540
|
+
catch (error) {
|
|
2541
|
+
console.error('Failed to add request:', error);
|
|
2542
|
+
this.userAccessRequestState.removeRequest(request.Id);
|
|
2543
|
+
throw error;
|
|
2544
|
+
}
|
|
2545
|
+
finally {
|
|
2546
|
+
this.userAccessRequestState.setUpdating(false);
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
async updateRequest(request) {
|
|
2550
|
+
try {
|
|
2551
|
+
this.userAccessRequestState.setUpdating(true);
|
|
2552
|
+
await this.userAccessRequestService.saveUserAccessRequests([request]);
|
|
2553
|
+
this.userAccessRequestState.updateRequest(request);
|
|
2554
|
+
}
|
|
2555
|
+
catch (error) {
|
|
2556
|
+
console.error('Failed to update request:', error);
|
|
2557
|
+
throw error;
|
|
2558
|
+
}
|
|
2559
|
+
finally {
|
|
2560
|
+
this.userAccessRequestState.setUpdating(false);
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
async deleteRequest(requestId) {
|
|
2564
|
+
try {
|
|
2565
|
+
this.userAccessRequestState.setUpdating(true);
|
|
2566
|
+
await lastValueFrom(this.userAccessRequestService.deleteUserAccessRequests([requestId]));
|
|
2567
|
+
this.userAccessRequestState.removeRequest(requestId);
|
|
2568
|
+
}
|
|
2569
|
+
catch (error) {
|
|
2570
|
+
console.error('Failed to delete request:', error);
|
|
2571
|
+
throw error;
|
|
2572
|
+
}
|
|
2573
|
+
finally {
|
|
2574
|
+
this.userAccessRequestState.setUpdating(false);
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
async approveRequest(request) {
|
|
2578
|
+
try {
|
|
2579
|
+
this.userAccessRequestState.setUpdating(true);
|
|
2580
|
+
const response = await this.userAccessRequestService.processUserAccessRequests([request], true);
|
|
2581
|
+
// console.log(response);
|
|
2582
|
+
const data = response?.[0];
|
|
2583
|
+
if (data) {
|
|
2584
|
+
this.userAccessRequestState.updateRequest(data);
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
catch (error) {
|
|
2588
|
+
console.error('Failed to update request:', error);
|
|
2589
|
+
throw error;
|
|
2590
|
+
}
|
|
2591
|
+
finally {
|
|
2592
|
+
this.userAccessRequestState.setUpdating(false);
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestFacade, deps: [{ token: UserAccessRequestService }, { token: UserAccessRequestState }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2596
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestFacade, providedIn: 'root' });
|
|
2597
|
+
}
|
|
2598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestFacade, decorators: [{
|
|
2599
|
+
type: Injectable,
|
|
2600
|
+
args: [{
|
|
2601
|
+
providedIn: 'root',
|
|
2602
|
+
}]
|
|
2603
|
+
}], ctorParameters: () => [{ type: UserAccessRequestService }, { type: UserAccessRequestState }] });
|
|
2604
|
+
|
|
2605
|
+
class UserRequestFormComponent {
|
|
2606
|
+
fb;
|
|
2607
|
+
set currentData(value) {
|
|
2608
|
+
if (value?.data) {
|
|
2609
|
+
this.form.patchValue({
|
|
2610
|
+
MailAddress: value.data.MailAddress || '',
|
|
2611
|
+
FirstName: value.data.FirstName || '',
|
|
2612
|
+
LastName: value.data.LastName || '',
|
|
2613
|
+
OtherName: value.data.OtherName || '',
|
|
2614
|
+
PhoneNumber: value.data.PhoneNumber || '',
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
else {
|
|
2618
|
+
this.form.reset();
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
switchView = new EventEmitter();
|
|
2622
|
+
onApproval = new EventEmitter();
|
|
2623
|
+
form;
|
|
2624
|
+
roles = [
|
|
2625
|
+
{ id: 'admin', name: 'Admin' },
|
|
2626
|
+
{ id: 'manager', name: 'Manager' },
|
|
2627
|
+
{ id: 'staff', name: 'Staff' },
|
|
2628
|
+
];
|
|
2629
|
+
constructor(fb) {
|
|
2630
|
+
this.fb = fb;
|
|
2631
|
+
this.form = this.fb.group({
|
|
2632
|
+
MailAddress: ['', { readonly: true }],
|
|
2633
|
+
FirstName: ['', { readonly: true }],
|
|
2634
|
+
LastName: ['', { readonly: true }],
|
|
2635
|
+
OtherName: ['', { readonly: true }],
|
|
2636
|
+
PhoneNumber: ['', { readonly: true }],
|
|
2637
|
+
RoleId: [''],
|
|
2638
|
+
});
|
|
2639
|
+
}
|
|
2640
|
+
ngOnInit() { }
|
|
2641
|
+
onSave() {
|
|
2642
|
+
if (this.form.valid) {
|
|
2643
|
+
// Emit save event with form value
|
|
2644
|
+
console.log('Form saved:', this.form.value);
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
onDelete() {
|
|
2648
|
+
// Emit delete event
|
|
2649
|
+
console.log('Delete requested');
|
|
2650
|
+
}
|
|
2651
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2652
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserRequestFormComponent, selector: "lib-user-request-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView", onApproval: "onApproval" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n formControlName=\"MailAddress\"\n />\n <verbena-input\n label=\"First Name:\"\n name=\"FirstName\"\n type=\"text\"\n formControlName=\"FirstName\"\n />\n <verbena-input\n label=\"Last Name:\"\n name=\"LastName\"\n type=\"text\"\n formControlName=\"LastName\"\n />\n <verbena-input\n label=\"OtherName:\"\n name=\"OtherName\"\n type=\"text\"\n formControlName=\"OtherName\"\n />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2\">\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n (click)=\"onApproval.emit(form.get('MailAddress')?.value)\"\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
|
|
2653
|
+
}
|
|
2654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestFormComponent, decorators: [{
|
|
2655
|
+
type: Component,
|
|
2656
|
+
args: [{ selector: 'lib-user-request-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n formControlName=\"MailAddress\"\n />\n <verbena-input\n label=\"First Name:\"\n name=\"FirstName\"\n type=\"text\"\n formControlName=\"FirstName\"\n />\n <verbena-input\n label=\"Last Name:\"\n name=\"LastName\"\n type=\"text\"\n formControlName=\"LastName\"\n />\n <verbena-input\n label=\"OtherName:\"\n name=\"OtherName\"\n type=\"text\"\n formControlName=\"OtherName\"\n />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2\">\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n (click)=\"onApproval.emit(form.get('MailAddress')?.value)\"\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n" }]
|
|
2657
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
|
|
2658
|
+
type: Input
|
|
2659
|
+
}], switchView: [{
|
|
2660
|
+
type: Output
|
|
2661
|
+
}], onApproval: [{
|
|
2662
|
+
type: Output
|
|
2663
|
+
}] } });
|
|
2664
|
+
|
|
2665
|
+
var UserAccessRequestStatus;
|
|
2666
|
+
(function (UserAccessRequestStatus) {
|
|
2667
|
+
UserAccessRequestStatus["Pending"] = "Pending";
|
|
2668
|
+
UserAccessRequestStatus["Approved"] = "Approved";
|
|
2669
|
+
UserAccessRequestStatus["Declined"] = "Declined";
|
|
2670
|
+
})(UserAccessRequestStatus || (UserAccessRequestStatus = {}));
|
|
2671
|
+
|
|
2672
|
+
class UserAccessRequestStatusBadgeComponent {
|
|
2673
|
+
status = UserAccessRequestStatus.Pending;
|
|
2674
|
+
badgeConfig() {
|
|
2675
|
+
switch (this.status) {
|
|
2676
|
+
case UserAccessRequestStatus.Approved:
|
|
2677
|
+
return { bgColor: '#CAE1CC', textColor: '#4ABB54', label: 'Approved' };
|
|
2678
|
+
case UserAccessRequestStatus.Declined:
|
|
2679
|
+
return { bgColor: '#FFDFDF', textColor: '#EB5757', label: 'Rejected' };
|
|
2680
|
+
default:
|
|
2681
|
+
return { bgColor: '#827C7C', textColor: '#C3C3C3', label: 'Pending' };
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestStatusBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2685
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserAccessRequestStatusBadgeComponent, selector: "lib-user-access-request-status-badge", inputs: { status: "status" }, ngImport: i0, template: "<verbena-badge\n borderRadius=\"9px\"\n [bgColor]=\"badgeConfig().bgColor\"\n [textColor]=\"badgeConfig().textColor\"\n fontSize=\"12px\"\n [text]=\"badgeConfig().label\"\n></verbena-badge>\n", styles: [""], dependencies: [{ kind: "component", type: i2.VerbenaBadgeComponent, selector: "verbena-badge", inputs: ["text", "bgColor", "textColor", "borderRadius", "pd", "fontSize", "width", "height"] }] });
|
|
2686
|
+
}
|
|
2687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserAccessRequestStatusBadgeComponent, decorators: [{
|
|
2688
|
+
type: Component,
|
|
2689
|
+
args: [{ selector: 'lib-user-access-request-status-badge', template: "<verbena-badge\n borderRadius=\"9px\"\n [bgColor]=\"badgeConfig().bgColor\"\n [textColor]=\"badgeConfig().textColor\"\n fontSize=\"12px\"\n [text]=\"badgeConfig().label\"\n></verbena-badge>\n" }]
|
|
2690
|
+
}], propDecorators: { status: [{
|
|
2691
|
+
type: Input
|
|
2692
|
+
}] } });
|
|
2693
|
+
|
|
2694
|
+
class UserRequestApprovalComponent {
|
|
2695
|
+
cdr;
|
|
2696
|
+
userAccessRequestFacade;
|
|
2697
|
+
cardDataView;
|
|
2698
|
+
dataView;
|
|
2699
|
+
columns = columns$1;
|
|
2700
|
+
// visibleColumnDef: WritableSignal<ColumnDefinition<UserAccessRequest>[]> =
|
|
2701
|
+
// signal(columns);
|
|
2702
|
+
visibleColumnDef = this.columns;
|
|
2703
|
+
data = signal([]);
|
|
2704
|
+
styles = baseStyle$1;
|
|
2705
|
+
currentData = null;
|
|
2706
|
+
isGridView = true;
|
|
2707
|
+
selected = null;
|
|
2708
|
+
cardData = computed(() => this.data()?.map(({ FirstName, LastName, MailAddress, PhoneNumber, RoleID, RequestStatus, }) => ({
|
|
2709
|
+
selected: false,
|
|
2710
|
+
title: `${FirstName} ${LastName}`,
|
|
2711
|
+
data: {
|
|
2712
|
+
FirstName,
|
|
2713
|
+
LastName,
|
|
2714
|
+
MailAddress,
|
|
2715
|
+
PhoneNumber,
|
|
2716
|
+
RoleID,
|
|
2717
|
+
RequestStatus,
|
|
2718
|
+
},
|
|
2719
|
+
body: [
|
|
2720
|
+
{ title: 'Name', value: `${FirstName} ${LastName}` },
|
|
2721
|
+
{ title: 'E-Mail Address', value: MailAddress },
|
|
2722
|
+
{ title: 'Phone Number', value: PhoneNumber ?? '' },
|
|
2723
|
+
],
|
|
2724
|
+
children: [],
|
|
2725
|
+
})));
|
|
2726
|
+
constructor(cdr,
|
|
2727
|
+
// private service: UserRequestApprovalService,
|
|
2728
|
+
userAccessRequestFacade) {
|
|
2729
|
+
this.cdr = cdr;
|
|
2730
|
+
this.userAccessRequestFacade = userAccessRequestFacade;
|
|
2731
|
+
}
|
|
2732
|
+
async ngOnInit() {
|
|
2733
|
+
// this.data = this.service.getMockUserRequests();
|
|
2734
|
+
this.userAccessRequestFacade.getRequests$().subscribe((data) => {
|
|
2735
|
+
this.data.set(data);
|
|
2736
|
+
});
|
|
2737
|
+
try {
|
|
2738
|
+
await this.userAccessRequestFacade.loadRequests();
|
|
2739
|
+
}
|
|
2740
|
+
catch (error) {
|
|
2741
|
+
// Handle error
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
// To search with parameter:
|
|
2745
|
+
async searchRequests(param) {
|
|
2746
|
+
try {
|
|
2747
|
+
await this.userAccessRequestFacade.loadRequestsWithParam(param);
|
|
2748
|
+
}
|
|
2749
|
+
catch (error) {
|
|
2750
|
+
// Handle error
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
async onApprove(mailAddress) {
|
|
2754
|
+
const data = this.data().find(({ MailAddress }) => MailAddress === mailAddress);
|
|
2755
|
+
if (data) {
|
|
2756
|
+
await this.userAccessRequestFacade.approveRequest(data);
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
openDetailView(mailAddress) {
|
|
2760
|
+
const cardItem = this.getCardDataByMailAddress(mailAddress);
|
|
2761
|
+
if (cardItem && this.cardDataView) {
|
|
2762
|
+
this.dataView.toggleView();
|
|
2763
|
+
// First reset all selections
|
|
2764
|
+
this.cardData().forEach((item) => {
|
|
2765
|
+
item.selected = false;
|
|
2766
|
+
if (item.children) {
|
|
2767
|
+
item.children.forEach((child) => (child.selected = false));
|
|
2768
|
+
}
|
|
2769
|
+
});
|
|
2770
|
+
// Set the selected item
|
|
2771
|
+
cardItem.selected = true;
|
|
2772
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
2773
|
+
// Force change detection if needed
|
|
2774
|
+
// this.changeDetectorRef.detectChanges();
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
getCardDataByMailAddress(mailAddress) {
|
|
2778
|
+
return this.cardData().find(({ data }) => data.MailAddress === mailAddress);
|
|
2779
|
+
}
|
|
2780
|
+
onViewChange(isGridView) {
|
|
2781
|
+
this.isGridView = isGridView;
|
|
2782
|
+
// Reset selection when switching views
|
|
2783
|
+
if (this.currentData) {
|
|
2784
|
+
this.cardDataView?.clearData();
|
|
2785
|
+
this.currentData = null;
|
|
2786
|
+
}
|
|
2787
|
+
console.log('SELECTED', this.selected);
|
|
2788
|
+
if (this.selected) {
|
|
2789
|
+
this.cardDataView.onItemClick(this.selected);
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
openFormView(index) {
|
|
2793
|
+
const item = this.cardData()[index];
|
|
2794
|
+
console.log('ITEM = ', item);
|
|
2795
|
+
}
|
|
2796
|
+
handleExport(exportedData) {
|
|
2797
|
+
console.log('Exported data:', exportedData);
|
|
2798
|
+
this.downloadCSV(exportedData);
|
|
2799
|
+
}
|
|
2800
|
+
/**
|
|
2801
|
+
*
|
|
2802
|
+
* @param data Simple csv export for testing
|
|
2803
|
+
*/
|
|
2804
|
+
downloadCSV(data) {
|
|
2805
|
+
const headers = Object.keys(data[0]);
|
|
2806
|
+
const csvContent = [
|
|
2807
|
+
headers.join(','),
|
|
2808
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
2809
|
+
].join('\n');
|
|
2810
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
2811
|
+
const link = document.createElement('a');
|
|
2812
|
+
if (link.download !== undefined) {
|
|
2813
|
+
const url = URL.createObjectURL(blob);
|
|
2814
|
+
link.setAttribute('href', url);
|
|
2815
|
+
link.setAttribute('download', 'export.csv');
|
|
2816
|
+
link.style.visibility = 'hidden';
|
|
2817
|
+
document.body.appendChild(link);
|
|
2818
|
+
link.click();
|
|
2819
|
+
document.body.removeChild(link);
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
onSelectionChange(selectedRows) {
|
|
2823
|
+
console.log('Selection changed:', selectedRows);
|
|
2824
|
+
// Handle the selection change
|
|
2825
|
+
}
|
|
2826
|
+
/**
|
|
2827
|
+
* Copied over from card view doc until I understand usage
|
|
2828
|
+
*/
|
|
2829
|
+
selectedColumnCount = 0;
|
|
2830
|
+
selectedFilterTableCount = 0;
|
|
2831
|
+
isOPen = true;
|
|
2832
|
+
selectedSortCount = 0;
|
|
2833
|
+
showColumn = false;
|
|
2834
|
+
showSort = false;
|
|
2835
|
+
selectedAll = false;
|
|
2836
|
+
visibleColumns = columns$1.map((col) => ({
|
|
2837
|
+
checked: true,
|
|
2838
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
2839
|
+
type: DataFilterType.Bool,
|
|
2840
|
+
}));
|
|
2841
|
+
filterArray = [
|
|
2842
|
+
{
|
|
2843
|
+
name: 'Name',
|
|
2844
|
+
type: DataFilterType.String,
|
|
2845
|
+
checked: false,
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
name: 'MailAddress',
|
|
2849
|
+
type: DataFilterType.String,
|
|
2850
|
+
checked: false,
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
name: 'PhoneNumber',
|
|
2854
|
+
type: DataFilterType.String,
|
|
2855
|
+
checked: false,
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
name: 'CreatedAt',
|
|
2859
|
+
type: DataFilterType.Date,
|
|
2860
|
+
checked: false,
|
|
2861
|
+
},
|
|
2862
|
+
];
|
|
2863
|
+
sortOptions = [
|
|
2864
|
+
{
|
|
2865
|
+
name: 'Name',
|
|
2866
|
+
type: DataFilterType.String,
|
|
2867
|
+
checked: false,
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
name: 'MailAddress',
|
|
2871
|
+
type: DataFilterType.String,
|
|
2872
|
+
checked: false,
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
name: 'PhoneNumber',
|
|
2876
|
+
type: DataFilterType.String,
|
|
2877
|
+
checked: false,
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
name: 'CreatedAt',
|
|
2881
|
+
type: DataFilterType.Date,
|
|
2882
|
+
checked: false,
|
|
2883
|
+
},
|
|
2884
|
+
];
|
|
2885
|
+
clearData() {
|
|
2886
|
+
this.currentData = {};
|
|
2887
|
+
}
|
|
2888
|
+
loadMore() {
|
|
2889
|
+
// this.cardData = this.cardData.concat(this.cardData);
|
|
2890
|
+
}
|
|
2891
|
+
onColumnChange(event) {
|
|
2892
|
+
this.showColumn = event;
|
|
2893
|
+
}
|
|
2894
|
+
onSortChange(event) {
|
|
2895
|
+
this.showSort = event;
|
|
2896
|
+
console.log(event);
|
|
2897
|
+
}
|
|
2898
|
+
onColumnsUpdated(updatedColumns) {
|
|
2899
|
+
console.log(updatedColumns);
|
|
2900
|
+
const updatedColumnDef = [];
|
|
2901
|
+
updatedColumns.forEach((col) => {
|
|
2902
|
+
const matchingCol = this.columns.find((column) => column.header === col.name || column.id === col.name);
|
|
2903
|
+
if (matchingCol) {
|
|
2904
|
+
updatedColumnDef.push(matchingCol);
|
|
2905
|
+
}
|
|
2906
|
+
});
|
|
2907
|
+
console.log(updatedColumnDef);
|
|
2908
|
+
this.visibleColumnDef = [...updatedColumnDef];
|
|
2909
|
+
this.cdr.markForCheck();
|
|
2910
|
+
this.onColumnChange(false);
|
|
2911
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
2912
|
+
}
|
|
2913
|
+
onSortUpdated(updatedSorts) {
|
|
2914
|
+
this.onSortChange(false);
|
|
2915
|
+
this.selectedSortCount = updatedSorts.length;
|
|
2916
|
+
console.log(updatedSorts);
|
|
2917
|
+
}
|
|
2918
|
+
onStateChange(event) {
|
|
2919
|
+
console.log(`State changed for ${event.key}:`, event.value);
|
|
2920
|
+
}
|
|
2921
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: UserAccessRequestFacade }], target: i0.ɵɵFactoryTarget.Component });
|
|
2922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserRequestApprovalComponent, selector: "lib-user-request-approval", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: false,\n isToggle: true,\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data()\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow>\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData()\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData()\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4 justify-between\">\n <div class=\"grid gap-y-2\">\n <span class=\"font-semibold text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-sm\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\"grid gap-y-2\">\n <p class=\"grid\">\n <label for=\"role\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"role\" class=\"text-sm\">Manager</span>\n </p>\n\n <lib-user-access-request-status-badge\n [status]=\"item.data.RequestStatus\"\n ></lib-user-access-request-status-badge>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n (onApproval)=\"onApprove($event)\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <!-- <span class=\"paginator-text\"\n >{{ data().length }} records loaded</span\n > -->\n <span></span>\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data()\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "exportCustomClass", "selectCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "component", type: UserRequestFormComponent, selector: "lib-user-request-form", inputs: ["currentData"], outputs: ["switchView", "onApproval"] }, { kind: "component", type: UserAccessRequestStatusBadgeComponent, selector: "lib-user-access-request-status-badge", inputs: ["status"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
|
|
2923
|
+
}
|
|
2924
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalComponent, decorators: [{
|
|
2925
|
+
type: Component,
|
|
2926
|
+
args: [{ selector: 'lib-user-request-approval', template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: false,\n isToggle: true,\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data()\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow>\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData()\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData()\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4 justify-between\">\n <div class=\"grid gap-y-2\">\n <span class=\"font-semibold text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-sm\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\"grid gap-y-2\">\n <p class=\"grid\">\n <label for=\"role\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"role\" class=\"text-sm\">Manager</span>\n </p>\n\n <lib-user-access-request-status-badge\n [status]=\"item.data.RequestStatus\"\n ></lib-user-access-request-status-badge>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n (onApproval)=\"onApprove($event)\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <!-- <span class=\"paginator-text\"\n >{{ data().length }} records loaded</span\n > -->\n <span></span>\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data()\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}\n"] }]
|
|
2927
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: UserAccessRequestFacade }], propDecorators: { cardDataView: [{
|
|
2928
|
+
type: ViewChild,
|
|
2929
|
+
args: ['vdcv']
|
|
2930
|
+
}], dataView: [{
|
|
2931
|
+
type: ViewChild,
|
|
2932
|
+
args: ['vdv']
|
|
2933
|
+
}] } });
|
|
2934
|
+
|
|
2935
|
+
const roles = [
|
|
2936
|
+
{ id: 'admin', name: 'Admin' },
|
|
2937
|
+
{ id: 'manager', name: 'Manager' },
|
|
2938
|
+
{ id: 'staff', name: 'Staff' },
|
|
2939
|
+
];
|
|
2940
|
+
const mockData$1 = new Array(10)
|
|
2941
|
+
.fill(1)
|
|
2942
|
+
.map((id, i) => ({
|
|
2943
|
+
FirstName: `First ${id + i}`,
|
|
2944
|
+
LastName: `Last ${id + i}`,
|
|
2945
|
+
OtherName: `Other ${id + i}`,
|
|
2946
|
+
Id: id + i,
|
|
2947
|
+
id: (id + i).toString(),
|
|
2948
|
+
MailAddress: `user${id + i}@mail.com`,
|
|
2949
|
+
PhoneNumber: `+23480000000${id + i}`,
|
|
2950
|
+
RequestStatus: randomEnum$1(UserAccessRequestStatus),
|
|
2951
|
+
RoleID: roles[Math.floor(Math.random() * roles.length)].id,
|
|
2952
|
+
Password: '1234567',
|
|
2953
|
+
ExpireOn: new Date(),
|
|
2954
|
+
IsSeeded: false,
|
|
2955
|
+
OTPExpireOn: new Date(),
|
|
2956
|
+
Tenants: [],
|
|
2957
|
+
CreatedAt: new Date(),
|
|
2958
|
+
UpdatedAt: new Date(),
|
|
2959
|
+
DataState: ObjectState.New,
|
|
2960
|
+
Tenant: `Tenant${id + i}`,
|
|
2961
|
+
}));
|
|
2962
|
+
function randomEnum$1(anEnum) {
|
|
2963
|
+
const enumValues = Object.values(anEnum);
|
|
2964
|
+
const randomIndex = Math.floor(Math.random() * enumValues.length);
|
|
2965
|
+
return enumValues[randomIndex];
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
const SERVICE_CONFIG = new InjectionToken('ServiceConfig');
|
|
2969
|
+
class UserRequestApprovalService {
|
|
2970
|
+
// protected readonly baseUrl: string;
|
|
2971
|
+
resourceEndpoint;
|
|
2972
|
+
roles = [
|
|
2973
|
+
{ id: 'admin', name: 'Admin' },
|
|
2974
|
+
{ id: 'manager', name: 'Manager' },
|
|
2975
|
+
{ id: 'staff', name: 'Staff' },
|
|
2976
|
+
];
|
|
2977
|
+
constructor() {
|
|
2978
|
+
// this.baseUrl = environment.serviceUrl;
|
|
2979
|
+
// this.resourceEndpoint = config.resourceEndpoint;
|
|
2980
|
+
this.resourceEndpoint = '';
|
|
2981
|
+
}
|
|
2982
|
+
getMockUserRequests() {
|
|
2983
|
+
return mockData$1;
|
|
2984
|
+
}
|
|
2985
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2986
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalService });
|
|
2987
|
+
}
|
|
2988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserRequestApprovalService, decorators: [{
|
|
2989
|
+
type: Injectable
|
|
2990
|
+
}], ctorParameters: () => [] });
|
|
2991
|
+
function randomEnum(anEnum) {
|
|
2992
|
+
const enumValues = Object.values(anEnum);
|
|
2993
|
+
const randomIndex = Math.floor(Math.random() * enumValues.length);
|
|
2994
|
+
return enumValues[randomIndex];
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
class LibUserRequestApprovalModule {
|
|
2998
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2999
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, declarations: [UserRequestApprovalComponent,
|
|
3000
|
+
UserRequestFormComponent,
|
|
3001
|
+
UserAccessRequestStatusBadgeComponent], imports: [CommonModule,
|
|
3002
|
+
DataTableModule,
|
|
3003
|
+
CardModule,
|
|
3004
|
+
SvgModule,
|
|
3005
|
+
DataViewModule,
|
|
3006
|
+
CardDataViewModule,
|
|
3007
|
+
SortTableModule,
|
|
3008
|
+
VisibleColumnModule,
|
|
3009
|
+
TableFilterModule,
|
|
3010
|
+
DataExportModule,
|
|
3011
|
+
FormsModule,
|
|
3012
|
+
ReactiveFormsModule,
|
|
3013
|
+
VerbenaInputModule,
|
|
3014
|
+
VerbenaButtonModule,
|
|
3015
|
+
VerbenaBadgeModule,
|
|
3016
|
+
DropDownModule], exports: [UserRequestApprovalComponent] });
|
|
3017
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, providers: [UserRequestApprovalService], imports: [CommonModule,
|
|
3018
|
+
DataTableModule,
|
|
3019
|
+
CardModule,
|
|
3020
|
+
SvgModule,
|
|
3021
|
+
DataViewModule,
|
|
3022
|
+
CardDataViewModule,
|
|
3023
|
+
SortTableModule,
|
|
3024
|
+
VisibleColumnModule,
|
|
3025
|
+
TableFilterModule,
|
|
3026
|
+
DataExportModule,
|
|
3027
|
+
FormsModule,
|
|
3028
|
+
ReactiveFormsModule,
|
|
3029
|
+
VerbenaInputModule,
|
|
3030
|
+
VerbenaButtonModule,
|
|
3031
|
+
VerbenaBadgeModule,
|
|
3032
|
+
DropDownModule] });
|
|
3033
|
+
}
|
|
3034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserRequestApprovalModule, decorators: [{
|
|
3035
|
+
type: NgModule,
|
|
3036
|
+
args: [{
|
|
3037
|
+
declarations: [
|
|
3038
|
+
UserRequestApprovalComponent,
|
|
3039
|
+
UserRequestFormComponent,
|
|
3040
|
+
UserAccessRequestStatusBadgeComponent,
|
|
3041
|
+
],
|
|
3042
|
+
imports: [
|
|
3043
|
+
CommonModule,
|
|
3044
|
+
DataTableModule,
|
|
3045
|
+
CardModule,
|
|
3046
|
+
SvgModule,
|
|
3047
|
+
DataViewModule,
|
|
3048
|
+
CardDataViewModule,
|
|
3049
|
+
SortTableModule,
|
|
3050
|
+
VisibleColumnModule,
|
|
3051
|
+
TableFilterModule,
|
|
3052
|
+
DataExportModule,
|
|
3053
|
+
FormsModule,
|
|
3054
|
+
ReactiveFormsModule,
|
|
3055
|
+
VerbenaInputModule,
|
|
3056
|
+
VerbenaButtonModule,
|
|
3057
|
+
VerbenaBadgeModule,
|
|
3058
|
+
DropDownModule,
|
|
3059
|
+
],
|
|
3060
|
+
providers: [UserRequestApprovalService],
|
|
3061
|
+
exports: [UserRequestApprovalComponent],
|
|
3062
|
+
}]
|
|
3063
|
+
}] });
|
|
3064
|
+
|
|
3065
|
+
const columns = [
|
|
3066
|
+
{
|
|
3067
|
+
id: 'createdAt',
|
|
3068
|
+
header: 'CREATED',
|
|
3069
|
+
accessorKey: 'CreatedAt',
|
|
3070
|
+
},
|
|
3071
|
+
{
|
|
3072
|
+
id: 'user',
|
|
3073
|
+
header: 'NAME',
|
|
3074
|
+
accessorFn: (row) => `${row.FirstName} ${row.LastName}`,
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
id: 'mail',
|
|
3078
|
+
header: 'E-Mail',
|
|
3079
|
+
accessorKey: 'MailAddress',
|
|
3080
|
+
},
|
|
3081
|
+
{
|
|
3082
|
+
id: 'phone',
|
|
3083
|
+
header: 'PHONE NUMBER',
|
|
3084
|
+
accessorKey: 'PhoneNumber',
|
|
3085
|
+
},
|
|
3086
|
+
{
|
|
3087
|
+
id: 'address',
|
|
3088
|
+
header: 'ADDRESS',
|
|
3089
|
+
accessorKey: 'Address',
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
id: 'role',
|
|
3093
|
+
header: 'ROLE',
|
|
3094
|
+
accessorKey: 'Role',
|
|
3095
|
+
},
|
|
3096
|
+
{
|
|
3097
|
+
id: 'status',
|
|
3098
|
+
header: 'STATUS',
|
|
3099
|
+
accessorKey: 'Status',
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
id: 'actions',
|
|
3103
|
+
header: 'ACTIONS',
|
|
3104
|
+
accessorKey: 'MailAddress',
|
|
3105
|
+
},
|
|
3106
|
+
];
|
|
3107
|
+
|
|
3108
|
+
const mockData = new Array(10)
|
|
3109
|
+
.fill(1)
|
|
3110
|
+
.map((id, i) => ({
|
|
3111
|
+
FirstName: `First ${id + i}`,
|
|
3112
|
+
LastName: `Last ${id + i}`,
|
|
3113
|
+
OtherName: `Other ${id + i}`,
|
|
3114
|
+
Id: id + i,
|
|
3115
|
+
id: (id + i).toString(),
|
|
3116
|
+
MailAddress: `user${id + i}@mail.com`,
|
|
3117
|
+
PhoneNumber: `+23480000000${id + i}`,
|
|
3118
|
+
RequestStatus: UserAccessRequestStatus.Pending,
|
|
3119
|
+
Address: `AAA Block`,
|
|
3120
|
+
Password: '1234567',
|
|
3121
|
+
ExpireOn: new Date(),
|
|
3122
|
+
IsSeeded: false,
|
|
3123
|
+
OTPExpireOn: new Date(),
|
|
3124
|
+
Tenants: [],
|
|
3125
|
+
Role: ['Manager'],
|
|
3126
|
+
CreatedAt: new Date(),
|
|
3127
|
+
UpdatedAt: new Date(),
|
|
3128
|
+
DataState: ObjectState.New,
|
|
3129
|
+
Tenant: `Tenant${id + i}`,
|
|
3130
|
+
}));
|
|
3131
|
+
|
|
3132
|
+
const baseStyle = {
|
|
3133
|
+
width: "100%",
|
|
3134
|
+
fontFamily: '"Fraunces", serif',
|
|
3135
|
+
fontSize: '80%',
|
|
3136
|
+
whiteSpace: 'nowrap',
|
|
3137
|
+
margin: '0',
|
|
3138
|
+
border: '1px solid #D4A007',
|
|
3139
|
+
borderRadius: '16px',
|
|
3140
|
+
borderCollapse: 'separate',
|
|
3141
|
+
borderSpacing: '0',
|
|
3142
|
+
tableLayout: 'fixed',
|
|
3143
|
+
overflow: 'hidden',
|
|
3144
|
+
rows: {
|
|
3145
|
+
even: {
|
|
3146
|
+
backgroundColor: '#FDFDFD',
|
|
3147
|
+
},
|
|
3148
|
+
odd: {
|
|
3149
|
+
backgroundColor: '#F1F4FB',
|
|
3150
|
+
},
|
|
3151
|
+
height: '68px',
|
|
3152
|
+
},
|
|
3153
|
+
cells: {
|
|
3154
|
+
padding: '0.5rem 1rem',
|
|
3155
|
+
},
|
|
3156
|
+
header: {
|
|
3157
|
+
stickyTop: true,
|
|
3158
|
+
zIndex: 2,
|
|
3159
|
+
backgroundColor: '#EFF2FB',
|
|
3160
|
+
fontWeight: 'bold',
|
|
3161
|
+
textAlign: 'left',
|
|
3162
|
+
padding: '12px 16px',
|
|
3163
|
+
height: '40px',
|
|
3164
|
+
},
|
|
3165
|
+
footer: {
|
|
3166
|
+
stickyBottom: true,
|
|
3167
|
+
zIndex: 2,
|
|
3168
|
+
padding: '3px',
|
|
3169
|
+
},
|
|
3170
|
+
// body: {
|
|
3171
|
+
// background: '#fff',
|
|
3172
|
+
// padding: '4px 5px',
|
|
3173
|
+
// textAlign: 'center',
|
|
3174
|
+
// },
|
|
3175
|
+
firstColumn: {
|
|
3176
|
+
stickyLeft: true,
|
|
3177
|
+
zIndex: 1,
|
|
3178
|
+
},
|
|
3179
|
+
lastColumn: {
|
|
3180
|
+
stickyRight: true,
|
|
3181
|
+
zIndex: 1,
|
|
3182
|
+
},
|
|
3183
|
+
};
|
|
3184
|
+
|
|
3185
|
+
class UserManagementFormComponent {
|
|
3186
|
+
fb;
|
|
3187
|
+
set currentData(value) {
|
|
3188
|
+
if (value?.data) {
|
|
3189
|
+
this.form.patchValue({
|
|
3190
|
+
MailAddress: value.data.MailAddress || '',
|
|
3191
|
+
Name: value.data.Name || '',
|
|
3192
|
+
PhoneNumber: value.data.PhoneNumber || '',
|
|
3193
|
+
});
|
|
3194
|
+
}
|
|
3195
|
+
else {
|
|
3196
|
+
this.form.reset();
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
switchView = new EventEmitter();
|
|
3200
|
+
form;
|
|
3201
|
+
roles = [
|
|
3202
|
+
{ id: 'admin', name: 'Admin' },
|
|
3203
|
+
{ id: 'manager', name: 'Manager' },
|
|
3204
|
+
{ id: 'staff', name: 'Staff' },
|
|
3205
|
+
];
|
|
3206
|
+
constructor(fb) {
|
|
3207
|
+
this.fb = fb;
|
|
3208
|
+
this.form = this.fb.group({
|
|
3209
|
+
MailAddress: ['', { readonly: true }],
|
|
3210
|
+
Name: ['', { readonly: true }],
|
|
3211
|
+
PhoneNumber: ['', { readonly: true }],
|
|
3212
|
+
RoleId: [''],
|
|
3213
|
+
});
|
|
3214
|
+
}
|
|
3215
|
+
ngOnInit() { }
|
|
3216
|
+
onSave() {
|
|
3217
|
+
if (this.form.valid) {
|
|
3218
|
+
// Emit save event with form value
|
|
3219
|
+
console.log('Form saved:', this.form.value);
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
onDelete() {
|
|
3223
|
+
// Emit delete event
|
|
3224
|
+
console.log('Delete requested');
|
|
3225
|
+
}
|
|
3226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
3227
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserManagementFormComponent, selector: "lib-user-request-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n [type]=\"'email'\"\n formControlName=\"MailAddress\"\n />\n <verbena-input label=\"Name:\" name=\"Name\" type=\"text\" formControlName=\"Name\" />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
|
|
3228
|
+
}
|
|
3229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementFormComponent, decorators: [{
|
|
3230
|
+
type: Component,
|
|
3231
|
+
args: [{ selector: 'lib-user-request-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n [type]=\"'email'\"\n formControlName=\"MailAddress\"\n />\n <verbena-input label=\"Name:\" name=\"Name\" type=\"text\" formControlName=\"Name\" />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n" }]
|
|
3232
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
|
|
3233
|
+
type: Input
|
|
3234
|
+
}], switchView: [{
|
|
3235
|
+
type: Output
|
|
3236
|
+
}] } });
|
|
3237
|
+
|
|
3238
|
+
class UserManagementComponent {
|
|
3239
|
+
cardDataView;
|
|
3240
|
+
dataView;
|
|
3241
|
+
columns = columns;
|
|
3242
|
+
data = mockData;
|
|
3243
|
+
styles = baseStyle;
|
|
3244
|
+
selectedParent;
|
|
3245
|
+
basicOption;
|
|
3246
|
+
selectedOption = [];
|
|
3247
|
+
selectedOptionTwo = [];
|
|
3248
|
+
selectedOptionThree;
|
|
3249
|
+
missingObject;
|
|
3250
|
+
generateNewUserAccessRequest() {
|
|
3251
|
+
const newId = this.data.length + 1; // Incremental ID based on current data length
|
|
3252
|
+
return {
|
|
3253
|
+
FirstName: `First ${newId}`,
|
|
3254
|
+
LastName: `Last ${newId}`,
|
|
3255
|
+
OtherName: `Other ${newId}`,
|
|
3256
|
+
Id: `${newId}`,
|
|
3257
|
+
id: newId,
|
|
3258
|
+
MailAddress: ` `,
|
|
3259
|
+
PhoneNumber: ``,
|
|
3260
|
+
RequestStatus: UserAccessRequestStatus.Pending,
|
|
3261
|
+
Address: ` `,
|
|
3262
|
+
Password: ' ',
|
|
3263
|
+
ExpireOn: new Date(),
|
|
3264
|
+
IsSeeded: false,
|
|
3265
|
+
OTPExpireOn: new Date(),
|
|
3266
|
+
Tenants: [`Tenant${newId}`],
|
|
3267
|
+
Role: ['User'],
|
|
3268
|
+
CreatedAt: new Date(),
|
|
3269
|
+
UpdatedAt: new Date(),
|
|
3270
|
+
DataState: ObjectState.New,
|
|
3271
|
+
Tenant: `Tenant${newId}`
|
|
3272
|
+
};
|
|
3273
|
+
}
|
|
3274
|
+
// Function to add a new user to mockData
|
|
3275
|
+
addNewUserToMockData() {
|
|
3276
|
+
const newUser = this.generateNewUserAccessRequest();
|
|
3277
|
+
this.data.push(newUser); // Adds the new user to the data array
|
|
3278
|
+
// Optionally, update cardData with the new user entry for card display
|
|
3279
|
+
const fullName = `${newUser.FirstName} ${newUser.LastName}`;
|
|
3280
|
+
const newCardData = {
|
|
3281
|
+
selected: false,
|
|
3282
|
+
title: fullName,
|
|
3283
|
+
data: {
|
|
3284
|
+
Name: fullName,
|
|
3285
|
+
MailAddress: newUser.MailAddress,
|
|
3286
|
+
PhoneNumber: newUser.PhoneNumber,
|
|
3287
|
+
RoleID: newUser.Role,
|
|
3288
|
+
Status: newUser.Status,
|
|
3289
|
+
},
|
|
3290
|
+
body: [
|
|
3291
|
+
{ title: 'Name', value: fullName },
|
|
3292
|
+
{ title: 'E-Mail Address', value: newUser.MailAddress },
|
|
3293
|
+
{ title: 'Phone Number', value: newUser.PhoneNumber ?? '' },
|
|
3294
|
+
],
|
|
3295
|
+
children: [],
|
|
3296
|
+
};
|
|
3297
|
+
this.cardData.push(newCardData); // Update cardData array with the new user
|
|
3298
|
+
return newUser;
|
|
3299
|
+
}
|
|
3300
|
+
// Grid view properties
|
|
3301
|
+
isGridView = true;
|
|
3302
|
+
currentData;
|
|
3303
|
+
selectedColumnCount = 0;
|
|
3304
|
+
selectedFilterTableCount = 0;
|
|
3305
|
+
isOPen = true;
|
|
3306
|
+
selectedSortCount = 0;
|
|
3307
|
+
showColumn = false;
|
|
3308
|
+
showSort = false;
|
|
3309
|
+
selectedAll = false;
|
|
3310
|
+
visibleColumns = columns.map((col) => ({
|
|
3311
|
+
checked: false,
|
|
3312
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
3313
|
+
type: DataFilterType.Bool,
|
|
3314
|
+
}));
|
|
3315
|
+
filterArray = [
|
|
3316
|
+
{ name: 'Name', type: DataFilterType.String, checked: false },
|
|
3317
|
+
{ name: 'MailAddress', type: DataFilterType.String, checked: false },
|
|
3318
|
+
{ name: 'PhoneNumber', type: DataFilterType.String, checked: false },
|
|
3319
|
+
{ name: 'CreatedAt', type: DataFilterType.Date, checked: false },
|
|
3320
|
+
];
|
|
3321
|
+
sortOptions = [
|
|
3322
|
+
{ name: 'Name', type: DataFilterType.String, checked: false },
|
|
3323
|
+
{ name: 'MailAddress', type: DataFilterType.String, checked: false },
|
|
3324
|
+
{ name: 'PhoneNumber', type: DataFilterType.String, checked: false },
|
|
3325
|
+
{ name: 'CreatedAt', type: DataFilterType.Date, checked: false },
|
|
3326
|
+
];
|
|
3327
|
+
testParents = [
|
|
3328
|
+
{ Id: '1', Name: 'Manager' },
|
|
3329
|
+
{ Id: '2', Name: 'Administrator' },
|
|
3330
|
+
{ Id: '3', Name: 'Jelom' },
|
|
3331
|
+
];
|
|
3332
|
+
cardData = mockData.map(({ FirstName, LastName, MailAddress, PhoneNumber, RoleID, Status }) => ({
|
|
3333
|
+
selected: false,
|
|
3334
|
+
title: `${FirstName} ${LastName}`,
|
|
3335
|
+
data: {
|
|
3336
|
+
FirstName,
|
|
3337
|
+
LastName,
|
|
3338
|
+
MailAddress,
|
|
3339
|
+
PhoneNumber,
|
|
3340
|
+
RoleID,
|
|
3341
|
+
Status,
|
|
3342
|
+
},
|
|
3343
|
+
body: [
|
|
3344
|
+
{ title: 'Name', value: `${FirstName} ${LastName}` },
|
|
3345
|
+
{ title: 'E-Mail Address', value: MailAddress },
|
|
3346
|
+
{ title: 'Phone Number', value: PhoneNumber ?? '' },
|
|
3347
|
+
],
|
|
3348
|
+
children: [],
|
|
3349
|
+
}));
|
|
3350
|
+
ngOnInit() {
|
|
3351
|
+
this.selectedParent = '1';
|
|
3352
|
+
this.selectedOption = ['Opt 1'];
|
|
3353
|
+
this.selectedOptionTwo = ['1'];
|
|
3354
|
+
this.selectedOptionThree = '1';
|
|
3355
|
+
}
|
|
3356
|
+
getParentLabel(context) {
|
|
3357
|
+
console.log({ MissingObj: this.missingObject });
|
|
3358
|
+
return this.missingObject.Name;
|
|
3359
|
+
}
|
|
3360
|
+
async loadMoreParents(event) {
|
|
3361
|
+
console.log({ ParentLoadEvent: JSON.parse(JSON.stringify(event)) });
|
|
3362
|
+
return await new Promise((resolve) => setTimeout(() => resolve([
|
|
3363
|
+
{ Id: '1', Name: 'Jimly' },
|
|
3364
|
+
{ Id: '2', Name: 'Jecil' },
|
|
3365
|
+
{ Id: '3', Name: 'Jelom' },
|
|
3366
|
+
{ Id: '4', Name: 'Jemima' },
|
|
3367
|
+
{ Id: '5', Name: 'Akintunde' },
|
|
3368
|
+
]), 3000));
|
|
3369
|
+
}
|
|
3370
|
+
onDropdownChange(event) {
|
|
3371
|
+
// console.log({
|
|
3372
|
+
// 'Test Parent Value': this.selectedParent,
|
|
3373
|
+
// ...
|
|
3374
|
+
// });
|
|
3375
|
+
}
|
|
3376
|
+
onSelectionChange(selectedRows) {
|
|
3377
|
+
console.log('Selection changed:', selectedRows);
|
|
3378
|
+
// Handle the selection change
|
|
3379
|
+
}
|
|
3380
|
+
handleExport(exportedData) {
|
|
3381
|
+
console.log('Exported data:', exportedData);
|
|
3382
|
+
this.downloadCSV(exportedData);
|
|
3383
|
+
}
|
|
3384
|
+
downloadCSV(data) {
|
|
3385
|
+
const headers = Object.keys(data[0]);
|
|
3386
|
+
const csvContent = [
|
|
3387
|
+
headers.join(','),
|
|
3388
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
3389
|
+
].join('\n');
|
|
3390
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
3391
|
+
const link = document.createElement('a');
|
|
3392
|
+
if (link.download !== undefined) {
|
|
3393
|
+
const url = URL.createObjectURL(blob);
|
|
3394
|
+
link.setAttribute('href', url);
|
|
3395
|
+
link.setAttribute('download', 'export.csv');
|
|
3396
|
+
link.style.visibility = 'hidden';
|
|
3397
|
+
document.body.appendChild(link);
|
|
3398
|
+
link.click();
|
|
3399
|
+
document.body.removeChild(link);
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
// applyFilters() {
|
|
3403
|
+
// this.filteredData = this.data.filter((item) => {
|
|
3404
|
+
// return this.filterArray.every((filter) => {
|
|
3405
|
+
// if (filter.checked) {
|
|
3406
|
+
// switch (filter.type) {
|
|
3407
|
+
// case DataFilterType.String:
|
|
3408
|
+
// return item[filter.name].toLowerCase().includes(filter.name.toLowerCase());
|
|
3409
|
+
// case DataFilterType.Date:
|
|
3410
|
+
// return new Date(item[filter.name]) >= new Date(filter.name);
|
|
3411
|
+
// default:
|
|
3412
|
+
// return true;
|
|
3413
|
+
// }
|
|
3414
|
+
// }
|
|
3415
|
+
// return true;
|
|
3416
|
+
// });
|
|
3417
|
+
// });
|
|
3418
|
+
// }
|
|
3419
|
+
getCardDataByMailAddress(mailAddress) {
|
|
3420
|
+
console.log('cardData array:', this.cardData);
|
|
3421
|
+
console.log(mailAddress);
|
|
3422
|
+
return this.cardData.find(({ data }) => data?.MailAddress === mailAddress);
|
|
3423
|
+
}
|
|
3424
|
+
openDetailView(mailAddress) {
|
|
3425
|
+
const cardItem = this.getCardDataByMailAddress(mailAddress);
|
|
3426
|
+
console.log(cardItem);
|
|
3427
|
+
if (cardItem && this.cardDataView) {
|
|
3428
|
+
this.dataView.toggleView();
|
|
3429
|
+
// First reset all selections
|
|
3430
|
+
this.cardData.forEach((item) => {
|
|
3431
|
+
item.selected = false;
|
|
3432
|
+
if (item.children) {
|
|
3433
|
+
item.children.forEach((child) => (child.selected = false));
|
|
3434
|
+
}
|
|
3435
|
+
});
|
|
3436
|
+
// Set the selected item
|
|
3437
|
+
cardItem.selected = true;
|
|
3438
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
3439
|
+
// Force change detection if needed
|
|
3440
|
+
// this.changeDetectorRef.detectChanges();
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
newItem() {
|
|
3444
|
+
const newData = this.addNewUserToMockData();
|
|
3445
|
+
const newCardData = {
|
|
3446
|
+
selected: true,
|
|
3447
|
+
title: `${newData.FirstName} ${newData.LastName}`,
|
|
3448
|
+
data: {
|
|
3449
|
+
...newData,
|
|
3450
|
+
},
|
|
3451
|
+
body: [
|
|
3452
|
+
{ title: 'Name', value: `${newData.FirstName} ${newData.LastName}` },
|
|
3453
|
+
{ title: 'E-Mail Address', value: newData.MailAddress },
|
|
3454
|
+
{ title: 'Phone Number', value: newData.PhoneNumber ?? '' },
|
|
3455
|
+
],
|
|
3456
|
+
children: [],
|
|
3457
|
+
};
|
|
3458
|
+
if (this.dataView.isTableView) {
|
|
3459
|
+
this.dataView.toggleView();
|
|
3460
|
+
}
|
|
3461
|
+
// First reset all selections
|
|
3462
|
+
this.cardData.forEach((item) => {
|
|
3463
|
+
item.selected = false;
|
|
3464
|
+
if (item.children) {
|
|
3465
|
+
item.children.forEach((child) => (child.selected = false));
|
|
3466
|
+
}
|
|
3467
|
+
});
|
|
3468
|
+
// this.cardData = [newCardData].concat(this.cardData);
|
|
3469
|
+
// this.cardDataView.onItemClick(newCardData)
|
|
3470
|
+
this.cardData = [newCardData, ...this.cardData];
|
|
3471
|
+
this.currentData = this.cardDataView.onItemClick(newCardData);
|
|
3472
|
+
}
|
|
3473
|
+
// toggleChildView(action: string) {
|
|
3474
|
+
// if (action === 'create') {
|
|
3475
|
+
// const newCard: CardData = {
|
|
3476
|
+
// selected: false,
|
|
3477
|
+
// title: 'New Card', // Default title, change as needed
|
|
3478
|
+
// data: { Name: '', MailAddress: '', PhoneNumber: '' },
|
|
3479
|
+
// body: [
|
|
3480
|
+
// { title: 'Name', value: '' },
|
|
3481
|
+
// { title: 'E-Mail Address', value: '' },
|
|
3482
|
+
// { title: 'Phone Number', value: '' }
|
|
3483
|
+
// ],
|
|
3484
|
+
// children: []
|
|
3485
|
+
// };
|
|
3486
|
+
// this.cardData.push(newCard);
|
|
3487
|
+
// }
|
|
3488
|
+
// }
|
|
3489
|
+
clearData() {
|
|
3490
|
+
this.currentData = {};
|
|
3491
|
+
}
|
|
3492
|
+
loadMore() {
|
|
3493
|
+
this.cardData = this.cardData.concat(this.cardData);
|
|
3494
|
+
}
|
|
3495
|
+
onColumnChange(event) {
|
|
3496
|
+
this.showColumn = event;
|
|
3497
|
+
}
|
|
3498
|
+
onSortChange(event) {
|
|
3499
|
+
this.showSort = event;
|
|
3500
|
+
console.log(event);
|
|
3501
|
+
}
|
|
3502
|
+
onColumnsUpdated(updatedColumns) {
|
|
3503
|
+
this.onColumnChange(false);
|
|
3504
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
3505
|
+
}
|
|
3506
|
+
onSortUpdated(updatedSorts) {
|
|
3507
|
+
this.onSortChange(false);
|
|
3508
|
+
this.selectedSortCount = updatedSorts.length;
|
|
3509
|
+
console.log(updatedSorts);
|
|
3510
|
+
}
|
|
3511
|
+
onViewChange(isGridView) {
|
|
3512
|
+
console.log('View changed to:', isGridView ? 'Grid View' : 'List View');
|
|
3513
|
+
}
|
|
3514
|
+
onStateChange(event) {
|
|
3515
|
+
console.log(`State changed for ${event.key}:`, event.value);
|
|
3516
|
+
if (event.key === 'create') {
|
|
3517
|
+
console.log('peace is a boy');
|
|
3518
|
+
this.newItem();
|
|
3519
|
+
// const newUser = this.newItem()
|
|
3520
|
+
// if ( newUser && this.cardDataView) {
|
|
3521
|
+
// this.dataView.toggleView();
|
|
3522
|
+
// // First reset all selections
|
|
3523
|
+
// this.cardData.forEach((item) => {
|
|
3524
|
+
// item.selected = false;
|
|
3525
|
+
// if (item.children) {
|
|
3526
|
+
// item.children.forEach((child) => (child.selected = false));
|
|
3527
|
+
// }
|
|
3528
|
+
// });
|
|
3529
|
+
// this.currentData = this.cardDataView.onItemClick(newUser);
|
|
3530
|
+
// // Force change detection if needed
|
|
3531
|
+
// // this.changeDetectorRef.detectChanges();
|
|
3532
|
+
// }
|
|
3533
|
+
}
|
|
3534
|
+
}
|
|
3535
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3536
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UserManagementComponent, selector: "lib-user-management", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-1 h-full\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"columns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow >\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"status\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n >\n <verbena-badge\n borderRadius=\"20px\"\n width=\"121px\"\n text=\"{{value}}\"\n bgColor=\"#D6F3E6\"\n textColor=\"#2DB76F\"\n pd=\"5px 15px\"\n fontSize=\"16px\"\n >\n\n\n </verbena-badge>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"role\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n let-updateValue=\"updateValue\"\n >\n <!-- <verben-drop-down [minChar]=\"3\" [required]=\"true\" placeholder=\"Select Parent\"\n [asyncLabel]=\"this.getParentLabel.bind(this)\" invalidMessage=\"No value was provided\"\n width=\"120px\"\n (onChange)=\"onDropdownChange($event)\" [(ngModel)]=\"selectedParent\" optionLabel=\"Name\" optionValue=\"Id\"\n [options]=\"testParents\"></verben-drop-down> -->\n\n <verben-drop-down\n placeholder=\"Select Value\"\n width=\"120px\"\n (ngModelChange)=\"onDropdownChange($event)\"\n [options]=\"testParents\"\n optionLabel=\"Name\"\n optionValue=\"Name\"\n [ngModel]=\"value\"\n ></verben-drop-down>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"0px\"\n class=\"gap-1\"\n >\n <verben-left-card-data-view class=\"m-0 gap-2\" >\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl scroll-no border-primary border-[1px] gap-1 h-full justify-pp m-0 overflow-y-auto overflow-hidden\"\n [cardDataList]=\"cardData\"\n\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer bg-secondary rounded-xl overflow-hidden w-full\"\n >\n <div\n class=\"w-2 rounded-xl rounded-tr-none rounded-br-none overflow-hidden\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-[6px] pr-[3px] \">\n <div class=\"flex items-center gap-4\">\n <div class=\"pl-[13px]\">\n <span class=\"font-semibold text-[16px] text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-[13px] font-medium truncate text-wrap\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\" \">\n <p class=\"grid\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\"\n >Manager</span\n >\n <span class=\" bg-[#CAE1CC] text-center text-[#4ABB54] text-[13px] mt-[8px] rounded-[9px]\">\n {{item.data.Status}}\n </span>\n </p>\n <!-- <lib-user-access-request-status-badge\n [status]=\"item.data.Status\"\n ></lib-user-access-request-status-badge> -->\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.master-only-contanier{margin-top:0!important}.scroll-no::-webkit-scrollbar{width:4px}.scroll-no::-webkit-scrollbar-thumb{background:gray}.justify-pp{justify-content:start!important;margin-top:0!important}.toolbar{margin:0!important}@media screen and (max-width: 1024px){.scroll-no{padding:5px}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "exportCustomClass", "selectCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.VerbenaBadgeComponent, selector: "verbena-badge", inputs: ["text", "bgColor", "textColor", "borderRadius", "pd", "fontSize", "width", "height"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: UserManagementFormComponent, selector: "lib-user-request-form", inputs: ["currentData"], outputs: ["switchView"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
|
|
3537
|
+
}
|
|
3538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UserManagementComponent, decorators: [{
|
|
3539
|
+
type: Component,
|
|
3540
|
+
args: [{ selector: 'lib-user-management', template: "<div class=\"space-y-1 h-full\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: true,\n isToggle:true\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div table-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"columns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow >\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"status\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n >\n <verbena-badge\n borderRadius=\"20px\"\n width=\"121px\"\n text=\"{{value}}\"\n bgColor=\"#D6F3E6\"\n textColor=\"#2DB76F\"\n pd=\"5px 15px\"\n fontSize=\"16px\"\n >\n\n\n </verbena-badge>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"role\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-deleteRow=\"deleteRow\"\n let-value=\"value\"\n let-updateValue=\"updateValue\"\n >\n <!-- <verben-drop-down [minChar]=\"3\" [required]=\"true\" placeholder=\"Select Parent\"\n [asyncLabel]=\"this.getParentLabel.bind(this)\" invalidMessage=\"No value was provided\"\n width=\"120px\"\n (onChange)=\"onDropdownChange($event)\" [(ngModel)]=\"selectedParent\" optionLabel=\"Name\" optionValue=\"Id\"\n [options]=\"testParents\"></verben-drop-down> -->\n\n <verben-drop-down\n placeholder=\"Select Value\"\n width=\"120px\"\n (ngModelChange)=\"onDropdownChange($event)\"\n [options]=\"testParents\"\n optionLabel=\"Name\"\n optionValue=\"Name\"\n [ngModel]=\"value\"\n ></verben-drop-down>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"0px\"\n class=\"gap-1\"\n >\n <verben-left-card-data-view class=\"m-0 gap-2\" >\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl scroll-no border-primary border-[1px] gap-1 h-full justify-pp m-0 overflow-y-auto overflow-hidden\"\n [cardDataList]=\"cardData\"\n\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer bg-secondary rounded-xl overflow-hidden w-full\"\n >\n <div\n class=\"w-2 rounded-xl rounded-tr-none rounded-br-none overflow-hidden\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-[6px] pr-[3px] \">\n <div class=\"flex items-center gap-4\">\n <div class=\"pl-[13px]\">\n <span class=\"font-semibold text-[16px] text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-[13px] font-medium truncate text-wrap\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\" \">\n <p class=\"grid\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\"\n >Manager</span\n >\n <span class=\" bg-[#CAE1CC] text-center text-[#4ABB54] text-[13px] mt-[8px] rounded-[9px]\">\n {{item.data.Status}}\n </span>\n </p>\n <!-- <lib-user-access-request-status-badge\n [status]=\"item.data.Status\"\n ></lib-user-access-request-status-badge> -->\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: ["*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-8{bottom:2rem}.left-0{left:0}.right-0{right:0}.float-right{float:right}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.w-2{width:.5rem}.w-3{width:.75rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-7>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.rounded-\\[9px\\]{border-radius:9px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-br-none{border-bottom-right-radius:0}.rounded-tr-none{border-top-right-radius:0}.border,.border-\\[1px\\]{border-width:1px}.border-primary{--tw-border-opacity: 1;border-color:rgb(212 160 7 / var(--tw-border-opacity, 1))}.border-secondary-200{border-color:#d7dbe6}.bg-\\[\\#CAE1CC\\]{--tw-bg-opacity: 1;background-color:rgb(202 225 204 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(212 160 7 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(232 234 241 / var(--tw-bg-opacity, 1))}.bg-secondary-100{--tw-bg-opacity: 1;background-color:rgb(245 246 249 / var(--tw-bg-opacity, 1))}.bg-secondary-200{background-color:#d7dbe6}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-\\[6px\\]{padding-top:6px;padding-bottom:6px}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-\\[13px\\]{padding-left:13px}.pr-1{padding-right:.25rem}.pr-\\[3px\\]{padding-right:3px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.text-\\[24px\\]{font-size:24px}.text-\\[2rem\\]{font-size:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-\\[29\\.05px\\]{line-height:29.05px}.leading-\\[33px\\]{line-height:33px}.leading-\\[48px\\]{line-height:48px}.text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}.text-\\[\\#404040\\]{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-\\[\\#4ABB54\\]{--tw-text-opacity: 1;color:rgb(74 187 84 / var(--tw-text-opacity, 1))}.text-\\[black\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-muted{color:#0009}.underline{text-decoration-line:underline}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.master-only-contanier{margin-top:0!important}.scroll-no::-webkit-scrollbar{width:4px}.scroll-no::-webkit-scrollbar-thumb{background:gray}.justify-pp{justify-content:start!important;margin-top:0!important}.toolbar{margin:0!important}@media screen and (max-width: 1024px){.scroll-no{padding:5px}}\n"] }]
|
|
3541
|
+
}], propDecorators: { cardDataView: [{
|
|
3542
|
+
type: ViewChild,
|
|
3543
|
+
args: ['vdcv']
|
|
3544
|
+
}], dataView: [{
|
|
3545
|
+
type: ViewChild,
|
|
3546
|
+
args: ['vdv']
|
|
3547
|
+
}] } });
|
|
3548
|
+
|
|
3549
|
+
class LibUserManagementModule {
|
|
3550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3551
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, declarations: [UserManagementComponent, UserManagementFormComponent], imports: [CommonModule,
|
|
3552
|
+
DataTableModule,
|
|
3553
|
+
CardModule,
|
|
3554
|
+
SvgModule,
|
|
3555
|
+
DataViewModule,
|
|
3556
|
+
CardDataViewModule,
|
|
3557
|
+
SortTableModule,
|
|
3558
|
+
VisibleColumnModule,
|
|
3559
|
+
TableFilterModule,
|
|
3560
|
+
DataExportModule,
|
|
3561
|
+
FormsModule,
|
|
3562
|
+
ReactiveFormsModule,
|
|
3563
|
+
VerbenaInputModule,
|
|
3564
|
+
VerbenaButtonModule,
|
|
3565
|
+
VerbenaBadgeModule,
|
|
3566
|
+
DropDownModule], exports: [UserManagementComponent] });
|
|
3567
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, imports: [CommonModule,
|
|
3568
|
+
DataTableModule,
|
|
3569
|
+
CardModule,
|
|
3570
|
+
SvgModule,
|
|
3571
|
+
DataViewModule,
|
|
3572
|
+
CardDataViewModule,
|
|
3573
|
+
SortTableModule,
|
|
3574
|
+
VisibleColumnModule,
|
|
3575
|
+
TableFilterModule,
|
|
3576
|
+
DataExportModule,
|
|
3577
|
+
FormsModule,
|
|
3578
|
+
ReactiveFormsModule,
|
|
3579
|
+
VerbenaInputModule,
|
|
3580
|
+
VerbenaButtonModule,
|
|
3581
|
+
VerbenaBadgeModule,
|
|
3582
|
+
DropDownModule] });
|
|
3583
|
+
}
|
|
3584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibUserManagementModule, decorators: [{
|
|
3585
|
+
type: NgModule,
|
|
3586
|
+
args: [{
|
|
3587
|
+
declarations: [UserManagementComponent, UserManagementFormComponent],
|
|
3588
|
+
imports: [
|
|
3589
|
+
CommonModule,
|
|
3590
|
+
DataTableModule,
|
|
3591
|
+
CardModule,
|
|
3592
|
+
SvgModule,
|
|
3593
|
+
DataViewModule,
|
|
3594
|
+
CardDataViewModule,
|
|
3595
|
+
SortTableModule,
|
|
3596
|
+
VisibleColumnModule,
|
|
3597
|
+
TableFilterModule,
|
|
3598
|
+
DataExportModule,
|
|
3599
|
+
FormsModule,
|
|
3600
|
+
ReactiveFormsModule,
|
|
3601
|
+
VerbenaInputModule,
|
|
3602
|
+
VerbenaButtonModule,
|
|
3603
|
+
VerbenaBadgeModule,
|
|
3604
|
+
DropDownModule
|
|
3605
|
+
],
|
|
3606
|
+
exports: [UserManagementComponent],
|
|
3607
|
+
}]
|
|
3608
|
+
}] });
|
|
3609
|
+
|
|
3610
|
+
/*
|
|
3611
|
+
* Public API Surface of verben-ng-ui
|
|
3612
|
+
*/
|
|
3613
|
+
// export * from './lib/verben-ng-ui.service';
|
|
3614
|
+
// export * from './lib/verben-ng-ui.component';
|
|
3615
|
+
// Exporting modules
|
|
3616
|
+
|
|
3617
|
+
/**
|
|
3618
|
+
* Generated bundle index. Do not edit.
|
|
3619
|
+
*/
|
|
3620
|
+
|
|
3621
|
+
export { ENVIRONMENT, EnvironmentService, ForgotPasswordComponent, ForgotPasswordModule, LibUserManagementModule, LibUserRequestApprovalModule, MailComponent, MailModule, MailValidationComponent, MailValidationModule, ResetPasswordComponent, ResetPasswordModule, SERVICE_CONFIG, SignInComponent, SignInModule, SignUpComponent, SignUpModule, SsoComponent, SsoModule, TwoFactorAuthOtpComponent, TwoFactorAuthOtpModule, TwoFactorAuthSetupComponent, TwoFactorAuthSetupModule, UserManagementComponent, UserRequestApprovalComponent, UserRequestApprovalService, UserRequestComponent, UserRequestModule };
|
|
3622
|
+
//# sourceMappingURL=verben-authentication-ui.mjs.map
|