verben-authentication-ui 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/auth-callback/auth-callback.component.mjs +57 -0
- package/esm2022/lib/components/auth-callback/auth-callback.module.mjs +18 -0
- package/esm2022/lib/components/button/button.component.mjs +46 -0
- package/esm2022/lib/components/button/button.module.mjs +20 -0
- package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +2 -0
- package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +92 -0
- package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +34 -0
- package/esm2022/lib/components/mail/mail.component.mjs +69 -0
- package/esm2022/lib/components/mail/mail.module.mjs +21 -0
- package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +108 -0
- package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +34 -0
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +107 -0
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +19 -0
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +86 -0
- package/esm2022/lib/components/otp-input/otp-input.module.mjs +23 -0
- package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +2 -0
- package/esm2022/lib/components/reset-password/reset-password.component.mjs +108 -0
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +34 -0
- package/esm2022/lib/components/role-control/ChildrenType.mjs +6 -0
- package/esm2022/lib/components/role-control/MappedRole.mjs +2 -0
- package/esm2022/lib/components/role-control/MappedRoleAction.mjs +2 -0
- package/esm2022/lib/components/role-control/MappedRoleContext.mjs +2 -0
- package/esm2022/lib/components/role-control/UIActions.mjs +7 -0
- package/esm2022/lib/components/role-control/UIs.mjs +40 -0
- package/esm2022/lib/components/role-control/base-table-style.mjs +53 -0
- package/esm2022/lib/components/role-control/role-control.component.mjs +1608 -0
- package/esm2022/lib/components/role-control/role-control.module.mjs +18 -0
- package/esm2022/lib/components/role-control/role-control.service.mjs +54 -0
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +318 -0
- package/esm2022/lib/components/sign-in/sign-in.module.mjs +24 -0
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +229 -0
- package/esm2022/lib/components/sign-up/sign-up.module.mjs +24 -0
- package/esm2022/lib/components/sso/base-table-style.mjs +53 -0
- package/esm2022/lib/components/sso/helper.mjs +16 -0
- package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +74 -0
- package/esm2022/lib/components/sso/sso.columns.mjs +29 -0
- package/esm2022/lib/components/sso/sso.component.mjs +236 -0
- package/esm2022/lib/components/sso/sso.module.mjs +63 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +209 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +22 -0
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +90 -0
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +19 -0
- package/esm2022/lib/components/user-management/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-management/services/user-management.service.mjs +88 -0
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +73 -0
- package/esm2022/lib/components/user-management/user-management.columns.mjs +53 -0
- package/esm2022/lib/components/user-management/user-management.component.mjs +536 -0
- package/esm2022/lib/components/user-management/user-management.module.mjs +85 -0
- package/esm2022/lib/components/user-management/user-status-badge/user-status-badge.component.mjs +26 -0
- package/esm2022/lib/components/user-request/user-request.component.mjs +320 -0
- package/esm2022/lib/components/user-request/user-request.module.mjs +38 -0
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +29 -0
- package/esm2022/lib/components/user-request-approval/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-request-approval/facades/user-access-request.facade.mjs +260 -0
- package/esm2022/lib/components/user-request-approval/helper.mjs +56 -0
- package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +93 -0
- package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +92 -0
- package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +26 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +271 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +83 -0
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +86 -0
- package/esm2022/lib/models/ApplicationRoleAction.mjs +2 -0
- package/esm2022/lib/models/ApplicationRoleContext.mjs +2 -0
- package/esm2022/lib/models/ErrorResponse.mjs +11 -0
- package/esm2022/lib/models/OAuthParam.mjs +2 -0
- package/esm2022/lib/models/OAuthType.mjs +9 -0
- package/esm2022/lib/models/PagedResult.mjs +2 -0
- package/esm2022/lib/models/PasswordRequestParam.mjs +2 -0
- package/esm2022/lib/models/PermissionConfig.mjs +2 -0
- package/esm2022/lib/models/ResponseKeyValue.mjs +2 -0
- package/esm2022/lib/models/Role.mjs +2 -0
- package/esm2022/lib/models/RoleAction.mjs +2 -0
- package/esm2022/lib/models/RoleContext.mjs +2 -0
- package/esm2022/lib/models/SearchDynamicWrapper.mjs +2 -0
- package/esm2022/lib/models/SearchOperator.mjs +6 -0
- package/esm2022/lib/models/SearchPropertySign.mjs +11 -0
- package/esm2022/lib/models/SearchPropertyValue.mjs +2 -0
- package/esm2022/lib/models/SearchPropertyValueType.mjs +11 -0
- package/esm2022/lib/models/SortDirection.mjs +7 -0
- package/esm2022/lib/models/Tag.mjs +2 -0
- package/esm2022/lib/models/TenantConfig.mjs +2 -0
- package/esm2022/lib/models/UserRequest.mjs +2 -0
- package/esm2022/lib/models/auth-mechanism.mjs +8 -0
- package/esm2022/lib/models/base.mjs +2 -0
- package/esm2022/lib/models/conditions.mjs +13 -0
- package/esm2022/lib/models/log-in.mjs +2 -0
- package/esm2022/lib/models/mainUser.mjs +2 -0
- package/esm2022/lib/models/oauth-resp.mjs +2 -0
- package/esm2022/lib/models/oauth-response.mjs +2 -0
- package/esm2022/lib/models/object-state.mjs +8 -0
- package/esm2022/lib/models/otpValue.mjs +2 -0
- package/esm2022/lib/models/paged.mjs +2 -0
- package/esm2022/lib/models/query-params.mjs +2 -0
- package/esm2022/lib/models/request-status.mjs +5 -0
- package/esm2022/lib/models/resend-otp-data.mjs +2 -0
- package/esm2022/lib/models/sign-up.mjs +2 -0
- package/esm2022/lib/models/single-sign-on.mjs +2 -0
- package/esm2022/lib/models/status.mjs +6 -0
- package/esm2022/lib/models/user-access-request-status.mjs +7 -0
- package/esm2022/lib/models/user-access-request.mjs +2 -0
- package/esm2022/lib/models/user.mjs +2 -0
- package/esm2022/lib/pipes/async-label.pipe.mjs +25 -0
- package/esm2022/lib/services/authorization.service.mjs +26 -0
- package/esm2022/lib/services/encryption.service.mjs +52 -0
- package/esm2022/lib/services/environment.service.mjs +26 -0
- package/esm2022/lib/services/http-web-request.service.mjs +85 -0
- package/esm2022/lib/services/label.service.mjs +134 -0
- package/esm2022/lib/services/util.service.mjs +55 -0
- package/esm2022/lib/shared/shared.module.mjs +84 -0
- package/esm2022/public-api.mjs +48 -0
- package/esm2022/verben-authentication-ui.mjs +5 -0
- package/fesm2022/verben-authentication-ui.mjs +6622 -0
- package/fesm2022/verben-authentication-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/auth-callback/auth-callback.component.d.ts +17 -0
- package/lib/components/auth-callback/auth-callback.module.d.ts +8 -0
- package/lib/components/button/button.component.d.ts +17 -0
- package/lib/components/button/button.module.d.ts +10 -0
- package/{src/lib/components/forgot-password/ForgotPasswordData.ts → lib/components/forgot-password/ForgotPasswordData.d.ts} +1 -1
- package/lib/components/forgot-password/forgot-password.component.d.ts +30 -0
- package/lib/components/forgot-password/forgot-password.module.d.ts +10 -0
- package/lib/components/mail/mail.component.d.ts +32 -0
- package/lib/components/mail/mail.module.d.ts +11 -0
- package/lib/components/mail-validation/mail-validation.component.d.ts +42 -0
- package/lib/components/mail-validation/mail-validation.module.d.ts +10 -0
- package/lib/components/o-auth/o-auth.component.d.ts +30 -0
- package/lib/components/o-auth/o-auth.module.d.ts +9 -0
- package/lib/components/otp-input/otp-input.component.d.ts +21 -0
- package/lib/components/otp-input/otp-input.module.d.ts +13 -0
- package/lib/components/reset-password/ResetPasswordData.d.ts +5 -0
- package/lib/components/reset-password/reset-password.component.d.ts +30 -0
- package/lib/components/reset-password/reset-password.module.d.ts +10 -0
- package/lib/components/role-control/ChildrenType.d.ts +4 -0
- package/{src/lib/components/role-control/MappedRole.ts → lib/components/role-control/MappedRole.d.ts} +2 -3
- package/{src/lib/components/role-control/MappedRoleAction.ts → lib/components/role-control/MappedRoleAction.d.ts} +1 -2
- package/{src/lib/components/role-control/MappedRoleContext.ts → lib/components/role-control/MappedRoleContext.d.ts} +3 -4
- package/lib/components/role-control/UIActions.d.ts +5 -0
- package/lib/components/role-control/UIs.d.ts +38 -0
- package/lib/components/role-control/base-table-style.d.ts +1 -0
- package/lib/components/role-control/role-control.component.d.ts +131 -0
- package/lib/components/role-control/role-control.module.d.ts +8 -0
- package/lib/components/role-control/role-control.service.d.ts +9 -0
- package/lib/components/sign-in/sign-in.component.d.ts +95 -0
- package/lib/components/sign-in/sign-in.module.d.ts +13 -0
- package/lib/components/sign-up/sign-up.component.d.ts +68 -0
- package/lib/components/sign-up/sign-up.module.d.ts +13 -0
- package/lib/components/sso/base-table-style.d.ts +1 -0
- package/lib/components/sso/helper.d.ts +2 -0
- package/lib/components/sso/sso-form/sso-form.component.d.ts +21 -0
- package/lib/components/sso/sso.columns.d.ts +3 -0
- package/lib/components/sso/sso.component.d.ts +54 -0
- package/lib/components/sso/sso.module.d.ts +11 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +67 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +12 -0
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +39 -0
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +9 -0
- package/lib/components/user-management/base-table-style.d.ts +1 -0
- package/lib/components/user-management/services/user-management.service.d.ts +44 -0
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +24 -0
- package/lib/components/user-management/user-management.columns.d.ts +3 -0
- package/lib/components/user-management/user-management.component.d.ts +134 -0
- package/lib/components/user-management/user-management.module.d.ts +14 -0
- package/lib/components/user-management/user-status-badge/user-status-badge.component.d.ts +12 -0
- package/lib/components/user-request/user-request.component.d.ts +80 -0
- package/lib/components/user-request/user-request.module.d.ts +11 -0
- package/lib/components/user-request-approval/access-request.columns.d.ts +3 -0
- package/lib/components/user-request-approval/base-table-style.d.ts +1 -0
- package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +39 -0
- package/lib/components/user-request-approval/helper.d.ts +7 -0
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +65 -0
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +35 -0
- package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.component.d.ts +69 -0
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +25 -0
- package/lib/models/ApplicationRoleAction.d.ts +9 -0
- package/{src/lib/models/ApplicationRoleContext copy.ts → lib/models/ApplicationRoleContext.d.ts} +5 -6
- package/lib/models/ErrorResponse.d.ts +6 -0
- package/lib/models/OAuthParam.d.ts +9 -0
- package/lib/models/OAuthType.d.ts +7 -0
- package/lib/models/PagedResult.d.ts +9 -0
- package/lib/models/PasswordRequestParam.d.ts +5 -0
- package/{src/lib/models/PermissionConfig.ts → lib/models/PermissionConfig.d.ts} +3 -4
- package/lib/models/ResponseKeyValue.d.ts +5 -0
- package/{src/lib/models/Role.ts → lib/models/Role.d.ts} +5 -6
- package/lib/models/RoleAction.d.ts +10 -0
- package/lib/models/RoleContext.d.ts +10 -0
- package/{src/lib/models/SearchDynamicWrapper.ts → lib/models/SearchDynamicWrapper.d.ts} +2 -3
- package/lib/models/SearchOperator.d.ts +4 -0
- package/lib/models/SearchPropertySign.d.ts +9 -0
- package/{src/lib/models/SearchPropertyValue.ts → lib/models/SearchPropertyValue.d.ts} +6 -7
- package/lib/models/SearchPropertyValueType.d.ts +9 -0
- package/lib/models/SortDirection.d.ts +5 -0
- package/{src/lib/models/Tag.ts → lib/models/Tag.d.ts} +3 -4
- package/lib/models/TenantConfig.d.ts +18 -0
- package/lib/models/UserRequest.d.ts +32 -0
- package/lib/models/auth-mechanism.d.ts +14 -0
- package/lib/models/base.d.ts +12 -0
- package/lib/models/conditions.d.ts +11 -0
- package/lib/models/log-in.d.ts +8 -0
- package/{src/lib/models/mainUser.ts → lib/models/mainUser.d.ts} +2 -3
- package/lib/models/oauth-resp.d.ts +6 -0
- package/{src/lib/models/oauth-response.ts → lib/models/oauth-response.d.ts} +1 -1
- package/lib/models/object-state.d.ts +6 -0
- package/{src/lib/models/otpValue.ts → lib/models/otpValue.d.ts} +2 -4
- package/lib/models/paged.d.ts +9 -0
- package/lib/models/query-params.d.ts +8 -0
- package/lib/models/request-status.d.ts +3 -0
- package/lib/models/resend-otp-data.d.ts +8 -0
- package/lib/models/sign-up.d.ts +9 -0
- package/lib/models/single-sign-on.d.ts +7 -0
- package/lib/models/status.d.ts +4 -0
- package/lib/models/user-access-request-status.d.ts +5 -0
- package/{src/lib/models/user-access-request.ts → lib/models/user-access-request.d.ts} +4 -5
- package/lib/models/user.d.ts +18 -0
- package/lib/pipes/async-label.pipe.d.ts +11 -0
- package/lib/services/authorization.service.d.ts +14 -0
- package/lib/services/encryption.service.d.ts +13 -0
- package/lib/services/environment.service.d.ts +22 -0
- package/lib/services/http-web-request.service.d.ts +23 -0
- package/lib/services/label.service.d.ts +15 -0
- package/lib/services/util.service.d.ts +11 -0
- package/lib/shared/shared.module.d.ts +10 -0
- package/package.json +14 -10
- package/{src/public-api.ts → public-api.d.ts} +0 -24
- package/ng-package.json +0 -8
- package/src/lib/base/base-data.component.ts +0 -86
- package/src/lib/base/base-data.facade.ts +0 -157
- package/src/lib/base/base-data.service.ts +0 -49
- package/src/lib/base/base-data.state.ts +0 -94
- package/src/lib/base/models.ts +0 -14
- package/src/lib/components/auth-callback/auth-callback.component.css +0 -30
- package/src/lib/components/auth-callback/auth-callback.component.html +0 -6
- package/src/lib/components/auth-callback/auth-callback.component.spec.ts +0 -23
- package/src/lib/components/auth-callback/auth-callback.component.ts +0 -56
- package/src/lib/components/auth-callback/auth-callback.module.ts +0 -10
- package/src/lib/components/button/button.component.css +0 -3
- package/src/lib/components/button/button.component.html +0 -13
- package/src/lib/components/button/button.component.spec.ts +0 -23
- package/src/lib/components/button/button.component.ts +0 -24
- package/src/lib/components/button/button.module.ts +0 -11
- package/src/lib/components/forgot-password/forgot-password.component.css +0 -50
- package/src/lib/components/forgot-password/forgot-password.component.html +0 -38
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +0 -23
- package/src/lib/components/forgot-password/forgot-password.component.ts +0 -90
- package/src/lib/components/forgot-password/forgot-password.module.ts +0 -18
- package/src/lib/components/mail/mail.component.css +0 -0
- package/src/lib/components/mail/mail.component.html +0 -11
- package/src/lib/components/mail/mail.component.spec.ts +0 -23
- package/src/lib/components/mail/mail.component.ts +0 -47
- package/src/lib/components/mail/mail.module.ts +0 -13
- package/src/lib/components/mail-validation/mail-validation.component.css +0 -59
- package/src/lib/components/mail-validation/mail-validation.component.html +0 -37
- package/src/lib/components/mail-validation/mail-validation.component.spec.ts +0 -23
- package/src/lib/components/mail-validation/mail-validation.component.ts +0 -66
- package/src/lib/components/mail-validation/mail-validation.module.ts +0 -18
- package/src/lib/components/o-auth/o-auth.component.css +0 -26
- package/src/lib/components/o-auth/o-auth.component.html +0 -26
- package/src/lib/components/o-auth/o-auth.component.spec.ts +0 -23
- package/src/lib/components/o-auth/o-auth.component.ts +0 -115
- package/src/lib/components/o-auth/o-auth.module.ts +0 -11
- package/src/lib/components/otp-input/otp-input.component.css +0 -19
- package/src/lib/components/otp-input/otp-input.component.html +0 -15
- package/src/lib/components/otp-input/otp-input.component.spec.ts +0 -23
- package/src/lib/components/otp-input/otp-input.component.ts +0 -88
- package/src/lib/components/otp-input/otp-input.module.ts +0 -15
- package/src/lib/components/reset-password/ResetPasswordData.ts +0 -5
- package/src/lib/components/reset-password/reset-password.component.css +0 -29
- package/src/lib/components/reset-password/reset-password.component.html +0 -24
- package/src/lib/components/reset-password/reset-password.component.spec.ts +0 -23
- package/src/lib/components/reset-password/reset-password.component.ts +0 -108
- package/src/lib/components/reset-password/reset-password.module.ts +0 -18
- package/src/lib/components/role-control/ChildrenType.ts +0 -4
- package/src/lib/components/role-control/UIActions.ts +0 -5
- package/src/lib/components/role-control/UIs.ts +0 -38
- package/src/lib/components/role-control/base-table-style.ts +0 -52
- package/src/lib/components/role-control/role-control.component.css +0 -87
- package/src/lib/components/role-control/role-control.component.html +0 -603
- package/src/lib/components/role-control/role-control.component.spec.ts +0 -23
- package/src/lib/components/role-control/role-control.component.ts +0 -1884
- package/src/lib/components/role-control/role-control.module.ts +0 -10
- package/src/lib/components/role-control/role-control.service.spec.ts +0 -16
- package/src/lib/components/role-control/role-control.service.ts +0 -53
- package/src/lib/components/sign-in/sign-in.component.css +0 -21
- package/src/lib/components/sign-in/sign-in.component.html +0 -83
- package/src/lib/components/sign-in/sign-in.component.spec.ts +0 -23
- package/src/lib/components/sign-in/sign-in.component.ts +0 -267
- package/src/lib/components/sign-in/sign-in.module.ts +0 -17
- package/src/lib/components/sign-up/sign-up.component.css +0 -36
- package/src/lib/components/sign-up/sign-up.component.html +0 -132
- package/src/lib/components/sign-up/sign-up.component.spec.ts +0 -23
- package/src/lib/components/sign-up/sign-up.component.ts +0 -180
- package/src/lib/components/sign-up/sign-up.module.ts +0 -15
- package/src/lib/components/sso/base-table-style.ts +0 -52
- package/src/lib/components/sso/helper.ts +0 -17
- package/src/lib/components/sso/sso-form/sso-form.component.css +0 -13
- package/src/lib/components/sso/sso-form/sso-form.component.html +0 -109
- package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +0 -23
- package/src/lib/components/sso/sso-form/sso-form.component.ts +0 -70
- package/src/lib/components/sso/sso.columns.ts +0 -32
- package/src/lib/components/sso/sso.component.css +0 -47
- package/src/lib/components/sso/sso.component.html +0 -208
- package/src/lib/components/sso/sso.component.spec.ts +0 -23
- package/src/lib/components/sso/sso.component.ts +0 -261
- package/src/lib/components/sso/sso.module.ts +0 -40
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +0 -8
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +0 -30
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +0 -23
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +0 -155
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +0 -15
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +0 -17
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +0 -45
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +0 -23
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +0 -57
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +0 -11
- package/src/lib/components/user-management/base-table-style.ts +0 -52
- package/src/lib/components/user-management/facades/user-management.facades.ts +0 -133
- package/src/lib/components/user-management/helper.ts +0 -38
- package/src/lib/components/user-management/index.ts +0 -4
- package/src/lib/components/user-management/services/user-management.service.spec.ts +0 -16
- package/src/lib/components/user-management/services/user-management.service.ts +0 -111
- package/src/lib/components/user-management/states/user-management.state.ts +0 -65
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +0 -74
- package/src/lib/components/user-management/user-management-form/user-management-form.component.css +0 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.html +0 -89
- package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +0 -23
- package/src/lib/components/user-management/user-management.columns.ts +0 -57
- package/src/lib/components/user-management/user-management.component.css +0 -31
- package/src/lib/components/user-management/user-management.component.html +0 -455
- package/src/lib/components/user-management/user-management.component.spec.ts +0 -23
- package/src/lib/components/user-management/user-management.component.ts +0 -626
- package/src/lib/components/user-management/user-management.module.ts +0 -60
- 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 +0 -8
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.spec.ts +0 -22
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.ts +0 -22
- package/src/lib/components/user-request/user-request.component.css +0 -91
- package/src/lib/components/user-request/user-request.component.html +0 -137
- package/src/lib/components/user-request/user-request.component.spec.ts +0 -23
- package/src/lib/components/user-request/user-request.component.ts +0 -306
- package/src/lib/components/user-request/user-request.module.ts +0 -20
- package/src/lib/components/user-request-approval/access-request.columns.ts +0 -31
- package/src/lib/components/user-request-approval/base-table-style.ts +0 -52
- package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +0 -324
- package/src/lib/components/user-request-approval/helper.ts +0 -61
- package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +0 -16
- package/src/lib/components/user-request-approval/services/user-access-request.service.ts +0 -122
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +0 -109
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.css +0 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.html +0 -8
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +0 -23
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +0 -22
- package/src/lib/components/user-request-approval/user-request-approval.component.css +0 -6
- package/src/lib/components/user-request-approval/user-request-approval.component.html +0 -273
- package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +0 -23
- package/src/lib/components/user-request-approval/user-request-approval.component.ts +0 -328
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +0 -56
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +0 -98
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css +0 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html +0 -94
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +0 -23
- 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 +0 -1
- package/src/lib/components/user-request-process/user-request-process.component.spec.ts +0 -23
- package/src/lib/components/user-request-process/user-request-process.component.ts +0 -12
- package/src/lib/components/user-request-process/user-request-process.module.ts +0 -12
- package/src/lib/models/ApplicationRoleAction.ts +0 -10
- package/src/lib/models/ApplicationRoleContext.ts +0 -10
- package/src/lib/models/ErrorResponse.ts +0 -7
- package/src/lib/models/FilterTypes.ts +0 -8
- package/src/lib/models/MailConfig.ts +0 -13
- package/src/lib/models/MessageConfig.ts +0 -5
- package/src/lib/models/MessageMedium.ts +0 -4
- package/src/lib/models/OAuthParam.ts +0 -10
- package/src/lib/models/OAuthType.ts +0 -7
- package/src/lib/models/PagedResult.ts +0 -9
- package/src/lib/models/PasswordRequestParam.ts +0 -5
- package/src/lib/models/PeriodMode.ts +0 -10
- package/src/lib/models/ReportSchedule.ts +0 -23
- package/src/lib/models/ReportType.ts +0 -5
- package/src/lib/models/ResponseKeyValue.ts +0 -5
- package/src/lib/models/RoleAction.ts +0 -11
- package/src/lib/models/RoleContext.ts +0 -11
- package/src/lib/models/SMSConfig.ts +0 -11
- package/src/lib/models/SearchOperator.ts +0 -4
- package/src/lib/models/SearchPropertySign.ts +0 -9
- package/src/lib/models/SearchPropertyValueType.ts +0 -9
- package/src/lib/models/SortDirection.ts +0 -5
- package/src/lib/models/TaskNotification.ts +0 -14
- package/src/lib/models/TaskNotificationMessageType.ts +0 -4
- package/src/lib/models/TaskNotificationType.ts +0 -4
- package/src/lib/models/Tenant.ts +0 -22
- package/src/lib/models/TenantConfig.ts +0 -19
- package/src/lib/models/UserRequest.ts +0 -38
- package/src/lib/models/auth-mechanism.ts +0 -15
- package/src/lib/models/base.ts +0 -13
- package/src/lib/models/conditions.ts +0 -11
- package/src/lib/models/log-in.ts +0 -8
- package/src/lib/models/oauth-resp.ts +0 -6
- package/src/lib/models/object-state.ts +0 -6
- package/src/lib/models/paged.ts +0 -9
- package/src/lib/models/query-params.ts +0 -9
- package/src/lib/models/request-status.ts +0 -4
- package/src/lib/models/resend-otp-data.ts +0 -8
- package/src/lib/models/resource.ts +0 -27
- package/src/lib/models/sign-up.ts +0 -11
- package/src/lib/models/single-sign-on.ts +0 -9
- package/src/lib/models/status.ts +0 -5
- package/src/lib/models/user-access-request-status.ts +0 -5
- package/src/lib/models/user-object-state.ts +0 -6
- package/src/lib/models/user.ts +0 -19
- package/src/lib/pipes/async-label.pipe.spec.ts +0 -8
- package/src/lib/pipes/async-label.pipe.ts +0 -20
- package/src/lib/services/authorization.service.spec.ts +0 -16
- package/src/lib/services/authorization.service.ts +0 -24
- package/src/lib/services/encryption.service.ts +0 -57
- package/src/lib/services/environment.service.spec.ts +0 -16
- package/src/lib/services/environment.service.ts +0 -30
- package/src/lib/services/http-web-request.service.spec.ts +0 -16
- package/src/lib/services/http-web-request.service.ts +0 -114
- package/src/lib/services/label.service.spec.ts +0 -16
- package/src/lib/services/label.service.ts +0 -177
- package/src/lib/services/util.service.spec.ts +0 -16
- package/src/lib/services/util.service.ts +0 -49
- package/src/lib/shared/shared.module.ts +0 -55
- package/src/styles.css +0 -96
- package/src/theme/tailwind-setup.css +0 -3
- package/src/theme/tailwind.css +0 -1035
- package/src/utils/components/base-data-view.component.ts +0 -131
- package/src/utils/models/DataViewConfig.ts +0 -19
- package/tailwind.config.js +0 -20
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,626 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
Input,
|
|
4
|
-
signal,
|
|
5
|
-
ViewChild,
|
|
6
|
-
WritableSignal,
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
import { columns } from './user-management.columns';
|
|
9
|
-
|
|
10
|
-
import { SearchPropertySign } from '../../models/SearchPropertySign';
|
|
11
|
-
import { UtilService } from '../../services/util.service';
|
|
12
|
-
import { PagedResult } from '../../models/PagedResult';
|
|
13
|
-
import { baseStyle } from './base-table-style';
|
|
14
|
-
import { HttpWebRequestService } from '../../services/http-web-request.service';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
CardData,
|
|
18
|
-
DataFilterType,
|
|
19
|
-
IDataFilter,
|
|
20
|
-
DropdownLoadEvent,
|
|
21
|
-
DropdownChangeEvent,
|
|
22
|
-
ColumnDefinition,
|
|
23
|
-
ConditionalOptions,
|
|
24
|
-
CardDataViewComponent,
|
|
25
|
-
DataViewComponent,
|
|
26
|
-
FormGroupConfig,
|
|
27
|
-
} from 'verben-ng-ui';
|
|
28
|
-
import { UserAccessRequestStatus } from '../../models/user-access-request-status';
|
|
29
|
-
import { ObjectState } from '../../models/object-state';
|
|
30
|
-
import { EnvironmentService } from '../../services/environment.service';
|
|
31
|
-
import { UserManagementService } from './services/user-management.service';
|
|
32
|
-
import { User } from '../../models/user';
|
|
33
|
-
import { ErrorResponse } from '../../models/ErrorResponse';
|
|
34
|
-
import { UserManagementFormComponent } from './user-management-form/use-management-form.component';
|
|
35
|
-
import { Subject, debounceTime, BehaviorSubject } from 'rxjs';
|
|
36
|
-
import { ConditionOptions } from '../../models/conditions';
|
|
37
|
-
import { ActivatedRoute } from '@angular/router';
|
|
38
|
-
import { UserAccessRequestService } from '../user-request-approval/services/user-access-request.service';
|
|
39
|
-
import { Role } from '../../models/Role';
|
|
40
|
-
import { Tag } from '../../models/Tag';
|
|
41
|
-
import { FormBuilder } from '@angular/forms';
|
|
42
|
-
import { Status } from '../../models/status';
|
|
43
|
-
|
|
44
|
-
enum DateFilterTypes {
|
|
45
|
-
Before = SearchPropertySign.LT,
|
|
46
|
-
On = SearchPropertySign.EQ,
|
|
47
|
-
After = SearchPropertySign.GT,
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface TestParentObject {
|
|
51
|
-
Id: string;
|
|
52
|
-
Name: string;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Component({
|
|
56
|
-
selector: 'lib-user-management',
|
|
57
|
-
templateUrl: './user-management.component.html',
|
|
58
|
-
styleUrl: './user-management.component.css',
|
|
59
|
-
})
|
|
60
|
-
export class UserManagementComponent {
|
|
61
|
-
@ViewChild('vdcv') cardDataView!: CardDataViewComponent;
|
|
62
|
-
@ViewChild('vdv') dataView!: DataViewComponent;
|
|
63
|
-
@ViewChild(UserManagementFormComponent)
|
|
64
|
-
childComponent!: UserManagementFormComponent;
|
|
65
|
-
private currentSearchTerm: string = '';
|
|
66
|
-
|
|
67
|
-
allColumns: ColumnDefinition<User>[] = columns;
|
|
68
|
-
filteredColumns: ColumnDefinition<User>[] = columns;
|
|
69
|
-
skip: number = 0;
|
|
70
|
-
users: User[] = [];
|
|
71
|
-
searchTerm$ = new Subject<string>();
|
|
72
|
-
@Input() searchDebounceTime: number = 500;
|
|
73
|
-
@Input() pageSize: number = 1;
|
|
74
|
-
pageState: PagedResult<User> | null = null;
|
|
75
|
-
errorMessage: string = '';
|
|
76
|
-
appliedFilters: boolean = false;
|
|
77
|
-
isLoading: boolean = false;
|
|
78
|
-
hasMore: boolean = true;
|
|
79
|
-
limit: number = 20;
|
|
80
|
-
sortParam: string = 'name';
|
|
81
|
-
sortOrder: string = 'asc';
|
|
82
|
-
Roles: Role[] = [];
|
|
83
|
-
Tags: WritableSignal<Tag[]> = signal([]);
|
|
84
|
-
dataFit: PagedResult<User> = {
|
|
85
|
-
PageSize: 1,
|
|
86
|
-
Skip: 0,
|
|
87
|
-
Total: 0,
|
|
88
|
-
Result: [],
|
|
89
|
-
LastItem: [''],
|
|
90
|
-
IsLoadingResults: false,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
currentFilters: IDataFilter[] = [];
|
|
94
|
-
currentSorts: IDataFilter[] = [];
|
|
95
|
-
|
|
96
|
-
role: string = '';
|
|
97
|
-
|
|
98
|
-
cardContextHistory: CardData[] = [];
|
|
99
|
-
param: string | null | undefined;
|
|
100
|
-
formGroupConfig: WritableSignal<FormGroupConfig<any>>;
|
|
101
|
-
statuses = Object.values(Status);
|
|
102
|
-
|
|
103
|
-
constructor(
|
|
104
|
-
private route: ActivatedRoute,
|
|
105
|
-
private userManagementService: UserManagementService,
|
|
106
|
-
private userRole: UserAccessRequestService,
|
|
107
|
-
private server: HttpWebRequestService,
|
|
108
|
-
private utilService: UtilService,
|
|
109
|
-
private envSvc: EnvironmentService,
|
|
110
|
-
private fb: FormBuilder
|
|
111
|
-
) {
|
|
112
|
-
this.formGroupConfig = signal({
|
|
113
|
-
controls: {
|
|
114
|
-
MailAddress: this.fb.control(''),
|
|
115
|
-
FirstName: this.fb.control(''),
|
|
116
|
-
PhoneNumber: this.fb.control(''),
|
|
117
|
-
Address: this.fb.control(''),
|
|
118
|
-
RoleID: this.fb.control(''),
|
|
119
|
-
Tags: this.fb.control([]),
|
|
120
|
-
Status: this.fb.control(''),
|
|
121
|
-
},
|
|
122
|
-
// validatorOrOpts: null,
|
|
123
|
-
// asyncValidator: null,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
async ngOnInit(): Promise<void> {
|
|
128
|
-
this.getRoles();
|
|
129
|
-
this.getTags();
|
|
130
|
-
this.route.paramMap.subscribe((params) => {
|
|
131
|
-
this.role = params.get('role') || ''; // Default to an empty string if no role
|
|
132
|
-
this.fetchUsers();
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
cardData: CardData[] = [];
|
|
137
|
-
|
|
138
|
-
data: any[] = [];
|
|
139
|
-
|
|
140
|
-
async fetchUsers(sortValue: string = 'CreatedAt', order: string = 'asc') {
|
|
141
|
-
this.isLoading = true;
|
|
142
|
-
this.utilService.sendBI(true);
|
|
143
|
-
|
|
144
|
-
try {
|
|
145
|
-
const res = await this.userManagementService.getRealUsers(
|
|
146
|
-
this.role,
|
|
147
|
-
this.skip,
|
|
148
|
-
this.limit,
|
|
149
|
-
this.sortParam,
|
|
150
|
-
this.sortOrder
|
|
151
|
-
);
|
|
152
|
-
this.utilService.sendBI(false);
|
|
153
|
-
|
|
154
|
-
if (res instanceof ErrorResponse) {
|
|
155
|
-
// Handle error response
|
|
156
|
-
console.error('Error fetching logs:', res);
|
|
157
|
-
} else {
|
|
158
|
-
const response = res as PagedResult<User>;
|
|
159
|
-
this.dataFit = response;
|
|
160
|
-
this.users = [...this.users, ...response.Result];
|
|
161
|
-
this.cardData = this.formatCardData(this.users);
|
|
162
|
-
this.skip += this.pageSize;
|
|
163
|
-
this.hasMore = this.skip < response.Total;
|
|
164
|
-
}
|
|
165
|
-
} catch (error) {
|
|
166
|
-
console.error('Error:', error);
|
|
167
|
-
} finally {
|
|
168
|
-
this.isLoading = false;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
async getRoles() {
|
|
173
|
-
this.utilService.sendBI(true);
|
|
174
|
-
|
|
175
|
-
try {
|
|
176
|
-
const res = await this.userRole.getRoles();
|
|
177
|
-
this.utilService.sendBI(false);
|
|
178
|
-
|
|
179
|
-
if (res instanceof ErrorResponse) {
|
|
180
|
-
console.error('Error fetching roles:', res);
|
|
181
|
-
return undefined;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const response = res as PagedResult<Role>;
|
|
185
|
-
this.Roles = response.Result;
|
|
186
|
-
} catch (error) {
|
|
187
|
-
console.error('Error fetching roles:', error);
|
|
188
|
-
return undefined;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
async getTags() {
|
|
193
|
-
this.utilService.sendBI(true);
|
|
194
|
-
|
|
195
|
-
try {
|
|
196
|
-
const res = await this.userRole.getTags();
|
|
197
|
-
this.utilService.sendBI(false);
|
|
198
|
-
|
|
199
|
-
if (res instanceof ErrorResponse) {
|
|
200
|
-
console.error('Error fetching roles:', res);
|
|
201
|
-
return undefined;
|
|
202
|
-
}
|
|
203
|
-
const response = res as PagedResult<Tag>;
|
|
204
|
-
this.Tags.set(response.Result);
|
|
205
|
-
} catch (error) {
|
|
206
|
-
console.error('Error fetching roles:', error);
|
|
207
|
-
return undefined;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
handleRoleId(value: string) {
|
|
212
|
-
const matchedRole = this.Roles.filter((role) => role.Name === value);
|
|
213
|
-
return matchedRole[0]?.Code;
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Format users into CardData for the UI library
|
|
217
|
-
* @param users Array of users to format
|
|
218
|
-
* @returns Array of CardData
|
|
219
|
-
*/
|
|
220
|
-
private formatCardData(users: User[]): CardData[] {
|
|
221
|
-
return users.map((user) => ({
|
|
222
|
-
selected: false, // Default selection state
|
|
223
|
-
title: `${user.FirstName} ${user.LastName}`, // Display user's name as title
|
|
224
|
-
data: { ...user }, // Pass the entire user object
|
|
225
|
-
body: [
|
|
226
|
-
{ title: 'Name', value: `${user.FirstName} ${user.LastName}` },
|
|
227
|
-
{ title: 'E-Mail Address', value: user.MailAddress },
|
|
228
|
-
{ title: 'Phone Number', value: user.PhoneNumber || 'N/A' },
|
|
229
|
-
],
|
|
230
|
-
children: [], // Add child data if necessary
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
columns = columns;
|
|
235
|
-
styles = baseStyle;
|
|
236
|
-
|
|
237
|
-
selectedParent?: string;
|
|
238
|
-
basicOption?: string;
|
|
239
|
-
selectedOption: string[] = [];
|
|
240
|
-
selectedOptionTwo: string[] = [];
|
|
241
|
-
selectedOptionThree?: string;
|
|
242
|
-
missingObject: any;
|
|
243
|
-
|
|
244
|
-
// clearLogs(sortValue: string = 'CreatedAt', order: string = 'asc') {
|
|
245
|
-
// this.User = []; // Clear the logs array
|
|
246
|
-
// this.skip = 0; // Reset the skip value
|
|
247
|
-
// this.hasMore = true; // Reset the flag to allow fetching more logs
|
|
248
|
-
// this.appliedFilters = false;
|
|
249
|
-
// this.fetchUsers();
|
|
250
|
-
// }
|
|
251
|
-
|
|
252
|
-
// Grid view properties
|
|
253
|
-
isGridView: boolean = true;
|
|
254
|
-
currentData!: CardData;
|
|
255
|
-
selectedColumnCount: number = 0;
|
|
256
|
-
selectedFilterTableCount: number = 0;
|
|
257
|
-
isOPen: boolean = true;
|
|
258
|
-
selectedSortCount: number = 0;
|
|
259
|
-
showFilter: boolean = false;
|
|
260
|
-
searchTerm: string = '';
|
|
261
|
-
showColumn: boolean = false;
|
|
262
|
-
showSort: boolean = false;
|
|
263
|
-
selectedAll: boolean = false;
|
|
264
|
-
visibleColumns: IDataFilter[] = columns.map((col) => ({
|
|
265
|
-
checked: false,
|
|
266
|
-
name: typeof col.header === 'string' ? col.header : col.id,
|
|
267
|
-
type: DataFilterType.Bool,
|
|
268
|
-
}));
|
|
269
|
-
|
|
270
|
-
filterArray: IDataFilter[] = [
|
|
271
|
-
{ name: 'FirstName', type: DataFilterType.String, checked: false },
|
|
272
|
-
{ name: 'LastName', type: DataFilterType.String, checked: false },
|
|
273
|
-
{ name: 'MailAddress', type: DataFilterType.String, checked: false },
|
|
274
|
-
{ name: 'Status', type: DataFilterType.String, checked: false },
|
|
275
|
-
{ name: 'PhoneNumber', type: DataFilterType.String, checked: false },
|
|
276
|
-
{ name: 'CreatedAt', type: DataFilterType.Date, checked: false },
|
|
277
|
-
{ name: 'Role', type: DataFilterType.String, checked: false },
|
|
278
|
-
];
|
|
279
|
-
|
|
280
|
-
sortOptions: IDataFilter[] = [
|
|
281
|
-
{ name: 'Name', type: DataFilterType.String, checked: false },
|
|
282
|
-
{ name: 'MailAddress', type: DataFilterType.String, checked: false },
|
|
283
|
-
{ name: 'PhoneNumber', type: DataFilterType.String, checked: false },
|
|
284
|
-
{ name: 'CreatedAt', type: DataFilterType.Date, checked: false },
|
|
285
|
-
];
|
|
286
|
-
|
|
287
|
-
testParents: TestParentObject[] = [
|
|
288
|
-
{ Id: '1', Name: 'Manager' },
|
|
289
|
-
{ Id: '2', Name: 'Administrator' },
|
|
290
|
-
{ Id: '3', Name: 'Jelom' },
|
|
291
|
-
];
|
|
292
|
-
|
|
293
|
-
getParentLabel(context: any): string {
|
|
294
|
-
console.log({ MissingObj: this.missingObject });
|
|
295
|
-
return this.missingObject.Name;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
onSave(): void {
|
|
299
|
-
if (this.childComponent.form.valid) {
|
|
300
|
-
// const userData: User = this.childComponent.form.value;
|
|
301
|
-
// console.log('Payload:', [userData]); // Log the payload to check its structure
|
|
302
|
-
|
|
303
|
-
this.utilService.sendBI(true);
|
|
304
|
-
this.userManagementService
|
|
305
|
-
.saveUsers([
|
|
306
|
-
{
|
|
307
|
-
...this.currentData?.data,
|
|
308
|
-
...this.childComponent.form.value,
|
|
309
|
-
DataState:
|
|
310
|
-
this.currentData?.data.DataState === ObjectState.Unchanged
|
|
311
|
-
? ObjectState.Changed
|
|
312
|
-
: this.currentData?.data.DataState,
|
|
313
|
-
},
|
|
314
|
-
])
|
|
315
|
-
.then(
|
|
316
|
-
(result) => {
|
|
317
|
-
if (result instanceof ErrorResponse) {
|
|
318
|
-
} else {
|
|
319
|
-
this.utilService.showSuccess('User saved successfully');
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
(error) => {
|
|
323
|
-
console.error('Unexpected error saving user:', error);
|
|
324
|
-
}
|
|
325
|
-
)
|
|
326
|
-
.finally(() => {
|
|
327
|
-
this.utilService.sendBI(false);
|
|
328
|
-
});
|
|
329
|
-
console.log(this.childComponent.form.value);
|
|
330
|
-
} else {
|
|
331
|
-
console.error('Form is invalid');
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
async onDataSave(event: {
|
|
336
|
-
index: number;
|
|
337
|
-
key: number | string;
|
|
338
|
-
data: Partial<User>;
|
|
339
|
-
}) {
|
|
340
|
-
const payload = {
|
|
341
|
-
...this.users[event.index],
|
|
342
|
-
...event.data,
|
|
343
|
-
DataState:
|
|
344
|
-
this.users[event.index]?.DataState === ObjectState.Unchanged
|
|
345
|
-
? ObjectState.Changed : ObjectState.New
|
|
346
|
-
} as User;
|
|
347
|
-
|
|
348
|
-
this.utilService.sendBI(true);
|
|
349
|
-
this.userManagementService
|
|
350
|
-
.saveUsers([
|
|
351
|
-
payload
|
|
352
|
-
])
|
|
353
|
-
.then(
|
|
354
|
-
(result) => {
|
|
355
|
-
if (result instanceof ErrorResponse) {
|
|
356
|
-
} else {
|
|
357
|
-
if (result[0]) {
|
|
358
|
-
this.users = this.users.map((user, index) => {
|
|
359
|
-
if (index === event.index) return result[0] as User;
|
|
360
|
-
return user;
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
this.utilService.showSuccess('User saved successfully');
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
(error) => {
|
|
367
|
-
console.error('Unexpected error saving user:', error);
|
|
368
|
-
}
|
|
369
|
-
)
|
|
370
|
-
.finally(() => {
|
|
371
|
-
this.utilService.sendBI(false);
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
onDelete(): void {
|
|
376
|
-
console.log('Child form delete triggered');
|
|
377
|
-
// Perform delete logic here
|
|
378
|
-
}
|
|
379
|
-
onDropdownChange(event: DropdownChangeEvent): void {
|
|
380
|
-
// console.log({
|
|
381
|
-
// 'Test Parent Value': this.selectedParent,
|
|
382
|
-
// ...
|
|
383
|
-
// });
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
onSelectionChange(selectedRows: User[]) {
|
|
387
|
-
console.log('Selection changed:', selectedRows);
|
|
388
|
-
// Handle the selection change
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
handleExport(exportedData: Partial<any>[]) {
|
|
392
|
-
console.log('Exported data:', exportedData);
|
|
393
|
-
this.downloadCSV(exportedData);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
private downloadCSV(data: Partial<any>[]) {
|
|
397
|
-
const headers = Object.keys(data[0]);
|
|
398
|
-
const csvContent = [
|
|
399
|
-
headers.join(','),
|
|
400
|
-
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
401
|
-
].join('\n');
|
|
402
|
-
|
|
403
|
-
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
404
|
-
const link = document.createElement('a');
|
|
405
|
-
if (link.download !== undefined) {
|
|
406
|
-
const url = URL.createObjectURL(blob);
|
|
407
|
-
link.setAttribute('href', url);
|
|
408
|
-
link.setAttribute('download', 'export.csv');
|
|
409
|
-
link.style.visibility = 'hidden';
|
|
410
|
-
document.body.appendChild(link);
|
|
411
|
-
link.click();
|
|
412
|
-
document.body.removeChild(link);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
getCardDataByMailAddress(mailAddress: string): CardData | undefined {
|
|
417
|
-
console.log('cardData array:', this.cardData);
|
|
418
|
-
console.log(mailAddress);
|
|
419
|
-
|
|
420
|
-
return this.cardData.find(({ data }) => data?.MailAddress === mailAddress);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
openDetailView(mailAddress: string) {
|
|
424
|
-
const cardItem = this.getCardDataByMailAddress(mailAddress);
|
|
425
|
-
console.log(cardItem);
|
|
426
|
-
|
|
427
|
-
if (cardItem && this.cardDataView) {
|
|
428
|
-
this.dataView.toggleView();
|
|
429
|
-
// First reset all selections
|
|
430
|
-
this.cardData.forEach((item) => {
|
|
431
|
-
item.selected = false;
|
|
432
|
-
if (item.children) {
|
|
433
|
-
item.children.forEach((child) => (child.selected = false));
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
// Set the selected item
|
|
438
|
-
cardItem.selected = true;
|
|
439
|
-
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
440
|
-
|
|
441
|
-
// Force change detection if needed
|
|
442
|
-
// this.changeDetectorRef.detectChanges();
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
reset() {
|
|
447
|
-
this.skip = 0;
|
|
448
|
-
this.pageSize = 20;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
clearData() {
|
|
452
|
-
this.currentData = {} as CardData;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
loadMore() {
|
|
456
|
-
if (this.hasMore) {
|
|
457
|
-
this.fetchUsers();
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
onColumnChange(event: boolean) {
|
|
462
|
-
this.showColumn = event;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
onSortChange(event: boolean) {
|
|
466
|
-
this.showSort = event;
|
|
467
|
-
console.log(event);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
onColumnsUpdated(updatedColumns: IDataFilter[]) {
|
|
471
|
-
this.onColumnChange(false);
|
|
472
|
-
this.selectedColumnCount = updatedColumns.length;
|
|
473
|
-
|
|
474
|
-
if (updatedColumns) {
|
|
475
|
-
// Filter columns to include only visible ones
|
|
476
|
-
this.filteredColumns = this.columns.filter((col) =>
|
|
477
|
-
this.visibleColumns.find(
|
|
478
|
-
(filter) => filter.name === col.header && filter.checked
|
|
479
|
-
)
|
|
480
|
-
);
|
|
481
|
-
|
|
482
|
-
// Reorder columns based on the order in visibleColumns
|
|
483
|
-
const visibleColumnOrder = this.visibleColumns
|
|
484
|
-
.filter((filter) => filter.checked)
|
|
485
|
-
.map((filter) => filter.name);
|
|
486
|
-
|
|
487
|
-
this.columns.sort((a, b) => {
|
|
488
|
-
const indexA = visibleColumnOrder.indexOf(a.header as string);
|
|
489
|
-
const indexB = visibleColumnOrder.indexOf(b.header as string);
|
|
490
|
-
return indexA - indexB;
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
async postSearch(payload: any) {
|
|
496
|
-
this.utilService.sendBI(true);
|
|
497
|
-
const res = await this.server.post(
|
|
498
|
-
`User/SearchUsers/0/10/CreatedAt/asc`,
|
|
499
|
-
payload
|
|
500
|
-
);
|
|
501
|
-
|
|
502
|
-
this.utilService.sendBI(false);
|
|
503
|
-
if (res instanceof ErrorResponse) {
|
|
504
|
-
this.appliedFilters = false;
|
|
505
|
-
return;
|
|
506
|
-
} else {
|
|
507
|
-
this.appliedFilters = true;
|
|
508
|
-
const response = res as PagedResult<User>;
|
|
509
|
-
this.dataFit = response;
|
|
510
|
-
this.users = response.Result;
|
|
511
|
-
this.cardData = this.formatCardData(this.users);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
onFilterApplied(appliedFilter: IDataFilter[]) {
|
|
516
|
-
this.showFilter = false;
|
|
517
|
-
if (Array.isArray(appliedFilter)) {
|
|
518
|
-
this.selectedFilterTableCount = appliedFilter.length;
|
|
519
|
-
console.log(appliedFilter);
|
|
520
|
-
|
|
521
|
-
const queryParams = appliedFilter
|
|
522
|
-
.filter((filter) => filter.checked)
|
|
523
|
-
.map((filter) => ({
|
|
524
|
-
PropertyName: filter.name,
|
|
525
|
-
EntityValue:
|
|
526
|
-
filter.name === 'Role'
|
|
527
|
-
? this.handleRoleId(filter.value)
|
|
528
|
-
: filter.value,
|
|
529
|
-
Type: filter.type,
|
|
530
|
-
Operator: 'And',
|
|
531
|
-
Sign: this.getCondition(filter.condition),
|
|
532
|
-
}));
|
|
533
|
-
|
|
534
|
-
this.postSearch(queryParams);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
getCondition(value: any): ConditionOptions | undefined {
|
|
539
|
-
switch (value) {
|
|
540
|
-
case ConditionalOptions.On:
|
|
541
|
-
return ConditionOptions.On;
|
|
542
|
-
case ConditionalOptions.After:
|
|
543
|
-
return ConditionOptions.After;
|
|
544
|
-
case ConditionalOptions.Before:
|
|
545
|
-
return ConditionOptions.Before;
|
|
546
|
-
case ConditionalOptions.NotEqual:
|
|
547
|
-
return ConditionOptions.NotEqual;
|
|
548
|
-
default:
|
|
549
|
-
return undefined; // Explicitly return undefined for invalid cases
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
onSortUpdated(updatedSorts: IDataFilter[]): void {
|
|
554
|
-
this.currentSorts = updatedSorts;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
async onSearch(event: { key: string; value: string }) {
|
|
558
|
-
this.searchTerm = event.value;
|
|
559
|
-
this.reset();
|
|
560
|
-
if (!this.searchTerm) {
|
|
561
|
-
this.clearLogs('CreatedAt', 'asc');
|
|
562
|
-
return;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
this.isLoading = true;
|
|
566
|
-
this.utilService.sendBI(true);
|
|
567
|
-
|
|
568
|
-
try {
|
|
569
|
-
const res = await this.server.get(
|
|
570
|
-
`User/GetUserWithParam/${this.searchTerm}/${this.skip}/${this.pageSize}/CreatedAt/asc`
|
|
571
|
-
);
|
|
572
|
-
|
|
573
|
-
this.utilService.sendBI(false);
|
|
574
|
-
|
|
575
|
-
if (res instanceof ErrorResponse) {
|
|
576
|
-
console.error('Error during search:', res);
|
|
577
|
-
this.appliedFilters = false;
|
|
578
|
-
} else {
|
|
579
|
-
const response = res as PagedResult<User>;
|
|
580
|
-
this.dataFit = response;
|
|
581
|
-
this.users = response.Result;
|
|
582
|
-
this.cardData = this.formatCardData(this.users);
|
|
583
|
-
}
|
|
584
|
-
} catch (error) {
|
|
585
|
-
console.error('Search error:', error);
|
|
586
|
-
this.appliedFilters = false;
|
|
587
|
-
} finally {
|
|
588
|
-
this.isLoading = false;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
clearLogs(sortValue: string = 'CreatedAt', order: string = 'asc') {
|
|
593
|
-
this.users = []; // Clear the logs array
|
|
594
|
-
this.skip = 0; // Reset the skip value
|
|
595
|
-
this.hasMore = true; // Reset the flag to allow fetching more logs
|
|
596
|
-
this.appliedFilters = false;
|
|
597
|
-
this.fetchUsers(sortValue, order);
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
onViewChange(isGridView: boolean): void {}
|
|
601
|
-
|
|
602
|
-
onStateChange(event: { key: string; value: boolean }): void {
|
|
603
|
-
console.log(`State changed for ${event.key}:`, event.value);
|
|
604
|
-
if (event.key === 'create') {
|
|
605
|
-
console.log('peace is a boy');
|
|
606
|
-
|
|
607
|
-
// const newUser = this.newItem()
|
|
608
|
-
|
|
609
|
-
// if ( newUser && this.cardDataView) {
|
|
610
|
-
// this.dataView.toggleView();
|
|
611
|
-
// // First reset all selections
|
|
612
|
-
// this.cardData.forEach((item) => {
|
|
613
|
-
// item.selected = false;
|
|
614
|
-
// if (item.children) {
|
|
615
|
-
// item.children.forEach((child) => (child.selected = false));
|
|
616
|
-
// }
|
|
617
|
-
// });
|
|
618
|
-
|
|
619
|
-
// this.currentData = this.cardDataView.onItemClick(newUser);
|
|
620
|
-
|
|
621
|
-
// // Force change detection if needed
|
|
622
|
-
// // this.changeDetectorRef.detectChanges();
|
|
623
|
-
// }
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { UserManagementComponent } from './user-management.component';
|
|
5
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
6
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
CardDataViewModule,
|
|
10
|
-
CardModule,
|
|
11
|
-
DataExportModule,
|
|
12
|
-
DataTableModule,
|
|
13
|
-
DataViewModule,
|
|
14
|
-
SortTableModule,
|
|
15
|
-
SvgModule,
|
|
16
|
-
TableFilterModule,
|
|
17
|
-
VerbenaButtonModule,
|
|
18
|
-
VerbenaInputModule,
|
|
19
|
-
VisibleColumnModule,
|
|
20
|
-
DropDownModule,
|
|
21
|
-
|
|
22
|
-
VerbenaBadgeModule,
|
|
23
|
-
DataXportModule,
|
|
24
|
-
VerbenaSwitchModule
|
|
25
|
-
} from 'verben-ng-ui';
|
|
26
|
-
import { UserManagementFormComponent } from './user-management-form/use-management-form.component';
|
|
27
|
-
import { UserManagementService } from './services/user-management.service';
|
|
28
|
-
import { LibUserRequestApprovalModule } from '../user-request-approval/user-request-approval.module';
|
|
29
|
-
import { UserStatusBadgeComponent } from './user-status-badge/user-status-badge.component';
|
|
30
|
-
|
|
31
|
-
@NgModule({
|
|
32
|
-
declarations: [UserManagementComponent, UserManagementFormComponent, UserStatusBadgeComponent],
|
|
33
|
-
imports: [
|
|
34
|
-
HttpClientModule,
|
|
35
|
-
CommonModule,
|
|
36
|
-
|
|
37
|
-
DataTableModule,
|
|
38
|
-
CardModule,
|
|
39
|
-
SvgModule,
|
|
40
|
-
DataViewModule,
|
|
41
|
-
CardDataViewModule,
|
|
42
|
-
SortTableModule,
|
|
43
|
-
VisibleColumnModule,
|
|
44
|
-
TableFilterModule,
|
|
45
|
-
DataExportModule,
|
|
46
|
-
DataXportModule,
|
|
47
|
-
FormsModule,
|
|
48
|
-
ReactiveFormsModule,
|
|
49
|
-
VerbenaInputModule,
|
|
50
|
-
VerbenaButtonModule,
|
|
51
|
-
VerbenaBadgeModule,
|
|
52
|
-
DropDownModule,
|
|
53
|
-
VerbenaSwitchModule,
|
|
54
|
-
|
|
55
|
-
LibUserRequestApprovalModule
|
|
56
|
-
],
|
|
57
|
-
providers: [UserManagementService],
|
|
58
|
-
exports: [UserManagementComponent],
|
|
59
|
-
})
|
|
60
|
-
export class LibUserManagementModule {}
|
package/src/lib/components/user-management/user-status-badge/user-status-badge.component.css
DELETED
|
File without changes
|