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,32 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe } from '@angular/core';
|
|
3
|
+
import { of, from } from 'rxjs';
|
|
4
|
+
import * as i1 from 'verben-authentication-ui/src/lib/services';
|
|
5
|
+
|
|
6
|
+
class AsyncLabelPipe {
|
|
7
|
+
labelService;
|
|
8
|
+
constructor(labelService) {
|
|
9
|
+
this.labelService = labelService;
|
|
10
|
+
}
|
|
11
|
+
transform(code, entity, labelProp, env, key = 'Code') {
|
|
12
|
+
if (!code)
|
|
13
|
+
return of('');
|
|
14
|
+
return from(this.labelService.getAsyncLabelWithRequestTracking(code, entity, labelProp, env, key));
|
|
15
|
+
}
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AsyncLabelPipe, deps: [{ token: i1.LabelService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
17
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: AsyncLabelPipe, isStandalone: true, name: "asyncLabel" });
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AsyncLabelPipe, decorators: [{
|
|
20
|
+
type: Pipe,
|
|
21
|
+
args: [{
|
|
22
|
+
name: 'asyncLabel',
|
|
23
|
+
standalone: true,
|
|
24
|
+
}]
|
|
25
|
+
}], ctorParameters: () => [{ type: i1.LabelService }] });
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Generated bundle index. Do not edit.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export { AsyncLabelPipe };
|
|
32
|
+
//# sourceMappingURL=verben-authentication-ui-src-lib-pipes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verben-authentication-ui-src-lib-pipes.mjs","sources":["../../../projects/verben-authentication-ui/src/lib/pipes/async-label.pipe.ts","../../../projects/verben-authentication-ui/src/lib/pipes/verben-authentication-ui-src-lib-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { from, Observable, of } from 'rxjs';\nimport { LabelService } from 'verben-authentication-ui/src/lib/services';\n\n@Pipe({\n name: 'asyncLabel',\n standalone: true,\n})\nexport class AsyncLabelPipe implements PipeTransform {\n constructor(private labelService: LabelService) {}\n\n transform(\n code: any,\n entity: string,\n labelProp: string,\n env: string,\n key: string = 'Code'\n ): Observable<string> {\n if (!code) return of('');\n return from(\n this.labelService.getAsyncLabelWithRequestTracking(\n code,\n entity,\n labelProp,\n env,\n key\n )\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAQa,cAAc,CAAA;AACL,IAAA,YAAA,CAAA;AAApB,IAAA,WAAA,CAAoB,YAA0B,EAAA;QAA1B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;KAAI;IAElD,SAAS,CACP,IAAS,EACT,MAAc,EACd,SAAiB,EACjB,GAAW,EACX,GAAA,GAAc,MAAM,EAAA;AAEpB,QAAA,IAAI,CAAC,IAAI;AAAE,YAAA,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACzB,QAAA,OAAO,IAAI,CACT,IAAI,CAAC,YAAY,CAAC,gCAAgC,CAChD,IAAI,EACJ,MAAM,EACN,SAAS,EACT,GAAG,EACH,GAAG,CACJ,CACF,CAAC;KACH;wGApBU,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;sGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,YAAY;AAClB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Optional, Inject } from '@angular/core';
|
|
3
|
+
import CryptoJS from 'crypto-js';
|
|
4
|
+
import { ErrorResponse, ObjectState, SearchOperator, SearchPropertySign } from 'verben-authentication-ui/src/lib/models';
|
|
5
|
+
import * as i1 from '@angular/common/http';
|
|
6
|
+
import * as i3 from 'verben-ng-ui';
|
|
7
|
+
import { UTIL_SERVICE } from 'verben-ng-ui';
|
|
8
|
+
|
|
9
|
+
const AUTHORIZATION_CONFIG = new InjectionToken('authorization_config');
|
|
10
|
+
class AuthorizationService {
|
|
11
|
+
auth;
|
|
12
|
+
constructor(auth) {
|
|
13
|
+
this.auth = auth;
|
|
14
|
+
}
|
|
15
|
+
get authorizationConfig() {
|
|
16
|
+
return this.auth ? this.auth : [];
|
|
17
|
+
}
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthorizationService, deps: [{ token: AUTHORIZATION_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthorizationService, providedIn: 'root' });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthorizationService, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{
|
|
24
|
+
providedIn: 'root',
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
27
|
+
type: Optional
|
|
28
|
+
}, {
|
|
29
|
+
type: Inject,
|
|
30
|
+
args: [AUTHORIZATION_CONFIG]
|
|
31
|
+
}] }] });
|
|
32
|
+
|
|
33
|
+
// In your library's services/environment.service.ts
|
|
34
|
+
// import { ENVIRONMENT } from '../models/ENVIRONMENT_TOKEN';
|
|
35
|
+
const ENVIRONMENT = new InjectionToken('environment');
|
|
36
|
+
class EnvironmentService {
|
|
37
|
+
env;
|
|
38
|
+
constructor(env) {
|
|
39
|
+
this.env = env;
|
|
40
|
+
}
|
|
41
|
+
get environment() {
|
|
42
|
+
return this.env;
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, deps: [{ token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, providedIn: 'root' });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
48
|
+
type: Injectable,
|
|
49
|
+
args: [{
|
|
50
|
+
providedIn: 'root',
|
|
51
|
+
}]
|
|
52
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
53
|
+
type: Inject,
|
|
54
|
+
args: [ENVIRONMENT]
|
|
55
|
+
}] }] });
|
|
56
|
+
|
|
57
|
+
class EncryptionService {
|
|
58
|
+
envSvc;
|
|
59
|
+
isProd;
|
|
60
|
+
ivString;
|
|
61
|
+
keyString;
|
|
62
|
+
constructor(envSvc) {
|
|
63
|
+
this.envSvc = envSvc;
|
|
64
|
+
this.ivString = this.envSvc.environment.IvString;
|
|
65
|
+
this.keyString = this.envSvc.environment.keyString;
|
|
66
|
+
this.isProd = this.envSvc.environment.production;
|
|
67
|
+
}
|
|
68
|
+
encryptData(data) {
|
|
69
|
+
try {
|
|
70
|
+
const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(this.keyString), {
|
|
71
|
+
iv: CryptoJS.enc.Utf8.parse(this.ivString),
|
|
72
|
+
});
|
|
73
|
+
// Return the encrypted data as a string
|
|
74
|
+
return encrypted.toString();
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
console.error('Encryption error:', error);
|
|
78
|
+
return data; // Return original data if encryption fails
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
decryptData(data) {
|
|
82
|
+
try {
|
|
83
|
+
// Decrypt the data
|
|
84
|
+
const decrypted = CryptoJS.AES.decrypt(data, CryptoJS.enc.Utf8.parse(this.keyString), {
|
|
85
|
+
iv: CryptoJS.enc.Utf8.parse(this.ivString),
|
|
86
|
+
});
|
|
87
|
+
// Convert the decrypted data to a UTF-8 string
|
|
88
|
+
return decrypted.toString(CryptoJS.enc.Utf8);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
console.error('Decryption error:', error);
|
|
92
|
+
return data; // Return original data if decryption fails
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EncryptionService, deps: [{ token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
96
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EncryptionService, providedIn: 'root' });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EncryptionService, decorators: [{
|
|
99
|
+
type: Injectable,
|
|
100
|
+
args: [{
|
|
101
|
+
providedIn: 'root',
|
|
102
|
+
}]
|
|
103
|
+
}], ctorParameters: () => [{ type: EnvironmentService }] });
|
|
104
|
+
|
|
105
|
+
class HttpWebRequestService {
|
|
106
|
+
http;
|
|
107
|
+
envSvc;
|
|
108
|
+
notificationService;
|
|
109
|
+
isProd;
|
|
110
|
+
constructor(http, envSvc, notificationService) {
|
|
111
|
+
this.http = http;
|
|
112
|
+
this.envSvc = envSvc;
|
|
113
|
+
this.notificationService = notificationService;
|
|
114
|
+
this.isProd = this.envSvc.environment.production;
|
|
115
|
+
}
|
|
116
|
+
buildHeaders() {
|
|
117
|
+
return {
|
|
118
|
+
'Content-Type': 'application/json',
|
|
119
|
+
Authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJNYWlsQWRkcmVzcyI6InZlcmJlbmFAZ21haWwuY29tIiwiQXBwbGljYXRpb24iOiIiLCJOYW1lIjoiVmVyYmVuYSBMb2dpYyBMaW1pdGVkIiwiUm9sZUlEIjoiUk9MLVpYQVhYVCIsIlRlbmFudElkIjoiUERMVEM2IiwiU2VydmljZU5hbWUiOiJXaGl0ZTM2MCIsIkNvbXBhbnkiOiJDT00tNkxJNjNIIiwibmJmIjoxNzQ3MTMxNTk1LCJleHAiOjE3NDczNDc1OTUsImlhdCI6MTc0NzEzMTU5NX0.X-5xj31h2ON268n1sTq6eFhphsiZ1k9JhkJ91R2-PKI',
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
buildUrl(url, baseUrl) {
|
|
123
|
+
return `${baseUrl}/${url}`;
|
|
124
|
+
}
|
|
125
|
+
handleError(err) {
|
|
126
|
+
const msg = err?.ErrorMsg ||
|
|
127
|
+
err?.errors?.values?.toString() ||
|
|
128
|
+
`Error occurred`;
|
|
129
|
+
this.notificationService.error(msg, { timeout: 10000 });
|
|
130
|
+
return new ErrorResponse(msg);
|
|
131
|
+
}
|
|
132
|
+
request(method, url, body, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
133
|
+
const options = {
|
|
134
|
+
headers: this.buildHeaders(),
|
|
135
|
+
};
|
|
136
|
+
const requestUrl = this.buildUrl(url, baseUrl);
|
|
137
|
+
switch (method) {
|
|
138
|
+
case 'GET':
|
|
139
|
+
return new Promise((resolve) => this.http.get(requestUrl, options).subscribe({
|
|
140
|
+
next: resolve,
|
|
141
|
+
error: (err) => resolve(this.handleError(err)),
|
|
142
|
+
}));
|
|
143
|
+
case 'POST':
|
|
144
|
+
return new Promise((resolve) => this.http.post(requestUrl, body, options).subscribe({
|
|
145
|
+
next: resolve,
|
|
146
|
+
error: (err) => resolve(this.handleError(err)),
|
|
147
|
+
}));
|
|
148
|
+
case 'PUT':
|
|
149
|
+
return this.http.put(requestUrl, body, options);
|
|
150
|
+
case 'DELETE':
|
|
151
|
+
return this.http.delete(requestUrl, options);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
get(url, baseUrl) {
|
|
155
|
+
return this.request('GET', url, undefined, baseUrl);
|
|
156
|
+
}
|
|
157
|
+
post(url, body, baseUrl) {
|
|
158
|
+
return this.request('POST', url, JSON.stringify(body), baseUrl);
|
|
159
|
+
}
|
|
160
|
+
postFile(url, formData, baseUrl) {
|
|
161
|
+
return new Promise((resolve) => this.http
|
|
162
|
+
.post(this.buildUrl(url, baseUrl || this.envSvc.environment.AuthenticationAPI), formData)
|
|
163
|
+
.subscribe({
|
|
164
|
+
next: resolve,
|
|
165
|
+
error: (err) => resolve(this.handleError(err)),
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
put(url, body, baseUrl) {
|
|
169
|
+
return this.request('PUT', url, body, baseUrl);
|
|
170
|
+
}
|
|
171
|
+
delete(url, baseUrl) {
|
|
172
|
+
return this.request('DELETE', url, undefined, baseUrl);
|
|
173
|
+
}
|
|
174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, deps: [{ token: i1.HttpClient }, { token: EnvironmentService }, { token: i3.NotificationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
175
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, providedIn: 'root' });
|
|
176
|
+
}
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpWebRequestService, decorators: [{
|
|
178
|
+
type: Injectable,
|
|
179
|
+
args: [{
|
|
180
|
+
providedIn: 'root',
|
|
181
|
+
}]
|
|
182
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: EnvironmentService }, { type: i3.NotificationService }] });
|
|
183
|
+
|
|
184
|
+
class UtilService {
|
|
185
|
+
parentUtilService;
|
|
186
|
+
constructor(parentUtilService) {
|
|
187
|
+
this.parentUtilService = parentUtilService;
|
|
188
|
+
}
|
|
189
|
+
sendBI(state) {
|
|
190
|
+
if (this.parentUtilService && this.parentUtilService.sendBI) {
|
|
191
|
+
this.parentUtilService.sendBI(state);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
console.warn('Util Service is not provided');
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
showInfo(message) {
|
|
198
|
+
if (this.parentUtilService && this.parentUtilService.showInfo) {
|
|
199
|
+
this.parentUtilService.showInfo(message);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
console.warn('Util Service is not provided');
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
showSuccess(message) {
|
|
206
|
+
if (this.parentUtilService && this.parentUtilService.showSuccess) {
|
|
207
|
+
this.parentUtilService.showSuccess(message);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
console.warn('Util Service is not provided');
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
showError(message) {
|
|
214
|
+
if (this.parentUtilService && this.parentUtilService.showError) {
|
|
215
|
+
this.parentUtilService.showError(message);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
console.warn('Util Service is not provided');
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, deps: [{ token: UTIL_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
222
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, providedIn: 'root' });
|
|
223
|
+
}
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilService, decorators: [{
|
|
225
|
+
type: Injectable,
|
|
226
|
+
args: [{
|
|
227
|
+
providedIn: 'root',
|
|
228
|
+
}]
|
|
229
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
230
|
+
type: Optional
|
|
231
|
+
}, {
|
|
232
|
+
type: Inject,
|
|
233
|
+
args: [UTIL_SERVICE]
|
|
234
|
+
}] }] });
|
|
235
|
+
|
|
236
|
+
class ImportService {
|
|
237
|
+
utilService;
|
|
238
|
+
server;
|
|
239
|
+
constructor(utilService, server //private cdr: ChangeDetectorRef
|
|
240
|
+
) {
|
|
241
|
+
this.utilService = utilService;
|
|
242
|
+
this.server = server;
|
|
243
|
+
}
|
|
244
|
+
// onComplete(
|
|
245
|
+
// event: any[],
|
|
246
|
+
// defaults: T,
|
|
247
|
+
// endpoint: string | null,
|
|
248
|
+
// baseUrl: string,
|
|
249
|
+
// dataRef: T[],
|
|
250
|
+
// cardDataRef: CardData[],
|
|
251
|
+
// pagedState: PagedResult<T> | null = null,
|
|
252
|
+
// stringProps: (keyof T)[] = []
|
|
253
|
+
// ) {
|
|
254
|
+
// const normalized = event.map((raw) => {
|
|
255
|
+
// const def = defaults;
|
|
256
|
+
// let merged: T = {
|
|
257
|
+
// ...def,
|
|
258
|
+
// ...raw,
|
|
259
|
+
// Code: raw.Code ? String(raw.Code) : '',
|
|
260
|
+
// };
|
|
261
|
+
// stringProps.forEach((key) => {
|
|
262
|
+
// const value = raw[key];
|
|
263
|
+
// merged[key] = value != null ? String(value) : ('' as any);
|
|
264
|
+
// });
|
|
265
|
+
// const dateProps: (keyof T)[] = ['CreatedAt', 'UpdatedAt'];
|
|
266
|
+
// dateProps.forEach((key) => {
|
|
267
|
+
// const val = merged[key];
|
|
268
|
+
// let dateObj: Date;
|
|
269
|
+
// if (val instanceof Date) {
|
|
270
|
+
// dateObj = val;
|
|
271
|
+
// } else if (typeof val === 'number') {
|
|
272
|
+
// dateObj = this.excelSerialToDate(val);
|
|
273
|
+
// } else if (typeof val === 'string') {
|
|
274
|
+
// dateObj = new Date(val);
|
|
275
|
+
// } else {
|
|
276
|
+
// dateObj = new Date();
|
|
277
|
+
// }
|
|
278
|
+
// if (isNaN(dateObj.getTime())) {
|
|
279
|
+
// dateObj = new Date();
|
|
280
|
+
// }
|
|
281
|
+
// merged[key] = dateObj.toISOString() as any;
|
|
282
|
+
// });
|
|
283
|
+
// return merged;
|
|
284
|
+
// });
|
|
285
|
+
// if (normalized && normalized.length > 0) {
|
|
286
|
+
// this.saveImportedDataBatch(
|
|
287
|
+
// normalized,
|
|
288
|
+
// endpoint,
|
|
289
|
+
// baseUrl,
|
|
290
|
+
// dataRef,
|
|
291
|
+
// cardDataRef,
|
|
292
|
+
// pagedState
|
|
293
|
+
// );
|
|
294
|
+
// }
|
|
295
|
+
// }
|
|
296
|
+
// async saveImportedDataBatch(
|
|
297
|
+
// items: T[],
|
|
298
|
+
// endpoint: string | null,
|
|
299
|
+
// baseUrl: string,
|
|
300
|
+
// dataRef: T[],
|
|
301
|
+
// cardDataRef: CardData[],
|
|
302
|
+
// pagedState: PagedResult<T> | null = null
|
|
303
|
+
// ) {
|
|
304
|
+
// if (!items?.length) return;
|
|
305
|
+
// const preparedItems = items.map((item) => ({
|
|
306
|
+
// ...item,
|
|
307
|
+
// DataState: ObjectState.New,
|
|
308
|
+
// Id: '',
|
|
309
|
+
// }));
|
|
310
|
+
// if (!endpoint) {
|
|
311
|
+
// preparedItems.forEach((srv, idx) => {
|
|
312
|
+
// const newItem = {
|
|
313
|
+
// ...srv,
|
|
314
|
+
// Id: dataRef.length.toString(),
|
|
315
|
+
// id: dataRef.length.toString(),
|
|
316
|
+
// };
|
|
317
|
+
// const cardData: CardData = {
|
|
318
|
+
// selected: false,
|
|
319
|
+
// title: newItem.Id.toString(),
|
|
320
|
+
// data: newItem,
|
|
321
|
+
// body: [],
|
|
322
|
+
// children: [],
|
|
323
|
+
// };
|
|
324
|
+
// dataRef.push(newItem);
|
|
325
|
+
// cardDataRef.push(cardData);
|
|
326
|
+
// if (pagedState) {
|
|
327
|
+
// pagedState.Skip += 1;
|
|
328
|
+
// }
|
|
329
|
+
// });
|
|
330
|
+
// return;
|
|
331
|
+
// }
|
|
332
|
+
// this.utilService.sendBI(true);
|
|
333
|
+
// const res = await this.server.post(endpoint, preparedItems, baseUrl);
|
|
334
|
+
// this.utilService.sendBI(false);
|
|
335
|
+
// if (res instanceof ErrorResponse) {
|
|
336
|
+
// return;
|
|
337
|
+
// } else {
|
|
338
|
+
// this.utilService.showSuccess('Operation Account saved successfully');
|
|
339
|
+
// const result = res as T[];
|
|
340
|
+
// result.forEach((srv, idx) => {
|
|
341
|
+
// const newItem = {
|
|
342
|
+
// ...srv,
|
|
343
|
+
// Id: srv.Code,
|
|
344
|
+
// id: srv.Code,
|
|
345
|
+
// };
|
|
346
|
+
// const cardData: CardData = {
|
|
347
|
+
// selected: false,
|
|
348
|
+
// title: newItem.Id.toString(),
|
|
349
|
+
// data: newItem,
|
|
350
|
+
// body: [],
|
|
351
|
+
// children: [],
|
|
352
|
+
// };
|
|
353
|
+
// dataRef.push(newItem);
|
|
354
|
+
// // this.cdr.detectChanges();
|
|
355
|
+
// cardDataRef.push(cardData);
|
|
356
|
+
// if (pagedState) {
|
|
357
|
+
// pagedState.Skip += 1;
|
|
358
|
+
// }
|
|
359
|
+
// });
|
|
360
|
+
// }
|
|
361
|
+
// }
|
|
362
|
+
onComplete(event, defaults, endpoint, baseUrl, entity, updateCallback, pagedState = null, stringProps = [], numberProps = [], datePropsExtras = []) {
|
|
363
|
+
const normalized = event.map((raw) => {
|
|
364
|
+
const def = defaults;
|
|
365
|
+
let merged = {
|
|
366
|
+
...def,
|
|
367
|
+
...raw,
|
|
368
|
+
Code: raw.Code ? String(raw.Code) : '',
|
|
369
|
+
};
|
|
370
|
+
stringProps.forEach((key) => {
|
|
371
|
+
const value = raw[key];
|
|
372
|
+
merged[key] = value != null ? String(value) : '';
|
|
373
|
+
});
|
|
374
|
+
numberProps.forEach((key) => {
|
|
375
|
+
const value = raw[key];
|
|
376
|
+
if (typeof value === 'string') {
|
|
377
|
+
// Only parse if it's a valid number
|
|
378
|
+
const num = value === '' || isNaN(Number(value)) ? 0 : Number(value);
|
|
379
|
+
merged[key] = num;
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
merged[key] = value;
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
const dateProps = ['CreatedAt', 'UpdatedAt'].concat(datePropsExtras);
|
|
386
|
+
dateProps.forEach((key) => {
|
|
387
|
+
const val = merged[key];
|
|
388
|
+
let dateObj;
|
|
389
|
+
if (val instanceof Date) {
|
|
390
|
+
dateObj = val;
|
|
391
|
+
}
|
|
392
|
+
else if (typeof val === 'number') {
|
|
393
|
+
dateObj = this.excelSerialToDate(val);
|
|
394
|
+
}
|
|
395
|
+
else if (typeof val === 'string') {
|
|
396
|
+
dateObj = new Date(val);
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
dateObj = new Date();
|
|
400
|
+
}
|
|
401
|
+
if (isNaN(dateObj.getTime())) {
|
|
402
|
+
dateObj = new Date();
|
|
403
|
+
}
|
|
404
|
+
merged[key] = dateObj.toISOString();
|
|
405
|
+
});
|
|
406
|
+
return merged;
|
|
407
|
+
});
|
|
408
|
+
if (normalized && normalized.length > 0) {
|
|
409
|
+
this.saveImportedDataBatch(normalized, endpoint, baseUrl, entity, updateCallback, pagedState);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
async saveImportedDataBatch(items, endpoint, baseUrl, entity, updateCallback, pagedState = null) {
|
|
413
|
+
if (!items?.length)
|
|
414
|
+
return;
|
|
415
|
+
const preparedItems = items.map((item) => ({
|
|
416
|
+
...item,
|
|
417
|
+
DataState: ObjectState.New,
|
|
418
|
+
Id: '',
|
|
419
|
+
}));
|
|
420
|
+
if (!endpoint) {
|
|
421
|
+
preparedItems.forEach((srv, idx) => {
|
|
422
|
+
srv.Id = `UPLOAD ${idx}`;
|
|
423
|
+
srv.id = `UPLOAD ${idx}`;
|
|
424
|
+
});
|
|
425
|
+
updateCallback(preparedItems);
|
|
426
|
+
if (pagedState) {
|
|
427
|
+
pagedState.Skip += preparedItems.length;
|
|
428
|
+
}
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
this.utilService.sendBI(true);
|
|
432
|
+
const res = await this.server.post(endpoint, preparedItems, baseUrl);
|
|
433
|
+
this.utilService.sendBI(false);
|
|
434
|
+
if (res instanceof ErrorResponse) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
this.utilService.showSuccess(`${entity} upload successful`);
|
|
439
|
+
const result = res;
|
|
440
|
+
result.forEach((srv, idx) => {
|
|
441
|
+
srv.Id = srv.Code;
|
|
442
|
+
srv.id = srv.Code;
|
|
443
|
+
// const newItem = {
|
|
444
|
+
// ...srv,
|
|
445
|
+
// Id: srv.Code,
|
|
446
|
+
// id: srv.Code,
|
|
447
|
+
// };
|
|
448
|
+
// const cardData: CardData = {
|
|
449
|
+
// selected: false,
|
|
450
|
+
// title: newItem.Id.toString(),
|
|
451
|
+
// data: newItem,
|
|
452
|
+
// body: [],
|
|
453
|
+
// children: [],
|
|
454
|
+
// };
|
|
455
|
+
});
|
|
456
|
+
updateCallback(result);
|
|
457
|
+
if (pagedState) {
|
|
458
|
+
pagedState.Skip += result.length;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
excelSerialToDate(serial) {
|
|
463
|
+
1;
|
|
464
|
+
const excelEpoch = new Date(Date.UTC(1899, 11, 30));
|
|
465
|
+
const millisPerDay = 24 * 60 * 60 * 1000;
|
|
466
|
+
return new Date(excelEpoch.getTime() + serial * millisPerDay);
|
|
467
|
+
}
|
|
468
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ImportService, deps: [{ token: UtilService }, { token: HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
469
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ImportService, providedIn: 'root' });
|
|
470
|
+
}
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ImportService, decorators: [{
|
|
472
|
+
type: Injectable,
|
|
473
|
+
args: [{
|
|
474
|
+
providedIn: 'root',
|
|
475
|
+
}]
|
|
476
|
+
}], ctorParameters: () => [{ type: UtilService }, { type: HttpWebRequestService }] });
|
|
477
|
+
|
|
478
|
+
class LabelService {
|
|
479
|
+
utilService;
|
|
480
|
+
server;
|
|
481
|
+
cache = new Map();
|
|
482
|
+
inFlightRequests = new Map();
|
|
483
|
+
constructor(utilService, server) {
|
|
484
|
+
this.utilService = utilService;
|
|
485
|
+
this.server = server;
|
|
486
|
+
}
|
|
487
|
+
async getAsyncLabel(value, entity, labelProp, env, key = 'Code') {
|
|
488
|
+
const cacheKey = `${entity}_${labelProp}_${value}_${env}_${key}`;
|
|
489
|
+
if (this.cache.has(cacheKey)) {
|
|
490
|
+
const value = this.cache.get(cacheKey);
|
|
491
|
+
return value;
|
|
492
|
+
}
|
|
493
|
+
var payload = {
|
|
494
|
+
Fields: [labelProp],
|
|
495
|
+
SearchKeyValues: [
|
|
496
|
+
{
|
|
497
|
+
PropertyName: key,
|
|
498
|
+
EntityValue: value,
|
|
499
|
+
Operator: SearchOperator.And,
|
|
500
|
+
Sign: SearchPropertySign.EQ,
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
};
|
|
504
|
+
this.utilService.sendBI(true);
|
|
505
|
+
const res = await this.server.post(`SearchDynamic${entity}/0/1`, payload, env);
|
|
506
|
+
this.utilService.sendBI(false);
|
|
507
|
+
if (res instanceof ErrorResponse) {
|
|
508
|
+
return '';
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
const result = res.Result;
|
|
512
|
+
const label = result.length > 0 ? result[0] : value;
|
|
513
|
+
this.cache.set(cacheKey, label);
|
|
514
|
+
return label;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
async getAsyncLabelWithRequestTracking(value, entity, labelProp, env, key = 'Code') {
|
|
518
|
+
const cacheKey = `${entity}_${labelProp}_${value}_${env}_${key}`;
|
|
519
|
+
if (this.cache.has(cacheKey)) {
|
|
520
|
+
return this.cache.get(cacheKey);
|
|
521
|
+
}
|
|
522
|
+
if (this.inFlightRequests.has(cacheKey)) {
|
|
523
|
+
return this.inFlightRequests.get(cacheKey);
|
|
524
|
+
}
|
|
525
|
+
const requestPromise = (async () => {
|
|
526
|
+
const payload = {
|
|
527
|
+
Fields: [labelProp],
|
|
528
|
+
SearchKeyValues: [
|
|
529
|
+
{
|
|
530
|
+
PropertyName: key,
|
|
531
|
+
EntityValue: value,
|
|
532
|
+
Operator: SearchOperator.And,
|
|
533
|
+
Sign: SearchPropertySign.EQ,
|
|
534
|
+
},
|
|
535
|
+
],
|
|
536
|
+
};
|
|
537
|
+
this.utilService.sendBI(true);
|
|
538
|
+
const res = await this.server.post(`SearchDynamic${entity}/0/1`, payload, env);
|
|
539
|
+
this.utilService.sendBI(false);
|
|
540
|
+
let label;
|
|
541
|
+
if (res instanceof ErrorResponse) {
|
|
542
|
+
label = '';
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
const result = res.Result;
|
|
546
|
+
label = result.length > 0 ? result[0] : value;
|
|
547
|
+
}
|
|
548
|
+
this.cache.set(cacheKey, label);
|
|
549
|
+
this.inFlightRequests.delete(cacheKey);
|
|
550
|
+
return label;
|
|
551
|
+
})();
|
|
552
|
+
// Save the in-flight request
|
|
553
|
+
this.inFlightRequests.set(cacheKey, requestPromise);
|
|
554
|
+
return requestPromise;
|
|
555
|
+
}
|
|
556
|
+
async getAsyncLabelWithRequestTrackingNoGateway(value, entity, labelProp, env, controller, key = 'Code') {
|
|
557
|
+
const cacheKey = `${entity}_${labelProp}_${value}_${env}_${key}_${controller}`;
|
|
558
|
+
if (this.cache.has(cacheKey)) {
|
|
559
|
+
return this.cache.get(cacheKey);
|
|
560
|
+
}
|
|
561
|
+
if (this.inFlightRequests.has(cacheKey)) {
|
|
562
|
+
return this.inFlightRequests.get(cacheKey);
|
|
563
|
+
}
|
|
564
|
+
const requestPromise = (async () => {
|
|
565
|
+
const payload = {
|
|
566
|
+
Fields: [labelProp],
|
|
567
|
+
SearchKeyValues: [
|
|
568
|
+
{
|
|
569
|
+
PropertyName: key,
|
|
570
|
+
EntityValue: value,
|
|
571
|
+
Operator: SearchOperator.And,
|
|
572
|
+
Sign: SearchPropertySign.EQ,
|
|
573
|
+
},
|
|
574
|
+
],
|
|
575
|
+
};
|
|
576
|
+
this.utilService.sendBI(true);
|
|
577
|
+
const res = await this.server.post(`${controller}/SearchDynamic${entity}s/0/1`, payload, env);
|
|
578
|
+
this.utilService.sendBI(false);
|
|
579
|
+
let label;
|
|
580
|
+
if (res instanceof ErrorResponse) {
|
|
581
|
+
label = '';
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
const result = res.Result;
|
|
585
|
+
label = result.length > 0 ? result[0] : value;
|
|
586
|
+
}
|
|
587
|
+
this.cache.set(cacheKey, label);
|
|
588
|
+
this.inFlightRequests.delete(cacheKey);
|
|
589
|
+
return label;
|
|
590
|
+
})();
|
|
591
|
+
// Save the in-flight request
|
|
592
|
+
this.inFlightRequests.set(cacheKey, requestPromise);
|
|
593
|
+
return requestPromise;
|
|
594
|
+
}
|
|
595
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelService, deps: [{ token: UtilService }, { token: HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
596
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelService, providedIn: 'root' });
|
|
597
|
+
}
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelService, decorators: [{
|
|
599
|
+
type: Injectable,
|
|
600
|
+
args: [{
|
|
601
|
+
providedIn: 'root',
|
|
602
|
+
}]
|
|
603
|
+
}], ctorParameters: () => [{ type: UtilService }, { type: HttpWebRequestService }] });
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Generated bundle index. Do not edit.
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
export { AUTHORIZATION_CONFIG, AuthorizationService, ENVIRONMENT, EncryptionService, EnvironmentService, HttpWebRequestService, ImportService, LabelService, UtilService };
|
|
610
|
+
//# sourceMappingURL=verben-authentication-ui-src-lib-services.mjs.map
|