verben-authentication-ui 1.0.2 → 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,269 @@
|
|
|
1
|
+
<div class="space-y-8">
|
|
2
|
+
<verben-data-view
|
|
3
|
+
#vdv
|
|
4
|
+
[viewState]="{
|
|
5
|
+
isSearch: true,
|
|
6
|
+
isColumn: true,
|
|
7
|
+
isFilter: true,
|
|
8
|
+
isSort: true,
|
|
9
|
+
isExport: true,
|
|
10
|
+
isSelect: true,
|
|
11
|
+
isCreate: false,
|
|
12
|
+
isToggle: true,
|
|
13
|
+
}"
|
|
14
|
+
[buttonClass]="'my-custom-button-class'"
|
|
15
|
+
[iconClass]="'my-icon-class'"
|
|
16
|
+
[activeIconClass]="'my-active-icon-class'"
|
|
17
|
+
[selectedColumnCount]="0"
|
|
18
|
+
[selectedSortCount]="0"
|
|
19
|
+
[selectedFilterTableCount]="0"
|
|
20
|
+
(viewChange)="onViewChange($event)"
|
|
21
|
+
(stateChange)="onStateChange($event)"
|
|
22
|
+
(onSearchChange)="handleSearch($event)"
|
|
23
|
+
>
|
|
24
|
+
<div table-content>
|
|
25
|
+
<lib-data-table
|
|
26
|
+
[data]="data()"
|
|
27
|
+
[columns]="visibleColumnDef"
|
|
28
|
+
[styleConfig]="styles"
|
|
29
|
+
(selectionChange)="onSelectionChange($event)"
|
|
30
|
+
>
|
|
31
|
+
<ng-container libColumn="createdAt">
|
|
32
|
+
<ng-template #cell let-value>
|
|
33
|
+
{{ value | date }}
|
|
34
|
+
</ng-template>
|
|
35
|
+
</ng-container>
|
|
36
|
+
<ng-container libColumn="status">
|
|
37
|
+
<ng-template #cell let-value>
|
|
38
|
+
<lib-user-access-request-status-badge
|
|
39
|
+
[status]="value"
|
|
40
|
+
></lib-user-access-request-status-badge>
|
|
41
|
+
</ng-template>
|
|
42
|
+
</ng-container>
|
|
43
|
+
|
|
44
|
+
<ng-container libColumn="actions">
|
|
45
|
+
<ng-template #cell let-value let-deleteRow>
|
|
46
|
+
<div class="flex gap-6">
|
|
47
|
+
<verben-svg
|
|
48
|
+
(click)="openDetailView(value)"
|
|
49
|
+
icon="edit"
|
|
50
|
+
[width]="15"
|
|
51
|
+
[height]="15"
|
|
52
|
+
class="cursor-pointer"
|
|
53
|
+
></verben-svg>
|
|
54
|
+
<!-- <button (click)="openDetailView(value)">Open</button>
|
|
55
|
+
<button (click)="selected = cardData[rowIndex]; vdv.toggleView()">
|
|
56
|
+
Switch
|
|
57
|
+
</button> -->
|
|
58
|
+
<verben-svg
|
|
59
|
+
icon="delete"
|
|
60
|
+
[width]="15"
|
|
61
|
+
[height]="15"
|
|
62
|
+
(click)="deleteRow()"
|
|
63
|
+
class="cursor-pointer"
|
|
64
|
+
></verben-svg>
|
|
65
|
+
</div>
|
|
66
|
+
</ng-template>
|
|
67
|
+
<!-- <ng-template #header>
|
|
68
|
+
<strong>Actions</strong>
|
|
69
|
+
</ng-template> -->
|
|
70
|
+
</ng-container>
|
|
71
|
+
</lib-data-table>
|
|
72
|
+
</div>
|
|
73
|
+
<div card-content>
|
|
74
|
+
<verben-card-data-view
|
|
75
|
+
borderRadius="12px"
|
|
76
|
+
(loadMoreClick)="loadMore()"
|
|
77
|
+
#vdcv
|
|
78
|
+
dataId="MailAddress"
|
|
79
|
+
border="5px"
|
|
80
|
+
[cardDataList]="cardData()"
|
|
81
|
+
rbgColor="#f5f6f9"
|
|
82
|
+
mg="20px"
|
|
83
|
+
>
|
|
84
|
+
<verben-left-card-data-view class="space-y-7">
|
|
85
|
+
<verben-left-card-data
|
|
86
|
+
#vlcd
|
|
87
|
+
[parent]="vdcv"
|
|
88
|
+
dataId="MailAddress"
|
|
89
|
+
class="bg-secondary-100 rounded-xl border-primary border-[1px]"
|
|
90
|
+
[cardDataList]="cardData()"
|
|
91
|
+
>
|
|
92
|
+
<ng-template #card let-item>
|
|
93
|
+
<div (click)="currentData = vdcv.onItemClick(item)" class="flex">
|
|
94
|
+
<div
|
|
95
|
+
(click)="currentData = vdcv.onItemClick(item)"
|
|
96
|
+
class="flex cursor-pointer w-full bg-secondary rounded-xl"
|
|
97
|
+
>
|
|
98
|
+
<div
|
|
99
|
+
class="w-3 rounded-xl rounded-tr-none rounded-br-none"
|
|
100
|
+
[ngClass]="
|
|
101
|
+
item.selected ? 'bg-primary' : 'bg-secondary-200'
|
|
102
|
+
"
|
|
103
|
+
></div>
|
|
104
|
+
<div class="flex-1 flex items-end gap-y-2 gap-x-4 p-4">
|
|
105
|
+
<div class="flex-1 space-y-2">
|
|
106
|
+
<span
|
|
107
|
+
class="font-semibold text-[#404040] flex-1 truncate"
|
|
108
|
+
>{{ item.title }}</span
|
|
109
|
+
>
|
|
110
|
+
|
|
111
|
+
<p class="flex items-center my-1">
|
|
112
|
+
<label for="phone" class="text-[10px] font-light"
|
|
113
|
+
>Phone Number:</label
|
|
114
|
+
>
|
|
115
|
+
<span id="phone" class="text-sm truncate">{{
|
|
116
|
+
item.data.PhoneNumber
|
|
117
|
+
}}</span>
|
|
118
|
+
</p>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="grid gap-y-1">
|
|
122
|
+
<p class="grid">
|
|
123
|
+
<label
|
|
124
|
+
for="role"
|
|
125
|
+
class="text-[10px] font-light text-[#404040]"
|
|
126
|
+
>Role</label
|
|
127
|
+
>
|
|
128
|
+
<span id="role" class="text-sm font-medium">{{
|
|
129
|
+
item.data?.Role?.Name
|
|
130
|
+
}}</span>
|
|
131
|
+
</p>
|
|
132
|
+
|
|
133
|
+
<lib-user-access-request-status-badge
|
|
134
|
+
[status]="item.data.RequestStatus"
|
|
135
|
+
></lib-user-access-request-status-badge>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</ng-template>
|
|
141
|
+
</verben-left-card-data>
|
|
142
|
+
</verben-left-card-data-view>
|
|
143
|
+
|
|
144
|
+
<verben-right-card-data-view>
|
|
145
|
+
<ng-template #parent>
|
|
146
|
+
<lib-user-request-form
|
|
147
|
+
[roles]="roles()"
|
|
148
|
+
[currentData]="currentData"
|
|
149
|
+
(switchView)="vdv.toggleView()"
|
|
150
|
+
(onApproval)="onApprove($event)"
|
|
151
|
+
></lib-user-request-form>
|
|
152
|
+
</ng-template>
|
|
153
|
+
</verben-right-card-data-view>
|
|
154
|
+
|
|
155
|
+
<verben-card-data-view-footer class="w-full">
|
|
156
|
+
<div
|
|
157
|
+
[ngClass]="{
|
|
158
|
+
'flex gap-2 items-center': true,
|
|
159
|
+
'justify-end': true,
|
|
160
|
+
}"
|
|
161
|
+
>
|
|
162
|
+
<!-- <verbena-button
|
|
163
|
+
*ngIf="!vdcv.hasCurrentItem()"
|
|
164
|
+
[fontWeight]="'bold'"
|
|
165
|
+
[bgColor]="'#8E8D87'"
|
|
166
|
+
[borderRadius]="'4px'"
|
|
167
|
+
[textColor]="'#fff'"
|
|
168
|
+
[pd]="'9.79px 37.28px'"
|
|
169
|
+
[text]="'Delete'"
|
|
170
|
+
>
|
|
171
|
+
</verbena-button> -->
|
|
172
|
+
<div
|
|
173
|
+
class="flex {{
|
|
174
|
+
vdcv.hasCurrentItem() ? 'flex-1' : ''
|
|
175
|
+
}} justify-end items-center gap-5"
|
|
176
|
+
>
|
|
177
|
+
<span class="paginator-text"
|
|
178
|
+
>{{ cardData().length }} records loaded</span
|
|
179
|
+
>
|
|
180
|
+
<button
|
|
181
|
+
(click)="loadMore()"
|
|
182
|
+
class="load-more view-links text-[#3479E9] underline"
|
|
183
|
+
>
|
|
184
|
+
Load more
|
|
185
|
+
</button>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</verben-card-data-view-footer>
|
|
189
|
+
</verben-card-data-view>
|
|
190
|
+
</div>
|
|
191
|
+
<div column-content>
|
|
192
|
+
<verben-visible-column
|
|
193
|
+
(columnsUpdated)="onColumnsUpdated($event)"
|
|
194
|
+
[border]="'1px solid rgba(212, 160, 7, 1)'"
|
|
195
|
+
borderRadius="10px"
|
|
196
|
+
boxShadow="2px 2px 2px 0px silver"
|
|
197
|
+
bgColor="white"
|
|
198
|
+
width="400px"
|
|
199
|
+
textColor="black"
|
|
200
|
+
pd="1rem"
|
|
201
|
+
primaryColor="#FFE681"
|
|
202
|
+
secondaryColor="#3479E9"
|
|
203
|
+
[columns]="visibleColumns"
|
|
204
|
+
[displayedColumns]="5"
|
|
205
|
+
></verben-visible-column>
|
|
206
|
+
</div>
|
|
207
|
+
<div filter-content>
|
|
208
|
+
<verben-table-filter
|
|
209
|
+
(filtersApplied)="onFilterSet($event)"
|
|
210
|
+
[border]="'1px solid rgba(212, 160, 7, 1)'"
|
|
211
|
+
borderRadius="10px"
|
|
212
|
+
boxShadow="2px 2px 2px 0px silver"
|
|
213
|
+
bgColor="white"
|
|
214
|
+
width="420px"
|
|
215
|
+
textColor="black"
|
|
216
|
+
pd="1rem"
|
|
217
|
+
primaryColor="#FFE681"
|
|
218
|
+
secondaryColor="#3479E9"
|
|
219
|
+
tertiaryColor="#404040"
|
|
220
|
+
[filterOptions]="filterArray"
|
|
221
|
+
[maxFilterLength]="3"
|
|
222
|
+
></verben-table-filter>
|
|
223
|
+
</div>
|
|
224
|
+
<div sort-content>
|
|
225
|
+
<verben-sort-table
|
|
226
|
+
(selectedOptions)="onSortUpdated($event)"
|
|
227
|
+
[border]="'1px solid rgba(212, 160, 7, 1)'"
|
|
228
|
+
borderRadius="10px"
|
|
229
|
+
boxShadow="2px 2px 2px 0px silver"
|
|
230
|
+
bgColor="white"
|
|
231
|
+
width="400px"
|
|
232
|
+
textColor="black"
|
|
233
|
+
pd="1rem"
|
|
234
|
+
primaryColor="#FFE681"
|
|
235
|
+
secondaryColor="#3479E9"
|
|
236
|
+
tertiaryColor="#404040"
|
|
237
|
+
[enableDragAndDrop]="true"
|
|
238
|
+
[sortOptions]="sortOptions"
|
|
239
|
+
></verben-sort-table>
|
|
240
|
+
</div>
|
|
241
|
+
<div export-content>
|
|
242
|
+
<lib-data-export [data]="data()" (exportDataEvent)="handleExport($event)">
|
|
243
|
+
</lib-data-export>
|
|
244
|
+
</div>
|
|
245
|
+
</verben-data-view>
|
|
246
|
+
|
|
247
|
+
<div *ngIf="vdv.isTableView" class="flex gap-2 justify-end">
|
|
248
|
+
<!-- <div class="message-log-button-container flex justify-between">
|
|
249
|
+
<verbena-button
|
|
250
|
+
[fontWeight]="'bold'"
|
|
251
|
+
[bgColor]="'#8E8D87'"
|
|
252
|
+
[borderRadius]="'4px'"
|
|
253
|
+
[textColor]="'#fff'"
|
|
254
|
+
[pd]="'9.79px 37.28px'"
|
|
255
|
+
[text]="'Delete'"
|
|
256
|
+
>
|
|
257
|
+
</verbena-button>
|
|
258
|
+
</div> -->
|
|
259
|
+
<div class="flex justify-end items-center gap-5">
|
|
260
|
+
<span class="paginator-text">{{ cardData().length }} records loaded</span>
|
|
261
|
+
<button
|
|
262
|
+
(click)="loadMore()"
|
|
263
|
+
class="load-more view-links text-[#3479E9] underline"
|
|
264
|
+
>
|
|
265
|
+
Load more
|
|
266
|
+
</button>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { UserRequestApprovalComponent } from './user-request-approval.component';
|
|
4
|
+
|
|
5
|
+
describe('UserRequestApprovalComponent', () => {
|
|
6
|
+
let component: UserRequestApprovalComponent;
|
|
7
|
+
let fixture: ComponentFixture<UserRequestApprovalComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [UserRequestApprovalComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(UserRequestApprovalComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
computed,
|
|
6
|
+
OnInit,
|
|
7
|
+
Signal,
|
|
8
|
+
signal,
|
|
9
|
+
ViewChild,
|
|
10
|
+
WritableSignal,
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { columns } from './access-request.columns';
|
|
13
|
+
import { baseStyle } from './base-table-style';
|
|
14
|
+
import { UserAccessRequest } from '../../models/user-access-request';
|
|
15
|
+
import { Role } from '../../models/Role';
|
|
16
|
+
import {
|
|
17
|
+
CardData,
|
|
18
|
+
CardDataViewComponent,
|
|
19
|
+
ColumnDefinition,
|
|
20
|
+
DataFilterType,
|
|
21
|
+
DataViewComponent,
|
|
22
|
+
IDataFilter,
|
|
23
|
+
} from 'verben-ng-ui';
|
|
24
|
+
import { UserAccessRequestFacade } from './facades/user-access-request.facade';
|
|
25
|
+
|
|
26
|
+
interface UserFormData {
|
|
27
|
+
MailAddress: string;
|
|
28
|
+
Name: string;
|
|
29
|
+
PhoneNumber: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Component({
|
|
33
|
+
selector: 'lib-user-request-approval',
|
|
34
|
+
templateUrl: './user-request-approval.component.html',
|
|
35
|
+
styleUrl: './user-request-approval.component.css',
|
|
36
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
37
|
+
})
|
|
38
|
+
export class UserRequestApprovalComponent implements OnInit {
|
|
39
|
+
@ViewChild('vdcv') cardDataView!: CardDataViewComponent;
|
|
40
|
+
@ViewChild('vdv') dataView!: DataViewComponent;
|
|
41
|
+
|
|
42
|
+
columns: ColumnDefinition<UserAccessRequest>[] = columns;
|
|
43
|
+
// visibleColumnDef: WritableSignal<ColumnDefinition<UserAccessRequest>[]> =
|
|
44
|
+
// signal(columns);
|
|
45
|
+
visibleColumnDef = this.columns;
|
|
46
|
+
data: WritableSignal<UserAccessRequest[]> = signal([]);
|
|
47
|
+
styles = baseStyle;
|
|
48
|
+
currentData: CardData | null = null;
|
|
49
|
+
isGridView = true;
|
|
50
|
+
selected: CardData | null = null;
|
|
51
|
+
|
|
52
|
+
cardData: Signal<CardData[]> = computed(() =>
|
|
53
|
+
this.data()?.map(
|
|
54
|
+
({
|
|
55
|
+
FirstName,
|
|
56
|
+
LastName,
|
|
57
|
+
MailAddress,
|
|
58
|
+
PhoneNumber,
|
|
59
|
+
RoleID,
|
|
60
|
+
RequestStatus,
|
|
61
|
+
Role,
|
|
62
|
+
}) => ({
|
|
63
|
+
selected: false,
|
|
64
|
+
title: `${FirstName} ${LastName}`,
|
|
65
|
+
data: {
|
|
66
|
+
FirstName,
|
|
67
|
+
LastName,
|
|
68
|
+
MailAddress,
|
|
69
|
+
PhoneNumber,
|
|
70
|
+
RoleID,
|
|
71
|
+
RequestStatus,
|
|
72
|
+
Role,
|
|
73
|
+
} as Partial<UserAccessRequest>,
|
|
74
|
+
body: [{ title: 'Role', value: Role?.Name ?? '' }],
|
|
75
|
+
children: [],
|
|
76
|
+
})
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
roles: WritableSignal<Role[]> = signal([]);
|
|
81
|
+
|
|
82
|
+
constructor(
|
|
83
|
+
private cdr: ChangeDetectorRef,
|
|
84
|
+
// private service: UserRequestApprovalService,
|
|
85
|
+
private userAccessRequestFacade: UserAccessRequestFacade
|
|
86
|
+
) {}
|
|
87
|
+
|
|
88
|
+
async ngOnInit() {
|
|
89
|
+
// this.data = this.service.getMockUserRequests();
|
|
90
|
+
this.userAccessRequestFacade.getRequests$().subscribe((data) => {
|
|
91
|
+
this.data.set(data);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
this.userAccessRequestFacade.getRoles$().subscribe((data) => {
|
|
95
|
+
this.roles.set(data);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
this.userAccessRequestFacade.loadRequests();
|
|
100
|
+
this.userAccessRequestFacade.loadRoles();
|
|
101
|
+
} catch (error) {
|
|
102
|
+
// Handle error
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
ngOnDestroy() {
|
|
107
|
+
this.userAccessRequestFacade.destroy();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
handleSearch(event: { key: string; value: string }) {
|
|
111
|
+
this.userAccessRequestFacade.search(event.value);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
async loadMore() {
|
|
115
|
+
try {
|
|
116
|
+
await this.userAccessRequestFacade.loadMore();
|
|
117
|
+
} catch (error) {
|
|
118
|
+
// Handle error
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// To search with parameter:
|
|
123
|
+
async searchRequests(param: string) {
|
|
124
|
+
try {
|
|
125
|
+
await this.userAccessRequestFacade.loadRequestsWithParam(param);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
// Handle error
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async onApprove(approvalData: { email: string; role: string }) {
|
|
132
|
+
const data = this.data().find(
|
|
133
|
+
({ MailAddress }) => MailAddress === approvalData.email
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
if (data) {
|
|
137
|
+
await this.userAccessRequestFacade.approveRequest({
|
|
138
|
+
...data,
|
|
139
|
+
RoleID: approvalData.role,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
openDetailView(mailAddress: string) {
|
|
145
|
+
const cardItem = this.getCardDataByMailAddress(mailAddress);
|
|
146
|
+
if (cardItem && this.cardDataView) {
|
|
147
|
+
this.dataView.toggleView();
|
|
148
|
+
// First reset all selections
|
|
149
|
+
this.cardData().forEach((item) => {
|
|
150
|
+
item.selected = false;
|
|
151
|
+
if (item.children) {
|
|
152
|
+
item.children.forEach((child) => (child.selected = false));
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// Set the selected item
|
|
157
|
+
cardItem.selected = true;
|
|
158
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
159
|
+
|
|
160
|
+
// Force change detection if needed
|
|
161
|
+
// this.changeDetectorRef.detectChanges();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
getCardDataByMailAddress(mailAddress: string): CardData | undefined {
|
|
166
|
+
return this.cardData().find(({ data }) => data.MailAddress === mailAddress);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
onViewChange(isGridView: boolean): void {
|
|
170
|
+
this.isGridView = isGridView;
|
|
171
|
+
// Reset selection when switching views
|
|
172
|
+
if (this.currentData) {
|
|
173
|
+
this.cardDataView?.clearData();
|
|
174
|
+
this.currentData = null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
console.log('SELECTED', this.selected);
|
|
178
|
+
|
|
179
|
+
if (this.selected) {
|
|
180
|
+
this.cardDataView.onItemClick(this.selected);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
openFormView(index: number) {
|
|
185
|
+
const item = this.cardData()[index];
|
|
186
|
+
console.log('ITEM = ', item);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
handleExport(exportedData: Partial<any>[]) {
|
|
190
|
+
console.log('Exported data:', exportedData);
|
|
191
|
+
this.downloadCSV(exportedData);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @param data Simple csv export for testing
|
|
196
|
+
*/
|
|
197
|
+
private downloadCSV(data: Partial<any>[]) {
|
|
198
|
+
const headers = Object.keys(data[0]);
|
|
199
|
+
const csvContent = [
|
|
200
|
+
headers.join(','),
|
|
201
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
202
|
+
].join('\n');
|
|
203
|
+
|
|
204
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
205
|
+
const link = document.createElement('a');
|
|
206
|
+
if (link.download !== undefined) {
|
|
207
|
+
const url = URL.createObjectURL(blob);
|
|
208
|
+
link.setAttribute('href', url);
|
|
209
|
+
link.setAttribute('download', 'export.csv');
|
|
210
|
+
link.style.visibility = 'hidden';
|
|
211
|
+
document.body.appendChild(link);
|
|
212
|
+
link.click();
|
|
213
|
+
document.body.removeChild(link);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
onSelectionChange(selectedRows: UserAccessRequest[]) {
|
|
218
|
+
console.log('Selection changed:', selectedRows);
|
|
219
|
+
// Handle the selection change
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Copied over from card view doc until I understand usage
|
|
224
|
+
*/
|
|
225
|
+
selectedColumnCount: number = 0;
|
|
226
|
+
selectedFilterTableCount: number = 0;
|
|
227
|
+
isOPen: boolean = true;
|
|
228
|
+
selectedSortCount: number = 0;
|
|
229
|
+
showColumn: boolean = false;
|
|
230
|
+
showSort: boolean = false;
|
|
231
|
+
selectedAll: boolean = false;
|
|
232
|
+
visibleColumns: IDataFilter[] = columns.map((col) => ({
|
|
233
|
+
checked: true,
|
|
234
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
235
|
+
type: DataFilterType.Bool,
|
|
236
|
+
}));
|
|
237
|
+
filterArray: IDataFilter[] = [
|
|
238
|
+
{
|
|
239
|
+
name: 'Name',
|
|
240
|
+
type: DataFilterType.String,
|
|
241
|
+
checked: false,
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'MailAddress',
|
|
245
|
+
type: DataFilterType.String,
|
|
246
|
+
checked: false,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'PhoneNumber',
|
|
250
|
+
type: DataFilterType.String,
|
|
251
|
+
checked: false,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: 'CreatedAt',
|
|
255
|
+
type: DataFilterType.Date,
|
|
256
|
+
checked: false,
|
|
257
|
+
},
|
|
258
|
+
];
|
|
259
|
+
|
|
260
|
+
sortOptions: IDataFilter[] = [
|
|
261
|
+
{
|
|
262
|
+
name: 'Name',
|
|
263
|
+
type: DataFilterType.String,
|
|
264
|
+
checked: false,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: 'MailAddress',
|
|
268
|
+
type: DataFilterType.String,
|
|
269
|
+
checked: false,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'PhoneNumber',
|
|
273
|
+
type: DataFilterType.String,
|
|
274
|
+
checked: false,
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'CreatedAt',
|
|
278
|
+
type: DataFilterType.Date,
|
|
279
|
+
checked: true,
|
|
280
|
+
},
|
|
281
|
+
];
|
|
282
|
+
clearData() {
|
|
283
|
+
this.currentData = {} as CardData;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
onColumnChange(event: boolean) {
|
|
287
|
+
this.showColumn = event;
|
|
288
|
+
}
|
|
289
|
+
onSortChange(event: boolean) {
|
|
290
|
+
this.showSort = event;
|
|
291
|
+
console.log(event);
|
|
292
|
+
}
|
|
293
|
+
onColumnsUpdated(updatedColumns: IDataFilter[]) {
|
|
294
|
+
console.log(updatedColumns);
|
|
295
|
+
const updatedColumnDef: ColumnDefinition<UserAccessRequest>[] = [];
|
|
296
|
+
updatedColumns.forEach((col) => {
|
|
297
|
+
const matchingCol = this.columns.find(
|
|
298
|
+
(column) => column.header === col.name || column.id === col.name
|
|
299
|
+
);
|
|
300
|
+
if (matchingCol) {
|
|
301
|
+
updatedColumnDef.push(matchingCol);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
console.log(updatedColumnDef);
|
|
306
|
+
this.visibleColumnDef = [...updatedColumnDef];
|
|
307
|
+
this.cdr.markForCheck();
|
|
308
|
+
|
|
309
|
+
this.onColumnChange(false);
|
|
310
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
311
|
+
}
|
|
312
|
+
onSortUpdated(updatedSorts: IDataFilter[]) {
|
|
313
|
+
this.onSortChange(false);
|
|
314
|
+
this.selectedSortCount = updatedSorts.length;
|
|
315
|
+
console.log(updatedSorts);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
onStateChange(event: { key: string; value: boolean }): void {
|
|
319
|
+
console.log(`State changed for ${event.key}:`, event.value);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
onFilterSet(event: IDataFilter[]): void {
|
|
323
|
+
console.log(event);
|
|
324
|
+
this.userAccessRequestFacade.filter(event);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { UserRequestApprovalComponent } from './user-request-approval.component';
|
|
4
|
+
import {
|
|
5
|
+
CardDataViewModule,
|
|
6
|
+
CardModule,
|
|
7
|
+
DataExportModule,
|
|
8
|
+
DataTableModule,
|
|
9
|
+
DataViewModule,
|
|
10
|
+
DropDownModule,
|
|
11
|
+
SortTableModule,
|
|
12
|
+
SvgModule,
|
|
13
|
+
TableFilterModule,
|
|
14
|
+
VerbenaBadgeModule,
|
|
15
|
+
VerbenaButtonModule,
|
|
16
|
+
VerbenaInputModule,
|
|
17
|
+
VisibleColumnModule,
|
|
18
|
+
} from 'verben-ng-ui';
|
|
19
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
20
|
+
import { UserRequestFormComponent } from './user-request-form/use-request-form.component';
|
|
21
|
+
import { UserAccessRequestStatusBadgeComponent } from './user-access-request-status-badge/user-access-request-status-badge.component';
|
|
22
|
+
|
|
23
|
+
@NgModule({
|
|
24
|
+
declarations: [
|
|
25
|
+
UserRequestApprovalComponent,
|
|
26
|
+
UserRequestFormComponent,
|
|
27
|
+
UserAccessRequestStatusBadgeComponent,
|
|
28
|
+
],
|
|
29
|
+
imports: [
|
|
30
|
+
CommonModule,
|
|
31
|
+
|
|
32
|
+
DataTableModule,
|
|
33
|
+
CardModule,
|
|
34
|
+
SvgModule,
|
|
35
|
+
DataViewModule,
|
|
36
|
+
CardDataViewModule,
|
|
37
|
+
SortTableModule,
|
|
38
|
+
VisibleColumnModule,
|
|
39
|
+
TableFilterModule,
|
|
40
|
+
DataExportModule,
|
|
41
|
+
FormsModule,
|
|
42
|
+
ReactiveFormsModule,
|
|
43
|
+
VerbenaInputModule,
|
|
44
|
+
VerbenaButtonModule,
|
|
45
|
+
VerbenaBadgeModule,
|
|
46
|
+
DropDownModule,
|
|
47
|
+
],
|
|
48
|
+
providers: [],
|
|
49
|
+
exports: [
|
|
50
|
+
UserRequestApprovalComponent,
|
|
51
|
+
UserAccessRequestStatusBadgeComponent,
|
|
52
|
+
],
|
|
53
|
+
})
|
|
54
|
+
export class LibUserRequestApprovalModule {}
|