verben-authentication-ui 1.0.13 → 1.0.15
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/public-api.mjs +17 -35
- package/esm2022/src/lib/base/base-data.component.mjs +80 -0
- package/esm2022/src/lib/base/base-data.facade.mjs +130 -0
- package/esm2022/src/lib/base/base-data.service.mjs +21 -0
- package/esm2022/src/lib/base/base-data.state.mjs +74 -0
- package/esm2022/src/lib/base/index.mjs +2 -0
- package/esm2022/src/lib/base/models.mjs +2 -0
- package/esm2022/src/lib/base/public-api.mjs +6 -0
- package/esm2022/src/lib/base/verben-authentication-ui-src-lib-base.mjs +5 -0
- package/esm2022/src/lib/components/auth-callback/auth-callback.component.mjs +57 -0
- package/esm2022/{lib → src/lib}/components/auth-callback/auth-callback.module.mjs +1 -1
- package/esm2022/src/lib/components/auth-callback/index.mjs +2 -0
- package/esm2022/src/lib/components/auth-callback/public-api.mjs +3 -0
- package/esm2022/src/lib/components/auth-callback/verben-authentication-ui-src-lib-components-auth-callback.mjs +5 -0
- package/esm2022/{lib → src/lib}/components/button/button.component.mjs +1 -1
- package/esm2022/src/lib/components/button/button.module.mjs +20 -0
- package/esm2022/src/lib/components/button/index.mjs +2 -0
- package/esm2022/src/lib/components/button/public-api.mjs +3 -0
- package/esm2022/src/lib/components/button/verben-authentication-ui-src-lib-components-button.mjs +5 -0
- package/esm2022/src/lib/components/forgot-password/ForgotPasswordData.mjs +2 -0
- package/esm2022/{lib → src/lib}/components/forgot-password/forgot-password.component.mjs +8 -9
- package/esm2022/{lib → src/lib}/components/forgot-password/forgot-password.module.mjs +1 -1
- package/esm2022/src/lib/components/forgot-password/index.mjs +2 -0
- package/esm2022/src/lib/components/forgot-password/public-api.mjs +4 -0
- package/esm2022/src/lib/components/forgot-password/verben-authentication-ui-src-lib-components-forgot-password.mjs +5 -0
- package/esm2022/src/lib/components/mail/index.mjs +2 -0
- package/esm2022/src/lib/components/mail/mail.component.mjs +69 -0
- package/esm2022/src/lib/components/mail/mail.module.mjs +21 -0
- package/esm2022/src/lib/components/mail/public-api.mjs +3 -0
- package/esm2022/src/lib/components/mail/verben-authentication-ui-src-lib-components-mail.mjs +5 -0
- package/esm2022/src/lib/components/mail-validation/index.mjs +2 -0
- package/esm2022/{lib → src/lib}/components/mail-validation/mail-validation.component.mjs +1 -1
- package/esm2022/{lib → src/lib}/components/mail-validation/mail-validation.module.mjs +1 -1
- package/esm2022/src/lib/components/mail-validation/public-api.mjs +3 -0
- package/esm2022/src/lib/components/mail-validation/verben-authentication-ui-src-lib-components-mail-validation.mjs +5 -0
- package/esm2022/src/lib/components/o-auth/index.mjs +2 -0
- package/esm2022/src/lib/components/o-auth/o-auth.component.mjs +107 -0
- package/esm2022/{lib → src/lib}/components/o-auth/o-auth.module.mjs +1 -1
- package/esm2022/src/lib/components/o-auth/public-api.mjs +3 -0
- package/esm2022/src/lib/components/o-auth/verben-authentication-ui-src-lib-components-o-auth.mjs +5 -0
- package/esm2022/src/lib/components/otp-input/index.mjs +2 -0
- package/esm2022/src/lib/components/otp-input/otp-input.component.mjs +86 -0
- package/esm2022/src/lib/components/otp-input/otp-input.module.mjs +42 -0
- package/esm2022/src/lib/components/otp-input/public-api.mjs +3 -0
- package/esm2022/src/lib/components/otp-input/verben-authentication-ui-src-lib-components-otp-input.mjs +5 -0
- package/esm2022/src/lib/components/reset-password/ResetPasswordData.mjs +2 -0
- package/esm2022/src/lib/components/reset-password/index.mjs +2 -0
- package/esm2022/src/lib/components/reset-password/public-api.mjs +4 -0
- package/esm2022/{lib → src/lib}/components/reset-password/reset-password.component.mjs +8 -9
- package/esm2022/{lib → src/lib}/components/reset-password/reset-password.module.mjs +1 -1
- package/esm2022/src/lib/components/reset-password/verben-authentication-ui-src-lib-components-reset-password.mjs +5 -0
- package/esm2022/src/lib/components/role-control/ChildrenType.mjs +6 -0
- package/esm2022/src/lib/components/role-control/MappedRole.mjs +2 -0
- package/esm2022/src/lib/components/role-control/MappedRoleAction.mjs +2 -0
- package/esm2022/src/lib/components/role-control/MappedRoleContext.mjs +2 -0
- package/esm2022/src/lib/components/role-control/UIActions.mjs +7 -0
- package/esm2022/src/lib/components/role-control/UIs.mjs +40 -0
- package/esm2022/src/lib/components/role-control/base-table-style.mjs +53 -0
- package/esm2022/src/lib/components/role-control/index.mjs +2 -0
- package/esm2022/src/lib/components/role-control/public-api.mjs +3 -0
- package/esm2022/src/lib/components/role-control/role-control.component.mjs +1720 -0
- package/esm2022/src/lib/components/role-control/role-control.module.mjs +18 -0
- package/esm2022/src/lib/components/role-control/role-control.service.mjs +57 -0
- package/esm2022/src/lib/components/role-control/verben-authentication-ui-src-lib-components-role-control.mjs +5 -0
- package/esm2022/src/lib/components/sign-in/index.mjs +2 -0
- package/esm2022/src/lib/components/sign-in/public-api.mjs +3 -0
- package/esm2022/src/lib/components/sign-in/sign-in.component.mjs +316 -0
- package/esm2022/src/lib/components/sign-in/sign-in.module.mjs +46 -0
- package/esm2022/src/lib/components/sign-in/verben-authentication-ui-src-lib-components-sign-in.mjs +5 -0
- package/esm2022/src/lib/components/sign-up/index.mjs +2 -0
- package/esm2022/src/lib/components/sign-up/public-api.mjs +3 -0
- package/esm2022/src/lib/components/sign-up/sign-up.component.mjs +227 -0
- package/esm2022/src/lib/components/sign-up/sign-up.module.mjs +43 -0
- package/esm2022/src/lib/components/sign-up/verben-authentication-ui-src-lib-components-sign-up.mjs +5 -0
- package/esm2022/src/lib/components/sso/base-table-style.mjs +53 -0
- package/esm2022/src/lib/components/sso/helper.mjs +16 -0
- package/esm2022/src/lib/components/sso/index.mjs +2 -0
- package/esm2022/src/lib/components/sso/public-api.mjs +3 -0
- package/esm2022/{lib → src/lib}/components/sso/sso-form/sso-form.component.mjs +1 -1
- package/esm2022/src/lib/components/sso/sso.columns.mjs +29 -0
- package/esm2022/src/lib/components/sso/sso.component.mjs +234 -0
- package/esm2022/src/lib/components/sso/sso.module.mjs +63 -0
- package/esm2022/src/lib/components/sso/verben-authentication-ui-src-lib-components-sso.mjs +5 -0
- package/esm2022/src/lib/components/two-factor-auth-otp/index.mjs +2 -0
- package/esm2022/src/lib/components/two-factor-auth-otp/public-api.mjs +3 -0
- package/esm2022/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +208 -0
- package/esm2022/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +35 -0
- package/esm2022/src/lib/components/two-factor-auth-otp/verben-authentication-ui-src-lib-components-two-factor-auth-otp.mjs +5 -0
- package/esm2022/src/lib/components/two-factor-auth-setup/index.mjs +2 -0
- package/esm2022/src/lib/components/two-factor-auth-setup/public-api.mjs +3 -0
- package/esm2022/{lib → src/lib}/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +1 -1
- package/esm2022/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +19 -0
- package/esm2022/src/lib/components/two-factor-auth-setup/verben-authentication-ui-src-lib-components-two-factor-auth-setup.mjs +5 -0
- package/esm2022/src/lib/components/user-management/base-table-style.mjs +53 -0
- package/esm2022/src/lib/components/user-management/index.mjs +2 -0
- package/esm2022/src/lib/components/user-management/public-api.mjs +3 -0
- package/esm2022/src/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 → src/lib/components/user-management/user-management-form/user-management-form.component.mjs} +2 -2
- package/esm2022/src/lib/components/user-management/user-management.columns.mjs +53 -0
- package/esm2022/{lib → src/lib}/components/user-management/user-management.component.mjs +20 -23
- package/esm2022/src/lib/components/user-management/user-management.module.mjs +91 -0
- package/esm2022/src/lib/components/user-management/user-status-badge/user-status-badge.component.mjs +26 -0
- package/esm2022/src/lib/components/user-management/verben-authentication-ui-src-lib-components-user-management.mjs +5 -0
- package/esm2022/src/lib/components/user-request/index.mjs +2 -0
- package/esm2022/src/lib/components/user-request/public-api.mjs +3 -0
- package/esm2022/src/lib/components/user-request/user-request.component.mjs +318 -0
- package/esm2022/src/lib/components/user-request/user-request.module.mjs +38 -0
- package/esm2022/src/lib/components/user-request/verben-authentication-ui-src-lib-components-user-request.mjs +5 -0
- package/esm2022/src/lib/components/user-request-approval/access-request.columns.mjs +29 -0
- package/esm2022/src/lib/components/user-request-approval/base-table-style.mjs +53 -0
- package/esm2022/src/lib/components/user-request-approval/facades/user-access-request.facade.mjs +260 -0
- package/esm2022/src/lib/components/user-request-approval/helper.mjs +56 -0
- package/esm2022/src/lib/components/user-request-approval/index.mjs +2 -0
- package/esm2022/src/lib/components/user-request-approval/public-api.mjs +5 -0
- package/esm2022/src/lib/components/user-request-approval/services/user-access-request.service.mjs +93 -0
- package/esm2022/src/lib/components/user-request-approval/states/user-access-request.state.mjs +92 -0
- package/esm2022/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +26 -0
- package/esm2022/{lib → src/lib}/components/user-request-approval/user-request-approval.component.mjs +3 -3
- package/esm2022/src/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 → src/lib/components/user-request-approval/user-request-form/user-request-form.component.mjs} +2 -2
- package/esm2022/src/lib/components/user-request-approval/verben-authentication-ui-src-lib-components-user-request-approval.mjs +5 -0
- package/esm2022/src/lib/components/user-request-process/index.mjs +2 -0
- package/esm2022/src/lib/components/user-request-process/public-api.mjs +3 -0
- package/esm2022/src/lib/components/user-request-process/user-request-process.component.mjs +11 -0
- package/esm2022/src/lib/components/user-request-process/user-request-process.module.mjs +18 -0
- package/esm2022/src/lib/components/user-request-process/verben-authentication-ui-src-lib-components-user-request-process.mjs +5 -0
- package/esm2022/src/lib/models/ApplicationRoleAction.mjs +2 -0
- package/esm2022/src/lib/models/ApplicationRoleContext.mjs +2 -0
- package/esm2022/src/lib/models/ErrorResponse.mjs +11 -0
- package/esm2022/src/lib/models/FilterTypes.mjs +9 -0
- package/esm2022/src/lib/models/MailConfig.mjs +2 -0
- package/esm2022/src/lib/models/MessageConfig.mjs +2 -0
- package/esm2022/src/lib/models/MessageMedium.mjs +6 -0
- package/esm2022/src/lib/models/OAuthParam.mjs +2 -0
- package/esm2022/src/lib/models/OAuthType.mjs +9 -0
- package/esm2022/src/lib/models/PagedResult.mjs +2 -0
- package/esm2022/src/lib/models/PasswordRequestParam.mjs +2 -0
- package/esm2022/src/lib/models/PeriodMode.mjs +12 -0
- package/esm2022/src/lib/models/PermissionConfig.mjs +2 -0
- package/esm2022/src/lib/models/ReportSchedule.mjs +2 -0
- package/esm2022/src/lib/models/ReportType.mjs +7 -0
- package/esm2022/src/lib/models/ResponseKeyValue.mjs +2 -0
- package/esm2022/src/lib/models/Role.mjs +2 -0
- package/esm2022/src/lib/models/RoleAction.mjs +2 -0
- package/esm2022/src/lib/models/RoleContext.mjs +2 -0
- package/esm2022/src/lib/models/SMSConfig.mjs +2 -0
- package/esm2022/src/lib/models/SearchDynamicWrapper.mjs +2 -0
- package/esm2022/src/lib/models/SearchOperator.mjs +6 -0
- package/esm2022/src/lib/models/SearchPropertySign.mjs +11 -0
- package/esm2022/src/lib/models/SearchPropertyValue.mjs +2 -0
- package/esm2022/src/lib/models/SearchPropertyValueType.mjs +11 -0
- package/esm2022/src/lib/models/SortDirection.mjs +7 -0
- package/esm2022/src/lib/models/Tag.mjs +2 -0
- package/esm2022/src/lib/models/TaskNotification.mjs +2 -0
- package/esm2022/src/lib/models/TaskNotificationMessageType.mjs +6 -0
- package/esm2022/src/lib/models/TaskNotificationType.mjs +6 -0
- package/esm2022/src/lib/models/Tenant.mjs +2 -0
- package/esm2022/src/lib/models/TenantConfig.mjs +2 -0
- package/esm2022/src/lib/models/UserRequest.mjs +2 -0
- package/esm2022/src/lib/models/auth-mechanism.mjs +8 -0
- package/esm2022/src/lib/models/base.mjs +2 -0
- package/esm2022/src/lib/models/conditions.mjs +13 -0
- package/esm2022/src/lib/models/index.mjs +2 -0
- package/esm2022/src/lib/models/log-in.mjs +2 -0
- package/esm2022/src/lib/models/mainUser.mjs +2 -0
- package/esm2022/src/lib/models/oauth-resp.mjs +2 -0
- package/esm2022/src/lib/models/oauth-response.mjs +2 -0
- package/esm2022/src/lib/models/object-state.mjs +8 -0
- package/esm2022/src/lib/models/otpValue.mjs +2 -0
- package/esm2022/src/lib/models/paged.mjs +2 -0
- package/esm2022/src/lib/models/public-api.mjs +53 -0
- package/esm2022/src/lib/models/query-params.mjs +2 -0
- package/esm2022/src/lib/models/request-status.mjs +5 -0
- package/esm2022/src/lib/models/resend-otp-data.mjs +2 -0
- package/esm2022/src/lib/models/sign-up.mjs +2 -0
- package/esm2022/src/lib/models/single-sign-on.mjs +2 -0
- package/esm2022/src/lib/models/status.mjs +6 -0
- package/esm2022/src/lib/models/user-access-request-status.mjs +7 -0
- package/esm2022/src/lib/models/user-access-request.mjs +2 -0
- package/esm2022/src/lib/models/user.mjs +2 -0
- package/esm2022/src/lib/models/verben-authentication-ui-src-lib-models.mjs +5 -0
- package/esm2022/src/lib/pipes/async-label.pipe.mjs +25 -0
- package/esm2022/src/lib/pipes/index.mjs +2 -0
- package/esm2022/src/lib/pipes/public-api.mjs +2 -0
- package/esm2022/src/lib/pipes/verben-authentication-ui-src-lib-pipes.mjs +5 -0
- package/esm2022/src/lib/services/authorization.service.mjs +26 -0
- package/esm2022/src/lib/services/encryption.service.mjs +52 -0
- package/esm2022/src/lib/services/environment.service.mjs +26 -0
- package/esm2022/src/lib/services/http-web-request.service.mjs +85 -0
- package/esm2022/src/lib/services/import.service.mjs +248 -0
- package/esm2022/src/lib/services/index.mjs +2 -0
- package/esm2022/src/lib/services/label.service.mjs +134 -0
- package/esm2022/src/lib/services/public-api.mjs +8 -0
- package/esm2022/src/lib/services/util.service.mjs +55 -0
- package/esm2022/src/lib/services/verben-authentication-ui-src-lib-services.mjs +5 -0
- package/esm2022/src/lib/shared/index.mjs +2 -0
- package/esm2022/src/lib/shared/public-api.mjs +2 -0
- package/esm2022/src/lib/shared/shared.module.mjs +90 -0
- package/esm2022/src/lib/shared/verben-authentication-ui-src-lib-shared.mjs +5 -0
- package/esm2022/src/utils/components/base-data-view.component.mjs +111 -0
- package/esm2022/src/utils/index.mjs +2 -0
- package/esm2022/src/utils/models/DataViewConfig.mjs +2 -0
- package/esm2022/src/utils/public-api.mjs +3 -0
- package/esm2022/src/utils/verben-authentication-ui-src-utils.mjs +5 -0
- package/fesm2022/verben-authentication-ui-src-lib-base.mjs +305 -0
- package/fesm2022/verben-authentication-ui-src-lib-base.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-auth-callback.mjs +79 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-auth-callback.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-button.mjs +70 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-button.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-forgot-password.mjs +128 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-forgot-password.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-mail-validation.mjs +146 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-mail-validation.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-mail.mjs +94 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-mail.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-o-auth.mjs +130 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-o-auth.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-otp-input.mjs +131 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-otp-input.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-reset-password.mjs +144 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-reset-password.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-role-control.mjs +1893 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-role-control.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-sign-in.mjs +363 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-sign-in.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-sign-up.mjs +271 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-sign-up.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-sso.mjs +462 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-sso.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-two-factor-auth-otp.mjs +245 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-two-factor-auth-otp.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-two-factor-auth-setup.mjs +113 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-two-factor-auth-setup.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-management.mjs +894 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-management.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-request-approval.mjs +1021 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-request-approval.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-request-process.mjs +34 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-request-process.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-request.mjs +355 -0
- package/fesm2022/verben-authentication-ui-src-lib-components-user-request.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-models.mjs +153 -0
- package/fesm2022/verben-authentication-ui-src-lib-models.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-pipes.mjs +32 -0
- package/fesm2022/verben-authentication-ui-src-lib-pipes.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-services.mjs +610 -0
- package/fesm2022/verben-authentication-ui-src-lib-services.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-lib-shared.mjs +97 -0
- package/fesm2022/verben-authentication-ui-src-lib-shared.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui-src-utils.mjs +118 -0
- package/fesm2022/verben-authentication-ui-src-utils.mjs.map +1 -0
- package/fesm2022/verben-authentication-ui.mjs +16 -6610
- package/fesm2022/verben-authentication-ui.mjs.map +1 -1
- package/package.json +146 -2
- package/public-api.d.ts +16 -34
- package/src/lib/base/base-data.component.d.ts +32 -0
- package/src/lib/base/base-data.facade.d.ts +27 -0
- package/src/lib/base/base-data.service.d.ts +14 -0
- package/src/lib/base/base-data.state.d.ts +28 -0
- package/src/lib/base/index.d.ts +1 -0
- package/src/lib/base/models.d.ts +11 -0
- package/src/lib/base/public-api.d.ts +5 -0
- package/src/lib/components/auth-callback/index.d.ts +1 -0
- package/src/lib/components/auth-callback/public-api.d.ts +2 -0
- package/src/lib/components/button/index.d.ts +1 -0
- package/src/lib/components/button/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/forgot-password/forgot-password.component.d.ts +4 -4
- package/src/lib/components/forgot-password/index.d.ts +1 -0
- package/src/lib/components/forgot-password/public-api.d.ts +3 -0
- package/src/lib/components/mail/index.d.ts +1 -0
- package/{lib → src/lib}/components/mail/mail.module.d.ts +1 -1
- package/src/lib/components/mail/public-api.d.ts +2 -0
- package/src/lib/components/mail-validation/index.d.ts +1 -0
- package/src/lib/components/mail-validation/public-api.d.ts +2 -0
- package/src/lib/components/o-auth/index.d.ts +1 -0
- package/{lib → src/lib}/components/o-auth/o-auth.component.d.ts +1 -1
- package/src/lib/components/o-auth/public-api.d.ts +2 -0
- package/src/lib/components/otp-input/index.d.ts +1 -0
- package/{lib → src/lib}/components/otp-input/otp-input.module.d.ts +2 -2
- package/src/lib/components/otp-input/public-api.d.ts +2 -0
- package/src/lib/components/reset-password/index.d.ts +1 -0
- package/src/lib/components/reset-password/public-api.d.ts +3 -0
- package/{lib → src/lib}/components/reset-password/reset-password.component.d.ts +4 -4
- package/{lib → src/lib}/components/role-control/MappedRole.d.ts +1 -1
- package/{lib → src/lib}/components/role-control/MappedRoleAction.d.ts +1 -1
- package/{lib → src/lib}/components/role-control/MappedRoleContext.d.ts +1 -1
- package/src/lib/components/role-control/index.d.ts +1 -0
- package/src/lib/components/role-control/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/role-control/role-control.component.d.ts +21 -13
- package/{lib → src/lib}/components/role-control/role-control.module.d.ts +1 -1
- package/src/lib/components/sign-in/index.d.ts +1 -0
- package/src/lib/components/sign-in/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/sign-in/sign-in.component.d.ts +10 -10
- package/{lib → src/lib}/components/sign-in/sign-in.module.d.ts +2 -2
- package/src/lib/components/sign-up/index.d.ts +1 -0
- package/src/lib/components/sign-up/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/sign-up/sign-up.component.d.ts +6 -6
- package/{lib → src/lib}/components/sign-up/sign-up.module.d.ts +2 -2
- package/src/lib/components/sso/helper.d.ts +2 -0
- package/src/lib/components/sso/index.d.ts +1 -0
- package/src/lib/components/sso/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/sso/sso.columns.d.ts +1 -1
- package/{lib → src/lib}/components/sso/sso.component.d.ts +1 -1
- package/src/lib/components/two-factor-auth-otp/index.d.ts +1 -0
- package/src/lib/components/two-factor-auth-otp/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +6 -6
- package/{lib → src/lib}/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +2 -2
- package/src/lib/components/two-factor-auth-setup/index.d.ts +1 -0
- package/src/lib/components/two-factor-auth-setup/public-api.d.ts +2 -0
- package/src/lib/components/user-management/index.d.ts +1 -0
- package/src/lib/components/user-management/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/user-management/services/user-management.service.d.ts +4 -4
- package/{lib/components/user-management/user-management-form/use-management-form.component.d.ts → src/lib/components/user-management/user-management-form/user-management-form.component.d.ts} +4 -4
- package/{lib → src/lib}/components/user-management/user-management.columns.d.ts +1 -1
- package/{lib → src/lib}/components/user-management/user-management.component.d.ts +11 -11
- package/{lib → src/lib}/components/user-management/user-management.module.d.ts +2 -2
- package/{lib → src/lib}/components/user-management/user-status-badge/user-status-badge.component.d.ts +1 -1
- package/src/lib/components/user-request/index.d.ts +1 -0
- package/src/lib/components/user-request/public-api.d.ts +2 -0
- package/{lib → src/lib}/components/user-request/user-request.component.d.ts +7 -7
- package/{lib → src/lib}/components/user-request/user-request.module.d.ts +1 -1
- package/{lib → src/lib}/components/user-request-approval/access-request.columns.d.ts +1 -1
- package/{lib → src/lib}/components/user-request-approval/facades/user-access-request.facade.d.ts +4 -4
- package/{lib → src/lib}/components/user-request-approval/helper.d.ts +1 -1
- package/src/lib/components/user-request-approval/index.d.ts +1 -0
- package/src/lib/components/user-request-approval/public-api.d.ts +4 -0
- package/{lib → src/lib}/components/user-request-approval/services/user-access-request.service.d.ts +6 -6
- package/{lib → src/lib}/components/user-request-approval/states/user-access-request.state.d.ts +3 -3
- package/{lib → src/lib}/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +1 -1
- package/{lib → src/lib}/components/user-request-approval/user-request-approval.component.d.ts +2 -2
- package/{lib → src/lib}/components/user-request-approval/user-request-approval.module.d.ts +1 -1
- package/{lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts → src/lib/components/user-request-approval/user-request-form/user-request-form.component.d.ts} +1 -1
- package/src/lib/components/user-request-process/index.d.ts +1 -0
- package/src/lib/components/user-request-process/public-api.d.ts +2 -0
- package/src/lib/components/user-request-process/user-request-process.component.d.ts +5 -0
- package/src/lib/components/user-request-process/user-request-process.module.d.ts +7 -0
- package/src/lib/models/FilterTypes.d.ts +6 -0
- package/src/lib/models/MailConfig.d.ts +12 -0
- package/src/lib/models/MessageConfig.d.ts +3 -0
- package/src/lib/models/MessageMedium.d.ts +4 -0
- package/src/lib/models/PeriodMode.d.ts +10 -0
- package/src/lib/models/ReportSchedule.d.ts +22 -0
- package/src/lib/models/ReportType.d.ts +5 -0
- package/src/lib/models/SMSConfig.d.ts +10 -0
- package/src/lib/models/TaskNotification.d.ts +12 -0
- package/src/lib/models/TaskNotificationMessageType.d.ts +4 -0
- package/src/lib/models/TaskNotificationType.d.ts +4 -0
- package/src/lib/models/Tenant.d.ts +21 -0
- package/{lib → src/lib}/models/UserRequest.d.ts +6 -9
- package/src/lib/models/index.d.ts +1 -0
- package/src/lib/models/public-api.d.ts +52 -0
- package/{lib → src/lib}/pipes/async-label.pipe.d.ts +1 -1
- package/src/lib/pipes/index.d.ts +1 -0
- package/src/lib/pipes/public-api.d.ts +1 -0
- package/src/lib/services/import.service.d.ts +15 -0
- package/src/lib/services/index.d.ts +1 -0
- package/src/lib/services/public-api.d.ts +7 -0
- package/src/lib/shared/index.d.ts +1 -0
- package/src/lib/shared/public-api.d.ts +1 -0
- package/{lib → src/lib}/shared/shared.module.d.ts +2 -2
- package/src/utils/components/base-data-view.component.d.ts +34 -0
- package/src/utils/index.d.ts +1 -0
- package/src/utils/models/DataViewConfig.d.ts +11 -0
- package/src/utils/public-api.d.ts +2 -0
- package/esm2022/lib/components/auth-callback/auth-callback.component.mjs +0 -57
- package/esm2022/lib/components/button/button.module.mjs +0 -20
- package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +0 -2
- package/esm2022/lib/components/mail/mail.component.mjs +0 -69
- package/esm2022/lib/components/mail/mail.module.mjs +0 -21
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +0 -107
- 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/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 -1608
- 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.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.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.columns.mjs +0 -53
- package/esm2022/lib/components/user-management/user-management.module.mjs +0 -85
- 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.module.mjs +0 -83
- 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/lib/components/sso/helper.d.ts +0 -2
- /package/{lib → src/lib}/components/auth-callback/auth-callback.component.d.ts +0 -0
- /package/{lib → src/lib}/components/auth-callback/auth-callback.module.d.ts +0 -0
- /package/{lib → src/lib}/components/button/button.component.d.ts +0 -0
- /package/{lib → src/lib}/components/button/button.module.d.ts +0 -0
- /package/{lib → src/lib}/components/forgot-password/ForgotPasswordData.d.ts +0 -0
- /package/{lib → src/lib}/components/forgot-password/forgot-password.module.d.ts +0 -0
- /package/{lib → src/lib}/components/mail/mail.component.d.ts +0 -0
- /package/{lib → src/lib}/components/mail-validation/mail-validation.component.d.ts +0 -0
- /package/{lib → src/lib}/components/mail-validation/mail-validation.module.d.ts +0 -0
- /package/{lib → src/lib}/components/o-auth/o-auth.module.d.ts +0 -0
- /package/{lib → src/lib}/components/otp-input/otp-input.component.d.ts +0 -0
- /package/{lib → src/lib}/components/reset-password/ResetPasswordData.d.ts +0 -0
- /package/{lib → src/lib}/components/reset-password/reset-password.module.d.ts +0 -0
- /package/{lib → src/lib}/components/role-control/ChildrenType.d.ts +0 -0
- /package/{lib → src/lib}/components/role-control/UIActions.d.ts +0 -0
- /package/{lib → src/lib}/components/role-control/UIs.d.ts +0 -0
- /package/{lib → src/lib}/components/role-control/base-table-style.d.ts +0 -0
- /package/{lib → src/lib}/components/role-control/role-control.service.d.ts +0 -0
- /package/{lib → src/lib}/components/sso/base-table-style.d.ts +0 -0
- /package/{lib → src/lib}/components/sso/sso-form/sso-form.component.d.ts +0 -0
- /package/{lib → src/lib}/components/sso/sso.module.d.ts +0 -0
- /package/{lib → src/lib}/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +0 -0
- /package/{lib → src/lib}/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +0 -0
- /package/{lib → src/lib}/components/user-management/base-table-style.d.ts +0 -0
- /package/{lib → src/lib}/components/user-request-approval/base-table-style.d.ts +0 -0
- /package/{lib → src/lib}/models/ApplicationRoleAction.d.ts +0 -0
- /package/{lib → src/lib}/models/ApplicationRoleContext.d.ts +0 -0
- /package/{lib → src/lib}/models/ErrorResponse.d.ts +0 -0
- /package/{lib → src/lib}/models/OAuthParam.d.ts +0 -0
- /package/{lib → src/lib}/models/OAuthType.d.ts +0 -0
- /package/{lib → src/lib}/models/PagedResult.d.ts +0 -0
- /package/{lib → src/lib}/models/PasswordRequestParam.d.ts +0 -0
- /package/{lib → src/lib}/models/PermissionConfig.d.ts +0 -0
- /package/{lib → src/lib}/models/ResponseKeyValue.d.ts +0 -0
- /package/{lib → src/lib}/models/Role.d.ts +0 -0
- /package/{lib → src/lib}/models/RoleAction.d.ts +0 -0
- /package/{lib → src/lib}/models/RoleContext.d.ts +0 -0
- /package/{lib → src/lib}/models/SearchDynamicWrapper.d.ts +0 -0
- /package/{lib → src/lib}/models/SearchOperator.d.ts +0 -0
- /package/{lib → src/lib}/models/SearchPropertySign.d.ts +0 -0
- /package/{lib → src/lib}/models/SearchPropertyValue.d.ts +0 -0
- /package/{lib → src/lib}/models/SearchPropertyValueType.d.ts +0 -0
- /package/{lib → src/lib}/models/SortDirection.d.ts +0 -0
- /package/{lib → src/lib}/models/Tag.d.ts +0 -0
- /package/{lib → src/lib}/models/TenantConfig.d.ts +0 -0
- /package/{lib → src/lib}/models/auth-mechanism.d.ts +0 -0
- /package/{lib → src/lib}/models/base.d.ts +0 -0
- /package/{lib → src/lib}/models/conditions.d.ts +0 -0
- /package/{lib → src/lib}/models/log-in.d.ts +0 -0
- /package/{lib → src/lib}/models/mainUser.d.ts +0 -0
- /package/{lib → src/lib}/models/oauth-resp.d.ts +0 -0
- /package/{lib → src/lib}/models/oauth-response.d.ts +0 -0
- /package/{lib → src/lib}/models/object-state.d.ts +0 -0
- /package/{lib → src/lib}/models/otpValue.d.ts +0 -0
- /package/{lib → src/lib}/models/paged.d.ts +0 -0
- /package/{lib → src/lib}/models/query-params.d.ts +0 -0
- /package/{lib → src/lib}/models/request-status.d.ts +0 -0
- /package/{lib → src/lib}/models/resend-otp-data.d.ts +0 -0
- /package/{lib → src/lib}/models/sign-up.d.ts +0 -0
- /package/{lib → src/lib}/models/single-sign-on.d.ts +0 -0
- /package/{lib → src/lib}/models/status.d.ts +0 -0
- /package/{lib → src/lib}/models/user-access-request-status.d.ts +0 -0
- /package/{lib → src/lib}/models/user-access-request.d.ts +0 -0
- /package/{lib → src/lib}/models/user.d.ts +0 -0
- /package/{lib → src/lib}/services/authorization.service.d.ts +0 -0
- /package/{lib → src/lib}/services/encryption.service.d.ts +0 -0
- /package/{lib → src/lib}/services/environment.service.d.ts +0 -0
- /package/{lib → src/lib}/services/http-web-request.service.d.ts +0 -0
- /package/{lib → src/lib}/services/label.service.d.ts +0 -0
- /package/{lib → src/lib}/services/util.service.d.ts +0 -0
|
@@ -0,0 +1,1893 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, viewChildren, Component, ViewChild, ViewChildren, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i5 from 'verben-ng-ui';
|
|
4
|
+
import { ColumnDirective, DataFilterType } from 'verben-ng-ui';
|
|
5
|
+
import { SearchOperator, SearchPropertySign, ErrorResponse, ObjectState, SearchPropertyValueType, SortDirection } from 'verben-authentication-ui/src/lib/models';
|
|
6
|
+
import { Subject, debounceTime } from 'rxjs';
|
|
7
|
+
import * as i1 from 'verben-authentication-ui/src/lib/services';
|
|
8
|
+
import * as i3 from '@angular/forms';
|
|
9
|
+
import * as i4 from '@angular/common';
|
|
10
|
+
import { SharedModule } from 'verben-authentication-ui/src/lib/shared';
|
|
11
|
+
|
|
12
|
+
const baseStyle = {
|
|
13
|
+
width: '100%',
|
|
14
|
+
fontFamily: '"Fraunces", serif',
|
|
15
|
+
fontSize: '125%',
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
margin: '0',
|
|
18
|
+
border: '1px solid #D4A007',
|
|
19
|
+
borderRadius: '16px',
|
|
20
|
+
borderCollapse: 'separate',
|
|
21
|
+
borderSpacing: '0',
|
|
22
|
+
// tableLayout: 'fixed',
|
|
23
|
+
overflow: 'hidden',
|
|
24
|
+
rows: {
|
|
25
|
+
even: {
|
|
26
|
+
backgroundColor: '#FDFDFD',
|
|
27
|
+
},
|
|
28
|
+
odd: {
|
|
29
|
+
backgroundColor: '#F1F4FB',
|
|
30
|
+
},
|
|
31
|
+
height: '68px',
|
|
32
|
+
},
|
|
33
|
+
cells: {
|
|
34
|
+
padding: '0.5rem 1rem',
|
|
35
|
+
},
|
|
36
|
+
header: {
|
|
37
|
+
// stickyTop: true,
|
|
38
|
+
// zIndex: 2,
|
|
39
|
+
backgroundColor: '#EFF2FB',
|
|
40
|
+
fontWeight: 'bold',
|
|
41
|
+
textAlign: 'left',
|
|
42
|
+
padding: '12px 16px',
|
|
43
|
+
height: '30px',
|
|
44
|
+
},
|
|
45
|
+
footer: {
|
|
46
|
+
// stickyBottom: true,
|
|
47
|
+
// zIndex: 2,
|
|
48
|
+
padding: '3px',
|
|
49
|
+
},
|
|
50
|
+
// body: {
|
|
51
|
+
// background: '#fff',
|
|
52
|
+
// padding: '4px 5px',
|
|
53
|
+
// textAlign: 'center',
|
|
54
|
+
// },
|
|
55
|
+
// firstColumn: {
|
|
56
|
+
// stickyLeft: true,
|
|
57
|
+
// zIndex: 1,
|
|
58
|
+
// },
|
|
59
|
+
lastColumn: {
|
|
60
|
+
// stickyRight: true,
|
|
61
|
+
// zIndex: 1,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var UIs;
|
|
66
|
+
(function (UIs) {
|
|
67
|
+
UIs["ProductDistribution"] = "ProductDistribution";
|
|
68
|
+
UIs["Terminals"] = "Terminals";
|
|
69
|
+
UIs["Meters"] = "Meters";
|
|
70
|
+
UIs["ProductInbound"] = "ProductInbound";
|
|
71
|
+
UIs["TerminalDocumentation"] = "TerminalDocumentation";
|
|
72
|
+
UIs["Laboratories"] = "Laboratories";
|
|
73
|
+
UIs["Surveyors"] = "Surveyors";
|
|
74
|
+
UIs["Products"] = "Products";
|
|
75
|
+
UIs["Stocks"] = "Stocks";
|
|
76
|
+
UIs["Tanks"] = "Tanks";
|
|
77
|
+
UIs["Customers"] = "Customers";
|
|
78
|
+
UIs["ProductAllocation"] = "ProductAllocation";
|
|
79
|
+
UIs["ReleaseManagement"] = "ReleaseManagement";
|
|
80
|
+
UIs["ProductPricing"] = "ProductPricing";
|
|
81
|
+
UIs["Purchases"] = "Purchases";
|
|
82
|
+
UIs["Agents"] = "Agents";
|
|
83
|
+
UIs["Banks"] = "Banks";
|
|
84
|
+
UIs["Vendors"] = "Vendors";
|
|
85
|
+
UIs["Vessels"] = "Vessels";
|
|
86
|
+
UIs["ExpenseList"] = "ExpenseList";
|
|
87
|
+
UIs["ProcurementDocumentation"] = "ProcurementDocumentation";
|
|
88
|
+
UIs["Journal"] = "Journal";
|
|
89
|
+
UIs["JournalTemplate"] = "JournalTemplate";
|
|
90
|
+
UIs["RecurringJournal"] = "RecurringJournal";
|
|
91
|
+
UIs["InterCompanyJournal"] = "InterCompanyJournal";
|
|
92
|
+
UIs["InterCompanyJournalTemplate"] = "InterCompanyJournalTemplate";
|
|
93
|
+
UIs["UserManagement"] = "UserManagement";
|
|
94
|
+
UIs["AccessRequest"] = "AccessRequest";
|
|
95
|
+
UIs["RolesAndPermissions"] = "RolesAndPermissions";
|
|
96
|
+
UIs["AuditTrail"] = "AuditTrail";
|
|
97
|
+
UIs["LogViewer"] = "LogViewer";
|
|
98
|
+
UIs["MessageHistory"] = "MessageHistory";
|
|
99
|
+
UIs["MessageConfig"] = "MessageConfig";
|
|
100
|
+
UIs["MessageList"] = "MessageList";
|
|
101
|
+
UIs["Config"] = "Config";
|
|
102
|
+
UIs["Reports"] = "Reports";
|
|
103
|
+
})(UIs || (UIs = {}));
|
|
104
|
+
|
|
105
|
+
var UIActions;
|
|
106
|
+
(function (UIActions) {
|
|
107
|
+
UIActions["Save"] = "Save";
|
|
108
|
+
UIActions["Edit"] = "Edit";
|
|
109
|
+
UIActions["Delete"] = "Delete";
|
|
110
|
+
})(UIActions || (UIActions = {}));
|
|
111
|
+
|
|
112
|
+
var ChildrenType;
|
|
113
|
+
(function (ChildrenType) {
|
|
114
|
+
ChildrenType["Permission"] = "Permission";
|
|
115
|
+
ChildrenType["Action"] = "Action";
|
|
116
|
+
})(ChildrenType || (ChildrenType = {}));
|
|
117
|
+
|
|
118
|
+
class RoleControlService {
|
|
119
|
+
constructor() { }
|
|
120
|
+
get roleColumns() {
|
|
121
|
+
return [
|
|
122
|
+
{
|
|
123
|
+
id: 'select',
|
|
124
|
+
header: '',
|
|
125
|
+
canExport: false,
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 'createdAt',
|
|
129
|
+
header: 'CREATED',
|
|
130
|
+
accessorKey: 'CreatedAt',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 'updatedAt',
|
|
134
|
+
header: 'UPDATED',
|
|
135
|
+
accessorKey: 'UpdatedAt',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 'name',
|
|
139
|
+
header: 'NAME',
|
|
140
|
+
accessorFn: (row) => {
|
|
141
|
+
return row;
|
|
142
|
+
},
|
|
143
|
+
importKey: 'Name',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'permissions',
|
|
147
|
+
header: 'PERMISSIONS',
|
|
148
|
+
accessorFn: (row) => {
|
|
149
|
+
const sum = row.RoleContexts.filter((x) => x.Selected == true).length;
|
|
150
|
+
return `${sum} of ${row.RoleContexts.length} Permissions`;
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 'actions',
|
|
155
|
+
header: 'ACTIONS',
|
|
156
|
+
accessorFn: (row) => {
|
|
157
|
+
return row;
|
|
158
|
+
},
|
|
159
|
+
canExport: false,
|
|
160
|
+
},
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
164
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlService, providedIn: 'root' });
|
|
165
|
+
}
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlService, decorators: [{
|
|
167
|
+
type: Injectable,
|
|
168
|
+
args: [{
|
|
169
|
+
providedIn: 'root',
|
|
170
|
+
}]
|
|
171
|
+
}], ctorParameters: () => [] });
|
|
172
|
+
|
|
173
|
+
var DateFilterTypes;
|
|
174
|
+
(function (DateFilterTypes) {
|
|
175
|
+
DateFilterTypes["Before"] = "LT";
|
|
176
|
+
DateFilterTypes["On"] = "EQ";
|
|
177
|
+
DateFilterTypes["After"] = "GT";
|
|
178
|
+
})(DateFilterTypes || (DateFilterTypes = {}));
|
|
179
|
+
class RoleControlComponent {
|
|
180
|
+
authService;
|
|
181
|
+
roleControlSvc;
|
|
182
|
+
utilService;
|
|
183
|
+
server;
|
|
184
|
+
cdr;
|
|
185
|
+
fb;
|
|
186
|
+
envSvc;
|
|
187
|
+
importService;
|
|
188
|
+
visibleColumnDef = [];
|
|
189
|
+
styles = baseStyle;
|
|
190
|
+
data = [];
|
|
191
|
+
cardData = [];
|
|
192
|
+
//dataCopy: CardData[] = [];
|
|
193
|
+
currentData = null;
|
|
194
|
+
currentExpandedCard = null;
|
|
195
|
+
cardContext = null;
|
|
196
|
+
cardContextHistory = [];
|
|
197
|
+
cardContextHistoryData = [];
|
|
198
|
+
//dataCopyHistory: CardData[][] = [];
|
|
199
|
+
cardDataView;
|
|
200
|
+
dataView;
|
|
201
|
+
popUps;
|
|
202
|
+
tableView;
|
|
203
|
+
isGlobal = true;
|
|
204
|
+
serviceName = null;
|
|
205
|
+
application = null;
|
|
206
|
+
pageSize = 10;
|
|
207
|
+
searchDebounceTime = 500;
|
|
208
|
+
permissionConfig = null;
|
|
209
|
+
pageState = null;
|
|
210
|
+
sourceData = [];
|
|
211
|
+
isOpen = false;
|
|
212
|
+
openDropdownId = null;
|
|
213
|
+
currentFilters = [];
|
|
214
|
+
currentSorts = [];
|
|
215
|
+
searchTerm$ = new Subject();
|
|
216
|
+
visibleColumns = [];
|
|
217
|
+
columnTemplates = viewChildren(ColumnDirective);
|
|
218
|
+
filterArray = [
|
|
219
|
+
{
|
|
220
|
+
name: 'CreatedAt',
|
|
221
|
+
type: DataFilterType.Date,
|
|
222
|
+
checked: false,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'UpdatedAt',
|
|
226
|
+
type: DataFilterType.Date,
|
|
227
|
+
checked: false,
|
|
228
|
+
},
|
|
229
|
+
];
|
|
230
|
+
sortOptions = [
|
|
231
|
+
{
|
|
232
|
+
name: 'CreatedAt',
|
|
233
|
+
type: DataFilterType.Date,
|
|
234
|
+
checked: false,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'UpdatedAt',
|
|
238
|
+
type: DataFilterType.Date,
|
|
239
|
+
checked: false,
|
|
240
|
+
},
|
|
241
|
+
];
|
|
242
|
+
searchContext = '';
|
|
243
|
+
searchContextHistory = [];
|
|
244
|
+
isInputFocused = false;
|
|
245
|
+
// private _searchItem: string = '';
|
|
246
|
+
// get searchItem(): string {
|
|
247
|
+
// return this._searchItem
|
|
248
|
+
// }
|
|
249
|
+
// set searchItem(value: string) {
|
|
250
|
+
// this._searchItem = value;
|
|
251
|
+
// this.searchTerm$.next(value);
|
|
252
|
+
// }
|
|
253
|
+
// form: FormGroup;
|
|
254
|
+
childPermissionRef = ChildrenType.Permission;
|
|
255
|
+
roleContextsStore = [];
|
|
256
|
+
roleActionsStore = [];
|
|
257
|
+
currentSearchTerm = '';
|
|
258
|
+
constructor(authService, roleControlSvc, utilService, server, cdr, fb, envSvc, importService) {
|
|
259
|
+
this.authService = authService;
|
|
260
|
+
this.roleControlSvc = roleControlSvc;
|
|
261
|
+
this.utilService = utilService;
|
|
262
|
+
this.server = server;
|
|
263
|
+
this.cdr = cdr;
|
|
264
|
+
this.fb = fb;
|
|
265
|
+
this.envSvc = envSvc;
|
|
266
|
+
this.importService = importService;
|
|
267
|
+
this.visibleColumnDef = roleControlSvc.roleColumns;
|
|
268
|
+
this.visibleColumns = roleControlSvc.roleColumns.map((col) => ({
|
|
269
|
+
checked: true,
|
|
270
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
271
|
+
type: DataFilterType.Bool,
|
|
272
|
+
}));
|
|
273
|
+
// this.form = this.fb.group({
|
|
274
|
+
// Name: new FormControl<string | null>(null, Validators.required),
|
|
275
|
+
// });
|
|
276
|
+
}
|
|
277
|
+
async ngOnInit() {
|
|
278
|
+
const mockData = this.getMockRoles();
|
|
279
|
+
const roles = await this.getAllRoles();
|
|
280
|
+
const contextsRes = await this.getSavedContexts();
|
|
281
|
+
if (this.isGlobal) {
|
|
282
|
+
if (contextsRes) {
|
|
283
|
+
this.roleContextsStore = contextsRes;
|
|
284
|
+
this.roleActionsStore = contextsRes.flatMap((x) => x.RoleActions);
|
|
285
|
+
const authConfig = contextsRes.map((x) => {
|
|
286
|
+
return {
|
|
287
|
+
Name: x.Name,
|
|
288
|
+
Actions: x.RoleActions.map((y) => {
|
|
289
|
+
return y.Name;
|
|
290
|
+
}),
|
|
291
|
+
};
|
|
292
|
+
});
|
|
293
|
+
this.sourceData = authConfig;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
this.sourceData = this.authService.authorizationConfig;
|
|
298
|
+
}
|
|
299
|
+
if (roles) {
|
|
300
|
+
this.setUpMappedData(roles);
|
|
301
|
+
this.setUpCardData();
|
|
302
|
+
}
|
|
303
|
+
this.searchTerm$
|
|
304
|
+
.pipe(debounceTime(this.searchDebounceTime)) // Adjust debounce time here (in ms)
|
|
305
|
+
.subscribe(async (searchTerm) => {
|
|
306
|
+
this.currentSearchTerm = searchTerm;
|
|
307
|
+
this.updateFiltersAndSorts(true);
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
async getSavedContexts() {
|
|
311
|
+
if (!this.isGlobal || !this.application) {
|
|
312
|
+
return undefined;
|
|
313
|
+
}
|
|
314
|
+
var payload = [
|
|
315
|
+
{
|
|
316
|
+
PropertyName: 'Application',
|
|
317
|
+
EntityValue: this.application,
|
|
318
|
+
Operator: SearchOperator.And,
|
|
319
|
+
Sign: SearchPropertySign.EQ,
|
|
320
|
+
},
|
|
321
|
+
// {
|
|
322
|
+
// PropertyName: 'APIKey',
|
|
323
|
+
// EntityValue: this.envSvc.environment.APIKey,
|
|
324
|
+
// Operator: SearchOperator.And,
|
|
325
|
+
// Sign: SearchPropertySign.EQ,
|
|
326
|
+
// },
|
|
327
|
+
];
|
|
328
|
+
this.utilService.sendBI(true);
|
|
329
|
+
const res = await this.server.post(`Application/SearchApplicationRoleContexts/0/0`, payload);
|
|
330
|
+
this.utilService.sendBI(false);
|
|
331
|
+
if (res instanceof ErrorResponse) {
|
|
332
|
+
return undefined;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
var result = res.Result;
|
|
336
|
+
return result;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
async getAllRoles() {
|
|
340
|
+
// var payload: SearchPropertyValue[] = [
|
|
341
|
+
// {
|
|
342
|
+
// PropertyName: 'APIKey',
|
|
343
|
+
// EntityValue: this.envSvc.environment.APIKey,
|
|
344
|
+
// Operator: SearchOperator.And,
|
|
345
|
+
// Sign: SearchPropertySign.EQ
|
|
346
|
+
// }
|
|
347
|
+
// ]
|
|
348
|
+
this.utilService.sendBI(true);
|
|
349
|
+
const res = await this.server.get(`Role/GetRoles/0/${this.pageSize}`);
|
|
350
|
+
this.utilService.sendBI(false);
|
|
351
|
+
if (res instanceof ErrorResponse) {
|
|
352
|
+
return undefined;
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
this.pageState = res;
|
|
356
|
+
var result = res.Result;
|
|
357
|
+
return result;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
async loadMore() {
|
|
361
|
+
if (!this.pageState) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
this.utilService.sendBI(true);
|
|
365
|
+
const res = this.currentFilters.length > 0 ||
|
|
366
|
+
this.currentSorts.length > 0 ||
|
|
367
|
+
this.currentSearchTerm.trim().length > 0
|
|
368
|
+
? await this.loadMoreFiltersAndSorts()
|
|
369
|
+
: await this.server.get(`Role/GetRoles/${this.pageState.Skip}/${this.pageSize}`);
|
|
370
|
+
this.utilService.sendBI(false);
|
|
371
|
+
if (res instanceof ErrorResponse) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this.pageState = res;
|
|
376
|
+
var result = res.Result;
|
|
377
|
+
const data = this.setUpMappedDataExtra(result);
|
|
378
|
+
this.data = this.data.concat(data);
|
|
379
|
+
this.setUpCardDataExtra(data);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
getApplicationContextCode(name) {
|
|
383
|
+
const item = this.roleContextsStore.find((x) => x.Name == name);
|
|
384
|
+
return item ? item.Code : '';
|
|
385
|
+
}
|
|
386
|
+
getApplicationActionCode(name) {
|
|
387
|
+
const item = this.roleActionsStore.find((x) => x.Name == name);
|
|
388
|
+
return item ? item.Code : '';
|
|
389
|
+
}
|
|
390
|
+
findParent(cardData, target) {
|
|
391
|
+
for (const item of cardData) {
|
|
392
|
+
if (item.children.includes(target)) {
|
|
393
|
+
return item; // Immediate parent found
|
|
394
|
+
}
|
|
395
|
+
const parent = this.findParent(item.children, target);
|
|
396
|
+
if (parent) {
|
|
397
|
+
return parent;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return null; // Not found
|
|
401
|
+
}
|
|
402
|
+
isAllSelected(item) {
|
|
403
|
+
const parent = this.cardContextHistoryData.length > 0
|
|
404
|
+
? this.findParent(this.cardContextHistoryData[0], item)
|
|
405
|
+
: this.findParent(this.cardData, item);
|
|
406
|
+
if (parent &&
|
|
407
|
+
parent.data.ChildrenType &&
|
|
408
|
+
parent.data.ChildrenType == ChildrenType.Action &&
|
|
409
|
+
parent.data.RoleActions.some((y) => !y.Selected)) {
|
|
410
|
+
return false;
|
|
411
|
+
}
|
|
412
|
+
if (parent &&
|
|
413
|
+
parent.data.ChildrenType &&
|
|
414
|
+
parent.data.ChildrenType == ChildrenType.Permission &&
|
|
415
|
+
parent.data.RoleContexts.some((y) => !y.Selected)) {
|
|
416
|
+
return false;
|
|
417
|
+
}
|
|
418
|
+
return true;
|
|
419
|
+
}
|
|
420
|
+
isCheckboxDisabled(item) {
|
|
421
|
+
const parent = this.cardContextHistoryData.length > 0
|
|
422
|
+
? this.findParent(this.cardContextHistoryData[0], item)
|
|
423
|
+
: this.findParent(this.cardData, item);
|
|
424
|
+
if (parent &&
|
|
425
|
+
parent.data.ChildrenType &&
|
|
426
|
+
parent.data.ChildrenType == ChildrenType.Action &&
|
|
427
|
+
(parent.data.Selected == false ||
|
|
428
|
+
(this.permissionConfig != null &&
|
|
429
|
+
!this.permissionConfig.Actions['AddAction']))) {
|
|
430
|
+
return true;
|
|
431
|
+
}
|
|
432
|
+
if (parent &&
|
|
433
|
+
parent.data.ChildrenType &&
|
|
434
|
+
parent.data.ChildrenType == ChildrenType.Permission &&
|
|
435
|
+
this.permissionConfig != null &&
|
|
436
|
+
!this.permissionConfig.Actions['AddContext']) {
|
|
437
|
+
return true;
|
|
438
|
+
}
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
setUpMappedData(data) {
|
|
442
|
+
this.data = data.map((x) => {
|
|
443
|
+
return {
|
|
444
|
+
...x,
|
|
445
|
+
Id: x.Code,
|
|
446
|
+
ChildrenType: ChildrenType.Permission,
|
|
447
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
448
|
+
const existingId = x.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
449
|
+
var context = {
|
|
450
|
+
ChildrenType: ChildrenType.Action,
|
|
451
|
+
Selected: existingId > -1 ? true : false,
|
|
452
|
+
RoleActions: config.Actions.map((action) => {
|
|
453
|
+
const existingAction = existingId > -1
|
|
454
|
+
? x.RoleContexts[existingId].RoleActions.findIndex((c) => c.Name == action)
|
|
455
|
+
: -1;
|
|
456
|
+
var act = {
|
|
457
|
+
Selected: existingAction > -1 ? true : false,
|
|
458
|
+
Name: action,
|
|
459
|
+
Role: x.Code,
|
|
460
|
+
Context: '',
|
|
461
|
+
id: existingAction > -1
|
|
462
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
463
|
+
.Code
|
|
464
|
+
: '',
|
|
465
|
+
Id: existingAction > -1
|
|
466
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
467
|
+
.Code
|
|
468
|
+
: '',
|
|
469
|
+
CreatedAt: new Date(),
|
|
470
|
+
UpdatedAt: new Date(),
|
|
471
|
+
DataState: ObjectState.New,
|
|
472
|
+
TenantId: x.TenantId,
|
|
473
|
+
Code: existingAction > -1
|
|
474
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
475
|
+
.Code
|
|
476
|
+
: '',
|
|
477
|
+
ServiceName: existingAction > -1
|
|
478
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
479
|
+
.ServiceName
|
|
480
|
+
: '',
|
|
481
|
+
APIKey: existingAction > -1
|
|
482
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
483
|
+
.APIKey
|
|
484
|
+
: this.envSvc.environment.APIKey,
|
|
485
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
486
|
+
};
|
|
487
|
+
return act;
|
|
488
|
+
}),
|
|
489
|
+
Name: config.Name,
|
|
490
|
+
Role: x.Code,
|
|
491
|
+
id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
492
|
+
Id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
493
|
+
CreatedAt: new Date(),
|
|
494
|
+
UpdatedAt: new Date(),
|
|
495
|
+
DataState: ObjectState.New,
|
|
496
|
+
TenantId: x.TenantId,
|
|
497
|
+
Code: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
498
|
+
ServiceName: existingId > -1 ? x.RoleContexts[existingId].ServiceName : '',
|
|
499
|
+
APIKey: existingId > -1
|
|
500
|
+
? x.RoleContexts[existingId].APIKey
|
|
501
|
+
: this.envSvc.environment.APIKey,
|
|
502
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
503
|
+
};
|
|
504
|
+
return context;
|
|
505
|
+
}),
|
|
506
|
+
};
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
setUpMappedDataExtra(data) {
|
|
510
|
+
return data.map((x) => {
|
|
511
|
+
return {
|
|
512
|
+
...x,
|
|
513
|
+
Id: x.Code,
|
|
514
|
+
ChildrenType: ChildrenType.Permission,
|
|
515
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
516
|
+
const existingId = x.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
517
|
+
var context = {
|
|
518
|
+
ChildrenType: ChildrenType.Action,
|
|
519
|
+
Selected: existingId > -1 ? true : false,
|
|
520
|
+
RoleActions: config.Actions.map((action) => {
|
|
521
|
+
const existingAction = existingId > -1
|
|
522
|
+
? x.RoleContexts[existingId].RoleActions.findIndex((c) => c.Name == action)
|
|
523
|
+
: -1;
|
|
524
|
+
var act = {
|
|
525
|
+
Selected: existingAction > -1 ? true : false,
|
|
526
|
+
Name: action,
|
|
527
|
+
Role: x.Code,
|
|
528
|
+
Context: '',
|
|
529
|
+
id: existingAction > -1
|
|
530
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
531
|
+
.Code
|
|
532
|
+
: '',
|
|
533
|
+
Id: existingAction > -1
|
|
534
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
535
|
+
.Code
|
|
536
|
+
: '',
|
|
537
|
+
CreatedAt: new Date(),
|
|
538
|
+
UpdatedAt: new Date(),
|
|
539
|
+
DataState: ObjectState.New,
|
|
540
|
+
TenantId: x.TenantId,
|
|
541
|
+
Code: existingAction > -1
|
|
542
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
543
|
+
.Code
|
|
544
|
+
: '',
|
|
545
|
+
ServiceName: existingAction > -1
|
|
546
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
547
|
+
.ServiceName
|
|
548
|
+
: '',
|
|
549
|
+
APIKey: existingAction > -1
|
|
550
|
+
? x.RoleContexts[existingId].RoleActions[existingAction]
|
|
551
|
+
.APIKey
|
|
552
|
+
: this.envSvc.environment.APIKey,
|
|
553
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
554
|
+
};
|
|
555
|
+
return act;
|
|
556
|
+
}),
|
|
557
|
+
Name: config.Name,
|
|
558
|
+
Role: x.Code,
|
|
559
|
+
id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
560
|
+
Id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
561
|
+
CreatedAt: new Date(),
|
|
562
|
+
UpdatedAt: new Date(),
|
|
563
|
+
DataState: ObjectState.New,
|
|
564
|
+
TenantId: x.TenantId,
|
|
565
|
+
Code: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
566
|
+
ServiceName: existingId > -1 ? x.RoleContexts[existingId].ServiceName : '',
|
|
567
|
+
APIKey: existingId > -1
|
|
568
|
+
? x.RoleContexts[existingId].APIKey
|
|
569
|
+
: this.envSvc.environment.APIKey,
|
|
570
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
571
|
+
};
|
|
572
|
+
return context;
|
|
573
|
+
}),
|
|
574
|
+
};
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
setUpCardData() {
|
|
578
|
+
const cardData = this.data.map((x) => {
|
|
579
|
+
return {
|
|
580
|
+
selected: false,
|
|
581
|
+
title: x.Name,
|
|
582
|
+
data: x,
|
|
583
|
+
body: [],
|
|
584
|
+
children: x.RoleContexts.map((c) => {
|
|
585
|
+
return {
|
|
586
|
+
selected: false,
|
|
587
|
+
title: this.getFormattedName(c.Name),
|
|
588
|
+
data: c,
|
|
589
|
+
body: [],
|
|
590
|
+
children: c.RoleActions.map((a) => {
|
|
591
|
+
return {
|
|
592
|
+
selected: false,
|
|
593
|
+
title: this.getFormattedName(a.Name),
|
|
594
|
+
data: a,
|
|
595
|
+
body: [],
|
|
596
|
+
children: [],
|
|
597
|
+
};
|
|
598
|
+
}),
|
|
599
|
+
};
|
|
600
|
+
}),
|
|
601
|
+
};
|
|
602
|
+
});
|
|
603
|
+
this.cardData = cardData;
|
|
604
|
+
}
|
|
605
|
+
setUpCardDataExtra(baseData) {
|
|
606
|
+
const cardData = baseData.map((x) => {
|
|
607
|
+
return {
|
|
608
|
+
selected: false,
|
|
609
|
+
title: x.Name,
|
|
610
|
+
data: x,
|
|
611
|
+
body: [],
|
|
612
|
+
children: x.RoleContexts.map((c) => {
|
|
613
|
+
return {
|
|
614
|
+
selected: false,
|
|
615
|
+
title: this.getFormattedName(c.Name),
|
|
616
|
+
data: c,
|
|
617
|
+
body: [],
|
|
618
|
+
children: c.RoleActions.map((a) => {
|
|
619
|
+
return {
|
|
620
|
+
selected: false,
|
|
621
|
+
title: this.getFormattedName(a.Name),
|
|
622
|
+
data: a,
|
|
623
|
+
body: [],
|
|
624
|
+
children: [],
|
|
625
|
+
};
|
|
626
|
+
}),
|
|
627
|
+
};
|
|
628
|
+
}),
|
|
629
|
+
};
|
|
630
|
+
});
|
|
631
|
+
this.cardData = this.cardData.concat(cardData);
|
|
632
|
+
}
|
|
633
|
+
getFormattedName(name) {
|
|
634
|
+
// Split the key on capital letters, handling "And" as lowercase
|
|
635
|
+
const words = name
|
|
636
|
+
.split(/(?=[A-Z])/)
|
|
637
|
+
.map((word) => (word === 'And' ? 'and' : word));
|
|
638
|
+
// Join the words with spaces
|
|
639
|
+
return words.join(' ');
|
|
640
|
+
}
|
|
641
|
+
viewDetailsFromTable(data) {
|
|
642
|
+
const cardData = this.cardData.find((x) => x.data == data);
|
|
643
|
+
console.log({ Data: data });
|
|
644
|
+
console.log({ CardData: this.cardData });
|
|
645
|
+
if (cardData) {
|
|
646
|
+
this.dataView.isTableView = false;
|
|
647
|
+
this.viewDetails(cardData);
|
|
648
|
+
}
|
|
649
|
+
this.closePopUp();
|
|
650
|
+
}
|
|
651
|
+
viewDetails(context) {
|
|
652
|
+
this.cardContextHistory.push(context);
|
|
653
|
+
this.cardContextHistoryData.push(this.cardData);
|
|
654
|
+
if (context.data.ChildrenType &&
|
|
655
|
+
context.data.ChildrenType != this.childPermissionRef) {
|
|
656
|
+
this.searchContextHistory.push(this.searchContext);
|
|
657
|
+
this.searchContext = '';
|
|
658
|
+
}
|
|
659
|
+
this.cardData = context.children;
|
|
660
|
+
this.cardDataView.clearData();
|
|
661
|
+
}
|
|
662
|
+
viewDetailsChild(context) {
|
|
663
|
+
if (this.currentExpandedCard) {
|
|
664
|
+
this.cardContextHistory.push(this.currentExpandedCard);
|
|
665
|
+
this.cardContextHistory.push(context);
|
|
666
|
+
this.cardContextHistoryData.push(this.cardData);
|
|
667
|
+
this.cardContextHistoryData.push(this.currentExpandedCard.children);
|
|
668
|
+
this.cardData = context.children;
|
|
669
|
+
this.cardDataView.clearData();
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
roleCardClicked(item) {
|
|
673
|
+
this.currentData = this.cardDataView.onItemClick(item);
|
|
674
|
+
// if (this.currentData) {
|
|
675
|
+
// this.form.controls['Name'].setValue(this.currentData.data?.Name);
|
|
676
|
+
// }
|
|
677
|
+
}
|
|
678
|
+
toggleChildren(item) {
|
|
679
|
+
var currToggleState = item.isChildrenExpanded;
|
|
680
|
+
this.cardData.forEach((_) => {
|
|
681
|
+
_.isChildrenExpanded = false;
|
|
682
|
+
});
|
|
683
|
+
item.isChildrenExpanded = !currToggleState;
|
|
684
|
+
if (item.isChildrenExpanded) {
|
|
685
|
+
this.currentExpandedCard = item;
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
this.currentExpandedCard = null;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
goToTableView() {
|
|
692
|
+
if (!this.currentData) {
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
this.dataView.toggleView();
|
|
696
|
+
const id = this.currentData.data ? this.currentData.data.Id : '';
|
|
697
|
+
if (id.trim().length > 0 && !this.tableView.isRowEditing(id)) {
|
|
698
|
+
this.tableView.toggleRowEdit(id);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
closeDetails() {
|
|
702
|
+
this.cardData =
|
|
703
|
+
this.cardContextHistoryData[this.cardContextHistoryData.length - 1];
|
|
704
|
+
this.cardContextHistoryData.pop();
|
|
705
|
+
this.cardContextHistory.pop();
|
|
706
|
+
if (this.searchContextHistory.length > 0) {
|
|
707
|
+
this.searchContext =
|
|
708
|
+
this.searchContextHistory[this.searchContextHistory.length - 1];
|
|
709
|
+
this.searchContextHistory.pop();
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
this.searchContext = '';
|
|
713
|
+
}
|
|
714
|
+
setTimeout(() => {
|
|
715
|
+
if (this.dataView.isTableView) {
|
|
716
|
+
this.dataView.toggleView();
|
|
717
|
+
}
|
|
718
|
+
}, 200);
|
|
719
|
+
}
|
|
720
|
+
getCardSubCaption(item) {
|
|
721
|
+
const selected = item.children.filter((x) => x.data.Selected).length;
|
|
722
|
+
const total = item.children.length;
|
|
723
|
+
return `${selected} of ${total} ${total > 1 ? item.data.ChildrenType + 's' : item.data.ChildrenType}`;
|
|
724
|
+
}
|
|
725
|
+
getUpdatedRole(role) {
|
|
726
|
+
const newRole = role;
|
|
727
|
+
newRole.RoleContexts = role.RoleContexts.filter((x) => x.Selected).map((y) => {
|
|
728
|
+
y.RoleActions = y.RoleActions.filter((z) => z.Selected);
|
|
729
|
+
return y;
|
|
730
|
+
});
|
|
731
|
+
newRole.DataState =
|
|
732
|
+
newRole.DataState == ObjectState.New
|
|
733
|
+
? ObjectState.New
|
|
734
|
+
: ObjectState.Changed;
|
|
735
|
+
newRole.Id = '';
|
|
736
|
+
return newRole;
|
|
737
|
+
}
|
|
738
|
+
async saveRole() {
|
|
739
|
+
if (this.currentData) {
|
|
740
|
+
var role = this.currentData.data;
|
|
741
|
+
// role.Name = this.form.controls['Name'].value;
|
|
742
|
+
if (this.currentData.data.Name.trim().length == 0) {
|
|
743
|
+
this.utilService.showInfo('Role name cannot be empty');
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
const mappedRole = this.getUpdatedRole(JSON.parse(JSON.stringify(role)));
|
|
747
|
+
this.utilService.sendBI(true);
|
|
748
|
+
const res = await this.server.post(`Role/SaveRoles`, [mappedRole]);
|
|
749
|
+
this.utilService.sendBI(false);
|
|
750
|
+
if (res instanceof ErrorResponse) {
|
|
751
|
+
}
|
|
752
|
+
else {
|
|
753
|
+
this.utilService.showSuccess('Role saved successfully');
|
|
754
|
+
const result = res;
|
|
755
|
+
if (result.length > 0) {
|
|
756
|
+
var roleResult = result[0];
|
|
757
|
+
var mappedRoleSave = {
|
|
758
|
+
...roleResult,
|
|
759
|
+
ChildrenType: ChildrenType.Permission,
|
|
760
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
761
|
+
const existingId = roleResult.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
762
|
+
var context = {
|
|
763
|
+
ChildrenType: ChildrenType.Action,
|
|
764
|
+
Selected: existingId > -1 ? true : false,
|
|
765
|
+
RoleActions: config.Actions.map((action) => {
|
|
766
|
+
const existingAction = existingId > -1
|
|
767
|
+
? roleResult.RoleContexts[existingId].RoleActions.findIndex((c) => c.Name == action)
|
|
768
|
+
: -1;
|
|
769
|
+
var act = {
|
|
770
|
+
Selected: existingAction > -1 ? true : false,
|
|
771
|
+
Name: action,
|
|
772
|
+
Role: roleResult.Code,
|
|
773
|
+
Context: '',
|
|
774
|
+
id: existingAction > -1
|
|
775
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
776
|
+
: '',
|
|
777
|
+
Id: existingAction > -1
|
|
778
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
779
|
+
: '',
|
|
780
|
+
CreatedAt: new Date(),
|
|
781
|
+
UpdatedAt: new Date(),
|
|
782
|
+
DataState: ObjectState.New,
|
|
783
|
+
TenantId: roleResult.TenantId,
|
|
784
|
+
Code: existingAction > -1
|
|
785
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
786
|
+
: '',
|
|
787
|
+
ServiceName: existingAction > -1
|
|
788
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].ServiceName
|
|
789
|
+
: '',
|
|
790
|
+
APIKey: existingAction > -1
|
|
791
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].APIKey
|
|
792
|
+
: this.envSvc.environment.APIKey,
|
|
793
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
794
|
+
};
|
|
795
|
+
return act;
|
|
796
|
+
}),
|
|
797
|
+
Name: config.Name,
|
|
798
|
+
Role: roleResult.Code,
|
|
799
|
+
id: existingId > -1
|
|
800
|
+
? roleResult.RoleContexts[existingId].Code
|
|
801
|
+
: '',
|
|
802
|
+
Id: existingId > -1
|
|
803
|
+
? roleResult.RoleContexts[existingId].Code
|
|
804
|
+
: '',
|
|
805
|
+
CreatedAt: new Date(),
|
|
806
|
+
UpdatedAt: new Date(),
|
|
807
|
+
DataState: ObjectState.New,
|
|
808
|
+
TenantId: roleResult.TenantId,
|
|
809
|
+
Code: existingId > -1
|
|
810
|
+
? roleResult.RoleContexts[existingId].Code
|
|
811
|
+
: '',
|
|
812
|
+
ServiceName: existingId > -1
|
|
813
|
+
? roleResult.RoleContexts[existingId].ServiceName
|
|
814
|
+
: '',
|
|
815
|
+
APIKey: existingId > -1
|
|
816
|
+
? roleResult.RoleContexts[existingId].APIKey
|
|
817
|
+
: this.envSvc.environment.APIKey,
|
|
818
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
819
|
+
};
|
|
820
|
+
return context;
|
|
821
|
+
}),
|
|
822
|
+
};
|
|
823
|
+
const itemIndex = this.data.findIndex((x) => x == this.currentData?.data);
|
|
824
|
+
if (itemIndex > -1) {
|
|
825
|
+
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
826
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
827
|
+
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
828
|
+
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
829
|
+
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|
|
830
|
+
mappedRoleSave.RoleContexts.forEach((x, i) => {
|
|
831
|
+
this.data[itemIndex].RoleContexts[i].Role = mappedRoleSave.Code;
|
|
832
|
+
this.data[itemIndex].RoleContexts[i].Code = x.Code;
|
|
833
|
+
this.data[itemIndex].RoleContexts[i].ServiceName = x.ServiceName;
|
|
834
|
+
x.RoleActions.forEach((y, j) => {
|
|
835
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Role =
|
|
836
|
+
mappedRoleSave.Code;
|
|
837
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Code =
|
|
838
|
+
y.Code;
|
|
839
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].ServiceName = y.ServiceName;
|
|
840
|
+
});
|
|
841
|
+
});
|
|
842
|
+
this.data = this.data.map((x) => x);
|
|
843
|
+
this.cacheItem(this.data[itemIndex]);
|
|
844
|
+
// this.currentData = {
|
|
845
|
+
// selected: true,
|
|
846
|
+
// title: mappedRoleSave.Name,
|
|
847
|
+
// data: mappedRoleSave,
|
|
848
|
+
// isChildrenExpanded: this.currentData.isChildrenExpanded,
|
|
849
|
+
// body: [],
|
|
850
|
+
// children: mappedRoleSave.RoleContexts.map((c) => {
|
|
851
|
+
// return {
|
|
852
|
+
// selected: false,
|
|
853
|
+
// title: this.getFormattedName(c.Name),
|
|
854
|
+
// data: c,
|
|
855
|
+
// body: [],
|
|
856
|
+
// children: c.RoleActions.map((a) => {
|
|
857
|
+
// return {
|
|
858
|
+
// selected: false,
|
|
859
|
+
// title: this.getFormattedName(a.Name),
|
|
860
|
+
// data: a,
|
|
861
|
+
// body: [],
|
|
862
|
+
// children: [],
|
|
863
|
+
// };
|
|
864
|
+
// }),
|
|
865
|
+
// };
|
|
866
|
+
// }),
|
|
867
|
+
// };
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
async tableSaveRole(role, callBack) {
|
|
874
|
+
if (role.Name.trim().length == 0) {
|
|
875
|
+
this.utilService.showInfo('Role name cannot be empty');
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
const mappedRole = this.getUpdatedRole(JSON.parse(JSON.stringify(role)));
|
|
879
|
+
this.utilService.sendBI(true);
|
|
880
|
+
const res = await this.server.post(`Role/SaveRoles`, [mappedRole]);
|
|
881
|
+
this.utilService.sendBI(false);
|
|
882
|
+
if (res instanceof ErrorResponse) {
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
this.utilService.showSuccess('Role saved successfully');
|
|
886
|
+
const result = res;
|
|
887
|
+
if (result.length > 0) {
|
|
888
|
+
var roleResult = result[0];
|
|
889
|
+
var mappedRoleSave = {
|
|
890
|
+
...roleResult,
|
|
891
|
+
ChildrenType: ChildrenType.Permission,
|
|
892
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
893
|
+
const existingId = roleResult.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
894
|
+
var context = {
|
|
895
|
+
ChildrenType: ChildrenType.Action,
|
|
896
|
+
Selected: existingId > -1 ? true : false,
|
|
897
|
+
RoleActions: config.Actions.map((action) => {
|
|
898
|
+
const existingAction = existingId > -1
|
|
899
|
+
? roleResult.RoleContexts[existingId].RoleActions.findIndex((c) => c.Name == action)
|
|
900
|
+
: -1;
|
|
901
|
+
var act = {
|
|
902
|
+
Selected: existingAction > -1 ? true : false,
|
|
903
|
+
Name: action,
|
|
904
|
+
Role: roleResult.Code,
|
|
905
|
+
Context: '',
|
|
906
|
+
id: existingAction > -1
|
|
907
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
908
|
+
: '',
|
|
909
|
+
Id: existingAction > -1
|
|
910
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
911
|
+
: '',
|
|
912
|
+
CreatedAt: new Date(),
|
|
913
|
+
UpdatedAt: new Date(),
|
|
914
|
+
DataState: ObjectState.New,
|
|
915
|
+
TenantId: roleResult.TenantId,
|
|
916
|
+
Code: existingAction > -1
|
|
917
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
918
|
+
: '',
|
|
919
|
+
ServiceName: existingAction > -1
|
|
920
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].ServiceName
|
|
921
|
+
: '',
|
|
922
|
+
APIKey: existingAction > -1
|
|
923
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].APIKey
|
|
924
|
+
: this.envSvc.environment.APIKey,
|
|
925
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
926
|
+
};
|
|
927
|
+
return act;
|
|
928
|
+
}),
|
|
929
|
+
Name: config.Name,
|
|
930
|
+
Role: roleResult.Code,
|
|
931
|
+
id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
932
|
+
Id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
933
|
+
CreatedAt: new Date(),
|
|
934
|
+
UpdatedAt: new Date(),
|
|
935
|
+
DataState: ObjectState.New,
|
|
936
|
+
TenantId: roleResult.TenantId,
|
|
937
|
+
Code: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
938
|
+
ServiceName: existingId > -1
|
|
939
|
+
? roleResult.RoleContexts[existingId].ServiceName
|
|
940
|
+
: '',
|
|
941
|
+
APIKey: existingId > -1
|
|
942
|
+
? roleResult.RoleContexts[existingId].APIKey
|
|
943
|
+
: this.envSvc.environment.APIKey,
|
|
944
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
945
|
+
};
|
|
946
|
+
return context;
|
|
947
|
+
}),
|
|
948
|
+
};
|
|
949
|
+
const itemIndex = this.data.findIndex((x) => x == this.currentData?.data);
|
|
950
|
+
if (itemIndex > -1) {
|
|
951
|
+
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
952
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
953
|
+
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
954
|
+
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
955
|
+
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|
|
956
|
+
mappedRoleSave.RoleContexts.forEach((x, i) => {
|
|
957
|
+
this.data[itemIndex].RoleContexts[i].Role = mappedRoleSave.Code;
|
|
958
|
+
this.data[itemIndex].RoleContexts[i].Code = x.Code;
|
|
959
|
+
this.data[itemIndex].RoleContexts[i].ServiceName = x.ServiceName;
|
|
960
|
+
x.RoleActions.forEach((y, j) => {
|
|
961
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Role =
|
|
962
|
+
mappedRoleSave.Code;
|
|
963
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Code = y.Code;
|
|
964
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].ServiceName =
|
|
965
|
+
y.ServiceName;
|
|
966
|
+
});
|
|
967
|
+
});
|
|
968
|
+
this.data = this.data.map((x) => x);
|
|
969
|
+
this.cacheItem(this.data[itemIndex]);
|
|
970
|
+
}
|
|
971
|
+
callBack();
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
async saveRoleDynamic(item) {
|
|
976
|
+
if (this.isCheckboxDisabled(item)) {
|
|
977
|
+
this.utilService.showInfo('Parent UI not selected');
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
var role = this.cardContextHistory.length > 0
|
|
981
|
+
? this.cardContextHistory[0]
|
|
982
|
+
: this.currentExpandedCard
|
|
983
|
+
? this.currentExpandedCard
|
|
984
|
+
: null;
|
|
985
|
+
var cardDataRef = this.cardContextHistoryData.length > 0
|
|
986
|
+
? this.cardContextHistoryData[0]
|
|
987
|
+
: this.currentExpandedCard
|
|
988
|
+
? this.cardData
|
|
989
|
+
: null;
|
|
990
|
+
// const isExpandedCard: boolean =
|
|
991
|
+
// this.cardContextHistory.length > 0
|
|
992
|
+
// ? false
|
|
993
|
+
// : this.currentExpandedCard
|
|
994
|
+
// ? true
|
|
995
|
+
// : false;
|
|
996
|
+
if (!role) {
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
if (role.data.Name.trim().length == 0) {
|
|
1000
|
+
item.data.Selected = false;
|
|
1001
|
+
this.utilService.showInfo('Role name cannot be empty');
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
item.data.Selected = !item.data.Selected;
|
|
1005
|
+
const mappedRole = this.getUpdatedRole(JSON.parse(JSON.stringify(role.data)));
|
|
1006
|
+
this.utilService.sendBI(true);
|
|
1007
|
+
const res = await this.server.post(`Role/SaveRoles`, [mappedRole]);
|
|
1008
|
+
this.utilService.sendBI(false);
|
|
1009
|
+
if (res instanceof ErrorResponse) {
|
|
1010
|
+
item.data.Selected = false;
|
|
1011
|
+
}
|
|
1012
|
+
else {
|
|
1013
|
+
this.utilService.showSuccess('Role saved successfully');
|
|
1014
|
+
const result = res;
|
|
1015
|
+
if (result.length > 0) {
|
|
1016
|
+
var roleResult = result[0];
|
|
1017
|
+
var mappedRoleSave = {
|
|
1018
|
+
...roleResult,
|
|
1019
|
+
ChildrenType: ChildrenType.Permission,
|
|
1020
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
1021
|
+
const existingId = roleResult.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
1022
|
+
var context = {
|
|
1023
|
+
ChildrenType: ChildrenType.Action,
|
|
1024
|
+
Selected: existingId > -1 ? true : false,
|
|
1025
|
+
RoleActions: config.Actions.map((action) => {
|
|
1026
|
+
const existingAction = existingId > -1
|
|
1027
|
+
? roleResult.RoleContexts[existingId].RoleActions.findIndex((c) => c.Name == action)
|
|
1028
|
+
: -1;
|
|
1029
|
+
var act = {
|
|
1030
|
+
Selected: existingAction > -1 ? true : false,
|
|
1031
|
+
Name: action,
|
|
1032
|
+
Role: roleResult.Code,
|
|
1033
|
+
Context: '',
|
|
1034
|
+
id: existingAction > -1
|
|
1035
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
1036
|
+
: '',
|
|
1037
|
+
Id: existingAction > -1
|
|
1038
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
1039
|
+
: '',
|
|
1040
|
+
CreatedAt: new Date(),
|
|
1041
|
+
UpdatedAt: new Date(),
|
|
1042
|
+
DataState: ObjectState.New,
|
|
1043
|
+
TenantId: roleResult.TenantId,
|
|
1044
|
+
Code: existingAction > -1
|
|
1045
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
1046
|
+
: '',
|
|
1047
|
+
ServiceName: existingAction > -1
|
|
1048
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].ServiceName
|
|
1049
|
+
: '',
|
|
1050
|
+
APIKey: existingAction > -1
|
|
1051
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].APIKey
|
|
1052
|
+
: this.envSvc.environment.APIKey,
|
|
1053
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
1054
|
+
};
|
|
1055
|
+
return act;
|
|
1056
|
+
}),
|
|
1057
|
+
Name: config.Name,
|
|
1058
|
+
Role: roleResult.Code,
|
|
1059
|
+
id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
1060
|
+
Id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
1061
|
+
CreatedAt: new Date(),
|
|
1062
|
+
UpdatedAt: new Date(),
|
|
1063
|
+
DataState: ObjectState.New,
|
|
1064
|
+
TenantId: roleResult.TenantId,
|
|
1065
|
+
Code: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
1066
|
+
ServiceName: existingId > -1
|
|
1067
|
+
? roleResult.RoleContexts[existingId].ServiceName
|
|
1068
|
+
: '',
|
|
1069
|
+
APIKey: existingId > -1
|
|
1070
|
+
? roleResult.RoleContexts[existingId].APIKey
|
|
1071
|
+
: this.envSvc.environment.APIKey,
|
|
1072
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
1073
|
+
};
|
|
1074
|
+
return context;
|
|
1075
|
+
}),
|
|
1076
|
+
};
|
|
1077
|
+
const itemIndex = cardDataRef
|
|
1078
|
+
? cardDataRef.findIndex((x) => x.data == role?.data)
|
|
1079
|
+
: -1;
|
|
1080
|
+
if (itemIndex > -1) {
|
|
1081
|
+
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
1082
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
1083
|
+
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
1084
|
+
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
1085
|
+
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|
|
1086
|
+
mappedRoleSave.RoleContexts.forEach((x, i) => {
|
|
1087
|
+
this.data[itemIndex].RoleContexts[i].Role = mappedRoleSave.Code;
|
|
1088
|
+
this.data[itemIndex].RoleContexts[i].Code = x.Code;
|
|
1089
|
+
this.data[itemIndex].RoleContexts[i].ServiceName = x.ServiceName;
|
|
1090
|
+
x.RoleActions.forEach((y, j) => {
|
|
1091
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Role =
|
|
1092
|
+
mappedRoleSave.Code;
|
|
1093
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Code = y.Code;
|
|
1094
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].ServiceName =
|
|
1095
|
+
y.ServiceName;
|
|
1096
|
+
});
|
|
1097
|
+
});
|
|
1098
|
+
// this.data[itemIndex].RoleContexts = mappedRoleSave.RoleContexts;
|
|
1099
|
+
this.data = this.data.map((x) => x);
|
|
1100
|
+
// if (cardDataRef) {
|
|
1101
|
+
// console.log({
|
|
1102
|
+
// XDataIsHere: JSON.parse(JSON.stringify(cardDataRef)),
|
|
1103
|
+
// });
|
|
1104
|
+
// cardDataRef[itemIndex] = {
|
|
1105
|
+
// selected: cardDataRef[itemIndex].selected,
|
|
1106
|
+
// isChildrenExpanded: cardDataRef[itemIndex].isChildrenExpanded,
|
|
1107
|
+
// title: mappedRoleSave.Name,
|
|
1108
|
+
// data: mappedRoleSave,
|
|
1109
|
+
// body: [],
|
|
1110
|
+
// children: mappedRoleSave.RoleContexts.map((c) => {
|
|
1111
|
+
// return {
|
|
1112
|
+
// selected: false,
|
|
1113
|
+
// title: this.getFormattedName(c.Name),
|
|
1114
|
+
// data: c,
|
|
1115
|
+
// body: [],
|
|
1116
|
+
// children: c.RoleActions.map((a) => {
|
|
1117
|
+
// return {
|
|
1118
|
+
// selected: false,
|
|
1119
|
+
// title: this.getFormattedName(a.Name),
|
|
1120
|
+
// data: a,
|
|
1121
|
+
// body: [],
|
|
1122
|
+
// children: [],
|
|
1123
|
+
// };
|
|
1124
|
+
// }),
|
|
1125
|
+
// };
|
|
1126
|
+
// }),
|
|
1127
|
+
// };
|
|
1128
|
+
// }
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
async saveAllRoleDynamic(item) {
|
|
1134
|
+
if (this.isCheckboxDisabled(item)) {
|
|
1135
|
+
this.utilService.showInfo('Parent UI not selected');
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
var role = this.cardContextHistory.length > 0
|
|
1139
|
+
? this.cardContextHistory[0]
|
|
1140
|
+
: this.currentExpandedCard
|
|
1141
|
+
? this.currentExpandedCard
|
|
1142
|
+
: null;
|
|
1143
|
+
var cardDataRef = this.cardContextHistoryData.length > 0
|
|
1144
|
+
? this.cardContextHistoryData[0]
|
|
1145
|
+
: this.currentExpandedCard
|
|
1146
|
+
? this.cardData
|
|
1147
|
+
: null;
|
|
1148
|
+
// const isExpandedCard: boolean =
|
|
1149
|
+
// this.cardContextHistory.length > 0
|
|
1150
|
+
// ? false
|
|
1151
|
+
// : this.currentExpandedCard
|
|
1152
|
+
// ? true
|
|
1153
|
+
// : false;
|
|
1154
|
+
if (!role) {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
if (role.data.Name.trim().length == 0) {
|
|
1158
|
+
this.utilService.showInfo('Role name cannot be empty');
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
const isAllSelected = this.isAllSelected(item);
|
|
1162
|
+
const parent = this.cardContextHistoryData.length > 0
|
|
1163
|
+
? this.findParent(this.cardContextHistoryData[0], item)
|
|
1164
|
+
: this.findParent(this.cardData, item);
|
|
1165
|
+
if (parent &&
|
|
1166
|
+
parent.data.ChildrenType &&
|
|
1167
|
+
parent.data.ChildrenType == ChildrenType.Action) {
|
|
1168
|
+
parent.data.RoleActions.forEach((x) => {
|
|
1169
|
+
x.Selected = !isAllSelected;
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
if (parent &&
|
|
1173
|
+
parent.data.ChildrenType &&
|
|
1174
|
+
parent.data.ChildrenType == ChildrenType.Permission) {
|
|
1175
|
+
parent.data.RoleContexts.forEach((x) => {
|
|
1176
|
+
x.Selected = !isAllSelected;
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
const mappedRole = this.getUpdatedRole(JSON.parse(JSON.stringify(role.data)));
|
|
1180
|
+
this.utilService.sendBI(true);
|
|
1181
|
+
const res = await this.server.post(`Role/SaveRoles`, [mappedRole]);
|
|
1182
|
+
this.utilService.sendBI(false);
|
|
1183
|
+
if (res instanceof ErrorResponse) {
|
|
1184
|
+
item.data.Selected = false;
|
|
1185
|
+
}
|
|
1186
|
+
else {
|
|
1187
|
+
this.utilService.showSuccess('Role saved successfully');
|
|
1188
|
+
const result = res;
|
|
1189
|
+
if (result.length > 0) {
|
|
1190
|
+
var roleResult = result[0];
|
|
1191
|
+
var mappedRoleSave = {
|
|
1192
|
+
...roleResult,
|
|
1193
|
+
ChildrenType: ChildrenType.Permission,
|
|
1194
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
1195
|
+
const existingId = roleResult.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
1196
|
+
var context = {
|
|
1197
|
+
ChildrenType: ChildrenType.Action,
|
|
1198
|
+
Selected: existingId > -1 ? true : false,
|
|
1199
|
+
RoleActions: config.Actions.map((action) => {
|
|
1200
|
+
const existingAction = existingId > -1
|
|
1201
|
+
? roleResult.RoleContexts[existingId].RoleActions.findIndex((c) => c.Name == action)
|
|
1202
|
+
: -1;
|
|
1203
|
+
var act = {
|
|
1204
|
+
Selected: existingAction > -1 ? true : false,
|
|
1205
|
+
Name: action,
|
|
1206
|
+
Role: roleResult.Code,
|
|
1207
|
+
Context: '',
|
|
1208
|
+
id: existingAction > -1
|
|
1209
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
1210
|
+
: '',
|
|
1211
|
+
Id: existingAction > -1
|
|
1212
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
1213
|
+
: '',
|
|
1214
|
+
CreatedAt: new Date(),
|
|
1215
|
+
UpdatedAt: new Date(),
|
|
1216
|
+
DataState: ObjectState.New,
|
|
1217
|
+
TenantId: roleResult.TenantId,
|
|
1218
|
+
Code: existingAction > -1
|
|
1219
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
1220
|
+
: '',
|
|
1221
|
+
ServiceName: existingAction > -1
|
|
1222
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].ServiceName
|
|
1223
|
+
: '',
|
|
1224
|
+
APIKey: existingAction > -1
|
|
1225
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].APIKey
|
|
1226
|
+
: this.envSvc.environment.APIKey,
|
|
1227
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
1228
|
+
};
|
|
1229
|
+
return act;
|
|
1230
|
+
}),
|
|
1231
|
+
Name: config.Name,
|
|
1232
|
+
Role: roleResult.Code,
|
|
1233
|
+
id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
1234
|
+
Id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
1235
|
+
CreatedAt: new Date(),
|
|
1236
|
+
UpdatedAt: new Date(),
|
|
1237
|
+
DataState: ObjectState.New,
|
|
1238
|
+
TenantId: roleResult.TenantId,
|
|
1239
|
+
Code: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
1240
|
+
ServiceName: existingId > -1
|
|
1241
|
+
? roleResult.RoleContexts[existingId].ServiceName
|
|
1242
|
+
: '',
|
|
1243
|
+
APIKey: existingId > -1
|
|
1244
|
+
? roleResult.RoleContexts[existingId].APIKey
|
|
1245
|
+
: this.envSvc.environment.APIKey,
|
|
1246
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
1247
|
+
};
|
|
1248
|
+
return context;
|
|
1249
|
+
}),
|
|
1250
|
+
};
|
|
1251
|
+
const itemIndex = cardDataRef
|
|
1252
|
+
? cardDataRef.findIndex((x) => x.data == role?.data)
|
|
1253
|
+
: -1;
|
|
1254
|
+
if (itemIndex > -1) {
|
|
1255
|
+
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
1256
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
1257
|
+
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
1258
|
+
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
1259
|
+
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|
|
1260
|
+
mappedRoleSave.RoleContexts.forEach((x, i) => {
|
|
1261
|
+
this.data[itemIndex].RoleContexts[i].Role = mappedRoleSave.Code;
|
|
1262
|
+
this.data[itemIndex].RoleContexts[i].Code = x.Code;
|
|
1263
|
+
this.data[itemIndex].RoleContexts[i].ServiceName = x.ServiceName;
|
|
1264
|
+
x.RoleActions.forEach((y, j) => {
|
|
1265
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Role =
|
|
1266
|
+
mappedRoleSave.Code;
|
|
1267
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].Code = y.Code;
|
|
1268
|
+
this.data[itemIndex].RoleContexts[i].RoleActions[j].ServiceName =
|
|
1269
|
+
y.ServiceName;
|
|
1270
|
+
});
|
|
1271
|
+
});
|
|
1272
|
+
// this.data[itemIndex].RoleContexts = mappedRoleSave.RoleContexts;
|
|
1273
|
+
this.data = this.data.map((x) => x);
|
|
1274
|
+
// if (cardDataRef) {
|
|
1275
|
+
// console.log({
|
|
1276
|
+
// XDataIsHere: JSON.parse(JSON.stringify(cardDataRef)),
|
|
1277
|
+
// });
|
|
1278
|
+
// cardDataRef[itemIndex] = {
|
|
1279
|
+
// selected: cardDataRef[itemIndex].selected,
|
|
1280
|
+
// isChildrenExpanded: cardDataRef[itemIndex].isChildrenExpanded,
|
|
1281
|
+
// title: mappedRoleSave.Name,
|
|
1282
|
+
// data: mappedRoleSave,
|
|
1283
|
+
// body: [],
|
|
1284
|
+
// children: mappedRoleSave.RoleContexts.map((c) => {
|
|
1285
|
+
// return {
|
|
1286
|
+
// selected: false,
|
|
1287
|
+
// title: this.getFormattedName(c.Name),
|
|
1288
|
+
// data: c,
|
|
1289
|
+
// body: [],
|
|
1290
|
+
// children: c.RoleActions.map((a) => {
|
|
1291
|
+
// return {
|
|
1292
|
+
// selected: false,
|
|
1293
|
+
// title: this.getFormattedName(a.Name),
|
|
1294
|
+
// data: a,
|
|
1295
|
+
// body: [],
|
|
1296
|
+
// children: [],
|
|
1297
|
+
// };
|
|
1298
|
+
// }),
|
|
1299
|
+
// };
|
|
1300
|
+
// }),
|
|
1301
|
+
// };
|
|
1302
|
+
// }
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
saveDataAll() {
|
|
1308
|
+
const roles = this.data.map((x) => {
|
|
1309
|
+
return {
|
|
1310
|
+
...x,
|
|
1311
|
+
RoleContexts: x.RoleContexts.filter((y) => y.Selected).map((z) => {
|
|
1312
|
+
return {
|
|
1313
|
+
...z,
|
|
1314
|
+
RoleActions: z.RoleActions.filter((a) => a.Selected),
|
|
1315
|
+
};
|
|
1316
|
+
}),
|
|
1317
|
+
};
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
updateTable() {
|
|
1321
|
+
this.data = this.data.map((x) => x);
|
|
1322
|
+
}
|
|
1323
|
+
onViewChange(isGridView) { }
|
|
1324
|
+
onStateChange(event) {
|
|
1325
|
+
switch (event.key) {
|
|
1326
|
+
case 'create':
|
|
1327
|
+
var newMappedRole = {
|
|
1328
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
1329
|
+
var context = {
|
|
1330
|
+
ChildrenType: ChildrenType.Action,
|
|
1331
|
+
Selected: false,
|
|
1332
|
+
RoleActions: config.Actions.map((action) => {
|
|
1333
|
+
var act = {
|
|
1334
|
+
Selected: false,
|
|
1335
|
+
Name: action,
|
|
1336
|
+
Role: '',
|
|
1337
|
+
Context: '',
|
|
1338
|
+
id: '',
|
|
1339
|
+
Id: '',
|
|
1340
|
+
CreatedAt: new Date(),
|
|
1341
|
+
UpdatedAt: new Date(),
|
|
1342
|
+
DataState: ObjectState.New,
|
|
1343
|
+
TenantId: '',
|
|
1344
|
+
Code: '',
|
|
1345
|
+
ServiceName: '',
|
|
1346
|
+
APIKey: this.envSvc.environment.APIKey,
|
|
1347
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
1348
|
+
};
|
|
1349
|
+
return act;
|
|
1350
|
+
}),
|
|
1351
|
+
Name: config.Name,
|
|
1352
|
+
Role: '',
|
|
1353
|
+
id: '',
|
|
1354
|
+
Id: '',
|
|
1355
|
+
CreatedAt: new Date(),
|
|
1356
|
+
UpdatedAt: new Date(),
|
|
1357
|
+
DataState: ObjectState.New,
|
|
1358
|
+
TenantId: '',
|
|
1359
|
+
Code: '',
|
|
1360
|
+
ServiceName: '',
|
|
1361
|
+
APIKey: this.envSvc.environment.APIKey,
|
|
1362
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
1363
|
+
};
|
|
1364
|
+
return context;
|
|
1365
|
+
}),
|
|
1366
|
+
ChildrenType: ChildrenType.Permission,
|
|
1367
|
+
Name: '',
|
|
1368
|
+
id: (this.cardData.length + 1).toString(),
|
|
1369
|
+
Id: (this.cardData.length + 1).toString(),
|
|
1370
|
+
CreatedAt: new Date(),
|
|
1371
|
+
UpdatedAt: new Date(),
|
|
1372
|
+
DataState: ObjectState.New,
|
|
1373
|
+
TenantId: '',
|
|
1374
|
+
Code: '',
|
|
1375
|
+
ServiceName: '',
|
|
1376
|
+
Application: this.application ? this.application : undefined,
|
|
1377
|
+
APIKey: this.envSvc.environment.APIKey,
|
|
1378
|
+
};
|
|
1379
|
+
const cardData = {
|
|
1380
|
+
selected: false,
|
|
1381
|
+
title: newMappedRole.Name,
|
|
1382
|
+
data: newMappedRole,
|
|
1383
|
+
body: [],
|
|
1384
|
+
children: newMappedRole.RoleContexts.map((c) => {
|
|
1385
|
+
return {
|
|
1386
|
+
selected: false,
|
|
1387
|
+
title: this.getFormattedName(c.Name),
|
|
1388
|
+
data: c,
|
|
1389
|
+
body: [],
|
|
1390
|
+
children: c.RoleActions.map((a) => {
|
|
1391
|
+
return {
|
|
1392
|
+
selected: false,
|
|
1393
|
+
title: this.getFormattedName(a.Name),
|
|
1394
|
+
data: a,
|
|
1395
|
+
body: [],
|
|
1396
|
+
children: [],
|
|
1397
|
+
};
|
|
1398
|
+
}),
|
|
1399
|
+
};
|
|
1400
|
+
}),
|
|
1401
|
+
};
|
|
1402
|
+
this.data = this.data.concat([newMappedRole]);
|
|
1403
|
+
this.cardData.push(cardData);
|
|
1404
|
+
this.roleCardClicked(cardData);
|
|
1405
|
+
this.dataView.isTableView = false;
|
|
1406
|
+
break;
|
|
1407
|
+
default:
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
showTableView = false;
|
|
1412
|
+
onSelectionChange(selectedRows) { }
|
|
1413
|
+
retryMessage() { }
|
|
1414
|
+
onColumnsUpdated(updatedColumns) {
|
|
1415
|
+
const updatedColumnDef = [];
|
|
1416
|
+
updatedColumns.forEach((col) => {
|
|
1417
|
+
const matchingCol = this.roleControlSvc.roleColumns.find((column) => column.header === col.name || column.id === col.name);
|
|
1418
|
+
if (matchingCol) {
|
|
1419
|
+
updatedColumnDef.push(matchingCol);
|
|
1420
|
+
}
|
|
1421
|
+
});
|
|
1422
|
+
this.visibleColumnDef = [...updatedColumnDef];
|
|
1423
|
+
}
|
|
1424
|
+
exportFiltersAndSorts = async (pageState) => {
|
|
1425
|
+
var payload = this.currentFilters.map((x) => {
|
|
1426
|
+
return {
|
|
1427
|
+
PropertyName: x.name,
|
|
1428
|
+
EntityValue: x.value,
|
|
1429
|
+
Operator: SearchOperator.And,
|
|
1430
|
+
Sign: x.condition && Object.keys(DateFilterTypes).includes(x.condition)
|
|
1431
|
+
? DateFilterTypes[x.condition]
|
|
1432
|
+
: SearchPropertySign.EQ,
|
|
1433
|
+
Type: SearchPropertyValueType.Date,
|
|
1434
|
+
};
|
|
1435
|
+
});
|
|
1436
|
+
payload.push({
|
|
1437
|
+
PropertyName: 'APIKey',
|
|
1438
|
+
EntityValue: this.envSvc.environment.APIKey,
|
|
1439
|
+
Operator: SearchOperator.And,
|
|
1440
|
+
Sign: SearchPropertySign.EQ,
|
|
1441
|
+
});
|
|
1442
|
+
for (let sort of this.currentSorts) {
|
|
1443
|
+
payload.push({
|
|
1444
|
+
PropertyName: sort.name,
|
|
1445
|
+
EntityValue: '',
|
|
1446
|
+
Operator: SearchOperator.And,
|
|
1447
|
+
Sign: SearchPropertySign.EQ,
|
|
1448
|
+
Sort: sort.value.toLowerCase() == SortDirection.Asc.toLowerCase()
|
|
1449
|
+
? SortDirection.Asc
|
|
1450
|
+
: sort.value.toLowerCase() == SortDirection.Desc.toLowerCase()
|
|
1451
|
+
? SortDirection.Desc
|
|
1452
|
+
: SortDirection.None,
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
const searchTermExists = this.currentSearchTerm.trim().length > 0;
|
|
1456
|
+
this.utilService.sendBI(true);
|
|
1457
|
+
const res = searchTermExists
|
|
1458
|
+
? await this.server.get(`Role/GetRolesWithParam/${this.currentSearchTerm.trim()}/${pageState.skip}/${pageState.limit}`)
|
|
1459
|
+
: await this.server.post(`Role/SearchRoles/${pageState.skip}/${pageState.limit}`, payload);
|
|
1460
|
+
this.utilService.sendBI(false);
|
|
1461
|
+
if (res instanceof ErrorResponse) {
|
|
1462
|
+
return [];
|
|
1463
|
+
}
|
|
1464
|
+
else {
|
|
1465
|
+
var result = res.Result;
|
|
1466
|
+
return result;
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
async updateFiltersAndSorts(isSearch = false) {
|
|
1470
|
+
if (!isSearch) {
|
|
1471
|
+
this.dataView.onClearSearch();
|
|
1472
|
+
this.currentSearchTerm = '';
|
|
1473
|
+
this.cdr.detectChanges();
|
|
1474
|
+
const clickEvent = new MouseEvent('click', {
|
|
1475
|
+
bubbles: true,
|
|
1476
|
+
cancelable: true,
|
|
1477
|
+
view: window,
|
|
1478
|
+
});
|
|
1479
|
+
document.dispatchEvent(clickEvent);
|
|
1480
|
+
}
|
|
1481
|
+
var payload = this.currentFilters.map((x) => {
|
|
1482
|
+
return {
|
|
1483
|
+
PropertyName: x.name,
|
|
1484
|
+
EntityValue: x.value,
|
|
1485
|
+
Operator: SearchOperator.And,
|
|
1486
|
+
Sign: x.condition && Object.keys(DateFilterTypes).includes(x.condition)
|
|
1487
|
+
? DateFilterTypes[x.condition]
|
|
1488
|
+
: SearchPropertySign.EQ,
|
|
1489
|
+
Type: SearchPropertyValueType.Date,
|
|
1490
|
+
};
|
|
1491
|
+
});
|
|
1492
|
+
payload.push({
|
|
1493
|
+
PropertyName: 'APIKey',
|
|
1494
|
+
EntityValue: this.envSvc.environment.APIKey,
|
|
1495
|
+
Operator: SearchOperator.And,
|
|
1496
|
+
Sign: SearchPropertySign.EQ,
|
|
1497
|
+
});
|
|
1498
|
+
for (let sort of this.currentSorts) {
|
|
1499
|
+
payload.push({
|
|
1500
|
+
PropertyName: sort.name,
|
|
1501
|
+
EntityValue: '',
|
|
1502
|
+
Operator: SearchOperator.And,
|
|
1503
|
+
Sign: SearchPropertySign.EQ,
|
|
1504
|
+
Sort: sort.value.toLowerCase() == SortDirection.Asc.toLowerCase()
|
|
1505
|
+
? SortDirection.Asc
|
|
1506
|
+
: sort.value.toLowerCase() == SortDirection.Desc.toLowerCase()
|
|
1507
|
+
? SortDirection.Desc
|
|
1508
|
+
: SortDirection.None,
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
const searchTermExists = this.currentSearchTerm.trim().length > 0;
|
|
1512
|
+
this.utilService.sendBI(true);
|
|
1513
|
+
const res = searchTermExists
|
|
1514
|
+
? await this.server.get(`Role/GetRolesWithParam/${this.currentSearchTerm.trim()}/0/${this.pageSize}`)
|
|
1515
|
+
: await this.server.post(`Role/SearchRoles/0/${this.pageSize}`, payload);
|
|
1516
|
+
this.utilService.sendBI(false);
|
|
1517
|
+
if (res instanceof ErrorResponse) {
|
|
1518
|
+
this.currentFilters = [];
|
|
1519
|
+
this.currentSorts = [];
|
|
1520
|
+
return undefined;
|
|
1521
|
+
}
|
|
1522
|
+
else {
|
|
1523
|
+
this.cardDataView.clearData();
|
|
1524
|
+
this.currentData = null;
|
|
1525
|
+
this.pageState = res;
|
|
1526
|
+
var result = res.Result;
|
|
1527
|
+
this.setUpMappedData(result);
|
|
1528
|
+
this.setUpCardData();
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
async loadMoreFiltersAndSorts() {
|
|
1532
|
+
if (!this.pageState) {
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
var payload = this.currentFilters.map((x) => {
|
|
1536
|
+
return {
|
|
1537
|
+
PropertyName: x.name,
|
|
1538
|
+
EntityValue: x.value,
|
|
1539
|
+
Operator: SearchOperator.And,
|
|
1540
|
+
Sign: x.condition && Object.keys(DateFilterTypes).includes(x.condition)
|
|
1541
|
+
? DateFilterTypes[x.condition]
|
|
1542
|
+
: SearchPropertySign.EQ,
|
|
1543
|
+
Type: SearchPropertyValueType.Date,
|
|
1544
|
+
};
|
|
1545
|
+
});
|
|
1546
|
+
payload.push({
|
|
1547
|
+
PropertyName: 'APIKey',
|
|
1548
|
+
EntityValue: this.envSvc.environment.APIKey,
|
|
1549
|
+
Operator: SearchOperator.And,
|
|
1550
|
+
Sign: SearchPropertySign.EQ,
|
|
1551
|
+
});
|
|
1552
|
+
for (let sort of this.currentSorts) {
|
|
1553
|
+
payload.push({
|
|
1554
|
+
PropertyName: sort.name,
|
|
1555
|
+
EntityValue: '',
|
|
1556
|
+
Operator: SearchOperator.And,
|
|
1557
|
+
Sign: SearchPropertySign.EQ,
|
|
1558
|
+
Sort: sort.value.toLowerCase() == SortDirection.Asc.toLowerCase()
|
|
1559
|
+
? SortDirection.Asc
|
|
1560
|
+
: sort.value.toLowerCase() == SortDirection.Desc.toLowerCase()
|
|
1561
|
+
? SortDirection.Desc
|
|
1562
|
+
: SortDirection.None,
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
const searchTermExists = this.currentSearchTerm.trim().length > 0;
|
|
1566
|
+
this.utilService.sendBI(true);
|
|
1567
|
+
const res = searchTermExists
|
|
1568
|
+
? await this.server.get(`Role/GetRolesWithParam/${this.currentSearchTerm.trim()}/${this.pageState.Skip}/${this.pageSize}`)
|
|
1569
|
+
: await this.server.post(`Role/SearchRoles/${this.pageState.Skip}/${this.pageSize}`, payload);
|
|
1570
|
+
this.utilService.sendBI(false);
|
|
1571
|
+
if (res instanceof ErrorResponse) {
|
|
1572
|
+
return undefined;
|
|
1573
|
+
}
|
|
1574
|
+
else {
|
|
1575
|
+
var result = res;
|
|
1576
|
+
return result;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
onFilterUpdated(updatedFilters) {
|
|
1580
|
+
// Ensure updatedFilters is an array
|
|
1581
|
+
if (Array.isArray(updatedFilters)) {
|
|
1582
|
+
this.currentFilters = updatedFilters;
|
|
1583
|
+
this.updateFiltersAndSorts();
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
onSortUpdated(updatedSorts) {
|
|
1587
|
+
this.currentSorts = updatedSorts;
|
|
1588
|
+
console.log({ CurrSorts: this.currentSorts });
|
|
1589
|
+
this.updateFiltersAndSorts();
|
|
1590
|
+
}
|
|
1591
|
+
handleSearch(event) {
|
|
1592
|
+
this.searchTerm$.next(event.value);
|
|
1593
|
+
}
|
|
1594
|
+
handleExport(exportedData) {
|
|
1595
|
+
// console.log('Exported data:', exportedData);
|
|
1596
|
+
this.downloadCSV(exportedData);
|
|
1597
|
+
}
|
|
1598
|
+
downloadCSV(data) {
|
|
1599
|
+
const headers = Object.keys(data[0]);
|
|
1600
|
+
const csvContent = [
|
|
1601
|
+
headers.join(','),
|
|
1602
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
1603
|
+
].join('\n');
|
|
1604
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
1605
|
+
const link = document.createElement('a');
|
|
1606
|
+
if (link.download !== undefined) {
|
|
1607
|
+
const url = URL.createObjectURL(blob);
|
|
1608
|
+
link.setAttribute('href', url);
|
|
1609
|
+
link.setAttribute('download', 'export.csv');
|
|
1610
|
+
link.style.visibility = 'hidden';
|
|
1611
|
+
document.body.appendChild(link);
|
|
1612
|
+
link.click();
|
|
1613
|
+
document.body.removeChild(link);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
getMockRoles() {
|
|
1617
|
+
return new Array(10).fill(1).map((id, i) => ({
|
|
1618
|
+
Id: id + i,
|
|
1619
|
+
id: (id + i).toString(),
|
|
1620
|
+
Name: this.mockNames[i] || '',
|
|
1621
|
+
RoleContexts: this.randomContexts(),
|
|
1622
|
+
CreatedAt: new Date(),
|
|
1623
|
+
UpdatedAt: new Date(),
|
|
1624
|
+
DataState: ObjectState.New,
|
|
1625
|
+
TenantId: `Tenant${id + i}`,
|
|
1626
|
+
Code: '',
|
|
1627
|
+
ServiceName: '',
|
|
1628
|
+
APIKey: '',
|
|
1629
|
+
}));
|
|
1630
|
+
}
|
|
1631
|
+
mockNames = [
|
|
1632
|
+
'Admin',
|
|
1633
|
+
'Super Admin',
|
|
1634
|
+
'Manager',
|
|
1635
|
+
'Intern',
|
|
1636
|
+
'Production Manager',
|
|
1637
|
+
'CEO',
|
|
1638
|
+
'CTO',
|
|
1639
|
+
'COO',
|
|
1640
|
+
'Developer',
|
|
1641
|
+
'Engineer',
|
|
1642
|
+
];
|
|
1643
|
+
randomName() {
|
|
1644
|
+
const randomIndex = Math.floor(Math.random() * this.mockNames.length);
|
|
1645
|
+
return this.mockNames[randomIndex];
|
|
1646
|
+
}
|
|
1647
|
+
randomContexts() {
|
|
1648
|
+
const randomNumber = Math.floor(Math.random() * Object.keys(UIs).length + 1);
|
|
1649
|
+
var returnArray = [];
|
|
1650
|
+
const usedList = [];
|
|
1651
|
+
for (let i = 0; i < randomNumber; i++) {
|
|
1652
|
+
let randomIndex;
|
|
1653
|
+
do {
|
|
1654
|
+
randomIndex = Math.floor(Math.random() * Object.keys(UIs).length);
|
|
1655
|
+
} while (usedList.includes(randomIndex));
|
|
1656
|
+
returnArray.push({
|
|
1657
|
+
Id: 'context' + i,
|
|
1658
|
+
id: ('context' + i).toString(),
|
|
1659
|
+
Name: Object.keys(UIs)[randomIndex],
|
|
1660
|
+
Role: '',
|
|
1661
|
+
RoleActions: this.randomActions(),
|
|
1662
|
+
CreatedAt: new Date(),
|
|
1663
|
+
UpdatedAt: new Date(),
|
|
1664
|
+
DataState: ObjectState.New,
|
|
1665
|
+
TenantId: `Tenant${'context' + i}`,
|
|
1666
|
+
Code: '',
|
|
1667
|
+
ServiceName: '',
|
|
1668
|
+
APIKey: '',
|
|
1669
|
+
ApplicationRoleContext: '',
|
|
1670
|
+
});
|
|
1671
|
+
usedList.push(randomIndex);
|
|
1672
|
+
}
|
|
1673
|
+
return returnArray;
|
|
1674
|
+
}
|
|
1675
|
+
randomActions() {
|
|
1676
|
+
const randomNumber = Math.floor(Math.random() * Object.keys(UIActions).length + 1);
|
|
1677
|
+
var returnArray = [];
|
|
1678
|
+
const usedList = [];
|
|
1679
|
+
for (let i = 0; i < randomNumber; i++) {
|
|
1680
|
+
let randomIndex;
|
|
1681
|
+
do {
|
|
1682
|
+
randomIndex = Math.floor(Math.random() * Object.keys(UIActions).length);
|
|
1683
|
+
} while (usedList.includes(randomIndex));
|
|
1684
|
+
returnArray.push({
|
|
1685
|
+
Id: 'action' + i,
|
|
1686
|
+
id: ('action' + i).toString(),
|
|
1687
|
+
Name: Object.keys(UIActions)[randomIndex],
|
|
1688
|
+
Role: '',
|
|
1689
|
+
Context: '',
|
|
1690
|
+
CreatedAt: new Date(),
|
|
1691
|
+
UpdatedAt: new Date(),
|
|
1692
|
+
DataState: ObjectState.New,
|
|
1693
|
+
TenantId: `Tenant${'action' + i}`,
|
|
1694
|
+
Code: '',
|
|
1695
|
+
ServiceName: '',
|
|
1696
|
+
APIKey: '',
|
|
1697
|
+
ApplicationRoleAction: '',
|
|
1698
|
+
});
|
|
1699
|
+
usedList.push(randomIndex);
|
|
1700
|
+
}
|
|
1701
|
+
return returnArray;
|
|
1702
|
+
}
|
|
1703
|
+
closePopUp() {
|
|
1704
|
+
this.openDropdownId = null;
|
|
1705
|
+
this.popUps.forEach((popUp) => {
|
|
1706
|
+
if (popUp.dropdownOpen) {
|
|
1707
|
+
popUp.toggleDropdown();
|
|
1708
|
+
}
|
|
1709
|
+
});
|
|
1710
|
+
}
|
|
1711
|
+
updateItem(value, key) {
|
|
1712
|
+
return {
|
|
1713
|
+
[key]: value,
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
editValue(value) {
|
|
1717
|
+
const card = this.cardData.find((x) => x.data.Id == value.Id);
|
|
1718
|
+
if (card && this.cardDataView) {
|
|
1719
|
+
this.dataView.toggleView();
|
|
1720
|
+
card.selected = true;
|
|
1721
|
+
this.currentData = this.cardDataView.onItemClick(card);
|
|
1722
|
+
this.closePopUp();
|
|
1723
|
+
// if (this.currentData) {
|
|
1724
|
+
// this.form.controls['Name'].setValue(this.currentData.data?.Name);
|
|
1725
|
+
// }
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
tableCache = new Map();
|
|
1729
|
+
cacheItem(item) {
|
|
1730
|
+
const cacheKey = item.Id;
|
|
1731
|
+
this.tableCache.set(cacheKey, JSON.parse(JSON.stringify(item)));
|
|
1732
|
+
}
|
|
1733
|
+
restoreCache(item) {
|
|
1734
|
+
const cacheKey = item.Id;
|
|
1735
|
+
const itemCache = this.tableCache.get(cacheKey);
|
|
1736
|
+
if (itemCache) {
|
|
1737
|
+
item.Name = itemCache.Name;
|
|
1738
|
+
}
|
|
1739
|
+
this.tableCache.delete(cacheKey);
|
|
1740
|
+
}
|
|
1741
|
+
onSearchFocus() {
|
|
1742
|
+
this.isInputFocused = true;
|
|
1743
|
+
}
|
|
1744
|
+
onSearchBlur() {
|
|
1745
|
+
this.isInputFocused = false;
|
|
1746
|
+
}
|
|
1747
|
+
onInputFocus() {
|
|
1748
|
+
this.isInputFocused = true;
|
|
1749
|
+
}
|
|
1750
|
+
onInputBlur() {
|
|
1751
|
+
this.isInputFocused = false;
|
|
1752
|
+
}
|
|
1753
|
+
// onSearch(event: any) {
|
|
1754
|
+
// const searchTerm = event.target.value;
|
|
1755
|
+
// // if (this.firstSearch == false) {
|
|
1756
|
+
// // this.optionsCopy = cloneDeep(this._options);
|
|
1757
|
+
// // this.firstSearch = true;
|
|
1758
|
+
// // }
|
|
1759
|
+
// if (searchTerm.trim().length == 0) {
|
|
1760
|
+
// this.cardData = JSON.parse(JSON.stringify(this.dataCopy));
|
|
1761
|
+
// //this.firstSearch = false;
|
|
1762
|
+
// return;
|
|
1763
|
+
// }
|
|
1764
|
+
// this.cardData = this.dataCopy.filter(
|
|
1765
|
+
// (x) => typeof x.data.Name == 'string' && new RegExp(searchTerm, 'i').test(x.data.Name)
|
|
1766
|
+
// );
|
|
1767
|
+
// }
|
|
1768
|
+
get filteredData() {
|
|
1769
|
+
if (this.searchContext.trim().length == 0) {
|
|
1770
|
+
return this.cardData;
|
|
1771
|
+
}
|
|
1772
|
+
return this.cardData.filter((x) => typeof x.data.Name == 'string' &&
|
|
1773
|
+
new RegExp(this.searchContext, 'i').test(x.data.Name));
|
|
1774
|
+
}
|
|
1775
|
+
onComplete(event) {
|
|
1776
|
+
var defaultItem = {
|
|
1777
|
+
RoleContexts: this.sourceData.map((config) => {
|
|
1778
|
+
var context = {
|
|
1779
|
+
ChildrenType: ChildrenType.Action,
|
|
1780
|
+
Selected: false,
|
|
1781
|
+
RoleActions: config.Actions.map((action) => {
|
|
1782
|
+
var act = {
|
|
1783
|
+
Selected: false,
|
|
1784
|
+
Name: action,
|
|
1785
|
+
Role: '',
|
|
1786
|
+
Context: '',
|
|
1787
|
+
id: '',
|
|
1788
|
+
Id: '',
|
|
1789
|
+
CreatedAt: new Date(),
|
|
1790
|
+
UpdatedAt: new Date(),
|
|
1791
|
+
DataState: ObjectState.New,
|
|
1792
|
+
TenantId: '',
|
|
1793
|
+
Code: '',
|
|
1794
|
+
ServiceName: '',
|
|
1795
|
+
APIKey: this.envSvc.environment.APIKey,
|
|
1796
|
+
ApplicationRoleAction: this.getApplicationActionCode(action),
|
|
1797
|
+
};
|
|
1798
|
+
return act;
|
|
1799
|
+
}),
|
|
1800
|
+
Name: config.Name,
|
|
1801
|
+
Role: '',
|
|
1802
|
+
id: '',
|
|
1803
|
+
Id: '',
|
|
1804
|
+
CreatedAt: new Date(),
|
|
1805
|
+
UpdatedAt: new Date(),
|
|
1806
|
+
DataState: ObjectState.New,
|
|
1807
|
+
TenantId: '',
|
|
1808
|
+
Code: '',
|
|
1809
|
+
ServiceName: '',
|
|
1810
|
+
APIKey: this.envSvc.environment.APIKey,
|
|
1811
|
+
ApplicationRoleContext: this.getApplicationContextCode(config.Name),
|
|
1812
|
+
};
|
|
1813
|
+
return context;
|
|
1814
|
+
}),
|
|
1815
|
+
ChildrenType: ChildrenType.Permission,
|
|
1816
|
+
Name: '',
|
|
1817
|
+
id: (this.cardData.length + 1).toString(),
|
|
1818
|
+
Id: (this.cardData.length + 1).toString(),
|
|
1819
|
+
CreatedAt: new Date(),
|
|
1820
|
+
UpdatedAt: new Date(),
|
|
1821
|
+
DataState: ObjectState.New,
|
|
1822
|
+
TenantId: '',
|
|
1823
|
+
Code: '',
|
|
1824
|
+
ServiceName: '',
|
|
1825
|
+
Application: this.application ? this.application : undefined,
|
|
1826
|
+
APIKey: this.envSvc.environment.APIKey,
|
|
1827
|
+
};
|
|
1828
|
+
this.importService.onComplete(event, defaultItem, 'Role/SaveRoles', this.envSvc.environment.AuthenticationAPI, 'Role', (items) => {
|
|
1829
|
+
this.data = this.data.concat(items);
|
|
1830
|
+
const cardData = items.map((x) => {
|
|
1831
|
+
return {
|
|
1832
|
+
selected: false,
|
|
1833
|
+
title: x.Name,
|
|
1834
|
+
data: x,
|
|
1835
|
+
body: [],
|
|
1836
|
+
children: [],
|
|
1837
|
+
};
|
|
1838
|
+
});
|
|
1839
|
+
this.cardData = this.cardData.concat(cardData);
|
|
1840
|
+
}, this.pageState);
|
|
1841
|
+
}
|
|
1842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlComponent, deps: [{ token: i1.AuthorizationService }, { token: RoleControlService }, { token: i1.UtilService }, { token: i1.HttpWebRequestService }, { token: i0.ChangeDetectorRef }, { token: i3.FormBuilder }, { token: i1.EnvironmentService }, { token: i1.ImportService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: RoleControlComponent, selector: "lib-role-control", inputs: { isGlobal: "isGlobal", serviceName: "serviceName", application: "application", pageSize: "pageSize", searchDebounceTime: "searchDebounceTime", permissionConfig: "permissionConfig" }, viewQueries: [{ propertyName: "columnTemplates", predicate: ColumnDirective, descendants: true, isSignal: true }, { propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }, { propertyName: "tableView", first: true, predicate: ["dt"], descendants: true }, { propertyName: "popUps", predicate: ["popup"], descendants: true }], ngImport: i0, template: "<div #messageLog class=\"flex flex-col gap-4 message-log-container\">\n <div\n *ngIf=\"this.cardContextHistory.length > 0\"\n class=\"context-banner py-3 px-4 rounded-xl flex item-center justify-space-between gap-3\"\n >\n <div class=\"flex gap-2 flex-1 context-banner-content\">\n <div\n class=\"context-content items-center flex gap-2\"\n *ngFor=\"let context of this.cardContextHistory; index as i\"\n >\n <div class=\"context-main-content-container flex gap-4\">\n <span class=\"context-caption font-bold text-[#404040]\">{{\n context.data.ChildrenType &&\n context.data.ChildrenType == childPermissionRef\n ? context.data.Name\n : context.title\n }}</span>\n <span\n *ngIf=\"i == this.cardContextHistory.length - 1\"\n class=\"context-subcaption\"\n >{{ this.getCardSubCaption(context) }}</span\n >\n </div>\n <div *ngIf=\"i < this.cardContextHistory.length - 1\">/</div>\n </div>\n </div>\n <div class=\"flex justify-end\">\n <verben-svg\n (click)=\"closeDetails()\"\n class=\"cursor-pointer\"\n icon=\"close-circle-full\"\n [width]=\"20\"\n [height]=\"20\"\n ></verben-svg>\n </div>\n </div>\n\n <div\n *ngIf=\"this.cardContextHistory.length > 0 && this.cardData.length > 0\"\n class=\"nested-top-container flex gap-2 items-center\"\n >\n <div class=\"flex items-center gap-2 px-2\">\n <input\n [disabled]=\"this.isCheckboxDisabled(this.cardData[0])\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [ngModel]=\"isAllSelected(this.cardData[0])\"\n (click)=\"\n $event.preventDefault(); this.saveAllRoleDynamic(this.cardData[0])\n \"\n />\n\n <span class=\"font-semibold\">Select All</span>\n </div>\n <div\n [ngClass]=\"{ focused: isInputFocused }\"\n tabindex=\"0\"\n (focus)=\"onSearchFocus()\"\n (blur)=\"onSearchBlur()\"\n class=\"search-section flex\"\n >\n <span class=\"search-icon flex\">\n <verben-svg\n icon=\"search\"\n stroke=\"#64748b\"\n [width]=\"15\"\n [height]=\"15\"\n ></verben-svg>\n </span>\n <div class=\"search-input-container\">\n <input\n [(ngModel)]=\"searchContext\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n placeholder=\"Search...\"\n class=\"search-input\"\n />\n </div>\n </div>\n </div>\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: this.cardContextHistory.length == 0,\n isColumn: this.cardContextHistory.length == 0,\n isFilter: this.cardContextHistory.length == 0,\n isSort: this.cardContextHistory.length == 0,\n isExport:\n this.cardContextHistory.length == 0 &&\n (!permissionConfig || permissionConfig.Actions['Export']),\n isSelect: this.cardContextHistory.length == 0,\n isCreate:\n this.cardContextHistory.length == 0 &&\n (!permissionConfig || permissionConfig.Actions['Create']),\n isToggle: this.cardContextHistory.length == 0,\n isImport:\n this.cardContextHistory.length == 0 &&\n (!permissionConfig || permissionConfig.Actions['Import'])\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [isTableView]=\"false\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n (onSearchChange)=\"handleSearch($event)\"\n >\n <div class=\"mt-2\" table-content>\n <lib-data-table\n [dataKey]=\"'Id'\"\n #dt\n [data]=\"data\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"select\">\n <ng-template\n #cell\n let-isSelected=\"isSelected\"\n let-toggleRowSelection=\"toggleRowSelection\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"isSelected\"\n (change)=\"toggleRowSelection()\"\n />\n </ng-template>\n <ng-template\n #header\n let-allRowsSelected=\"allRowsSelected\"\n let-someRowsSelected=\"someRowsSelected\"\n let-toggleAllRows=\"toggleAllRows\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"allRowsSelected()\"\n [indeterminate]=\"someRowsSelected()\"\n (change)=\"toggleAllRows()\"\n />\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"updatedAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"name\">\n <ng-template #cell let-row=\"row\" let-value>\n {{ value.Name }}\n </ng-template>\n <ng-template\n #cellEdit\n let-row=\"row\"\n let-updateValue=\"updateValue\"\n let-updateData=\"updateData\"\n let-value\n >\n <div class=\"width-max\">\n <verbena-input [(ngModel)]=\"value.Name\"></verbena-input>\n </div>\n </ng-template>\n </ng-container>\n\n <ng-container libColumn=\"actions\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-row=\"row\"\n let-value\n >\n <verben-pop-Up\n #popup\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n >\n <verben-svg\n class=\"cursor-pointer actions-icon\"\n dropdown-trigger\n icon=\"list\"\n ></verben-svg>\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n *ngIf=\"\n !permissionConfig || permissionConfig.Actions['Create']\n \"\n (click)=\"toggleRowEdit(); cacheItem(value); closePopUp()\"\n class=\"pop-up-value cursor-pointer\"\n >\n Edit\n </div>\n <div\n (click)=\"viewDetailsFromTable(value)\"\n class=\"pop-up-value cursor-pointer\"\n >\n View Details\n </div>\n <div class=\"pop-up-value cursor-pointer\">View Users</div>\n </div>\n </verben-pop-Up>\n <!-- <div class=\"flex gap-4 items-center\">\n <verben-svg (click)=\"editValue(value)\" icon=\"edit\" [width]=\"15\" [height]=\"15\"\n class=\"cursor-pointer\"></verben-svg>\n <span (click)=\"viewDetailsFromTable(value)\" class=\"view-links view-details\">view details</span>\n <span class=\"view-links view-users\">view users</span>\n </div> -->\n </ng-template>\n <ng-template\n #cellEdit\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-row=\"row\"\n let-value\n >\n <div class=\"flex gap-2 items-center\">\n <verben-svg\n icon=\"tick\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"tableSaveRole(value, toggleRowEdit)\"\n ></verben-svg>\n <verben-svg\n (click)=\"restoreCache(value); toggleRowEdit()\"\n icon=\"close-no-circle\"\n [width]=\"15\"\n [height]=\"15\"\n ></verben-svg>\n <!-- <verben-svg icon=\"delete\" [width]=\"15\" [height]=\"15\"></verben-svg> -->\n <verben-svg\n icon=\"cardViewAlt\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"editValue(value)\"\n ></verben-svg>\n </div>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n #vdcv\n dataId=\"Id\"\n border=\"5px\"\n [cardDataList]=\"\n this.cardContextHistory.length > 0 ? filteredData : cardData\n \"\n rbgColor=\"#f5f6f9\"\n mg=\"0px\"\n >\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"\n this.cardContextHistory.length > 0 ? filteredData : cardData\n \"\n >\n <ng-template #card let-item>\n <div\n (click)=\"roleCardClicked(item)\"\n *ngIf=\"\n item.data.ChildrenType &&\n item.data.ChildrenType == childPermissionRef\n \"\n class=\"flex cursor-pointer h-[max-content]\"\n >\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"toggleChildren(item); $event.stopPropagation()\"\n [ngClass]=\"\n item.children && item.children.length\n ? 'visible'\n : 'invisible'\n \"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div class=\"flex w-full bg-secondary rounded-xl\">\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"py-3 px-4 flex-1 h-[100%]\">\n <div\n class=\"flex items-start flex-1 gap-1 justify-between h-[100%]\"\n >\n <div\n class=\"flex flex-col flex-1 card-min-height justify-between h-[100%]\"\n >\n <h3\n class=\"my-0 font-bold text-[#404040] leading-[19.5px]\"\n >\n {{ item.data.Name }}\n </h3>\n <span\n class=\"!text-[10px] font-light text-[#404040] leading-[12.1px]\"\n *ngIf=\"item.children && item.children.length > 0\"\n >\n {{ getCardSubCaption(item) }}\n </span>\n </div>\n\n <div\n *ngIf=\"item.children && item.children.length > 0\"\n class=\"flex items-end h-[100%]\"\n >\n <p\n (click)=\"viewDetails(item); $event.stopPropagation()\"\n class=\"my-0 underline text-[#3479E9] text-[12px] leading-[16.6px] cursor-pointer font-medium\"\n >\n view details\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"\n !item.data.ChildrenType ||\n item.data.ChildrenType !== childPermissionRef\n \"\n class=\"flex h-[max-content]\"\n >\n <verben-svg\n [ngClass]=\"\n item.children && item.children.length\n ? 'visible'\n : 'invisible'\n \"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"toggleChildren(item)\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div class=\"flex w-full bg-secondary rounded-xl\">\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"py-3 px-4 flex-1 flex gap-2 h-[100%] items-start\">\n <input\n *ngIf=\"item.data?.Selected != undefined\"\n [disabled]=\"this.isCheckboxDisabled(item)\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [(ngModel)]=\"item.data.Selected\"\n (click)=\"\n $event.preventDefault(); this.saveRoleDynamic(item)\n \"\n />\n <div\n class=\"flex items-start flex-1 gap-1 justify-between h-[100%]\"\n >\n <div\n class=\"flex flex-col flex-1 card-min-height justify-between h-[100%]\"\n >\n <h3\n class=\"my-0 font-bold text-[#404040] leading-[19.5px]\"\n >\n {{ item.title }}\n </h3>\n <span\n class=\"!text-[10px] font-light text-[#404040] leading-[12.1px]\"\n *ngIf=\"item.children && item.children.length > 0\"\n >\n {{ getCardSubCaption(item) }}\n </span>\n </div>\n\n <div\n *ngIf=\"item.children && item.children.length > 0\"\n class=\"flex items-end h-[100%]\"\n >\n <p\n (click)=\"viewDetails(item)\"\n class=\"my-0 underline text-[#3479E9] text-[12px] leading-[16.6px] cursor-pointer font-medium\"\n >\n view details\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #cardChild let-index=\"index\" let-item>\n <div class=\"flex gap-2 items-start h-[max-content]\">\n <input\n [ngClass]=\"index == 0 ? 'visible' : 'invisible'\"\n [disabled]=\"this.isCheckboxDisabled(item)\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [ngModel]=\"isAllSelected(item)\"\n (click)=\"\n $event.preventDefault(); this.saveAllRoleDynamic(item)\n \"\n />\n <div class=\"flex w-full bg-secondary rounded-xl\">\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"py-3 px-4 flex-1 flex gap-2 h-[100%] items-start\">\n <input\n *ngIf=\"item.data?.Selected != undefined\"\n [disabled]=\"this.isCheckboxDisabled(item)\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [(ngModel)]=\"item.data.Selected\"\n (click)=\"\n $event.preventDefault(); this.saveRoleDynamic(item)\n \"\n />\n <div\n class=\"flex items-start flex-1 gap-1 justify-between h-[100%]\"\n >\n <div\n class=\"flex flex-col flex-1 card-min-height justify-between h-[100%]\"\n >\n <h3\n class=\"my-0 font-bold text-[#404040] leading-[19.5px]\"\n >\n {{ item.title }}\n </h3>\n <span\n class=\"!text-[10px] font-light text-[#404040] leading-[12.1px]\"\n *ngIf=\"item.children && item.children.length > 0\"\n >\n {{ getCardSubCaption(item) }}\n </span>\n </div>\n\n <div\n *ngIf=\"item.children && item.children.length > 0\"\n class=\"flex items-end h-[100%]\"\n >\n <p\n (click)=\"viewDetailsChild(item)\"\n class=\"my-0 underline text-[#3479E9] text-[12px] leading-[16.6px] cursor-pointer font-medium\"\n >\n view details\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n <verben-right-card-data-view\n *ngIf=\"this.cardContextHistory.length == 0\"\n >\n <ng-template #parent>\n <div\n *ngIf=\"this.currentData\"\n class=\"flex flex-col rounded-xl h-full w-full justify-between relative space-y-4\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n (ngModelChange)=\"updateTable()\"\n [(ngModel)]=\"this.currentData.data.Name\"\n />\n\n <!-- buttons -->\n <div class=\"flex justify-between bottom-8 left-0 right-0\">\n <div></div>\n <!-- <verbena-button class=\"verben-delete-button\" text=\"Delete\"></verbena-button> -->\n <div class=\"flex gap-3\">\n <verbena-button\n class=\"verben-switch-button\"\n (click)=\"goToTableView()\"\n text=\"Switch To Table\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"this.saveRole()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n </div>\n </ng-template>\n </verben-right-card-data-view>\n <!-- <verben-right-card-data-view>\n yeshhhhhh\n </verben-right-card-data-view> -->\n\n <verben-card-data-view-footer\n *ngIf=\"this.cardContextHistory.length == 0\"\n >\n <div class=\"flex gap-2 justify-between\">\n <div\n *ngIf=\"\n !vdcv.hasCurrentItem() && this.cardContextHistory.length == 0\n \"\n class=\"message-log-button-container flex justify-between\"\n >\n <!-- <verbena-button [fontWeight]=\"'bold'\" [bgColor]=\"'#8E8D87'\" [borderRadius]=\"'4px'\" [textColor]=\"'#fff'\"\n [text]=\"'Delete'\">\n </verbena-button> -->\n </div>\n <div\n class=\"flex {{\n vdcv.hasCurrentItem() ? 'flex-1' : ''\n }} justify-end items-center gap-5\"\n >\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more view-links\">\n Load more\n </button>\n </div>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n (filtersApplied)=\"onFilterUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div import-content>\n <lib-data-import\n [previewColumns]=\"visibleColumnDef\"\n title=\"role\"\n (importEventData)=\"onComplete($event)\"\n [columnTemplates]=\"columnTemplates()\"\n >\n </lib-data-import>\n </div>\n <div export-content>\n <lib-data-xport\n [useImportKey]=\"true\"\n [columns]=\"visibleColumnDef\"\n [data]=\"data\"\n [dataQueryFunction]=\"exportFiltersAndSorts\"\n >\n </lib-data-xport>\n <!-- <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export> -->\n </div>\n </verben-data-view>\n <div *ngIf=\"vdv.isTableView\" class=\"flex gap-2 justify-between\">\n <div class=\"message-log-button-container flex justify-between\">\n <!-- <verbena-button [fontWeight]=\"'bold'\" [bgColor]=\"'#8E8D87'\" [borderRadius]=\"'4px'\" [textColor]=\"'#fff'\"\n [text]=\"'Delete'\">\n </verbena-button> -->\n </div>\n <div class=\"flex justify-end items-center gap-5\">\n <span class=\"paginator-text\">{{ cardData.length }} records loaded</span>\n <button (click)=\"loadMore()\" class=\"load-more view-links\">\n Load more\n </button>\n </div>\n </div>\n</div>\n", styles: [".view-links{font-size:14px!important;color:#00f;font-weight:600;cursor:pointer}.view-links:hover{text-decoration:underline;text-underline-offset:3px}.context-banner{background-color:#d4a00773}.card-min-height{gap:10px}::ng-deep .childrenPadding{max-height:300px;overflow-y:auto}.pop-up-content{border-radius:4px;background-color:#fff;border:1px solid rgba(212,161,7,.5)}.pop-up-value{padding:10px 20px}.pop-up-content>div:nth-child(1){border-bottom:4px solid #ffe681}.width-max{min-width:max-content}.search-section{flex:1 1 0;border:1px solid transparent;padding:5px 10px;border-radius:24px;gap:3px;background-color:#d9d9d940;align-items:center}.search-section.focused{border-color:#3b82f6;outline:none}.search-icon>svg{color:#64748b;width:.8rem;height:.8rem}.search-input-container{flex:1 1 0}.search-input{width:100%;border:none;outline:none;background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "dataKey", "formGroupConfig", "groupBy", "useVirtualScroll", "virtualScrollItemSize", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowRevert", "rowDelete", "selectionChange"] }, { kind: "directive", type: i5.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i5.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "type", "size"] }, { kind: "component", type: i5.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "extendCustomClass", "exportCustomClass", "selectCustomClass", "importCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "importTemplate", "columnTemplate", "extendTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "milliseconds", "showColumnChild", "showSortChild", "showFilterChild", "showImportChild", "showExportChild", "showExtendChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i5.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "showEditIcon", "onItemClick", "onCardChildClick"], outputs: ["editClicked", "loadMoreClick"] }, { kind: "component", type: i5.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i5.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i5.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i5.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i5.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions", "resetSortData"] }, { kind: "component", type: i5.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "closeColumn"], outputs: ["columnsUpdated", "resetFilter"] }, { kind: "component", type: i5.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied", "resetSortData"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i5.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i5.VerbenPopUpComponent, selector: "verben-pop-Up", inputs: ["dropdownOpen", "dropdownWidth", "color", "customStyles", "popUpClass", "border", "borderRadius", "enableMouseLeave", "cdkPosition"], outputs: ["dropdownOpenChange", "close"] }, { kind: "component", type: i5.DataXportComponent, selector: "lib-data-xport", inputs: ["data", "columns", "useImportKey", "dataFetchUrl", "dataQueryParameters", "dataQueryFunction"], outputs: ["exportDataEvent", "exportDataRangeEvent"] }, { kind: "component", type: i5.DataImportComponent, selector: "lib-data-import", inputs: ["previewColumns", "formGroupConfig", "fields", "title", "columnTemplates", "parser", "previewData", "onImportComplete"], outputs: ["exportTemplateEvent", "importEvent", "importEventData", "rowSave"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
|
|
1844
|
+
}
|
|
1845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlComponent, decorators: [{
|
|
1846
|
+
type: Component,
|
|
1847
|
+
args: [{ selector: 'lib-role-control', template: "<div #messageLog class=\"flex flex-col gap-4 message-log-container\">\n <div\n *ngIf=\"this.cardContextHistory.length > 0\"\n class=\"context-banner py-3 px-4 rounded-xl flex item-center justify-space-between gap-3\"\n >\n <div class=\"flex gap-2 flex-1 context-banner-content\">\n <div\n class=\"context-content items-center flex gap-2\"\n *ngFor=\"let context of this.cardContextHistory; index as i\"\n >\n <div class=\"context-main-content-container flex gap-4\">\n <span class=\"context-caption font-bold text-[#404040]\">{{\n context.data.ChildrenType &&\n context.data.ChildrenType == childPermissionRef\n ? context.data.Name\n : context.title\n }}</span>\n <span\n *ngIf=\"i == this.cardContextHistory.length - 1\"\n class=\"context-subcaption\"\n >{{ this.getCardSubCaption(context) }}</span\n >\n </div>\n <div *ngIf=\"i < this.cardContextHistory.length - 1\">/</div>\n </div>\n </div>\n <div class=\"flex justify-end\">\n <verben-svg\n (click)=\"closeDetails()\"\n class=\"cursor-pointer\"\n icon=\"close-circle-full\"\n [width]=\"20\"\n [height]=\"20\"\n ></verben-svg>\n </div>\n </div>\n\n <div\n *ngIf=\"this.cardContextHistory.length > 0 && this.cardData.length > 0\"\n class=\"nested-top-container flex gap-2 items-center\"\n >\n <div class=\"flex items-center gap-2 px-2\">\n <input\n [disabled]=\"this.isCheckboxDisabled(this.cardData[0])\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [ngModel]=\"isAllSelected(this.cardData[0])\"\n (click)=\"\n $event.preventDefault(); this.saveAllRoleDynamic(this.cardData[0])\n \"\n />\n\n <span class=\"font-semibold\">Select All</span>\n </div>\n <div\n [ngClass]=\"{ focused: isInputFocused }\"\n tabindex=\"0\"\n (focus)=\"onSearchFocus()\"\n (blur)=\"onSearchBlur()\"\n class=\"search-section flex\"\n >\n <span class=\"search-icon flex\">\n <verben-svg\n icon=\"search\"\n stroke=\"#64748b\"\n [width]=\"15\"\n [height]=\"15\"\n ></verben-svg>\n </span>\n <div class=\"search-input-container\">\n <input\n [(ngModel)]=\"searchContext\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n placeholder=\"Search...\"\n class=\"search-input\"\n />\n </div>\n </div>\n </div>\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: this.cardContextHistory.length == 0,\n isColumn: this.cardContextHistory.length == 0,\n isFilter: this.cardContextHistory.length == 0,\n isSort: this.cardContextHistory.length == 0,\n isExport:\n this.cardContextHistory.length == 0 &&\n (!permissionConfig || permissionConfig.Actions['Export']),\n isSelect: this.cardContextHistory.length == 0,\n isCreate:\n this.cardContextHistory.length == 0 &&\n (!permissionConfig || permissionConfig.Actions['Create']),\n isToggle: this.cardContextHistory.length == 0,\n isImport:\n this.cardContextHistory.length == 0 &&\n (!permissionConfig || permissionConfig.Actions['Import'])\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [isTableView]=\"false\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n (onSearchChange)=\"handleSearch($event)\"\n >\n <div class=\"mt-2\" table-content>\n <lib-data-table\n [dataKey]=\"'Id'\"\n #dt\n [data]=\"data\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"select\">\n <ng-template\n #cell\n let-isSelected=\"isSelected\"\n let-toggleRowSelection=\"toggleRowSelection\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"isSelected\"\n (change)=\"toggleRowSelection()\"\n />\n </ng-template>\n <ng-template\n #header\n let-allRowsSelected=\"allRowsSelected\"\n let-someRowsSelected=\"someRowsSelected\"\n let-toggleAllRows=\"toggleAllRows\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"allRowsSelected()\"\n [indeterminate]=\"someRowsSelected()\"\n (change)=\"toggleAllRows()\"\n />\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"updatedAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"name\">\n <ng-template #cell let-row=\"row\" let-value>\n {{ value.Name }}\n </ng-template>\n <ng-template\n #cellEdit\n let-row=\"row\"\n let-updateValue=\"updateValue\"\n let-updateData=\"updateData\"\n let-value\n >\n <div class=\"width-max\">\n <verbena-input [(ngModel)]=\"value.Name\"></verbena-input>\n </div>\n </ng-template>\n </ng-container>\n\n <ng-container libColumn=\"actions\">\n <ng-template\n #cell\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-row=\"row\"\n let-value\n >\n <verben-pop-Up\n #popup\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n >\n <verben-svg\n class=\"cursor-pointer actions-icon\"\n dropdown-trigger\n icon=\"list\"\n ></verben-svg>\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n *ngIf=\"\n !permissionConfig || permissionConfig.Actions['Create']\n \"\n (click)=\"toggleRowEdit(); cacheItem(value); closePopUp()\"\n class=\"pop-up-value cursor-pointer\"\n >\n Edit\n </div>\n <div\n (click)=\"viewDetailsFromTable(value)\"\n class=\"pop-up-value cursor-pointer\"\n >\n View Details\n </div>\n <div class=\"pop-up-value cursor-pointer\">View Users</div>\n </div>\n </verben-pop-Up>\n <!-- <div class=\"flex gap-4 items-center\">\n <verben-svg (click)=\"editValue(value)\" icon=\"edit\" [width]=\"15\" [height]=\"15\"\n class=\"cursor-pointer\"></verben-svg>\n <span (click)=\"viewDetailsFromTable(value)\" class=\"view-links view-details\">view details</span>\n <span class=\"view-links view-users\">view users</span>\n </div> -->\n </ng-template>\n <ng-template\n #cellEdit\n let-isEditing=\"isEditing\"\n let-toggleRowEdit=\"toggleRowEdit\"\n let-row=\"row\"\n let-value\n >\n <div class=\"flex gap-2 items-center\">\n <verben-svg\n icon=\"tick\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"tableSaveRole(value, toggleRowEdit)\"\n ></verben-svg>\n <verben-svg\n (click)=\"restoreCache(value); toggleRowEdit()\"\n icon=\"close-no-circle\"\n [width]=\"15\"\n [height]=\"15\"\n ></verben-svg>\n <!-- <verben-svg icon=\"delete\" [width]=\"15\" [height]=\"15\"></verben-svg> -->\n <verben-svg\n icon=\"cardViewAlt\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"editValue(value)\"\n ></verben-svg>\n </div>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div card-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n #vdcv\n dataId=\"Id\"\n border=\"5px\"\n [cardDataList]=\"\n this.cardContextHistory.length > 0 ? filteredData : cardData\n \"\n rbgColor=\"#f5f6f9\"\n mg=\"0px\"\n >\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"\n this.cardContextHistory.length > 0 ? filteredData : cardData\n \"\n >\n <ng-template #card let-item>\n <div\n (click)=\"roleCardClicked(item)\"\n *ngIf=\"\n item.data.ChildrenType &&\n item.data.ChildrenType == childPermissionRef\n \"\n class=\"flex cursor-pointer h-[max-content]\"\n >\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"toggleChildren(item); $event.stopPropagation()\"\n [ngClass]=\"\n item.children && item.children.length\n ? 'visible'\n : 'invisible'\n \"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div class=\"flex w-full bg-secondary rounded-xl\">\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"py-3 px-4 flex-1 h-[100%]\">\n <div\n class=\"flex items-start flex-1 gap-1 justify-between h-[100%]\"\n >\n <div\n class=\"flex flex-col flex-1 card-min-height justify-between h-[100%]\"\n >\n <h3\n class=\"my-0 font-bold text-[#404040] leading-[19.5px]\"\n >\n {{ item.data.Name }}\n </h3>\n <span\n class=\"!text-[10px] font-light text-[#404040] leading-[12.1px]\"\n *ngIf=\"item.children && item.children.length > 0\"\n >\n {{ getCardSubCaption(item) }}\n </span>\n </div>\n\n <div\n *ngIf=\"item.children && item.children.length > 0\"\n class=\"flex items-end h-[100%]\"\n >\n <p\n (click)=\"viewDetails(item); $event.stopPropagation()\"\n class=\"my-0 underline text-[#3479E9] text-[12px] leading-[16.6px] cursor-pointer font-medium\"\n >\n view details\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"\n !item.data.ChildrenType ||\n item.data.ChildrenType !== childPermissionRef\n \"\n class=\"flex h-[max-content]\"\n >\n <verben-svg\n [ngClass]=\"\n item.children && item.children.length\n ? 'visible'\n : 'invisible'\n \"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"toggleChildren(item)\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div class=\"flex w-full bg-secondary rounded-xl\">\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"py-3 px-4 flex-1 flex gap-2 h-[100%] items-start\">\n <input\n *ngIf=\"item.data?.Selected != undefined\"\n [disabled]=\"this.isCheckboxDisabled(item)\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [(ngModel)]=\"item.data.Selected\"\n (click)=\"\n $event.preventDefault(); this.saveRoleDynamic(item)\n \"\n />\n <div\n class=\"flex items-start flex-1 gap-1 justify-between h-[100%]\"\n >\n <div\n class=\"flex flex-col flex-1 card-min-height justify-between h-[100%]\"\n >\n <h3\n class=\"my-0 font-bold text-[#404040] leading-[19.5px]\"\n >\n {{ item.title }}\n </h3>\n <span\n class=\"!text-[10px] font-light text-[#404040] leading-[12.1px]\"\n *ngIf=\"item.children && item.children.length > 0\"\n >\n {{ getCardSubCaption(item) }}\n </span>\n </div>\n\n <div\n *ngIf=\"item.children && item.children.length > 0\"\n class=\"flex items-end h-[100%]\"\n >\n <p\n (click)=\"viewDetails(item)\"\n class=\"my-0 underline text-[#3479E9] text-[12px] leading-[16.6px] cursor-pointer font-medium\"\n >\n view details\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #cardChild let-index=\"index\" let-item>\n <div class=\"flex gap-2 items-start h-[max-content]\">\n <input\n [ngClass]=\"index == 0 ? 'visible' : 'invisible'\"\n [disabled]=\"this.isCheckboxDisabled(item)\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [ngModel]=\"isAllSelected(item)\"\n (click)=\"\n $event.preventDefault(); this.saveAllRoleDynamic(item)\n \"\n />\n <div class=\"flex w-full bg-secondary rounded-xl\">\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"py-3 px-4 flex-1 flex gap-2 h-[100%] items-start\">\n <input\n *ngIf=\"item.data?.Selected != undefined\"\n [disabled]=\"this.isCheckboxDisabled(item)\"\n type=\"checkbox\"\n class=\"mt-1 cursor-pointer\"\n [(ngModel)]=\"item.data.Selected\"\n (click)=\"\n $event.preventDefault(); this.saveRoleDynamic(item)\n \"\n />\n <div\n class=\"flex items-start flex-1 gap-1 justify-between h-[100%]\"\n >\n <div\n class=\"flex flex-col flex-1 card-min-height justify-between h-[100%]\"\n >\n <h3\n class=\"my-0 font-bold text-[#404040] leading-[19.5px]\"\n >\n {{ item.title }}\n </h3>\n <span\n class=\"!text-[10px] font-light text-[#404040] leading-[12.1px]\"\n *ngIf=\"item.children && item.children.length > 0\"\n >\n {{ getCardSubCaption(item) }}\n </span>\n </div>\n\n <div\n *ngIf=\"item.children && item.children.length > 0\"\n class=\"flex items-end h-[100%]\"\n >\n <p\n (click)=\"viewDetailsChild(item)\"\n class=\"my-0 underline text-[#3479E9] text-[12px] leading-[16.6px] cursor-pointer font-medium\"\n >\n view details\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n <verben-right-card-data-view\n *ngIf=\"this.cardContextHistory.length == 0\"\n >\n <ng-template #parent>\n <div\n *ngIf=\"this.currentData\"\n class=\"flex flex-col rounded-xl h-full w-full justify-between relative space-y-4\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n (ngModelChange)=\"updateTable()\"\n [(ngModel)]=\"this.currentData.data.Name\"\n />\n\n <!-- buttons -->\n <div class=\"flex justify-between bottom-8 left-0 right-0\">\n <div></div>\n <!-- <verbena-button class=\"verben-delete-button\" text=\"Delete\"></verbena-button> -->\n <div class=\"flex gap-3\">\n <verbena-button\n class=\"verben-switch-button\"\n (click)=\"goToTableView()\"\n text=\"Switch To Table\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"this.saveRole()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n </div>\n </ng-template>\n </verben-right-card-data-view>\n <!-- <verben-right-card-data-view>\n yeshhhhhh\n </verben-right-card-data-view> -->\n\n <verben-card-data-view-footer\n *ngIf=\"this.cardContextHistory.length == 0\"\n >\n <div class=\"flex gap-2 justify-between\">\n <div\n *ngIf=\"\n !vdcv.hasCurrentItem() && this.cardContextHistory.length == 0\n \"\n class=\"message-log-button-container flex justify-between\"\n >\n <!-- <verbena-button [fontWeight]=\"'bold'\" [bgColor]=\"'#8E8D87'\" [borderRadius]=\"'4px'\" [textColor]=\"'#fff'\"\n [text]=\"'Delete'\">\n </verbena-button> -->\n </div>\n <div\n class=\"flex {{\n vdcv.hasCurrentItem() ? 'flex-1' : ''\n }} justify-end items-center gap-5\"\n >\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more view-links\">\n Load more\n </button>\n </div>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n (filtersApplied)=\"onFilterUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div import-content>\n <lib-data-import\n [previewColumns]=\"visibleColumnDef\"\n title=\"role\"\n (importEventData)=\"onComplete($event)\"\n [columnTemplates]=\"columnTemplates()\"\n >\n </lib-data-import>\n </div>\n <div export-content>\n <lib-data-xport\n [useImportKey]=\"true\"\n [columns]=\"visibleColumnDef\"\n [data]=\"data\"\n [dataQueryFunction]=\"exportFiltersAndSorts\"\n >\n </lib-data-xport>\n <!-- <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export> -->\n </div>\n </verben-data-view>\n <div *ngIf=\"vdv.isTableView\" class=\"flex gap-2 justify-between\">\n <div class=\"message-log-button-container flex justify-between\">\n <!-- <verbena-button [fontWeight]=\"'bold'\" [bgColor]=\"'#8E8D87'\" [borderRadius]=\"'4px'\" [textColor]=\"'#fff'\"\n [text]=\"'Delete'\">\n </verbena-button> -->\n </div>\n <div class=\"flex justify-end items-center gap-5\">\n <span class=\"paginator-text\">{{ cardData.length }} records loaded</span>\n <button (click)=\"loadMore()\" class=\"load-more view-links\">\n Load more\n </button>\n </div>\n </div>\n</div>\n", styles: [".view-links{font-size:14px!important;color:#00f;font-weight:600;cursor:pointer}.view-links:hover{text-decoration:underline;text-underline-offset:3px}.context-banner{background-color:#d4a00773}.card-min-height{gap:10px}::ng-deep .childrenPadding{max-height:300px;overflow-y:auto}.pop-up-content{border-radius:4px;background-color:#fff;border:1px solid rgba(212,161,7,.5)}.pop-up-value{padding:10px 20px}.pop-up-content>div:nth-child(1){border-bottom:4px solid #ffe681}.width-max{min-width:max-content}.search-section{flex:1 1 0;border:1px solid transparent;padding:5px 10px;border-radius:24px;gap:3px;background-color:#d9d9d940;align-items:center}.search-section.focused{border-color:#3b82f6;outline:none}.search-icon>svg{color:#64748b;width:.8rem;height:.8rem}.search-input-container{flex:1 1 0}.search-input{width:100%;border:none;outline:none;background-color:transparent}\n"] }]
|
|
1848
|
+
}], ctorParameters: () => [{ type: i1.AuthorizationService }, { type: RoleControlService }, { type: i1.UtilService }, { type: i1.HttpWebRequestService }, { type: i0.ChangeDetectorRef }, { type: i3.FormBuilder }, { type: i1.EnvironmentService }, { type: i1.ImportService }], propDecorators: { cardDataView: [{
|
|
1849
|
+
type: ViewChild,
|
|
1850
|
+
args: ['vdcv']
|
|
1851
|
+
}], dataView: [{
|
|
1852
|
+
type: ViewChild,
|
|
1853
|
+
args: ['vdv']
|
|
1854
|
+
}], popUps: [{
|
|
1855
|
+
type: ViewChildren,
|
|
1856
|
+
args: ['popup']
|
|
1857
|
+
}], tableView: [{
|
|
1858
|
+
type: ViewChild,
|
|
1859
|
+
args: ['dt']
|
|
1860
|
+
}], isGlobal: [{
|
|
1861
|
+
type: Input
|
|
1862
|
+
}], serviceName: [{
|
|
1863
|
+
type: Input
|
|
1864
|
+
}], application: [{
|
|
1865
|
+
type: Input
|
|
1866
|
+
}], pageSize: [{
|
|
1867
|
+
type: Input
|
|
1868
|
+
}], searchDebounceTime: [{
|
|
1869
|
+
type: Input
|
|
1870
|
+
}], permissionConfig: [{
|
|
1871
|
+
type: Input
|
|
1872
|
+
}] } });
|
|
1873
|
+
|
|
1874
|
+
class RoleControlModule {
|
|
1875
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1876
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: RoleControlModule, declarations: [RoleControlComponent], imports: [SharedModule], exports: [RoleControlComponent] });
|
|
1877
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlModule, imports: [SharedModule] });
|
|
1878
|
+
}
|
|
1879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleControlModule, decorators: [{
|
|
1880
|
+
type: NgModule,
|
|
1881
|
+
args: [{
|
|
1882
|
+
declarations: [RoleControlComponent],
|
|
1883
|
+
imports: [SharedModule],
|
|
1884
|
+
exports: [RoleControlComponent],
|
|
1885
|
+
}]
|
|
1886
|
+
}] });
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* Generated bundle index. Do not edit.
|
|
1890
|
+
*/
|
|
1891
|
+
|
|
1892
|
+
export { RoleControlComponent, RoleControlModule };
|
|
1893
|
+
//# sourceMappingURL=verben-authentication-ui-src-lib-components-role-control.mjs.map
|