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,261 @@
|
|
|
1
|
+
import { Component, ViewChild } from '@angular/core';
|
|
2
|
+
import { columns } from './sso.columns';
|
|
3
|
+
import { mockData } from './helper';
|
|
4
|
+
import { baseStyle } from './base-table-style';
|
|
5
|
+
import {
|
|
6
|
+
CardData,
|
|
7
|
+
CardDataViewComponent,
|
|
8
|
+
ColumnDefinition,
|
|
9
|
+
DataFilterType,
|
|
10
|
+
DataViewComponent,
|
|
11
|
+
IDataFilter,
|
|
12
|
+
} from 'verben-ng-ui';
|
|
13
|
+
import { SingleSignOn } from '../../models/single-sign-on';
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'lib-sso',
|
|
19
|
+
templateUrl: './sso.component.html',
|
|
20
|
+
styleUrl: './sso.component.css',
|
|
21
|
+
})
|
|
22
|
+
export class SsoComponent {
|
|
23
|
+
@ViewChild('vdcv') cardDataView!: CardDataViewComponent;
|
|
24
|
+
@ViewChild('vdv') dataView!: DataViewComponent;
|
|
25
|
+
|
|
26
|
+
columns = columns;
|
|
27
|
+
data = mockData;
|
|
28
|
+
filteredColumns: ColumnDefinition<SingleSignOn>[] =columns
|
|
29
|
+
styles = baseStyle;
|
|
30
|
+
currentData: CardData | null = null;
|
|
31
|
+
isGridView = true;
|
|
32
|
+
selected: CardData | null = null;
|
|
33
|
+
|
|
34
|
+
cardData: CardData[] = mockData.map(({ Name, Description, Link,Logo }) => ({
|
|
35
|
+
selected: false,
|
|
36
|
+
title: Name,
|
|
37
|
+
data: { Name, Description,Link,Logo } as Partial<SingleSignOn>,
|
|
38
|
+
body: [
|
|
39
|
+
{ title: 'Description', value:Description??'' },
|
|
40
|
+
],
|
|
41
|
+
children: [],
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
openDetailView(name: string) {
|
|
45
|
+
const cardItem = this.getCardDataByMailAddress(name);
|
|
46
|
+
if (cardItem && this.cardDataView) {
|
|
47
|
+
this.dataView.toggleView();
|
|
48
|
+
this.cardData.forEach((item) => {
|
|
49
|
+
item.selected = false;
|
|
50
|
+
if (item.children) {
|
|
51
|
+
item.children.forEach((child) => (child.selected = false));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
cardItem.selected = true;
|
|
56
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
getCardDataByMailAddress(name: string): CardData | undefined {
|
|
61
|
+
return this.cardData.find(({ data }) => data.Name === name);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
onViewChange(isGridView: boolean): void {
|
|
65
|
+
isGridView=isGridView
|
|
66
|
+
|
|
67
|
+
if (this.currentData) {
|
|
68
|
+
this.cardDataView?.clearData();
|
|
69
|
+
this.currentData = null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (this.selected) {
|
|
73
|
+
this.cardDataView.onItemClick(this.selected);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
openFormView(index: number) {
|
|
78
|
+
const item = this.cardData[index];
|
|
79
|
+
console.log('ITEM = ', item);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
handleExport(exportedData: Partial<any>[]) {
|
|
83
|
+
console.log('Exported data:', exportedData);
|
|
84
|
+
this.downloadCSV(exportedData);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @param data Simple csv export for testing
|
|
90
|
+
*/
|
|
91
|
+
private downloadCSV(data: Partial<any>[]) {
|
|
92
|
+
const headers = Object.keys(data[0]);
|
|
93
|
+
const csvContent = [
|
|
94
|
+
headers.join(','),
|
|
95
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
96
|
+
].join('\n');
|
|
97
|
+
|
|
98
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
99
|
+
const link = document.createElement('a');
|
|
100
|
+
if (link.download !== undefined) {
|
|
101
|
+
const url = URL.createObjectURL(blob);
|
|
102
|
+
link.setAttribute('href', url);
|
|
103
|
+
link.setAttribute('download', 'export.csv');
|
|
104
|
+
link.style.visibility = 'hidden';
|
|
105
|
+
document.body.appendChild(link);
|
|
106
|
+
link.click();
|
|
107
|
+
document.body.removeChild(link);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
onSelectionChange(selectedRows:SingleSignOn[]) {
|
|
112
|
+
console.log('Selection changed:', selectedRows);
|
|
113
|
+
// Handle the selection change
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Copied over from card view doc until I understand usage
|
|
118
|
+
*/
|
|
119
|
+
selectedColumnCount: number = 0;
|
|
120
|
+
selectedFilterTableCount: number = 0;
|
|
121
|
+
isOPen: boolean = true;
|
|
122
|
+
selectedSortCount: number = 0;
|
|
123
|
+
showColumn: boolean = false;
|
|
124
|
+
showSort: boolean = false;
|
|
125
|
+
showExport: boolean = false;
|
|
126
|
+
selectedAll: boolean = false;
|
|
127
|
+
showFilter: boolean = false;
|
|
128
|
+
visibleColumns: IDataFilter[] = columns.map((col) => ({
|
|
129
|
+
checked: false,
|
|
130
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
131
|
+
type: DataFilterType.Bool,
|
|
132
|
+
}));
|
|
133
|
+
filterArray: IDataFilter[] = [
|
|
134
|
+
{
|
|
135
|
+
name: 'Name',
|
|
136
|
+
type: DataFilterType.String,
|
|
137
|
+
checked: false,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'Description',
|
|
141
|
+
type: DataFilterType.String,
|
|
142
|
+
checked: false,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Logo',
|
|
146
|
+
type: DataFilterType.String,
|
|
147
|
+
checked: false,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'Link',
|
|
151
|
+
type: DataFilterType.String,
|
|
152
|
+
checked: false,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'CreatedAt',
|
|
156
|
+
type: DataFilterType.Date,
|
|
157
|
+
checked: false,
|
|
158
|
+
},
|
|
159
|
+
];
|
|
160
|
+
sortOptions: IDataFilter[] = [
|
|
161
|
+
{
|
|
162
|
+
name: 'Name',
|
|
163
|
+
type: DataFilterType.String,
|
|
164
|
+
checked: false,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'Description',
|
|
168
|
+
type: DataFilterType.String,
|
|
169
|
+
checked: false,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'Link',
|
|
173
|
+
type: DataFilterType.String,
|
|
174
|
+
checked: false,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'Logo',
|
|
178
|
+
type: DataFilterType.String,
|
|
179
|
+
checked: false,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'CreatedAt',
|
|
183
|
+
type: DataFilterType.Date,
|
|
184
|
+
checked: false,
|
|
185
|
+
},
|
|
186
|
+
];
|
|
187
|
+
clearData() {
|
|
188
|
+
this.currentData = {} as CardData;
|
|
189
|
+
}
|
|
190
|
+
loadMore() {
|
|
191
|
+
this.cardData = this.cardData.concat(this.cardData);
|
|
192
|
+
}
|
|
193
|
+
onColumnChange(event: boolean) {
|
|
194
|
+
this.showColumn = event;
|
|
195
|
+
}
|
|
196
|
+
onSortChange(event: boolean) {
|
|
197
|
+
this.showSort = false
|
|
198
|
+
console.log(event);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
onColumnsUpdated(updatedColumns: IDataFilter[]) {
|
|
203
|
+
this.showColumn = false;
|
|
204
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
205
|
+
|
|
206
|
+
if (updatedColumns) {
|
|
207
|
+
// Filter columns to include only visible ones
|
|
208
|
+
this.filteredColumns = this.columns.filter((col) =>
|
|
209
|
+
this.visibleColumns.find(
|
|
210
|
+
(filter) => filter.name === col.header && filter.checked
|
|
211
|
+
)
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
// Reorder columns based on the order in visibleColumns
|
|
215
|
+
const visibleColumnOrder = this.visibleColumns
|
|
216
|
+
.filter((filter) => filter.checked)
|
|
217
|
+
.map((filter) => filter.name);
|
|
218
|
+
|
|
219
|
+
this.columns.sort((a, b) => {
|
|
220
|
+
const indexA = visibleColumnOrder.indexOf(a.header as string);
|
|
221
|
+
const indexB = visibleColumnOrder.indexOf(b.header as string);
|
|
222
|
+
return indexA - indexB;
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
onFilterApplied(appliedFilter: IDataFilter[]) {
|
|
228
|
+
this.showFilter=false
|
|
229
|
+
if (Array.isArray(appliedFilter)) {
|
|
230
|
+
this.selectedFilterTableCount = appliedFilter.length;
|
|
231
|
+
} else {
|
|
232
|
+
console.log('appliedFilter is not an array');
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
onSortUpdated(updatedSorts: IDataFilter[]) {
|
|
237
|
+
this.onSortChange(false);
|
|
238
|
+
this.selectedSortCount = updatedSorts.length;
|
|
239
|
+
console.log(updatedSorts);
|
|
240
|
+
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
onStateChange(event: { key: string; value: boolean }): void {
|
|
244
|
+
switch (event.key) {
|
|
245
|
+
case 'column':
|
|
246
|
+
this.showColumn=event.value
|
|
247
|
+
break;
|
|
248
|
+
case 'sort':
|
|
249
|
+
this.showSort=event.value
|
|
250
|
+
break;
|
|
251
|
+
case 'export':
|
|
252
|
+
this.showExport=event.value
|
|
253
|
+
break;
|
|
254
|
+
case 'filter':
|
|
255
|
+
this.showFilter=event.value
|
|
256
|
+
break;
|
|
257
|
+
default:
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import {
|
|
6
|
+
DataViewModule,
|
|
7
|
+
TableFilterModule,
|
|
8
|
+
SortTableModule,
|
|
9
|
+
DataExportModule,
|
|
10
|
+
VisibleColumnModule,
|
|
11
|
+
VerbenaButtonModule,
|
|
12
|
+
CardDataViewModule,
|
|
13
|
+
SvgModule,
|
|
14
|
+
VerbenaInputModule,
|
|
15
|
+
DataTableModule,
|
|
16
|
+
VerbenaTextareaModule,
|
|
17
|
+
} from 'verben-ng-ui';
|
|
18
|
+
import { SsoComponent } from './sso.component';
|
|
19
|
+
import { SsoFormComponent } from './sso-form/sso-form.component';
|
|
20
|
+
@NgModule({
|
|
21
|
+
declarations: [SsoComponent,SsoFormComponent],
|
|
22
|
+
imports: [
|
|
23
|
+
CommonModule,
|
|
24
|
+
FormsModule,
|
|
25
|
+
ReactiveFormsModule,
|
|
26
|
+
DataViewModule,
|
|
27
|
+
TableFilterModule,
|
|
28
|
+
SortTableModule,
|
|
29
|
+
DataExportModule,
|
|
30
|
+
VisibleColumnModule,
|
|
31
|
+
VerbenaButtonModule,
|
|
32
|
+
CardDataViewModule,
|
|
33
|
+
VerbenaInputModule,
|
|
34
|
+
SvgModule,
|
|
35
|
+
VerbenaTextareaModule,
|
|
36
|
+
DataTableModule,
|
|
37
|
+
],
|
|
38
|
+
exports: [SsoComponent],
|
|
39
|
+
})
|
|
40
|
+
export class SsoModule {}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<section
|
|
2
|
+
[ngStyle]="styles"
|
|
3
|
+
class="{{ customClass }}"
|
|
4
|
+
>
|
|
5
|
+
<h3 class="{{headlingClass}}">{{headlingText}}</h3>
|
|
6
|
+
<div class="otpWrapper">
|
|
7
|
+
<p class="{{paragraphClass}}">Enter the {{length}} digit code sent to you</p>
|
|
8
|
+
<verben-otp-input
|
|
9
|
+
[length]="length"
|
|
10
|
+
(otpChange)="onOtpChange($event)"
|
|
11
|
+
[otpClass]="otpClass"
|
|
12
|
+
></verben-otp-input>
|
|
13
|
+
</div>
|
|
14
|
+
<lib-button
|
|
15
|
+
[buttonClass]="btnClass"
|
|
16
|
+
[color]="btnColor"
|
|
17
|
+
[border]="btnBorder"
|
|
18
|
+
[borderRadius]="btnBorderRadius"
|
|
19
|
+
[bgColor]="btnBgColor"
|
|
20
|
+
[pd]="btnPd"
|
|
21
|
+
[text]="btnText"
|
|
22
|
+
(buttonClick)="submitData()"
|
|
23
|
+
[disabled]="!otpForm.valid"
|
|
24
|
+
></lib-button>
|
|
25
|
+
<p class="resendWrapper">
|
|
26
|
+
Didn’t get a code?
|
|
27
|
+
<a class="{{resendClass}}" (click)="resendOtp()">Resend</a>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
</section>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { TwoFactorAuthOtpComponent } from './two-factor-auth-otp.component';
|
|
4
|
+
|
|
5
|
+
describe('TwoFactorAuthOtpComponent', () => {
|
|
6
|
+
let component: TwoFactorAuthOtpComponent;
|
|
7
|
+
let fixture: ComponentFixture<TwoFactorAuthOtpComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [TwoFactorAuthOtpComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(TwoFactorAuthOtpComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
|
3
|
+
import { HttpWebRequestService } from '../../services/http-web-request.service';
|
|
4
|
+
import { UtilService } from '../../services/util.service';
|
|
5
|
+
import { ErrorResponse } from '../../models/ErrorResponse';
|
|
6
|
+
import { ResponseKeyValue } from '../../models/ResponseKeyValue';
|
|
7
|
+
import { OtpData } from '../../models/otpValue';
|
|
8
|
+
import { User } from '../../models/user';
|
|
9
|
+
import { ObjectState } from '../../models/object-state';
|
|
10
|
+
import { MainUser } from '../../models/mainUser';
|
|
11
|
+
import { ResendOtpData } from '../../models/resend-otp-data';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'verben-auth-otp',
|
|
15
|
+
templateUrl: './two-factor-auth-otp.component.html',
|
|
16
|
+
styleUrl: './two-factor-auth-otp.component.css'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
export class TwoFactorAuthOtpComponent {
|
|
20
|
+
@Input() customClass: string = ''
|
|
21
|
+
@Input() headlingClass: string = ''
|
|
22
|
+
@Input() headlingText: string = 'Two Factor Authentication'
|
|
23
|
+
@Input() paragraphClass: string = ''
|
|
24
|
+
@Input() resendClass: string = ''
|
|
25
|
+
@Input() width: string = '';
|
|
26
|
+
@Input() maxWidth: string = '';
|
|
27
|
+
@Input() margin: string = '';
|
|
28
|
+
@Input() pd: string = '';
|
|
29
|
+
@Input() bgColor: string = '#fff';
|
|
30
|
+
@Input() boxShadow: string = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
31
|
+
@Input() border: string = '1px solid #66666680';
|
|
32
|
+
@Input() borderRadius: string = '24px';
|
|
33
|
+
@Input() textColor: string = '#333';
|
|
34
|
+
@Input() height: string = 'auto';
|
|
35
|
+
@Input() length: number = 6;
|
|
36
|
+
@Input() otpClass: string = '';
|
|
37
|
+
@Input() resendOtpData: ResendOtpData = {
|
|
38
|
+
MailAddress: "verbena@gmail.com",
|
|
39
|
+
Password: "Default",
|
|
40
|
+
LoginType: "InApp",
|
|
41
|
+
APIKey: "PDLTC6",
|
|
42
|
+
Secrete: "$White360$",
|
|
43
|
+
RedirectUri: "/auth/otp"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
@Input() User:MainUser = {
|
|
47
|
+
Code: '024',
|
|
48
|
+
TenantId: '53b1c579bdf3de74f76bdac9',
|
|
49
|
+
Id: '53b1c579bdf3de74f76bdac9',
|
|
50
|
+
ServiceName: 'chinedu',
|
|
51
|
+
MailAddress: 'nwaekwuchinedu@gmail.com',
|
|
52
|
+
PhoneNumber: '070',
|
|
53
|
+
FirstName: 'nwaekwu',
|
|
54
|
+
LastName: 'chinedu',
|
|
55
|
+
OtherName: 'chinedu',
|
|
56
|
+
Role: [],
|
|
57
|
+
Tags: [
|
|
58
|
+
{
|
|
59
|
+
Name: "tester",
|
|
60
|
+
IsOptional: true
|
|
61
|
+
}],
|
|
62
|
+
Password: 'Default',
|
|
63
|
+
Status: 'Active',
|
|
64
|
+
CreatedAt: new Date(),
|
|
65
|
+
UpdatedAt: new Date(),
|
|
66
|
+
DataState: ObjectState.New
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@Input() OtpData:OtpData = {
|
|
70
|
+
User: this.User,
|
|
71
|
+
Token: '',
|
|
72
|
+
ValidateUrl: '',
|
|
73
|
+
Secret: '',
|
|
74
|
+
OTP: '',
|
|
75
|
+
Info: ''
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@Input() btnClass: string = ''
|
|
79
|
+
@Input() btnBgColor: string = '#FFE681'
|
|
80
|
+
@Input() btnColor: string = ''
|
|
81
|
+
@Input() btnBorder: string = ''
|
|
82
|
+
@Input() btnBorderRadius: string = '24px'
|
|
83
|
+
@Input() btnPd: string = '';
|
|
84
|
+
@Input() btnText: string = 'Submit';
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
otpValue: string = '';
|
|
88
|
+
otpForm!: FormGroup;
|
|
89
|
+
|
|
90
|
+
@Output() buttonClick = new EventEmitter<string>();
|
|
91
|
+
@Output() otpChange = new EventEmitter<string>();
|
|
92
|
+
@Output() onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse> = new EventEmitter();
|
|
93
|
+
@Output() resend: EventEmitter<ResponseKeyValue | ErrorResponse> = new EventEmitter();
|
|
94
|
+
|
|
95
|
+
constructor(
|
|
96
|
+
private fb: FormBuilder,
|
|
97
|
+
private server: HttpWebRequestService,
|
|
98
|
+
private utilService: UtilService
|
|
99
|
+
) {}
|
|
100
|
+
|
|
101
|
+
ngOnInit() {
|
|
102
|
+
this.otpForm = this.fb.group({
|
|
103
|
+
otpValue: ['', [Validators.required, Validators.minLength(6)]]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
onOtpChange(value: string) {
|
|
108
|
+
this.otpValue = value;
|
|
109
|
+
this.otpForm.get('otpValue')?.setValue(value);
|
|
110
|
+
this.otpChange.emit(this.otpValue);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async submitData() {
|
|
114
|
+
const data:OtpData = {
|
|
115
|
+
User: {
|
|
116
|
+
...this.User
|
|
117
|
+
},
|
|
118
|
+
Token: this.OtpData.Token,
|
|
119
|
+
ValidateUrl: this.OtpData.ValidateUrl,
|
|
120
|
+
Secret: this.OtpData.Secret,
|
|
121
|
+
OTP: this.OtpData.OTP,
|
|
122
|
+
Info: this.OtpData.Info,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
if (this.otpForm.valid) {
|
|
127
|
+
// this.buttonClick.emit(this.otpForm.get('otpValue')?.value);
|
|
128
|
+
this.utilService.sendBI(true);
|
|
129
|
+
const res = await this.server.post(
|
|
130
|
+
`Authentication/Validate`,data
|
|
131
|
+
);
|
|
132
|
+
this.utilService.sendBI(false);
|
|
133
|
+
if (res instanceof ErrorResponse) {
|
|
134
|
+
this.onSubmitEnd.emit(res);
|
|
135
|
+
} else {
|
|
136
|
+
var result = res as ResponseKeyValue;
|
|
137
|
+
this.onSubmitEnd.emit(result);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async resendOtp() {
|
|
144
|
+
const data:ResendOtpData = {
|
|
145
|
+
MailAddress:this.resendOtpData?.MailAddress,
|
|
146
|
+
Password:this.resendOtpData?.Password,
|
|
147
|
+
LoginType:this.resendOtpData?.LoginType,
|
|
148
|
+
APIKey:this.resendOtpData?.APIKey,
|
|
149
|
+
Secrete:this.resendOtpData?.Secrete,
|
|
150
|
+
RedirectUri:this.resendOtpData?.RedirectUri
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
this.utilService.sendBI(true);
|
|
154
|
+
const res = await this.server.post(
|
|
155
|
+
`Authentication/ResendOTP`,data
|
|
156
|
+
);
|
|
157
|
+
this.utilService.sendBI(false);
|
|
158
|
+
if (res instanceof ErrorResponse) {
|
|
159
|
+
this.resend.emit(res);
|
|
160
|
+
} else {
|
|
161
|
+
var result = res as ResponseKeyValue;
|
|
162
|
+
this.resend.emit(result);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
get styles() {
|
|
168
|
+
return {
|
|
169
|
+
'background-color': this.bgColor,
|
|
170
|
+
'box-shadow': this.boxShadow,
|
|
171
|
+
'border': this.border,
|
|
172
|
+
'border-radius': this.borderRadius,
|
|
173
|
+
'color': this.textColor,
|
|
174
|
+
'width': this.width,
|
|
175
|
+
'max-width':this.maxWidth,
|
|
176
|
+
'margin':this.margin,
|
|
177
|
+
'height': this.height,
|
|
178
|
+
'padding':this.pd
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { TwoFactorAuthOtpComponent } from './two-factor-auth-otp.component';
|
|
4
|
+
import { ButtonModule } from '../button/button.module';
|
|
5
|
+
import { OtpInputModule } from '../otp-input/otp-input.module';
|
|
6
|
+
import { RouterLink } from '@angular/router';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@NgModule({
|
|
11
|
+
declarations: [TwoFactorAuthOtpComponent],
|
|
12
|
+
imports: [CommonModule,ButtonModule,OtpInputModule,RouterLink,ReactiveFormsModule],
|
|
13
|
+
exports: [TwoFactorAuthOtpComponent]
|
|
14
|
+
})
|
|
15
|
+
export class TwoFactorAuthOtpModule {}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.setUpBtnWrapper{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
margin-top: 40px;
|
|
6
|
+
}
|
|
7
|
+
.iconWrapper{
|
|
8
|
+
display: flex;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
align-items:center;
|
|
11
|
+
justify-content:end;
|
|
12
|
+
gap: 12px;
|
|
13
|
+
margin-bottom:50px;
|
|
14
|
+
}
|
|
15
|
+
.custom-button{
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<section
|
|
2
|
+
[ngStyle]="styles"
|
|
3
|
+
class="{{ customClass }}"
|
|
4
|
+
>
|
|
5
|
+
<h3 class="{{headlingClass}}">{{headlingText}}</h3>
|
|
6
|
+
<div class="setUpBtnWrapper">
|
|
7
|
+
<verbena-button
|
|
8
|
+
svg="2fa-mail"
|
|
9
|
+
[svgHeight]="16"
|
|
10
|
+
[svgWidth]="20"
|
|
11
|
+
text="Continue with Mail"
|
|
12
|
+
bgColor="white"
|
|
13
|
+
textColor="#333333"
|
|
14
|
+
border="1px solid #333"
|
|
15
|
+
borderRadius="40px"
|
|
16
|
+
pd="10px 20px"
|
|
17
|
+
width="100%"
|
|
18
|
+
svgPosition="left"
|
|
19
|
+
buttonClass="font-normal text-[24px] leading-[29.05px] text-[#333] mb-2"
|
|
20
|
+
(click)="continueWithMail()"
|
|
21
|
+
></verbena-button>
|
|
22
|
+
<verbena-button
|
|
23
|
+
svg="2fa-sms"
|
|
24
|
+
[svgHeight]="24"
|
|
25
|
+
[svgWidth]="24"
|
|
26
|
+
text="Continue with SMS"
|
|
27
|
+
bgColor="white"
|
|
28
|
+
textColor="#333333"
|
|
29
|
+
border="1px solid #333"
|
|
30
|
+
borderRadius="40px"
|
|
31
|
+
pd="10px 20px"
|
|
32
|
+
width="100%"
|
|
33
|
+
svgPosition="left"
|
|
34
|
+
(click)="continueWithSMS()"
|
|
35
|
+
></verbena-button>
|
|
36
|
+
<!-- <div class="iconWrapper" (click)="handleSkip()">
|
|
37
|
+
<p class="{{paragraphClass}}">Skip for now</p>
|
|
38
|
+
<verben-svg
|
|
39
|
+
icon="skip-forward"
|
|
40
|
+
[height]="24"
|
|
41
|
+
[width]="24"
|
|
42
|
+
/>
|
|
43
|
+
</div> -->
|
|
44
|
+
</div>
|
|
45
|
+
</section>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { TwoFactorAuthSetupComponent } from './two-factor-auth-setup.component';
|
|
4
|
+
|
|
5
|
+
describe('TwoFactorAuthSetupComponent', () => {
|
|
6
|
+
let component: TwoFactorAuthSetupComponent;
|
|
7
|
+
let fixture: ComponentFixture<TwoFactorAuthSetupComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [TwoFactorAuthSetupComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(TwoFactorAuthSetupComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|