verben-authentication-ui 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ng-package.json +8 -0
- package/package.json +8 -14
- package/src/lib/components/button/button.component.css +3 -0
- package/src/lib/components/button/button.component.html +13 -0
- package/src/lib/components/button/button.component.spec.ts +23 -0
- package/src/lib/components/button/button.component.ts +24 -0
- package/src/lib/components/button/button.module.ts +11 -0
- package/{lib/components/forgot-password/ForgotPasswordData.d.ts → src/lib/components/forgot-password/ForgotPasswordData.ts} +1 -1
- package/src/lib/components/forgot-password/forgot-password.component.css +29 -0
- package/src/lib/components/forgot-password/forgot-password.component.html +13 -0
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +23 -0
- package/src/lib/components/forgot-password/forgot-password.component.ts +86 -0
- package/src/lib/components/forgot-password/forgot-password.module.ts +18 -0
- package/src/lib/components/mail/mail.component.css +0 -0
- package/src/lib/components/mail/mail.component.html +11 -0
- package/src/lib/components/mail/mail.component.spec.ts +23 -0
- package/src/lib/components/mail/mail.component.ts +47 -0
- package/src/lib/components/mail/mail.module.ts +13 -0
- package/src/lib/components/mail-validation/mail-validation.component.css +59 -0
- package/src/lib/components/mail-validation/mail-validation.component.html +37 -0
- package/src/lib/components/mail-validation/mail-validation.component.spec.ts +23 -0
- package/src/lib/components/mail-validation/mail-validation.component.ts +66 -0
- package/src/lib/components/mail-validation/mail-validation.module.ts +18 -0
- package/src/lib/components/o-auth/o-auth.component.css +21 -0
- package/src/lib/components/o-auth/o-auth.component.html +60 -0
- package/src/lib/components/o-auth/o-auth.component.spec.ts +23 -0
- package/src/lib/components/o-auth/o-auth.component.ts +43 -0
- package/src/lib/components/o-auth/o-auth.module.ts +11 -0
- package/src/lib/components/otp-input/otp-input.component.css +19 -0
- package/src/lib/components/otp-input/otp-input.component.html +14 -0
- package/src/lib/components/otp-input/otp-input.component.spec.ts +23 -0
- package/src/lib/components/otp-input/otp-input.component.ts +73 -0
- package/src/lib/components/otp-input/otp-input.module.ts +15 -0
- package/src/lib/components/reset-password/ResetPasswordData.ts +5 -0
- package/src/lib/components/reset-password/reset-password.component.css +29 -0
- package/src/lib/components/reset-password/reset-password.component.html +22 -0
- package/src/lib/components/reset-password/reset-password.component.spec.ts +23 -0
- package/src/lib/components/reset-password/reset-password.component.ts +108 -0
- package/src/lib/components/reset-password/reset-password.module.ts +18 -0
- package/src/lib/components/sign-in/sign-in.component.css +21 -0
- package/src/lib/components/sign-in/sign-in.component.html +84 -0
- package/src/lib/components/sign-in/sign-in.component.spec.ts +23 -0
- package/src/lib/components/sign-in/sign-in.component.ts +184 -0
- package/src/lib/components/sign-in/sign-in.module.ts +17 -0
- package/src/lib/components/sign-up/sign-up.component.css +36 -0
- package/src/lib/components/sign-up/sign-up.component.html +132 -0
- package/src/lib/components/sign-up/sign-up.component.spec.ts +23 -0
- package/src/lib/components/sign-up/sign-up.component.ts +176 -0
- package/src/lib/components/sign-up/sign-up.module.ts +15 -0
- package/src/lib/components/sso/base-table-style.ts +52 -0
- package/src/lib/components/sso/helper.ts +15 -0
- package/src/lib/components/sso/sso-form/sso-form.component.css +13 -0
- package/src/lib/components/sso/sso-form/sso-form.component.html +109 -0
- package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +23 -0
- package/src/lib/components/sso/sso-form/sso-form.component.ts +70 -0
- package/src/lib/components/sso/sso.columns.ts +32 -0
- package/src/lib/components/sso/sso.component.css +47 -0
- package/src/lib/components/sso/sso.component.html +208 -0
- package/src/lib/components/sso/sso.component.spec.ts +23 -0
- package/src/lib/components/sso/sso.component.ts +261 -0
- package/src/lib/components/sso/sso.module.ts +40 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +8 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +30 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +23 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +183 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +15 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +17 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +45 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +23 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +57 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +11 -0
- package/src/lib/components/user-management/base-table-style.ts +52 -0
- package/src/lib/components/user-management/helper.ts +29 -0
- package/src/lib/components/user-management/index.ts +4 -0
- package/src/lib/components/user-management/useer-management.module.ts +48 -0
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +61 -0
- 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 +91 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +23 -0
- package/src/lib/components/user-management/user-management.columns.ts +45 -0
- package/src/lib/components/user-management/user-management.component.css +26 -0
- package/src/lib/components/user-management/user-management.component.html +275 -0
- package/src/lib/components/user-management/user-management.component.spec.ts +23 -0
- package/src/lib/components/user-management/user-management.component.ts +380 -0
- package/src/lib/components/user-management/user-management.service.ts +42 -0
- package/src/lib/components/user-request/user-request.component.css +91 -0
- package/src/lib/components/user-request/user-request.component.html +165 -0
- package/src/lib/components/user-request/user-request.component.spec.ts +23 -0
- package/src/lib/components/user-request/user-request.component.ts +167 -0
- package/src/lib/components/user-request/user-request.module.ts +18 -0
- package/src/lib/components/user-request-approval/access-request.columns.ts +26 -0
- package/src/lib/components/user-request-approval/base-table-style.ts +52 -0
- package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +152 -0
- package/src/lib/components/user-request-approval/helper.ts +39 -0
- package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +16 -0
- package/src/lib/components/user-request-approval/services/user-access-request.service.ts +87 -0
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +65 -0
- 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 +7 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +23 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +22 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.css +1 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.html +218 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +23 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.ts +301 -0
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +52 -0
- package/src/lib/components/user-request-approval/user-request-approval.service.spec.ts +16 -0
- package/src/lib/components/user-request-approval/user-request-approval.service.ts +58 -0
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +66 -0
- 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 +97 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +23 -0
- package/src/lib/models/ErrorResponse.ts +7 -0
- package/src/lib/models/PasswordRequestParam.ts +5 -0
- package/src/lib/models/ResponseKeyValue.ts +5 -0
- package/src/lib/models/UserRequest.ts +28 -0
- package/src/lib/models/auth-mechanism.ts +14 -0
- package/src/lib/models/base.ts +11 -0
- package/src/lib/models/log-in.ts +7 -0
- package/{lib/models/mainUser.d.ts → src/lib/models/mainUser.ts} +3 -2
- package/src/lib/models/object-state.ts +6 -0
- package/{lib/models/otpValue.d.ts → src/lib/models/otpValue.ts} +3 -1
- package/src/lib/models/paged.ts +9 -0
- package/src/lib/models/query-params.ts +7 -0
- package/src/lib/models/request-status.ts +4 -0
- package/src/lib/models/resend-otp-data.ts +8 -0
- package/src/lib/models/resource.ts +27 -0
- package/src/lib/models/sign-up.ts +11 -0
- package/src/lib/models/single-sign-on.ts +9 -0
- package/src/lib/models/status.ts +5 -0
- package/src/lib/models/user-access-request-status.ts +5 -0
- package/{lib/models/user-access-request.d.ts → src/lib/models/user-access-request.ts} +4 -3
- package/src/lib/models/user.ts +24 -0
- package/src/lib/services/environment.service.spec.ts +16 -0
- package/src/lib/services/environment.service.ts +23 -0
- package/src/lib/services/http-web-request.service.spec.ts +16 -0
- package/src/lib/services/http-web-request.service.ts +101 -0
- package/src/lib/services/util.service.spec.ts +16 -0
- package/src/lib/services/util.service.ts +28 -0
- package/{public-api.d.ts → src/public-api.ts} +21 -0
- package/src/styles.css +96 -0
- package/src/theme/tailwind-setup.css +3 -0
- package/src/theme/tailwind.css +980 -0
- package/tailwind.config.js +20 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +15 -0
- package/esm2022/lib/components/button/button.component.mjs +0 -46
- package/esm2022/lib/components/button/button.module.mjs +0 -20
- package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +0 -2
- package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +0 -86
- package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +0 -34
- package/esm2022/lib/components/mail/mail.component.mjs +0 -69
- package/esm2022/lib/components/mail/mail.module.mjs +0 -21
- package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +0 -108
- package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +0 -34
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +0 -25
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +0 -19
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +0 -75
- package/esm2022/lib/components/otp-input/otp-input.module.mjs +0 -23
- package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +0 -2
- package/esm2022/lib/components/reset-password/reset-password.component.mjs +0 -107
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +0 -34
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +0 -214
- package/esm2022/lib/components/sign-in/sign-in.module.mjs +0 -24
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +0 -223
- package/esm2022/lib/components/sign-up/sign-up.module.mjs +0 -24
- package/esm2022/lib/components/sso/base-table-style.mjs +0 -53
- package/esm2022/lib/components/sso/helper.mjs +0 -14
- package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +0 -74
- package/esm2022/lib/components/sso/sso.columns.mjs +0 -29
- package/esm2022/lib/components/sso/sso.component.mjs +0 -236
- package/esm2022/lib/components/sso/sso.module.mjs +0 -63
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +0 -201
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +0 -22
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +0 -90
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +0 -19
- package/esm2022/lib/components/user-management/base-table-style.mjs +0 -53
- package/esm2022/lib/components/user-management/helper.mjs +0 -26
- package/esm2022/lib/components/user-management/useer-management.module.mjs +0 -68
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +0 -57
- package/esm2022/lib/components/user-management/user-management.columns.mjs +0 -43
- package/esm2022/lib/components/user-management/user-management.component.mjs +0 -323
- package/esm2022/lib/components/user-request/user-request.component.mjs +0 -206
- package/esm2022/lib/components/user-request/user-request.module.mjs +0 -34
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +0 -24
- package/esm2022/lib/components/user-request-approval/base-table-style.mjs +0 -53
- package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +0 -128
- package/esm2022/lib/components/user-request-approval/helper.mjs +0 -35
- package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +0 -72
- package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +0 -59
- package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +0 -26
- package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +0 -251
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +0 -77
- package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +0 -32
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +0 -64
- package/esm2022/lib/models/ErrorResponse.mjs +0 -11
- package/esm2022/lib/models/PasswordRequestParam.mjs +0 -2
- package/esm2022/lib/models/ResponseKeyValue.mjs +0 -2
- package/esm2022/lib/models/UserRequest.mjs +0 -2
- package/esm2022/lib/models/base.mjs +0 -2
- package/esm2022/lib/models/log-in.mjs +0 -2
- package/esm2022/lib/models/mainUser.mjs +0 -2
- package/esm2022/lib/models/object-state.mjs +0 -8
- package/esm2022/lib/models/otpValue.mjs +0 -2
- package/esm2022/lib/models/paged.mjs +0 -2
- package/esm2022/lib/models/query-params.mjs +0 -2
- package/esm2022/lib/models/request-status.mjs +0 -5
- package/esm2022/lib/models/sign-up.mjs +0 -2
- package/esm2022/lib/models/single-sign-on.mjs +0 -2
- package/esm2022/lib/models/status.mjs +0 -6
- package/esm2022/lib/models/user-access-request-status.mjs +0 -7
- package/esm2022/lib/models/user-access-request.mjs +0 -2
- package/esm2022/lib/models/user.mjs +0 -2
- package/esm2022/lib/services/environment.service.mjs +0 -26
- package/esm2022/lib/services/http-web-request.service.mjs +0 -83
- package/esm2022/lib/services/util.service.mjs +0 -32
- package/esm2022/public-api.mjs +0 -43
- package/esm2022/verben-authentication-ui.mjs +0 -5
- package/fesm2022/verben-authentication-ui.mjs +0 -3545
- package/fesm2022/verben-authentication-ui.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/button/button.component.d.ts +0 -17
- package/lib/components/button/button.module.d.ts +0 -10
- package/lib/components/forgot-password/forgot-password.component.d.ts +0 -28
- package/lib/components/forgot-password/forgot-password.module.d.ts +0 -10
- package/lib/components/mail/mail.component.d.ts +0 -32
- package/lib/components/mail/mail.module.d.ts +0 -11
- package/lib/components/mail-validation/mail-validation.component.d.ts +0 -42
- package/lib/components/mail-validation/mail-validation.module.d.ts +0 -10
- package/lib/components/o-auth/o-auth.component.d.ts +0 -10
- package/lib/components/o-auth/o-auth.module.d.ts +0 -9
- package/lib/components/otp-input/otp-input.component.d.ts +0 -20
- package/lib/components/otp-input/otp-input.module.d.ts +0 -13
- package/lib/components/reset-password/ResetPasswordData.d.ts +0 -5
- package/lib/components/reset-password/reset-password.component.d.ts +0 -30
- package/lib/components/reset-password/reset-password.module.d.ts +0 -10
- package/lib/components/sign-in/sign-in.component.d.ts +0 -77
- package/lib/components/sign-in/sign-in.module.d.ts +0 -13
- package/lib/components/sign-up/sign-up.component.d.ts +0 -66
- package/lib/components/sign-up/sign-up.module.d.ts +0 -13
- package/lib/components/sso/base-table-style.d.ts +0 -1
- package/lib/components/sso/helper.d.ts +0 -2
- package/lib/components/sso/sso-form/sso-form.component.d.ts +0 -21
- package/lib/components/sso/sso.columns.d.ts +0 -3
- package/lib/components/sso/sso.component.d.ts +0 -54
- package/lib/components/sso/sso.module.d.ts +0 -11
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +0 -65
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +0 -12
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +0 -39
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +0 -9
- package/lib/components/user-management/base-table-style.d.ts +0 -1
- package/lib/components/user-management/helper.d.ts +0 -2
- package/lib/components/user-management/useer-management.module.d.ts +0 -11
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +0 -20
- package/lib/components/user-management/user-management.columns.d.ts +0 -3
- package/lib/components/user-management/user-management.component.d.ts +0 -60
- package/lib/components/user-request/user-request.component.d.ts +0 -60
- package/lib/components/user-request/user-request.module.d.ts +0 -10
- package/lib/components/user-request-approval/access-request.columns.d.ts +0 -3
- package/lib/components/user-request-approval/base-table-style.d.ts +0 -1
- package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +0 -23
- package/lib/components/user-request-approval/helper.d.ts +0 -6
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +0 -50
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +0 -21
- package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +0 -12
- package/lib/components/user-request-approval/user-request-approval.component.d.ts +0 -59
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +0 -12
- package/lib/components/user-request-approval/user-request-approval.service.d.ts +0 -18
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +0 -21
- package/lib/models/ErrorResponse.d.ts +0 -6
- package/lib/models/PasswordRequestParam.d.ts +0 -5
- package/lib/models/ResponseKeyValue.d.ts +0 -5
- package/lib/models/UserRequest.d.ts +0 -24
- package/lib/models/base.d.ts +0 -10
- package/lib/models/log-in.d.ts +0 -7
- package/lib/models/object-state.d.ts +0 -6
- package/lib/models/paged.d.ts +0 -9
- package/lib/models/query-params.d.ts +0 -7
- package/lib/models/request-status.d.ts +0 -3
- package/lib/models/sign-up.d.ts +0 -9
- package/lib/models/single-sign-on.d.ts +0 -7
- package/lib/models/status.d.ts +0 -4
- package/lib/models/user-access-request-status.d.ts +0 -5
- package/lib/models/user.d.ts +0 -23
- package/lib/services/environment.service.d.ts +0 -16
- package/lib/services/http-web-request.service.d.ts +0 -23
- package/lib/services/util.service.d.ts +0 -8
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<section class="oauthWrapper">
|
|
2
|
+
<div class="OrFlexWrapper">
|
|
3
|
+
<hr/>
|
|
4
|
+
<span>OR</span>
|
|
5
|
+
<hr/>
|
|
6
|
+
</div>
|
|
7
|
+
<span *ngIf="showMicrosoft">
|
|
8
|
+
<verbena-button
|
|
9
|
+
svg="microsoft-logo"
|
|
10
|
+
[svgHeight]="24"
|
|
11
|
+
[svgWidth]="24"
|
|
12
|
+
text="Continue with Microsoft"
|
|
13
|
+
bgColor="white"
|
|
14
|
+
textColor="black"
|
|
15
|
+
border="1px solid #333"
|
|
16
|
+
borderRadius="40px"
|
|
17
|
+
pd="10px 20px"
|
|
18
|
+
width="100%"
|
|
19
|
+
svgPosition="left"
|
|
20
|
+
buttonClass="font-normal text-[24px] leading-[29.05px] text-[#333] mt-2"
|
|
21
|
+
(click)="oAuthWithMicrosoft()"
|
|
22
|
+
></verbena-button>
|
|
23
|
+
</span>
|
|
24
|
+
|
|
25
|
+
<span *ngIf="showGoogle">
|
|
26
|
+
<verbena-button
|
|
27
|
+
svg="google-logo"
|
|
28
|
+
[svgHeight]="24"
|
|
29
|
+
[svgWidth]="24"
|
|
30
|
+
text="Continue with Google"
|
|
31
|
+
bgColor="white"
|
|
32
|
+
textColor="black"
|
|
33
|
+
border="1px solid #333"
|
|
34
|
+
borderRadius="40px"
|
|
35
|
+
pd="10px 20px"
|
|
36
|
+
width="100%"
|
|
37
|
+
svgPosition="left"
|
|
38
|
+
buttonClass="font-normal text-[24px] leading-[29.05px] text-[#333] mt-2"
|
|
39
|
+
(click)="oAuthWithGoogle()"
|
|
40
|
+
></verbena-button>
|
|
41
|
+
</span>
|
|
42
|
+
|
|
43
|
+
<span *ngIf="showApple">
|
|
44
|
+
<verbena-button
|
|
45
|
+
svg="apple-logo"
|
|
46
|
+
[svgHeight]="24"
|
|
47
|
+
[svgWidth]="24"
|
|
48
|
+
text="Continue with Apple"
|
|
49
|
+
bgColor="white"
|
|
50
|
+
textColor="black"
|
|
51
|
+
border="1px solid #333"
|
|
52
|
+
borderRadius="40px"
|
|
53
|
+
pd="10px 20px"
|
|
54
|
+
width="100%"
|
|
55
|
+
svgPosition="left"
|
|
56
|
+
buttonClass="font-normal text-[24px] leading-[29.05px] text-[#333] mt-2"
|
|
57
|
+
(click)="oAuthWithApple()"
|
|
58
|
+
></verbena-button>
|
|
59
|
+
</span>
|
|
60
|
+
</section>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { OAuthComponent } from './o-auth.component';
|
|
4
|
+
|
|
5
|
+
describe('OAuthComponent', () => {
|
|
6
|
+
let component: OAuthComponent;
|
|
7
|
+
let fixture: ComponentFixture<OAuthComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [OAuthComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(OAuthComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { AuthMechanism, MechanismType } from '../../models/auth-mechanism';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'verben-o-auth',
|
|
6
|
+
templateUrl: './o-auth.component.html',
|
|
7
|
+
styleUrl: './o-auth.component.css'
|
|
8
|
+
})
|
|
9
|
+
export class OAuthComponent implements OnInit {
|
|
10
|
+
showGoogle:boolean = false;
|
|
11
|
+
showMicrosoft:boolean = false;
|
|
12
|
+
showApple:boolean = false;
|
|
13
|
+
@Input() authMechanisms:AuthMechanism[] | null = null
|
|
14
|
+
@Output() microsoftClick = new EventEmitter<void>();
|
|
15
|
+
@Output() googleClick = new EventEmitter<void>();
|
|
16
|
+
@Output() appleClick = new EventEmitter<void>();
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
ngOnInit(): void {
|
|
20
|
+
if(this.authMechanisms !== null ){
|
|
21
|
+
this.showMicrosoft = this.authMechanisms.some(item =>
|
|
22
|
+
item.AuthMechanism.includes(MechanismType.MicrosoftAD)
|
|
23
|
+
);
|
|
24
|
+
this.showGoogle = this.authMechanisms.some(item =>
|
|
25
|
+
item.AuthMechanism.includes(MechanismType.Google)
|
|
26
|
+
);
|
|
27
|
+
this.showApple = this.authMechanisms.some(item =>
|
|
28
|
+
item.AuthMechanism.includes(MechanismType.Apple)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
oAuthWithMicrosoft(){
|
|
34
|
+
this.microsoftClick.emit();
|
|
35
|
+
}
|
|
36
|
+
oAuthWithGoogle(){
|
|
37
|
+
this.googleClick.emit();
|
|
38
|
+
}
|
|
39
|
+
oAuthWithApple(){
|
|
40
|
+
this.appleClick.emit();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { VerbenaButtonModule, VerbenaInputModule } from 'verben-ng-ui';
|
|
4
|
+
import { OAuthComponent } from './o-auth.component';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
declarations: [OAuthComponent],
|
|
8
|
+
imports: [CommonModule,VerbenaInputModule,VerbenaButtonModule],
|
|
9
|
+
exports: [OAuthComponent]
|
|
10
|
+
})
|
|
11
|
+
export class OAuthModule {}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.otp-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 15px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.otp-input {
|
|
7
|
+
width: 50px;
|
|
8
|
+
height: 46px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-size: 1.5rem;
|
|
11
|
+
border: 1px solid #66666658;
|
|
12
|
+
border-radius: 12px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.otp-input:focus {
|
|
17
|
+
border-color: #FFE681;
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<form [formGroup]="otpForm" >
|
|
2
|
+
<div formArrayName="otpArray" class="otp-container">
|
|
3
|
+
<input
|
|
4
|
+
*ngFor="let control of otpArray.controls; let i = index"
|
|
5
|
+
[id]="'otp-input-' + i"
|
|
6
|
+
class="otp-input {{otpClass}}"
|
|
7
|
+
maxlength="1"
|
|
8
|
+
(input)="handleInput($event, i)"
|
|
9
|
+
(keydown)="handleKeydown($event, i)"
|
|
10
|
+
[formControlName]="i"
|
|
11
|
+
type="text"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</form>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { OtpInputComponent } from './otp-input.component';
|
|
4
|
+
|
|
5
|
+
describe('OtpInputComponent', () => {
|
|
6
|
+
let component: OtpInputComponent;
|
|
7
|
+
let fixture: ComponentFixture<OtpInputComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [OtpInputComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(OtpInputComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output, OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormArray, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'verben-otp-input',
|
|
6
|
+
templateUrl: './otp-input.component.html',
|
|
7
|
+
styleUrl: './otp-input.component.css'
|
|
8
|
+
})
|
|
9
|
+
export class OtpInputComponent implements OnInit {
|
|
10
|
+
@Input() length: number = 6;
|
|
11
|
+
@Input() otpClass: string = '';
|
|
12
|
+
@Output() otpChange = new EventEmitter<string>();
|
|
13
|
+
|
|
14
|
+
otpForm!: FormGroup;
|
|
15
|
+
|
|
16
|
+
constructor(private fb: FormBuilder) {}
|
|
17
|
+
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
this.otpForm = this.fb.group({
|
|
20
|
+
otpArray: this.fb.array(Array(this.length).fill('').map(() => new FormControl('')))
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
this.otpArray.valueChanges.subscribe(() => {
|
|
24
|
+
this.emitOtp();
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
get otpArray(): FormArray {
|
|
29
|
+
return this.otpForm.get('otpArray') as FormArray;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
handleInput(event: any, index: number) {
|
|
33
|
+
const value = event.target.value;
|
|
34
|
+
|
|
35
|
+
// /\d/.test(value)
|
|
36
|
+
if (value.length > 0) {
|
|
37
|
+
this.otpArray.at(index).setValue(value);
|
|
38
|
+
|
|
39
|
+
if (index < this.length - 1) {
|
|
40
|
+
this.focusNextInput(index);
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
this.otpArray.at(index).setValue('');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
handleKeydown(event: KeyboardEvent, index: number) {
|
|
48
|
+
if (event.key === 'Backspace') {
|
|
49
|
+
const currentValue = this.otpArray.at(index).value;
|
|
50
|
+
|
|
51
|
+
if (currentValue) {
|
|
52
|
+
this.otpArray.at(index).setValue('');
|
|
53
|
+
} else if (index > 0) {
|
|
54
|
+
this.focusPreviousInput(index);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private focusNextInput(index: number) {
|
|
60
|
+
const nextInput = document.getElementById(`otp-input-${index + 1}`);
|
|
61
|
+
nextInput?.focus();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private focusPreviousInput(index: number) {
|
|
65
|
+
const prevInput = document.getElementById(`otp-input-${index - 1}`);
|
|
66
|
+
prevInput?.focus();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private emitOtp() {
|
|
70
|
+
const otp = this.otpArray.value.join('');
|
|
71
|
+
this.otpChange.emit(otp);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { RouterLink } from '@angular/router';
|
|
5
|
+
import { VerbenaInputModule } from 'verben-ng-ui';
|
|
6
|
+
import { OAuthModule } from '../o-auth/o-auth.module';
|
|
7
|
+
import { ButtonModule } from '../button/button.module';
|
|
8
|
+
import { OtpInputComponent } from './otp-input.component';
|
|
9
|
+
|
|
10
|
+
@NgModule({
|
|
11
|
+
declarations: [OtpInputComponent],
|
|
12
|
+
imports: [CommonModule, FormsModule,VerbenaInputModule, RouterLink,ButtonModule,OAuthModule,ReactiveFormsModule],
|
|
13
|
+
exports: [OtpInputComponent]
|
|
14
|
+
})
|
|
15
|
+
export class OtpInputModule {}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import '../../../styles.css';
|
|
2
|
+
|
|
3
|
+
.reset-password-container {
|
|
4
|
+
gap: 25px;
|
|
5
|
+
padding: 50px;
|
|
6
|
+
border: 1px solid rgba(102, 102, 102, 0.5);
|
|
7
|
+
box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
|
|
8
|
+
border-radius: 24px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.reset-password-title {
|
|
12
|
+
font-size: 30px;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.reset-password-subtitle {
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
color: rgba(102, 102, 102, 1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.form-field {
|
|
23
|
+
gap: 5px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.form-field-caption {
|
|
27
|
+
color: rgba(102, 102, 102, 1);
|
|
28
|
+
/* font-weight: 600; */
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div [formGroup]="this.resetPasswordForm" class="reset-password-container flex flex-col">
|
|
2
|
+
<div class="reset-password-header flex flex-col">
|
|
3
|
+
<div class="reset-password-title">{{title}}</div>
|
|
4
|
+
<div class="reset-password-subtitle">{{subTitle}}</div>
|
|
5
|
+
</div>
|
|
6
|
+
<div *ngIf="showOldPassword" class="form-field flex flex-col">
|
|
7
|
+
<div class="form-field-caption">Old Password</div>
|
|
8
|
+
<verbena-input bgColor="white" borderRadius="12px" formControlName="OldPassword" type="password"></verbena-input>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="form-field flex flex-col">
|
|
11
|
+
<div class="form-field-caption">New Password</div>
|
|
12
|
+
<verbena-input bgColor="white" borderRadius="12px" formControlName="Password" type="password"></verbena-input>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-field flex flex-col">
|
|
15
|
+
<div class="form-field-caption">Confirm Password</div>
|
|
16
|
+
<verbena-input bgColor="white" borderRadius="12px" formControlName="ConfirmPassword"
|
|
17
|
+
type="password"></verbena-input>
|
|
18
|
+
</div>
|
|
19
|
+
<verbena-button fontWeight="700" (click)="submit()" [text]="buttonCaption" width="100%" [textColor]="buttonTextColor"
|
|
20
|
+
[bgColor]="buttonBackgroundColor" borderRadius="25px" [disable]="!this.checkForm()"></verbena-button>
|
|
21
|
+
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ResetPasswordComponent } from './reset-password.component';
|
|
4
|
+
|
|
5
|
+
describe('ResetPasswordComponent', () => {
|
|
6
|
+
let component: ResetPasswordComponent;
|
|
7
|
+
let fixture: ComponentFixture<ResetPasswordComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ResetPasswordComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ResetPasswordComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
AbstractControl,
|
|
4
|
+
FormBuilder,
|
|
5
|
+
FormControl,
|
|
6
|
+
FormGroup,
|
|
7
|
+
ValidationErrors,
|
|
8
|
+
Validators,
|
|
9
|
+
} from '@angular/forms';
|
|
10
|
+
import { ResetPasswordData } from './ResetPasswordData';
|
|
11
|
+
import { HttpWebRequestService } from '../../services/http-web-request.service';
|
|
12
|
+
import { ErrorResponse } from '../../models/ErrorResponse';
|
|
13
|
+
import { ResponseKeyValue } from '../../models/ResponseKeyValue';
|
|
14
|
+
import { PasswordRequestParam } from '../../models/PasswordRequestParam';
|
|
15
|
+
import { UtilService } from '../../services/util.service';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'verben-reset-password',
|
|
19
|
+
templateUrl: './reset-password.component.html',
|
|
20
|
+
styleUrl: './reset-password.component.css',
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export class ResetPasswordComponent {
|
|
24
|
+
@Input() title: string = 'Reset Password';
|
|
25
|
+
@Input() subTitle: string = 'Create a New Password';
|
|
26
|
+
@Input() buttonCaption: string = 'Submit';
|
|
27
|
+
@Input() buttonTextColor?: string;
|
|
28
|
+
@Input() buttonBackgroundColor?: string;
|
|
29
|
+
@Input() showOldPassword: boolean = false;
|
|
30
|
+
@Input() token?: string;
|
|
31
|
+
|
|
32
|
+
@Output() onSubmit: EventEmitter<ResetPasswordData> = new EventEmitter();
|
|
33
|
+
@Output() onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse> =
|
|
34
|
+
new EventEmitter();
|
|
35
|
+
|
|
36
|
+
resetPasswordForm: FormGroup;
|
|
37
|
+
|
|
38
|
+
constructor(
|
|
39
|
+
private fb: FormBuilder,
|
|
40
|
+
private server: HttpWebRequestService,
|
|
41
|
+
private utilService: UtilService
|
|
42
|
+
) {
|
|
43
|
+
this.resetPasswordForm = this.fb.group({
|
|
44
|
+
OldPassword: new FormControl<string | null>(
|
|
45
|
+
null,
|
|
46
|
+
this.oldPasswordValidator.bind(this)
|
|
47
|
+
),
|
|
48
|
+
Password: new FormControl<string | null>(null, Validators.required),
|
|
49
|
+
ConfirmPassword: new FormControl<string | null>(null, [
|
|
50
|
+
Validators.required,
|
|
51
|
+
this.confirmPasswordValidator.bind(this),
|
|
52
|
+
]),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
checkForm(): boolean {
|
|
57
|
+
return this.resetPasswordForm.valid;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
oldPasswordValidator(control: AbstractControl): ValidationErrors | null {
|
|
61
|
+
if (this.showOldPassword && control.value == null) {
|
|
62
|
+
return { customValidation: true };
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
confirmPasswordValidator(control: AbstractControl): ValidationErrors | null {
|
|
67
|
+
if (
|
|
68
|
+
this.resetPasswordForm &&
|
|
69
|
+
this.resetPasswordForm.controls['Password'] &&
|
|
70
|
+
this.resetPasswordForm.controls['Password'].value !== control.value
|
|
71
|
+
) {
|
|
72
|
+
return { customValidation: true };
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async submit() {
|
|
78
|
+
if (!this.checkForm()) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
var data: ResetPasswordData = {
|
|
82
|
+
OldPassword: this.showOldPassword
|
|
83
|
+
? this.resetPasswordForm.controls['OldPassword'].value
|
|
84
|
+
: undefined,
|
|
85
|
+
Password: this.resetPasswordForm.controls['Password'].value,
|
|
86
|
+
ConfirmPassword: this.resetPasswordForm.controls['ConfirmPassword'].value,
|
|
87
|
+
};
|
|
88
|
+
this.onSubmit.emit(data);
|
|
89
|
+
var passwordRequest: PasswordRequestParam = {
|
|
90
|
+
NewPassword: data.Password,
|
|
91
|
+
OldPassword: data.OldPassword,
|
|
92
|
+
Token: this.token,
|
|
93
|
+
};
|
|
94
|
+
this.utilService.sendBI(true);
|
|
95
|
+
const res = await this.server.post(
|
|
96
|
+
`User/CompleteChangePasswordRequest`,
|
|
97
|
+
passwordRequest
|
|
98
|
+
);
|
|
99
|
+
this.utilService.sendBI(false);
|
|
100
|
+
if (res instanceof ErrorResponse) {
|
|
101
|
+
this.onSubmitEnd.emit(res);
|
|
102
|
+
} else {
|
|
103
|
+
var result = res as ResponseKeyValue;
|
|
104
|
+
this.onSubmitEnd.emit(result);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { ResetPasswordComponent } from './reset-password.component';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { VerbenaButtonModule, VerbenaInputModule } from 'verben-ng-ui';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
declarations: [ResetPasswordComponent],
|
|
9
|
+
imports: [
|
|
10
|
+
FormsModule,
|
|
11
|
+
ReactiveFormsModule,
|
|
12
|
+
VerbenaInputModule,
|
|
13
|
+
VerbenaButtonModule,
|
|
14
|
+
CommonModule,
|
|
15
|
+
],
|
|
16
|
+
exports: [ResetPasswordComponent],
|
|
17
|
+
})
|
|
18
|
+
export class ResetPasswordModule {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
a{
|
|
2
|
+
text-decoration: underline;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.flexWrapper{
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap:20px;
|
|
9
|
+
margin-top: 12px;
|
|
10
|
+
}
|
|
11
|
+
.formWrapper{
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap:20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pwdWrapper{
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<section
|
|
2
|
+
[ngStyle]="styles"
|
|
3
|
+
class="{{ customClass }}"
|
|
4
|
+
>
|
|
5
|
+
<h2 class="{{headlingClass}}">{{headlingText}}</h2>
|
|
6
|
+
<form [formGroup]="loginForm" (ngSubmit)="submit()" class="flexWrapper">
|
|
7
|
+
<div class="formWrapper" *ngIf="showform">
|
|
8
|
+
<verbena-input
|
|
9
|
+
[label]="'Email'"
|
|
10
|
+
[labelColor]="inputLabelColor"
|
|
11
|
+
[placeHolder]="''"
|
|
12
|
+
[required]="true"
|
|
13
|
+
[type]="'email'"
|
|
14
|
+
formControlName="Email"
|
|
15
|
+
[showBorder]="true"
|
|
16
|
+
[bgColor]="inputBgColor"
|
|
17
|
+
[border]="inputBorder"
|
|
18
|
+
[borderRadius]="inputBorderRadius"
|
|
19
|
+
[showErrorMessage]="true"
|
|
20
|
+
[errorMessageColor]="'red'"
|
|
21
|
+
[errorBorderColor]="'red'"
|
|
22
|
+
[errorPosition]="'bottom'"
|
|
23
|
+
class="outline-none focus-none"
|
|
24
|
+
></verbena-input>
|
|
25
|
+
<div>
|
|
26
|
+
<verbena-input
|
|
27
|
+
[label]="'Password'"
|
|
28
|
+
[labelColor]="inputLabelColor"
|
|
29
|
+
[placeHolder]="''"
|
|
30
|
+
[required]="true"
|
|
31
|
+
[type]="'password'"
|
|
32
|
+
formControlName="Password"
|
|
33
|
+
[showBorder]="true"
|
|
34
|
+
[bgColor]="inputBgColor"
|
|
35
|
+
[border]="inputBorder"
|
|
36
|
+
[borderRadius]="inputBorderRadius"
|
|
37
|
+
[showErrorMessage]="true"
|
|
38
|
+
[errorMessageColor]="'red'"
|
|
39
|
+
[errorBorderColor]="'red'"
|
|
40
|
+
[errorPosition]="'bottom'"
|
|
41
|
+
[passwordToggle]="true"
|
|
42
|
+
[customErrorMessages]="{
|
|
43
|
+
password:'length must be 5 characters'
|
|
44
|
+
}"
|
|
45
|
+
class="outline-none focus-none"
|
|
46
|
+
></verbena-input>
|
|
47
|
+
<div class="pwdWrapper">
|
|
48
|
+
<p clas="mb-0"> <a [routerLink]="forgetPasswordLink" class="{{forgetPasswordClass}}">Forgot password</a></p>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<lib-button
|
|
52
|
+
[buttonClass]="btnClass"
|
|
53
|
+
[color]="btnColor"
|
|
54
|
+
[border]="btnBorder"
|
|
55
|
+
[borderRadius]="btnBorderRadius"
|
|
56
|
+
[bgColor]="btnBgColor"
|
|
57
|
+
[pd]="btnPd"
|
|
58
|
+
[text]="btnText"
|
|
59
|
+
type="submit"
|
|
60
|
+
[disabled]="!this.checkForm()"
|
|
61
|
+
></lib-button>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<p *ngIf="requestAccessLink">
|
|
65
|
+
<a [routerLink]="requestAccessLink" class="{{requestAccessClass}}">Click here to request user access</a>
|
|
66
|
+
</p>
|
|
67
|
+
<div>
|
|
68
|
+
<div *ngIf="AuthMechanisms !== null">
|
|
69
|
+
<verben-o-auth
|
|
70
|
+
[authMechanisms]="AuthMechanisms"
|
|
71
|
+
(googleClick)="handleGoogleAuth()"
|
|
72
|
+
(appleClick)="handleAppleAuth()"
|
|
73
|
+
(microsoftClick)="handleMicrosoft()"
|
|
74
|
+
></verben-o-auth>
|
|
75
|
+
</div>
|
|
76
|
+
<p class="{{createAccountClass}}" *ngIf="createAccountLink">
|
|
77
|
+
Don't have an account?
|
|
78
|
+
<a [routerLink]="createAccountLink" class="{{createAccountLinkClass}}">Create an account</a>
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</form>
|
|
83
|
+
</section>
|
|
84
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SignInComponent } from './sign-in.component';
|
|
4
|
+
|
|
5
|
+
describe('SignInComponent', () => {
|
|
6
|
+
let component: SignInComponent;
|
|
7
|
+
let fixture: ComponentFixture<SignInComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [SignInComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(SignInComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|