verben-authentication-ui 1.0.1 → 1.0.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 +10 -15
- package/src/lib/base/base-data.component.ts +86 -0
- package/src/lib/base/base-data.facade.ts +157 -0
- package/src/lib/base/base-data.service.ts +49 -0
- package/src/lib/base/base-data.state.ts +94 -0
- package/src/lib/base/models.ts +14 -0
- package/src/lib/components/auth-callback/auth-callback.component.css +30 -0
- package/src/lib/components/auth-callback/auth-callback.component.html +6 -0
- package/src/lib/components/auth-callback/auth-callback.component.spec.ts +23 -0
- package/src/lib/components/auth-callback/auth-callback.component.ts +56 -0
- package/src/lib/components/auth-callback/auth-callback.module.ts +10 -0
- 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 +46 -0
- package/src/lib/components/forgot-password/forgot-password.component.html +19 -0
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +23 -0
- package/src/lib/components/forgot-password/forgot-password.component.ts +88 -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 +26 -0
- package/src/lib/components/o-auth/o-auth.component.html +26 -0
- package/src/lib/components/o-auth/o-auth.component.spec.ts +23 -0
- package/src/lib/components/o-auth/o-auth.component.ts +115 -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 +15 -0
- package/src/lib/components/otp-input/otp-input.component.spec.ts +23 -0
- package/src/lib/components/otp-input/otp-input.component.ts +88 -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 +24 -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/role-control/ChildrenType.ts +4 -0
- package/{lib/components/role-control/MappedRole.d.ts → src/lib/components/role-control/MappedRole.ts} +3 -2
- package/{lib/components/role-control/MappedRoleAction.d.ts → src/lib/components/role-control/MappedRoleAction.ts} +2 -1
- package/{lib/components/role-control/MappedRoleContext.d.ts → src/lib/components/role-control/MappedRoleContext.ts} +4 -3
- package/src/lib/components/role-control/UIActions.ts +5 -0
- package/src/lib/components/role-control/UIs.ts +38 -0
- package/src/lib/components/role-control/base-table-style.ts +52 -0
- package/src/lib/components/role-control/role-control.component.css +55 -0
- package/src/lib/components/role-control/role-control.component.html +571 -0
- package/src/lib/components/role-control/role-control.component.spec.ts +23 -0
- package/src/lib/components/role-control/role-control.component.ts +1817 -0
- package/src/lib/components/role-control/role-control.module.ts +10 -0
- package/src/lib/components/role-control/role-control.service.spec.ts +16 -0
- package/src/lib/components/role-control/role-control.service.ts +53 -0
- package/src/lib/components/sign-in/sign-in.component.css +21 -0
- package/src/lib/components/sign-in/sign-in.component.html +83 -0
- package/src/lib/components/sign-in/sign-in.component.spec.ts +23 -0
- package/src/lib/components/sign-in/sign-in.component.ts +267 -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 +180 -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 +17 -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 +155 -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/facades/user-management.facades.ts +133 -0
- package/src/lib/components/user-management/helper.ts +38 -0
- package/src/lib/components/user-management/index.ts +4 -0
- package/src/lib/components/user-management/services/user-management.service.spec.ts +16 -0
- package/src/lib/components/user-management/services/user-management.service.ts +111 -0
- package/src/lib/components/user-management/states/user-management.state.ts +65 -0
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +73 -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 +80 -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 +51 -0
- package/src/lib/components/user-management/user-management.component.css +31 -0
- package/src/lib/components/user-management/user-management.component.html +319 -0
- package/src/lib/components/user-management/user-management.component.spec.ts +23 -0
- package/src/lib/components/user-management/user-management.component.ts +604 -0
- package/src/lib/components/user-management/user-management.module.ts +56 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.css +0 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.html +8 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.spec.ts +22 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.ts +22 -0
- package/src/lib/components/user-request/user-request.component.css +91 -0
- package/src/lib/components/user-request/user-request.component.html +137 -0
- package/src/lib/components/user-request/user-request.component.spec.ts +23 -0
- package/src/lib/components/user-request/user-request.component.ts +306 -0
- package/src/lib/components/user-request/user-request.module.ts +20 -0
- package/src/lib/components/user-request-approval/access-request.columns.ts +31 -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 +324 -0
- package/src/lib/components/user-request-approval/helper.ts +61 -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 +122 -0
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +109 -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 +8 -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 +6 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.html +269 -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 +326 -0
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +54 -0
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +98 -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 +94 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +23 -0
- package/src/lib/components/user-request-process/user-request-process.component.css +0 -0
- package/src/lib/components/user-request-process/user-request-process.component.html +1 -0
- package/src/lib/components/user-request-process/user-request-process.component.spec.ts +23 -0
- package/src/lib/components/user-request-process/user-request-process.component.ts +12 -0
- package/src/lib/components/user-request-process/user-request-process.module.ts +12 -0
- package/src/lib/models/ApplicationRoleAction.ts +10 -0
- package/{lib/models/ApplicationRoleContext.d.ts → src/lib/models/ApplicationRoleContext copy.ts } +6 -5
- package/src/lib/models/ApplicationRoleContext.ts +10 -0
- package/src/lib/models/ErrorResponse.ts +7 -0
- package/src/lib/models/FilterTypes.ts +8 -0
- package/src/lib/models/MailConfig.ts +13 -0
- package/src/lib/models/MessageConfig.ts +5 -0
- package/src/lib/models/MessageMedium.ts +4 -0
- package/src/lib/models/OAuthParam.ts +10 -0
- package/src/lib/models/OAuthType.ts +7 -0
- package/src/lib/models/PagedResult.ts +9 -0
- package/src/lib/models/PasswordRequestParam.ts +5 -0
- package/src/lib/models/PeriodMode.ts +10 -0
- package/{lib/models/PermissionConfig.d.ts → src/lib/models/PermissionConfig.ts} +4 -3
- package/src/lib/models/ReportSchedule.ts +23 -0
- package/src/lib/models/ReportType.ts +5 -0
- package/src/lib/models/ResponseKeyValue.ts +5 -0
- package/{lib/models/Role.d.ts → src/lib/models/Role.ts} +6 -5
- package/src/lib/models/RoleAction.ts +11 -0
- package/src/lib/models/RoleContext.ts +11 -0
- package/src/lib/models/SMSConfig.ts +11 -0
- package/{lib/models/SearchDynamicWrapper.d.ts → src/lib/models/SearchDynamicWrapper.ts} +3 -2
- package/src/lib/models/SearchOperator.ts +4 -0
- package/src/lib/models/SearchPropertySign.ts +9 -0
- package/{lib/models/SearchPropertyValue.d.ts → src/lib/models/SearchPropertyValue.ts} +7 -6
- package/src/lib/models/SearchPropertyValueType.ts +9 -0
- package/src/lib/models/SortDirection.ts +5 -0
- package/{lib/models/Tag.d.ts → src/lib/models/Tag.ts} +4 -3
- package/src/lib/models/TaskNotification.ts +14 -0
- package/src/lib/models/TaskNotificationMessageType.ts +4 -0
- package/src/lib/models/TaskNotificationType.ts +4 -0
- package/src/lib/models/Tenant.ts +22 -0
- package/src/lib/models/TenantConfig.ts +19 -0
- package/src/lib/models/UserRequest.ts +38 -0
- package/src/lib/models/auth-mechanism.ts +15 -0
- package/src/lib/models/base.ts +13 -0
- package/src/lib/models/conditions.ts +11 -0
- package/src/lib/models/log-in.ts +8 -0
- package/{lib/models/mainUser.d.ts → src/lib/models/mainUser.ts} +3 -2
- package/src/lib/models/oauth-resp.ts +6 -0
- package/{lib/models/oauth-response.d.ts → src/lib/models/oauth-response.ts} +1 -1
- package/src/lib/models/object-state.ts +6 -0
- package/{lib/models/otpValue.d.ts → src/lib/models/otpValue.ts} +4 -2
- package/src/lib/models/paged.ts +9 -0
- package/src/lib/models/query-params.ts +9 -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} +5 -4
- package/src/lib/models/user-object-state.ts +6 -0
- package/src/lib/models/user.ts +19 -0
- package/src/lib/pipes/async-label.pipe.spec.ts +8 -0
- package/src/lib/pipes/async-label.pipe.ts +20 -0
- package/src/lib/services/authorization.service.spec.ts +16 -0
- package/src/lib/services/authorization.service.ts +24 -0
- package/src/lib/services/encryption.service.ts +57 -0
- package/src/lib/services/environment.service.spec.ts +16 -0
- package/src/lib/services/environment.service.ts +30 -0
- package/src/lib/services/http-web-request.service.spec.ts +16 -0
- package/src/lib/services/http-web-request.service.ts +114 -0
- package/src/lib/services/label.service.spec.ts +16 -0
- package/src/lib/services/label.service.ts +177 -0
- package/src/lib/services/util.service.spec.ts +16 -0
- package/src/lib/services/util.service.ts +49 -0
- package/src/lib/shared/shared.module.ts +55 -0
- package/{public-api.d.ts → src/public-api.ts} +24 -0
- package/src/styles.css +96 -0
- package/src/theme/tailwind-setup.css +3 -0
- package/src/theme/tailwind.css +1030 -0
- package/src/utils/components/base-data-view.component.ts +131 -0
- package/src/utils/models/DataViewConfig.ts +19 -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/auth-callback/auth-callback.component.mjs +0 -57
- package/esm2022/lib/components/auth-callback/auth-callback.module.mjs +0 -18
- 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 -89
- 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 -107
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +0 -19
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +0 -86
- 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 -108
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +0 -34
- package/esm2022/lib/components/role-control/ChildrenType.mjs +0 -6
- package/esm2022/lib/components/role-control/MappedRole.mjs +0 -2
- package/esm2022/lib/components/role-control/MappedRoleAction.mjs +0 -2
- package/esm2022/lib/components/role-control/MappedRoleContext.mjs +0 -2
- package/esm2022/lib/components/role-control/UIActions.mjs +0 -7
- package/esm2022/lib/components/role-control/UIs.mjs +0 -40
- package/esm2022/lib/components/role-control/base-table-style.mjs +0 -53
- package/esm2022/lib/components/role-control/role-control.component.mjs +0 -1364
- package/esm2022/lib/components/role-control/role-control.module.mjs +0 -18
- package/esm2022/lib/components/role-control/role-control.service.mjs +0 -54
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +0 -318
- package/esm2022/lib/components/sign-in/sign-in.module.mjs +0 -24
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +0 -229
- 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 -16
- 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 -209
- 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/services/user-management.service.mjs +0 -88
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +0 -71
- package/esm2022/lib/components/user-management/user-management.columns.mjs +0 -47
- package/esm2022/lib/components/user-management/user-management.component.mjs +0 -475
- package/esm2022/lib/components/user-management/user-management.module.mjs +0 -79
- package/esm2022/lib/components/user-management/user-status-badge/user-status-badge.component.mjs +0 -26
- package/esm2022/lib/components/user-request/user-request.component.mjs +0 -320
- package/esm2022/lib/components/user-request/user-request.module.mjs +0 -38
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +0 -29
- 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 -260
- package/esm2022/lib/components/user-request-approval/helper.mjs +0 -56
- package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +0 -93
- package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +0 -92
- 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 -270
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +0 -80
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +0 -86
- package/esm2022/lib/models/ApplicationRoleAction.mjs +0 -2
- package/esm2022/lib/models/ApplicationRoleContext.mjs +0 -2
- package/esm2022/lib/models/ErrorResponse.mjs +0 -11
- package/esm2022/lib/models/OAuthParam.mjs +0 -2
- package/esm2022/lib/models/OAuthType.mjs +0 -9
- package/esm2022/lib/models/PagedResult.mjs +0 -2
- package/esm2022/lib/models/PasswordRequestParam.mjs +0 -2
- package/esm2022/lib/models/PermissionConfig.mjs +0 -2
- package/esm2022/lib/models/ResponseKeyValue.mjs +0 -2
- package/esm2022/lib/models/Role.mjs +0 -2
- package/esm2022/lib/models/RoleAction.mjs +0 -2
- package/esm2022/lib/models/RoleContext.mjs +0 -2
- package/esm2022/lib/models/SearchDynamicWrapper.mjs +0 -2
- package/esm2022/lib/models/SearchOperator.mjs +0 -6
- package/esm2022/lib/models/SearchPropertySign.mjs +0 -11
- package/esm2022/lib/models/SearchPropertyValue.mjs +0 -2
- package/esm2022/lib/models/SearchPropertyValueType.mjs +0 -11
- package/esm2022/lib/models/SortDirection.mjs +0 -7
- package/esm2022/lib/models/Tag.mjs +0 -2
- package/esm2022/lib/models/TenantConfig.mjs +0 -2
- package/esm2022/lib/models/UserRequest.mjs +0 -2
- package/esm2022/lib/models/auth-mechanism.mjs +0 -8
- package/esm2022/lib/models/base.mjs +0 -2
- package/esm2022/lib/models/conditions.mjs +0 -13
- package/esm2022/lib/models/log-in.mjs +0 -2
- package/esm2022/lib/models/mainUser.mjs +0 -2
- package/esm2022/lib/models/oauth-resp.mjs +0 -2
- package/esm2022/lib/models/oauth-response.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/resend-otp-data.mjs +0 -2
- 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/pipes/async-label.pipe.mjs +0 -25
- package/esm2022/lib/services/authorization.service.mjs +0 -26
- package/esm2022/lib/services/encryption.service.mjs +0 -52
- package/esm2022/lib/services/environment.service.mjs +0 -26
- package/esm2022/lib/services/http-web-request.service.mjs +0 -85
- package/esm2022/lib/services/label.service.mjs +0 -134
- package/esm2022/lib/services/util.service.mjs +0 -55
- package/esm2022/lib/shared/shared.module.mjs +0 -84
- package/esm2022/public-api.mjs +0 -48
- package/esm2022/verben-authentication-ui.mjs +0 -5
- package/fesm2022/verben-authentication-ui.mjs +0 -6299
- package/fesm2022/verben-authentication-ui.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/auth-callback/auth-callback.component.d.ts +0 -17
- package/lib/components/auth-callback/auth-callback.module.d.ts +0 -8
- 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 -29
- 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 -30
- package/lib/components/o-auth/o-auth.module.d.ts +0 -9
- package/lib/components/otp-input/otp-input.component.d.ts +0 -21
- 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/role-control/ChildrenType.d.ts +0 -4
- package/lib/components/role-control/UIActions.d.ts +0 -5
- package/lib/components/role-control/UIs.d.ts +0 -38
- package/lib/components/role-control/base-table-style.d.ts +0 -1
- package/lib/components/role-control/role-control.component.d.ts +0 -121
- package/lib/components/role-control/role-control.module.d.ts +0 -8
- package/lib/components/role-control/role-control.service.d.ts +0 -9
- package/lib/components/sign-in/sign-in.component.d.ts +0 -95
- package/lib/components/sign-in/sign-in.module.d.ts +0 -13
- package/lib/components/sign-up/sign-up.component.d.ts +0 -68
- 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 -67
- 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/services/user-management.service.d.ts +0 -44
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +0 -22
- package/lib/components/user-management/user-management.columns.d.ts +0 -3
- package/lib/components/user-management/user-management.component.d.ts +0 -123
- package/lib/components/user-management/user-management.module.d.ts +0 -14
- package/lib/components/user-management/user-status-badge/user-status-badge.component.d.ts +0 -12
- package/lib/components/user-request/user-request.component.d.ts +0 -80
- package/lib/components/user-request/user-request.module.d.ts +0 -11
- 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 -39
- package/lib/components/user-request-approval/helper.d.ts +0 -7
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +0 -65
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +0 -35
- 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 -69
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +0 -12
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +0 -25
- package/lib/models/ApplicationRoleAction.d.ts +0 -9
- package/lib/models/ErrorResponse.d.ts +0 -6
- package/lib/models/OAuthParam.d.ts +0 -9
- package/lib/models/OAuthType.d.ts +0 -7
- package/lib/models/PagedResult.d.ts +0 -9
- package/lib/models/PasswordRequestParam.d.ts +0 -5
- package/lib/models/ResponseKeyValue.d.ts +0 -5
- package/lib/models/RoleAction.d.ts +0 -10
- package/lib/models/RoleContext.d.ts +0 -10
- package/lib/models/SearchOperator.d.ts +0 -4
- package/lib/models/SearchPropertySign.d.ts +0 -9
- package/lib/models/SearchPropertyValueType.d.ts +0 -9
- package/lib/models/SortDirection.d.ts +0 -5
- package/lib/models/TenantConfig.d.ts +0 -18
- package/lib/models/UserRequest.d.ts +0 -32
- package/lib/models/auth-mechanism.d.ts +0 -14
- package/lib/models/base.d.ts +0 -12
- package/lib/models/conditions.d.ts +0 -11
- package/lib/models/log-in.d.ts +0 -8
- package/lib/models/oauth-resp.d.ts +0 -6
- 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 -8
- package/lib/models/request-status.d.ts +0 -3
- package/lib/models/resend-otp-data.d.ts +0 -8
- 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 -18
- package/lib/pipes/async-label.pipe.d.ts +0 -11
- package/lib/services/authorization.service.d.ts +0 -14
- package/lib/services/encryption.service.d.ts +0 -13
- package/lib/services/environment.service.d.ts +0 -22
- package/lib/services/http-web-request.service.d.ts +0 -23
- package/lib/services/label.service.d.ts +0 -15
- package/lib/services/util.service.d.ts +0 -11
- package/lib/shared/shared.module.d.ts +0 -10
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
import { MechanismType } from '../../models/auth-mechanism';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'verben-auth-otp',
|
|
16
|
+
templateUrl: './two-factor-auth-otp.component.html',
|
|
17
|
+
styleUrl: './two-factor-auth-otp.component.css',
|
|
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: '',
|
|
39
|
+
Password: '',
|
|
40
|
+
LoginType: 'InApp',
|
|
41
|
+
Tenant: 'PDLTC6',
|
|
42
|
+
Secrete: '$White360$',
|
|
43
|
+
RedirectUri: '/auth/otp',
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
@Input() User:any={}
|
|
47
|
+
|
|
48
|
+
@Input() OtpData: OtpData = {
|
|
49
|
+
User: this.User,
|
|
50
|
+
Token: '',
|
|
51
|
+
ValidateUrl: '',
|
|
52
|
+
Secret: '',
|
|
53
|
+
OTP: '',
|
|
54
|
+
Info: '',
|
|
55
|
+
Provider:MechanismType.InApp
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
@Input() btnClass: string = '';
|
|
59
|
+
@Input() btnBgColor: string = '#FFE681';
|
|
60
|
+
@Input() btnColor: string = '';
|
|
61
|
+
@Input() btnBorder: string = '';
|
|
62
|
+
@Input() btnBorderRadius: string = '24px';
|
|
63
|
+
@Input() btnPd: string = '';
|
|
64
|
+
@Input() btnText: string = 'Submit';
|
|
65
|
+
|
|
66
|
+
otpValue: string = '';
|
|
67
|
+
otpForm!: FormGroup;
|
|
68
|
+
|
|
69
|
+
@Output() buttonClick = new EventEmitter<string>();
|
|
70
|
+
@Output() otpChange = new EventEmitter<string>();
|
|
71
|
+
@Output() clearStore = new EventEmitter<any>();
|
|
72
|
+
@Output() onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse> =
|
|
73
|
+
new EventEmitter();
|
|
74
|
+
@Output() resend: EventEmitter<ResponseKeyValue | ErrorResponse> =
|
|
75
|
+
new EventEmitter();
|
|
76
|
+
|
|
77
|
+
constructor(
|
|
78
|
+
private fb: FormBuilder,
|
|
79
|
+
private server: HttpWebRequestService,
|
|
80
|
+
private utilService: UtilService
|
|
81
|
+
) {}
|
|
82
|
+
|
|
83
|
+
ngOnInit() {
|
|
84
|
+
this.otpForm = this.fb.group({
|
|
85
|
+
otpValue: ['', [Validators.required, Validators.minLength(6)]],
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
onOtpChange(value: string) {
|
|
90
|
+
this.otpValue = value;
|
|
91
|
+
this.otpForm.get('otpValue')?.setValue(value);
|
|
92
|
+
this.otpChange.emit(this.otpValue);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async submitData() {
|
|
96
|
+
const data: OtpData = {
|
|
97
|
+
User:this.User,
|
|
98
|
+
Token: this.OtpData.Token,
|
|
99
|
+
ValidateUrl: this.OtpData.ValidateUrl,
|
|
100
|
+
Secret: this.OtpData.Secret,
|
|
101
|
+
OTP: this.OtpData.OTP,
|
|
102
|
+
Info: this.OtpData.Info,
|
|
103
|
+
Provider:this.OtpData.Provider
|
|
104
|
+
};
|
|
105
|
+
this.clearStore.emit()
|
|
106
|
+
if (this.otpForm.valid) {
|
|
107
|
+
this.utilService.sendBI(true);
|
|
108
|
+
const res = await this.server.post(`Authentication/Validate`, data);
|
|
109
|
+
this.utilService.sendBI(false);
|
|
110
|
+
if (res instanceof ErrorResponse) {
|
|
111
|
+
this.onSubmitEnd.emit(res);
|
|
112
|
+
} else {
|
|
113
|
+
var result = res as ResponseKeyValue;
|
|
114
|
+
this.onSubmitEnd.emit(result);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async resendOtp() {
|
|
120
|
+
const data: ResendOtpData = {
|
|
121
|
+
MailAddress: this.resendOtpData?.MailAddress,
|
|
122
|
+
Password: this.resendOtpData?.Password,
|
|
123
|
+
LoginType: this.resendOtpData?.LoginType,
|
|
124
|
+
Tenant: this.resendOtpData?.Tenant,
|
|
125
|
+
Secrete: this.resendOtpData?.Secrete,
|
|
126
|
+
|
|
127
|
+
RedirectUri: this.resendOtpData?.RedirectUri,
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
this.utilService.sendBI(true);
|
|
131
|
+
const res = await this.server.post(`Authentication/ResendOTP`, data);
|
|
132
|
+
this.utilService.sendBI(false);
|
|
133
|
+
if (res instanceof ErrorResponse) {
|
|
134
|
+
this.resend.emit(res);
|
|
135
|
+
} else {
|
|
136
|
+
var result = res as ResponseKeyValue;
|
|
137
|
+
this.resend.emit(result);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
get styles() {
|
|
142
|
+
return {
|
|
143
|
+
'background-color': this.bgColor,
|
|
144
|
+
'box-shadow': this.boxShadow,
|
|
145
|
+
border: this.border,
|
|
146
|
+
'border-radius': this.borderRadius,
|
|
147
|
+
color: this.textColor,
|
|
148
|
+
width: this.width,
|
|
149
|
+
'max-width': this.maxWidth,
|
|
150
|
+
margin: this.margin,
|
|
151
|
+
height: this.height,
|
|
152
|
+
padding: this.pd,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'verben-two-factor-auth-setup',
|
|
5
|
+
templateUrl: './two-factor-auth-setup.component.html',
|
|
6
|
+
styleUrl: './two-factor-auth-setup.component.css'
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export class TwoFactorAuthSetupComponent {
|
|
10
|
+
@Input() customClass: string = ''
|
|
11
|
+
@Input() headlingClass: string = ''
|
|
12
|
+
@Input() headlingText: string = 'Set Up Two Factor Authentication'
|
|
13
|
+
@Input() paragraphClass: string = ''
|
|
14
|
+
@Input() buttonClass: string = ''
|
|
15
|
+
@Input() width: string = '';
|
|
16
|
+
@Input() maxWidth: string = '';
|
|
17
|
+
@Input() margin: string = '';
|
|
18
|
+
@Input() pd: string = '';
|
|
19
|
+
@Input() bgColor: string = '#fff';
|
|
20
|
+
@Input() boxShadow: string = '4px 4px 4px rgba(0, 0, 0, 0.25)';
|
|
21
|
+
@Input() border: string = '1px solid #66666680';
|
|
22
|
+
@Input() borderRadius: string = '24px';
|
|
23
|
+
@Input() textColor: string = '#333';
|
|
24
|
+
@Input() height: string = '';
|
|
25
|
+
|
|
26
|
+
@Output() smsClick = new EventEmitter();
|
|
27
|
+
@Output() mailClick = new EventEmitter();
|
|
28
|
+
@Output() skipClick = new EventEmitter();
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
continueWithSMS(){
|
|
32
|
+
this.smsClick.emit()
|
|
33
|
+
}
|
|
34
|
+
continueWithMail(){
|
|
35
|
+
this.mailClick.emit()
|
|
36
|
+
}
|
|
37
|
+
handleSkip(){
|
|
38
|
+
this.skipClick.emit()
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
get styles() {
|
|
43
|
+
return {
|
|
44
|
+
'background-color': this.bgColor,
|
|
45
|
+
'box-shadow': this.boxShadow,
|
|
46
|
+
'border': this.border,
|
|
47
|
+
'border-radius': this.borderRadius,
|
|
48
|
+
'color': this.textColor,
|
|
49
|
+
'width': this.width,
|
|
50
|
+
'max-width':this.maxWidth,
|
|
51
|
+
'margin':this.margin,
|
|
52
|
+
'height': this.height,
|
|
53
|
+
'padding':this.pd
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { TwoFactorAuthSetupComponent } from './two-factor-auth-setup.component';
|
|
4
|
+
import { SvgModule, VerbenaButtonModule } from 'verben-ng-ui';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
declarations: [TwoFactorAuthSetupComponent],
|
|
8
|
+
imports: [CommonModule,VerbenaButtonModule,SvgModule],
|
|
9
|
+
exports: [TwoFactorAuthSetupComponent]
|
|
10
|
+
})
|
|
11
|
+
export class TwoFactorAuthSetupModule {}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const baseStyle: any = {
|
|
2
|
+
width:"100%",
|
|
3
|
+
fontFamily: '"Fraunces", serif',
|
|
4
|
+
fontSize: '125%',
|
|
5
|
+
whiteSpace: 'nowrap',
|
|
6
|
+
margin: '0',
|
|
7
|
+
border: '1px solid #D4A007',
|
|
8
|
+
borderRadius: '16px',
|
|
9
|
+
borderCollapse: 'separate',
|
|
10
|
+
borderSpacing: '0',
|
|
11
|
+
// tableLayout: 'fixed',
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
rows: {
|
|
14
|
+
even: {
|
|
15
|
+
backgroundColor: '#FDFDFD',
|
|
16
|
+
},
|
|
17
|
+
odd: {
|
|
18
|
+
backgroundColor: '#F1F4FB',
|
|
19
|
+
},
|
|
20
|
+
height: '68px',
|
|
21
|
+
},
|
|
22
|
+
cells: {
|
|
23
|
+
padding: '0.5rem 1rem',
|
|
24
|
+
},
|
|
25
|
+
header: {
|
|
26
|
+
stickyTop: true,
|
|
27
|
+
zIndex: 2,
|
|
28
|
+
backgroundColor: '#EFF2FB',
|
|
29
|
+
fontWeight: 'bold',
|
|
30
|
+
textAlign: 'left',
|
|
31
|
+
padding: '12px 16px',
|
|
32
|
+
height: '30px',
|
|
33
|
+
},
|
|
34
|
+
footer: {
|
|
35
|
+
// stickyBottom: true,
|
|
36
|
+
// zIndex: 2,
|
|
37
|
+
padding: '3px',
|
|
38
|
+
},
|
|
39
|
+
// body: {
|
|
40
|
+
// background: '#fff',
|
|
41
|
+
// padding: '4px 5px',
|
|
42
|
+
// textAlign: 'center',
|
|
43
|
+
// },
|
|
44
|
+
// firstColumn: {
|
|
45
|
+
// stickyLeft: true,
|
|
46
|
+
// zIndex: 1,
|
|
47
|
+
// },
|
|
48
|
+
lastColumn: {
|
|
49
|
+
// stickyRight: true,
|
|
50
|
+
// zIndex: 1,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Observable, catchError, from, tap, throwError } from 'rxjs';
|
|
3
|
+
import { UserManagementState } from '../states/user-management.state';
|
|
4
|
+
import { User } from '../../../models/user';
|
|
5
|
+
import { QueryParams } from '../../../models/query-params';
|
|
6
|
+
import { UserManagementService } from '../services/user-management.service';
|
|
7
|
+
import { UtilService } from '../../../services/util.service';
|
|
8
|
+
|
|
9
|
+
@Injectable({
|
|
10
|
+
providedIn: 'root',
|
|
11
|
+
})
|
|
12
|
+
export class UserManagementFacade {
|
|
13
|
+
constructor(
|
|
14
|
+
private userManagementService: UserManagementService,
|
|
15
|
+
private userManagementState: UserManagementState,
|
|
16
|
+
private utilService: UtilService
|
|
17
|
+
) {
|
|
18
|
+
this.isUpdating$().subscribe((loading) => {
|
|
19
|
+
this.utilService.sendBI(loading);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
isUpdating$(): Observable<boolean> {
|
|
24
|
+
return this.userManagementState.isUpdating$();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
getUsers$(): Observable<User[]> {
|
|
28
|
+
return this.userManagementState.getUsers$();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getQueryParams$(): Observable<QueryParams<User>> {
|
|
32
|
+
return this.userManagementState.getQueryParams$();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async loadUsers(): Promise<void> {
|
|
36
|
+
try {
|
|
37
|
+
this.userManagementState.setUpdating(true);
|
|
38
|
+
const params = this.userManagementState.getQueryParamsValue() as QueryParams<User>;
|
|
39
|
+
|
|
40
|
+
const users = await this.userManagementService.getUsers(
|
|
41
|
+
params.skip,
|
|
42
|
+
params.limit,
|
|
43
|
+
params.sortParam || 'createdDate',
|
|
44
|
+
params.sortOrder
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (Array.isArray(users)) {
|
|
48
|
+
this.userManagementState.setUsers(users); // Safe to use
|
|
49
|
+
} else {
|
|
50
|
+
console.error('Error Response:', users);
|
|
51
|
+
throw new Error(users.ErrorMsg); // Assuming ErrorResponse has a `message` property
|
|
52
|
+
}
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error('Failed to load users:', error);
|
|
55
|
+
throw error;
|
|
56
|
+
} finally {
|
|
57
|
+
this.userManagementState.setUpdating(false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async loadUsersWithParam(param: string): Promise<void> {
|
|
62
|
+
try {
|
|
63
|
+
this.userManagementState.setUpdating(true);
|
|
64
|
+
const params = this.userManagementState.getQueryParamsValue();
|
|
65
|
+
|
|
66
|
+
const users = await this.userManagementService.getUsersWithParam(
|
|
67
|
+
param,
|
|
68
|
+
params.skip,
|
|
69
|
+
params.limit,
|
|
70
|
+
params.sortParam || 'createdDate',
|
|
71
|
+
params.sortOrder
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
this.userManagementState.setUsers(users);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error('Failed to load users with param:', error);
|
|
77
|
+
throw error;
|
|
78
|
+
} finally {
|
|
79
|
+
this.userManagementState.setUpdating(false);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
updateQueryParams(params: Partial<QueryParams<User>>): void {
|
|
84
|
+
this.userManagementState.updateQueryParams(params);
|
|
85
|
+
this.loadUsers();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async addUser(user: Partial<User>): Promise<void> {
|
|
89
|
+
try {
|
|
90
|
+
this.userManagementState.setUpdating(true);
|
|
91
|
+
const newUser = { ...user } as User;
|
|
92
|
+
this.userManagementState.addUser(newUser);
|
|
93
|
+
|
|
94
|
+
await this.userManagementService.saveUsers([newUser]);
|
|
95
|
+
await this.loadUsers(); // Reload to reflect server-side changes
|
|
96
|
+
} catch (error) {
|
|
97
|
+
console.error('Failed to add user:', error);
|
|
98
|
+
this.userManagementState.removeUser(user.Id!);
|
|
99
|
+
throw error;
|
|
100
|
+
} finally {
|
|
101
|
+
this.userManagementState.setUpdating(false);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async updateUser(user: User): Promise<void> {
|
|
106
|
+
try {
|
|
107
|
+
this.userManagementState.setUpdating(true);
|
|
108
|
+
await this.userManagementService.saveUsers([user]);
|
|
109
|
+
this.userManagementState.updateUser(user);
|
|
110
|
+
this.utilService.showSuccess("User updated successfully");
|
|
111
|
+
} catch (error) {
|
|
112
|
+
console.error('Failed to update user:', error);
|
|
113
|
+
throw error;
|
|
114
|
+
} finally {
|
|
115
|
+
this.userManagementState.setUpdating(false);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async deleteUser(userId: string): Promise<void> {
|
|
120
|
+
try {
|
|
121
|
+
this.userManagementState.setUpdating(true);
|
|
122
|
+
await from(
|
|
123
|
+
this.userManagementService.deleteUsers([userId])
|
|
124
|
+
).toPromise();
|
|
125
|
+
this.userManagementState.removeUser(userId);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error('Failed to delete user:', error);
|
|
128
|
+
throw error;
|
|
129
|
+
} finally {
|
|
130
|
+
this.userManagementState.setUpdating(false);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ObjectState } from '../../models/object-state';
|
|
2
|
+
import { UserManagementService } from './services/user-management.service';
|
|
3
|
+
|
|
4
|
+
import { UserAccessRequestStatus } from '../../models/user-access-request-status';
|
|
5
|
+
import { OAuthType } from '../../models/OAuthType';
|
|
6
|
+
import { User } from '../../models/user';
|
|
7
|
+
|
|
8
|
+
// export const mockData: User[] = new Array(10)
|
|
9
|
+
// .fill(1)
|
|
10
|
+
// .map((id, i) => ({
|
|
11
|
+
// FirstName: `First ${id + i}`,
|
|
12
|
+
// LastName: `Last ${id + i}`,
|
|
13
|
+
// OtherName: `Other ${id + i}`,
|
|
14
|
+
// Id: id + i,
|
|
15
|
+
// id: (id + i).toString(),
|
|
16
|
+
// MailAddress: `user${id + i}@mail.com`,
|
|
17
|
+
// PhoneNumber: `+23480000000${id + i}`,
|
|
18
|
+
// Status: randomEnum(UserAccessRequestStatus),
|
|
19
|
+
// Address: `AAA Bloc2`,
|
|
20
|
+
// SignupType: OAuthType.InApp,
|
|
21
|
+
// Password: '1234567',
|
|
22
|
+
// ExpireOn: new Date(),
|
|
23
|
+
// IsSeeded: false,
|
|
24
|
+
// OTPExpireOn: new Date(),
|
|
25
|
+
// Tenants: [],
|
|
26
|
+
|
|
27
|
+
// CreatedAt: new Date(),
|
|
28
|
+
// UpdatedAt: new Date(),
|
|
29
|
+
// DataState: ObjectState.New,
|
|
30
|
+
// TenantId: `Tenant${id + i}`,
|
|
31
|
+
// Code: '',
|
|
32
|
+
// ServiceName: '',
|
|
33
|
+
// }));
|
|
34
|
+
function randomEnum<T extends object>(anEnum: T): T[keyof T] {
|
|
35
|
+
const enumValues = Object.values(anEnum) as unknown as T[keyof T][];
|
|
36
|
+
const randomIndex = Math.floor(Math.random() * enumValues.length);
|
|
37
|
+
return enumValues[randomIndex];
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { UserManagementService } from './user-management.service';
|
|
4
|
+
|
|
5
|
+
describe('UserManagementService', () => {
|
|
6
|
+
let service: UserManagementService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(UserManagementService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HttpWebRequestService } from '../../../services/http-web-request.service';
|
|
4
|
+
import { ErrorResponse } from '../../../models/ErrorResponse';
|
|
5
|
+
import { PagedResult } from '../../../models/PagedResult';
|
|
6
|
+
import { User } from '../../../models/user';
|
|
7
|
+
|
|
8
|
+
@Injectable({
|
|
9
|
+
providedIn: 'root',
|
|
10
|
+
})
|
|
11
|
+
export class UserManagementService {
|
|
12
|
+
// private readonly BASE_URL = 'https://auth.white360.net/User';
|
|
13
|
+
|
|
14
|
+
constructor(private httpService: HttpWebRequestService) {}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Get users with pagination and sorting
|
|
18
|
+
* @param skip Number of records to skip
|
|
19
|
+
* @param limit Number of records to take
|
|
20
|
+
* @param sortParam Sort parameter
|
|
21
|
+
* @param sortOrder Sort order ('asc' or 'desc')
|
|
22
|
+
* @returns Promise containing the list of users
|
|
23
|
+
*/
|
|
24
|
+
async getUsers(
|
|
25
|
+
skip: number,
|
|
26
|
+
limit: number,
|
|
27
|
+
sortParam: string,
|
|
28
|
+
sortOrder: string
|
|
29
|
+
): Promise<User[] | ErrorResponse> {
|
|
30
|
+
// var response : User[] | ErrorResponse;
|
|
31
|
+
const url = `User/GetUsers/${skip}/${limit}/${sortParam}/${sortOrder}`;
|
|
32
|
+
const res = await this.httpService.get(url)
|
|
33
|
+
|
|
34
|
+
if (res instanceof ErrorResponse) {
|
|
35
|
+
return res;
|
|
36
|
+
} else {
|
|
37
|
+
return (res as PagedResult<User>).Result;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Get users with an additional search parameter, pagination, and sorting
|
|
47
|
+
* @param param Search parameter
|
|
48
|
+
* @param skip Number of records to skip
|
|
49
|
+
* @param limit Number of records to take
|
|
50
|
+
* @param sortParam Sort parameter
|
|
51
|
+
* @param sortOrder Sort order ('asc' or 'desc')
|
|
52
|
+
* @returns Promise containing the filtered list of users
|
|
53
|
+
*/
|
|
54
|
+
async getUsersWithParam(
|
|
55
|
+
param: string,
|
|
56
|
+
skip: number,
|
|
57
|
+
limit: number,
|
|
58
|
+
sortParam: string,
|
|
59
|
+
sortOrder: string
|
|
60
|
+
): Promise<User[]> {
|
|
61
|
+
const url = `User/GetUserWithParam/${param}/${skip}/${limit}/${sortParam}/${sortOrder}`;
|
|
62
|
+
return await this.httpService.get(url) as User[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async getRealUsers(
|
|
66
|
+
role: string | null,
|
|
67
|
+
skip: number,
|
|
68
|
+
limit: number,
|
|
69
|
+
sortParam: string,
|
|
70
|
+
sortOrder: string
|
|
71
|
+
){
|
|
72
|
+
let url: string;
|
|
73
|
+
|
|
74
|
+
if (role) {
|
|
75
|
+
// Role is provided, use the "GetUserWithParam" endpoint
|
|
76
|
+
url = `User/GetUserWithParam/${role}/${skip}/${limit}/${sortParam}/${sortOrder}`;
|
|
77
|
+
} else {
|
|
78
|
+
// Role is null, use the "GetUsers" endpoint
|
|
79
|
+
url = `User/GetUsers/${skip}/${limit}/${sortParam}/${sortOrder}`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const res = await this.httpService.get(url);
|
|
83
|
+
|
|
84
|
+
if (res instanceof ErrorResponse) {
|
|
85
|
+
return res;
|
|
86
|
+
} else {
|
|
87
|
+
return (res as PagedResult<User>)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Save multiple users
|
|
94
|
+
* @param users Array of users to save
|
|
95
|
+
* @returns Promise containing the save operation result
|
|
96
|
+
*/
|
|
97
|
+
saveUsers(users: User[]): Promise<any> {
|
|
98
|
+
const url = `User/SaveUsers`;
|
|
99
|
+
return this.httpService.post(url, users);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Delete multiple users
|
|
104
|
+
* @param userIds Array of user IDs to delete
|
|
105
|
+
* @returns Observable containing the delete operation result
|
|
106
|
+
*/
|
|
107
|
+
deleteUsers(userIds: string[]): Observable<any> {
|
|
108
|
+
const url = `User/DeleteUsers`;
|
|
109
|
+
return this.httpService.delete(`${url}?data=${userIds.join(',')}`);
|
|
110
|
+
}
|
|
111
|
+
}
|