verben-authentication-ui 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ng-package.json +8 -0
- package/package.json +10 -14
- package/src/lib/base/base-data.component.ts +86 -0
- package/src/lib/base/base-data.facade.ts +157 -0
- package/src/lib/base/base-data.service.ts +49 -0
- package/src/lib/base/base-data.state.ts +94 -0
- package/src/lib/base/models.ts +14 -0
- package/src/lib/components/auth-callback/auth-callback.component.css +30 -0
- package/src/lib/components/auth-callback/auth-callback.component.html +6 -0
- package/src/lib/components/auth-callback/auth-callback.component.spec.ts +23 -0
- package/src/lib/components/auth-callback/auth-callback.component.ts +56 -0
- package/src/lib/components/auth-callback/auth-callback.module.ts +10 -0
- package/src/lib/components/button/button.component.css +3 -0
- package/src/lib/components/button/button.component.html +13 -0
- package/src/lib/components/button/button.component.spec.ts +23 -0
- package/src/lib/components/button/button.component.ts +24 -0
- package/src/lib/components/button/button.module.ts +11 -0
- package/{lib/components/forgot-password/ForgotPasswordData.d.ts → src/lib/components/forgot-password/ForgotPasswordData.ts} +1 -1
- package/src/lib/components/forgot-password/forgot-password.component.css +50 -0
- package/src/lib/components/forgot-password/forgot-password.component.html +38 -0
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +23 -0
- package/src/lib/components/forgot-password/forgot-password.component.ts +90 -0
- package/src/lib/components/forgot-password/forgot-password.module.ts +18 -0
- package/src/lib/components/mail/mail.component.css +0 -0
- package/src/lib/components/mail/mail.component.html +11 -0
- package/src/lib/components/mail/mail.component.spec.ts +23 -0
- package/src/lib/components/mail/mail.component.ts +47 -0
- package/src/lib/components/mail/mail.module.ts +13 -0
- package/src/lib/components/mail-validation/mail-validation.component.css +59 -0
- package/src/lib/components/mail-validation/mail-validation.component.html +37 -0
- package/src/lib/components/mail-validation/mail-validation.component.spec.ts +23 -0
- package/src/lib/components/mail-validation/mail-validation.component.ts +66 -0
- package/src/lib/components/mail-validation/mail-validation.module.ts +18 -0
- package/src/lib/components/o-auth/o-auth.component.css +26 -0
- package/src/lib/components/o-auth/o-auth.component.html +26 -0
- package/src/lib/components/o-auth/o-auth.component.spec.ts +23 -0
- package/src/lib/components/o-auth/o-auth.component.ts +115 -0
- package/src/lib/components/o-auth/o-auth.module.ts +11 -0
- package/src/lib/components/otp-input/otp-input.component.css +19 -0
- package/src/lib/components/otp-input/otp-input.component.html +15 -0
- package/src/lib/components/otp-input/otp-input.component.spec.ts +23 -0
- package/src/lib/components/otp-input/otp-input.component.ts +88 -0
- package/src/lib/components/otp-input/otp-input.module.ts +15 -0
- package/src/lib/components/reset-password/ResetPasswordData.ts +5 -0
- package/src/lib/components/reset-password/reset-password.component.css +29 -0
- package/src/lib/components/reset-password/reset-password.component.html +24 -0
- package/src/lib/components/reset-password/reset-password.component.spec.ts +23 -0
- package/src/lib/components/reset-password/reset-password.component.ts +108 -0
- package/src/lib/components/reset-password/reset-password.module.ts +18 -0
- package/src/lib/components/role-control/ChildrenType.ts +4 -0
- package/{lib/components/role-control/MappedRole.d.ts → src/lib/components/role-control/MappedRole.ts} +3 -2
- package/{lib/components/role-control/MappedRoleAction.d.ts → src/lib/components/role-control/MappedRoleAction.ts} +2 -1
- package/{lib/components/role-control/MappedRoleContext.d.ts → src/lib/components/role-control/MappedRoleContext.ts} +4 -3
- package/src/lib/components/role-control/UIActions.ts +5 -0
- package/src/lib/components/role-control/UIs.ts +38 -0
- package/src/lib/components/role-control/base-table-style.ts +52 -0
- package/src/lib/components/role-control/role-control.component.css +87 -0
- package/src/lib/components/role-control/role-control.component.html +603 -0
- package/src/lib/components/role-control/role-control.component.spec.ts +23 -0
- package/src/lib/components/role-control/role-control.component.ts +1884 -0
- package/src/lib/components/role-control/role-control.module.ts +10 -0
- package/src/lib/components/role-control/role-control.service.spec.ts +16 -0
- package/src/lib/components/role-control/role-control.service.ts +53 -0
- package/src/lib/components/sign-in/sign-in.component.css +21 -0
- package/src/lib/components/sign-in/sign-in.component.html +83 -0
- package/src/lib/components/sign-in/sign-in.component.spec.ts +23 -0
- package/src/lib/components/sign-in/sign-in.component.ts +267 -0
- package/src/lib/components/sign-in/sign-in.module.ts +17 -0
- package/src/lib/components/sign-up/sign-up.component.css +36 -0
- package/src/lib/components/sign-up/sign-up.component.html +132 -0
- package/src/lib/components/sign-up/sign-up.component.spec.ts +23 -0
- package/src/lib/components/sign-up/sign-up.component.ts +180 -0
- package/src/lib/components/sign-up/sign-up.module.ts +15 -0
- package/src/lib/components/sso/base-table-style.ts +52 -0
- package/src/lib/components/sso/helper.ts +17 -0
- package/src/lib/components/sso/sso-form/sso-form.component.css +13 -0
- package/src/lib/components/sso/sso-form/sso-form.component.html +109 -0
- package/src/lib/components/sso/sso-form/sso-form.component.spec.ts +23 -0
- package/src/lib/components/sso/sso-form/sso-form.component.ts +70 -0
- package/src/lib/components/sso/sso.columns.ts +32 -0
- package/src/lib/components/sso/sso.component.css +47 -0
- package/src/lib/components/sso/sso.component.html +208 -0
- package/src/lib/components/sso/sso.component.spec.ts +23 -0
- package/src/lib/components/sso/sso.component.ts +261 -0
- package/src/lib/components/sso/sso.module.ts +40 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.css +8 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.html +30 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.spec.ts +23 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.ts +155 -0
- package/src/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.ts +15 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.css +17 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.html +45 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.spec.ts +23 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.ts +57 -0
- package/src/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.ts +11 -0
- package/src/lib/components/user-management/base-table-style.ts +52 -0
- package/src/lib/components/user-management/facades/user-management.facades.ts +133 -0
- package/src/lib/components/user-management/helper.ts +38 -0
- package/src/lib/components/user-management/index.ts +4 -0
- package/src/lib/components/user-management/services/user-management.service.spec.ts +16 -0
- package/src/lib/components/user-management/services/user-management.service.ts +111 -0
- package/src/lib/components/user-management/states/user-management.state.ts +65 -0
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +74 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.css +0 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.html +89 -0
- package/src/lib/components/user-management/user-management-form/user-management-form.component.spec.ts +23 -0
- package/src/lib/components/user-management/user-management.columns.ts +57 -0
- package/src/lib/components/user-management/user-management.component.css +31 -0
- package/src/lib/components/user-management/user-management.component.html +455 -0
- package/src/lib/components/user-management/user-management.component.spec.ts +23 -0
- package/src/lib/components/user-management/user-management.component.ts +626 -0
- package/src/lib/components/user-management/user-management.module.ts +60 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.css +0 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.html +8 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.spec.ts +22 -0
- package/src/lib/components/user-management/user-status-badge/user-status-badge.component.ts +22 -0
- package/src/lib/components/user-request/user-request.component.css +91 -0
- package/src/lib/components/user-request/user-request.component.html +137 -0
- package/src/lib/components/user-request/user-request.component.spec.ts +23 -0
- package/src/lib/components/user-request/user-request.component.ts +306 -0
- package/src/lib/components/user-request/user-request.module.ts +20 -0
- package/src/lib/components/user-request-approval/access-request.columns.ts +31 -0
- package/src/lib/components/user-request-approval/base-table-style.ts +52 -0
- package/src/lib/components/user-request-approval/facades/user-access-request.facade.ts +324 -0
- package/src/lib/components/user-request-approval/helper.ts +61 -0
- package/src/lib/components/user-request-approval/services/user-access-request.service.spec.ts +16 -0
- package/src/lib/components/user-request-approval/services/user-access-request.service.ts +122 -0
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +109 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.css +0 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.html +8 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.spec.ts +23 -0
- package/src/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.ts +22 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.css +6 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.html +273 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.spec.ts +23 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.ts +328 -0
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +56 -0
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +98 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.css +0 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.html +94 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +23 -0
- package/src/lib/components/user-request-process/user-request-process.component.css +0 -0
- package/src/lib/components/user-request-process/user-request-process.component.html +1 -0
- package/src/lib/components/user-request-process/user-request-process.component.spec.ts +23 -0
- package/src/lib/components/user-request-process/user-request-process.component.ts +12 -0
- package/src/lib/components/user-request-process/user-request-process.module.ts +12 -0
- package/src/lib/models/ApplicationRoleAction.ts +10 -0
- package/{lib/models/ApplicationRoleContext.d.ts → src/lib/models/ApplicationRoleContext copy.ts } +6 -5
- package/src/lib/models/ApplicationRoleContext.ts +10 -0
- package/src/lib/models/ErrorResponse.ts +7 -0
- package/src/lib/models/FilterTypes.ts +8 -0
- package/src/lib/models/MailConfig.ts +13 -0
- package/src/lib/models/MessageConfig.ts +5 -0
- package/src/lib/models/MessageMedium.ts +4 -0
- package/src/lib/models/OAuthParam.ts +10 -0
- package/src/lib/models/OAuthType.ts +7 -0
- package/src/lib/models/PagedResult.ts +9 -0
- package/src/lib/models/PasswordRequestParam.ts +5 -0
- package/src/lib/models/PeriodMode.ts +10 -0
- package/{lib/models/PermissionConfig.d.ts → src/lib/models/PermissionConfig.ts} +4 -3
- package/src/lib/models/ReportSchedule.ts +23 -0
- package/src/lib/models/ReportType.ts +5 -0
- package/src/lib/models/ResponseKeyValue.ts +5 -0
- package/{lib/models/Role.d.ts → src/lib/models/Role.ts} +6 -5
- package/src/lib/models/RoleAction.ts +11 -0
- package/src/lib/models/RoleContext.ts +11 -0
- package/src/lib/models/SMSConfig.ts +11 -0
- package/{lib/models/SearchDynamicWrapper.d.ts → src/lib/models/SearchDynamicWrapper.ts} +3 -2
- package/src/lib/models/SearchOperator.ts +4 -0
- package/src/lib/models/SearchPropertySign.ts +9 -0
- package/{lib/models/SearchPropertyValue.d.ts → src/lib/models/SearchPropertyValue.ts} +7 -6
- package/src/lib/models/SearchPropertyValueType.ts +9 -0
- package/src/lib/models/SortDirection.ts +5 -0
- package/{lib/models/Tag.d.ts → src/lib/models/Tag.ts} +4 -3
- package/src/lib/models/TaskNotification.ts +14 -0
- package/src/lib/models/TaskNotificationMessageType.ts +4 -0
- package/src/lib/models/TaskNotificationType.ts +4 -0
- package/src/lib/models/Tenant.ts +22 -0
- package/src/lib/models/TenantConfig.ts +19 -0
- package/src/lib/models/UserRequest.ts +38 -0
- package/src/lib/models/auth-mechanism.ts +15 -0
- package/src/lib/models/base.ts +13 -0
- package/src/lib/models/conditions.ts +11 -0
- package/src/lib/models/log-in.ts +8 -0
- package/{lib/models/mainUser.d.ts → src/lib/models/mainUser.ts} +3 -2
- package/src/lib/models/oauth-resp.ts +6 -0
- package/{lib/models/oauth-response.d.ts → src/lib/models/oauth-response.ts} +1 -1
- package/src/lib/models/object-state.ts +6 -0
- package/{lib/models/otpValue.d.ts → src/lib/models/otpValue.ts} +4 -2
- package/src/lib/models/paged.ts +9 -0
- package/src/lib/models/query-params.ts +9 -0
- package/src/lib/models/request-status.ts +4 -0
- package/src/lib/models/resend-otp-data.ts +8 -0
- package/src/lib/models/resource.ts +27 -0
- package/src/lib/models/sign-up.ts +11 -0
- package/src/lib/models/single-sign-on.ts +9 -0
- package/src/lib/models/status.ts +5 -0
- package/src/lib/models/user-access-request-status.ts +5 -0
- package/{lib/models/user-access-request.d.ts → src/lib/models/user-access-request.ts} +5 -4
- package/src/lib/models/user-object-state.ts +6 -0
- package/src/lib/models/user.ts +19 -0
- package/src/lib/pipes/async-label.pipe.spec.ts +8 -0
- package/src/lib/pipes/async-label.pipe.ts +20 -0
- package/src/lib/services/authorization.service.spec.ts +16 -0
- package/src/lib/services/authorization.service.ts +24 -0
- package/src/lib/services/encryption.service.ts +57 -0
- package/src/lib/services/environment.service.spec.ts +16 -0
- package/src/lib/services/environment.service.ts +30 -0
- package/src/lib/services/http-web-request.service.spec.ts +16 -0
- package/src/lib/services/http-web-request.service.ts +114 -0
- package/src/lib/services/label.service.spec.ts +16 -0
- package/src/lib/services/label.service.ts +177 -0
- package/src/lib/services/util.service.spec.ts +16 -0
- package/src/lib/services/util.service.ts +49 -0
- package/src/lib/shared/shared.module.ts +55 -0
- package/{public-api.d.ts → src/public-api.ts} +24 -0
- package/src/styles.css +96 -0
- package/src/theme/tailwind-setup.css +3 -0
- package/src/theme/tailwind.css +1035 -0
- package/src/utils/components/base-data-view.component.ts +131 -0
- package/src/utils/models/DataViewConfig.ts +19 -0
- package/tailwind.config.js +20 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +15 -0
- package/esm2022/lib/components/auth-callback/auth-callback.component.mjs +0 -57
- package/esm2022/lib/components/auth-callback/auth-callback.module.mjs +0 -18
- package/esm2022/lib/components/button/button.component.mjs +0 -46
- package/esm2022/lib/components/button/button.module.mjs +0 -20
- package/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +0 -2
- package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +0 -89
- package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +0 -34
- package/esm2022/lib/components/mail/mail.component.mjs +0 -69
- package/esm2022/lib/components/mail/mail.module.mjs +0 -21
- package/esm2022/lib/components/mail-validation/mail-validation.component.mjs +0 -108
- package/esm2022/lib/components/mail-validation/mail-validation.module.mjs +0 -34
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +0 -107
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +0 -19
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +0 -86
- package/esm2022/lib/components/otp-input/otp-input.module.mjs +0 -23
- package/esm2022/lib/components/reset-password/ResetPasswordData.mjs +0 -2
- package/esm2022/lib/components/reset-password/reset-password.component.mjs +0 -108
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +0 -34
- package/esm2022/lib/components/role-control/ChildrenType.mjs +0 -6
- package/esm2022/lib/components/role-control/MappedRole.mjs +0 -2
- package/esm2022/lib/components/role-control/MappedRoleAction.mjs +0 -2
- package/esm2022/lib/components/role-control/MappedRoleContext.mjs +0 -2
- package/esm2022/lib/components/role-control/UIActions.mjs +0 -7
- package/esm2022/lib/components/role-control/UIs.mjs +0 -40
- package/esm2022/lib/components/role-control/base-table-style.mjs +0 -53
- package/esm2022/lib/components/role-control/role-control.component.mjs +0 -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-form/sso-form.component.mjs +0 -74
- package/esm2022/lib/components/sso/sso.columns.mjs +0 -29
- package/esm2022/lib/components/sso/sso.component.mjs +0 -236
- package/esm2022/lib/components/sso/sso.module.mjs +0 -63
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +0 -209
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.mjs +0 -22
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +0 -90
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.mjs +0 -19
- package/esm2022/lib/components/user-management/base-table-style.mjs +0 -53
- package/esm2022/lib/components/user-management/services/user-management.service.mjs +0 -88
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +0 -73
- package/esm2022/lib/components/user-management/user-management.columns.mjs +0 -53
- package/esm2022/lib/components/user-management/user-management.component.mjs +0 -536
- 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.component.mjs +0 -271
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +0 -83
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +0 -86
- package/esm2022/lib/models/ApplicationRoleAction.mjs +0 -2
- package/esm2022/lib/models/ApplicationRoleContext.mjs +0 -2
- package/esm2022/lib/models/ErrorResponse.mjs +0 -11
- package/esm2022/lib/models/OAuthParam.mjs +0 -2
- package/esm2022/lib/models/OAuthType.mjs +0 -9
- package/esm2022/lib/models/PagedResult.mjs +0 -2
- package/esm2022/lib/models/PasswordRequestParam.mjs +0 -2
- package/esm2022/lib/models/PermissionConfig.mjs +0 -2
- package/esm2022/lib/models/ResponseKeyValue.mjs +0 -2
- package/esm2022/lib/models/Role.mjs +0 -2
- package/esm2022/lib/models/RoleAction.mjs +0 -2
- package/esm2022/lib/models/RoleContext.mjs +0 -2
- package/esm2022/lib/models/SearchDynamicWrapper.mjs +0 -2
- package/esm2022/lib/models/SearchOperator.mjs +0 -6
- package/esm2022/lib/models/SearchPropertySign.mjs +0 -11
- package/esm2022/lib/models/SearchPropertyValue.mjs +0 -2
- package/esm2022/lib/models/SearchPropertyValueType.mjs +0 -11
- package/esm2022/lib/models/SortDirection.mjs +0 -7
- package/esm2022/lib/models/Tag.mjs +0 -2
- package/esm2022/lib/models/TenantConfig.mjs +0 -2
- package/esm2022/lib/models/UserRequest.mjs +0 -2
- package/esm2022/lib/models/auth-mechanism.mjs +0 -8
- package/esm2022/lib/models/base.mjs +0 -2
- package/esm2022/lib/models/conditions.mjs +0 -13
- package/esm2022/lib/models/log-in.mjs +0 -2
- package/esm2022/lib/models/mainUser.mjs +0 -2
- package/esm2022/lib/models/oauth-resp.mjs +0 -2
- package/esm2022/lib/models/oauth-response.mjs +0 -2
- package/esm2022/lib/models/object-state.mjs +0 -8
- package/esm2022/lib/models/otpValue.mjs +0 -2
- package/esm2022/lib/models/paged.mjs +0 -2
- package/esm2022/lib/models/query-params.mjs +0 -2
- package/esm2022/lib/models/request-status.mjs +0 -5
- package/esm2022/lib/models/resend-otp-data.mjs +0 -2
- package/esm2022/lib/models/sign-up.mjs +0 -2
- package/esm2022/lib/models/single-sign-on.mjs +0 -2
- package/esm2022/lib/models/status.mjs +0 -6
- package/esm2022/lib/models/user-access-request-status.mjs +0 -7
- package/esm2022/lib/models/user-access-request.mjs +0 -2
- package/esm2022/lib/models/user.mjs +0 -2
- package/esm2022/lib/pipes/async-label.pipe.mjs +0 -25
- package/esm2022/lib/services/authorization.service.mjs +0 -26
- package/esm2022/lib/services/encryption.service.mjs +0 -52
- package/esm2022/lib/services/environment.service.mjs +0 -26
- package/esm2022/lib/services/http-web-request.service.mjs +0 -85
- package/esm2022/lib/services/label.service.mjs +0 -134
- package/esm2022/lib/services/util.service.mjs +0 -55
- package/esm2022/lib/shared/shared.module.mjs +0 -84
- package/esm2022/public-api.mjs +0 -48
- package/esm2022/verben-authentication-ui.mjs +0 -5
- package/fesm2022/verben-authentication-ui.mjs +0 -6619
- package/fesm2022/verben-authentication-ui.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/auth-callback/auth-callback.component.d.ts +0 -17
- package/lib/components/auth-callback/auth-callback.module.d.ts +0 -8
- package/lib/components/button/button.component.d.ts +0 -17
- package/lib/components/button/button.module.d.ts +0 -10
- package/lib/components/forgot-password/forgot-password.component.d.ts +0 -29
- package/lib/components/forgot-password/forgot-password.module.d.ts +0 -10
- package/lib/components/mail/mail.component.d.ts +0 -32
- package/lib/components/mail/mail.module.d.ts +0 -11
- package/lib/components/mail-validation/mail-validation.component.d.ts +0 -42
- package/lib/components/mail-validation/mail-validation.module.d.ts +0 -10
- package/lib/components/o-auth/o-auth.component.d.ts +0 -30
- package/lib/components/o-auth/o-auth.module.d.ts +0 -9
- package/lib/components/otp-input/otp-input.component.d.ts +0 -21
- package/lib/components/otp-input/otp-input.module.d.ts +0 -13
- package/lib/components/reset-password/ResetPasswordData.d.ts +0 -5
- package/lib/components/reset-password/reset-password.component.d.ts +0 -30
- package/lib/components/reset-password/reset-password.module.d.ts +0 -10
- package/lib/components/role-control/ChildrenType.d.ts +0 -4
- package/lib/components/role-control/UIActions.d.ts +0 -5
- package/lib/components/role-control/UIs.d.ts +0 -38
- package/lib/components/role-control/base-table-style.d.ts +0 -1
- package/lib/components/role-control/role-control.component.d.ts +0 -131
- package/lib/components/role-control/role-control.module.d.ts +0 -8
- package/lib/components/role-control/role-control.service.d.ts +0 -9
- package/lib/components/sign-in/sign-in.component.d.ts +0 -95
- package/lib/components/sign-in/sign-in.module.d.ts +0 -13
- package/lib/components/sign-up/sign-up.component.d.ts +0 -68
- package/lib/components/sign-up/sign-up.module.d.ts +0 -13
- package/lib/components/sso/base-table-style.d.ts +0 -1
- package/lib/components/sso/helper.d.ts +0 -2
- package/lib/components/sso/sso-form/sso-form.component.d.ts +0 -21
- package/lib/components/sso/sso.columns.d.ts +0 -3
- package/lib/components/sso/sso.component.d.ts +0 -54
- package/lib/components/sso/sso.module.d.ts +0 -11
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +0 -67
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.module.d.ts +0 -12
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +0 -39
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.module.d.ts +0 -9
- package/lib/components/user-management/base-table-style.d.ts +0 -1
- package/lib/components/user-management/services/user-management.service.d.ts +0 -44
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +0 -24
- package/lib/components/user-management/user-management.columns.d.ts +0 -3
- package/lib/components/user-management/user-management.component.d.ts +0 -134
- package/lib/components/user-management/user-management.module.d.ts +0 -14
- package/lib/components/user-management/user-status-badge/user-status-badge.component.d.ts +0 -12
- package/lib/components/user-request/user-request.component.d.ts +0 -80
- package/lib/components/user-request/user-request.module.d.ts +0 -11
- package/lib/components/user-request-approval/access-request.columns.d.ts +0 -3
- package/lib/components/user-request-approval/base-table-style.d.ts +0 -1
- package/lib/components/user-request-approval/facades/user-access-request.facade.d.ts +0 -39
- package/lib/components/user-request-approval/helper.d.ts +0 -7
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +0 -65
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +0 -35
- package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +0 -12
- package/lib/components/user-request-approval/user-request-approval.component.d.ts +0 -69
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +0 -12
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +0 -25
- package/lib/models/ApplicationRoleAction.d.ts +0 -9
- package/lib/models/ErrorResponse.d.ts +0 -6
- package/lib/models/OAuthParam.d.ts +0 -9
- package/lib/models/OAuthType.d.ts +0 -7
- package/lib/models/PagedResult.d.ts +0 -9
- package/lib/models/PasswordRequestParam.d.ts +0 -5
- package/lib/models/ResponseKeyValue.d.ts +0 -5
- package/lib/models/RoleAction.d.ts +0 -10
- package/lib/models/RoleContext.d.ts +0 -10
- package/lib/models/SearchOperator.d.ts +0 -4
- package/lib/models/SearchPropertySign.d.ts +0 -9
- package/lib/models/SearchPropertyValueType.d.ts +0 -9
- package/lib/models/SortDirection.d.ts +0 -5
- package/lib/models/TenantConfig.d.ts +0 -18
- package/lib/models/UserRequest.d.ts +0 -32
- package/lib/models/auth-mechanism.d.ts +0 -14
- package/lib/models/base.d.ts +0 -12
- package/lib/models/conditions.d.ts +0 -11
- package/lib/models/log-in.d.ts +0 -8
- package/lib/models/oauth-resp.d.ts +0 -6
- package/lib/models/object-state.d.ts +0 -6
- package/lib/models/paged.d.ts +0 -9
- package/lib/models/query-params.d.ts +0 -8
- package/lib/models/request-status.d.ts +0 -3
- package/lib/models/resend-otp-data.d.ts +0 -8
- package/lib/models/sign-up.d.ts +0 -9
- package/lib/models/single-sign-on.d.ts +0 -7
- package/lib/models/status.d.ts +0 -4
- package/lib/models/user-access-request-status.d.ts +0 -5
- package/lib/models/user.d.ts +0 -18
- package/lib/pipes/async-label.pipe.d.ts +0 -11
- package/lib/services/authorization.service.d.ts +0 -14
- package/lib/services/encryption.service.d.ts +0 -13
- package/lib/services/environment.service.d.ts +0 -22
- package/lib/services/http-web-request.service.d.ts +0 -23
- package/lib/services/label.service.d.ts +0 -15
- package/lib/services/util.service.d.ts +0 -11
- package/lib/shared/shared.module.d.ts +0 -10
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verben-authentication-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build-watch": "ng build --watch"
|
|
6
|
+
},
|
|
4
7
|
"peerDependencies": {
|
|
5
8
|
"@angular/cdk": "^18.2.0",
|
|
6
9
|
"@angular/common": "^14.0.0 || ^18.0.0",
|
|
7
10
|
"@angular/core": "^14.0.0 || ^18.0.0",
|
|
8
11
|
"verben-ng-ui": "^1.2.10"
|
|
12
|
+
|
|
9
13
|
},
|
|
10
14
|
"dependencies": {
|
|
11
15
|
"tslib": "^2.3.0"
|
|
12
16
|
},
|
|
13
17
|
"sideEffects": false,
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"default": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
".": {
|
|
21
|
-
"types": "./index.d.ts",
|
|
22
|
-
"esm2022": "./esm2022/verben-authentication-ui.mjs",
|
|
23
|
-
"esm": "./esm2022/verben-authentication-ui.mjs",
|
|
24
|
-
"default": "./fesm2022/verben-authentication-ui.mjs"
|
|
25
|
-
}
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"autoprefixer": "^10.4.20",
|
|
20
|
+
"storage-encryption": "^1.0.16",
|
|
21
|
+
"verben-ng-ui": "^1.2.10"
|
|
26
22
|
}
|
|
27
|
-
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
Input,
|
|
4
|
+
Output,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
OnInit,
|
|
7
|
+
OnDestroy,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import { Subject } from 'rxjs';
|
|
10
|
+
import { takeUntil } from 'rxjs/operators';
|
|
11
|
+
import { BaseModel } from '../models/base';
|
|
12
|
+
import { ColumnDefinition } from 'verben-ng-ui';
|
|
13
|
+
import { BaseDataFacade } from './base-data.facade';
|
|
14
|
+
|
|
15
|
+
@Component({ template: '' })
|
|
16
|
+
export abstract class BaseDataComponent<T extends BaseModel>
|
|
17
|
+
implements OnInit, OnDestroy
|
|
18
|
+
{
|
|
19
|
+
@Input() columns!: ColumnDefinition<T>[];
|
|
20
|
+
@Output() selectionChange = new EventEmitter<T[]>();
|
|
21
|
+
@Output() exportData = new EventEmitter<Record<string, any>[]>();
|
|
22
|
+
|
|
23
|
+
protected destroy$ = new Subject<void>();
|
|
24
|
+
isLoading = false;
|
|
25
|
+
items: T[] = [];
|
|
26
|
+
selectedItems: T[] = [];
|
|
27
|
+
isGridView = true;
|
|
28
|
+
|
|
29
|
+
constructor(protected facade: BaseDataFacade<T>) {}
|
|
30
|
+
|
|
31
|
+
ngOnInit(): void {
|
|
32
|
+
this.setupSubscriptions();
|
|
33
|
+
this.loadInitialData();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ngOnDestroy(): void {
|
|
37
|
+
this.destroy$.next();
|
|
38
|
+
this.destroy$.complete();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
protected setupSubscriptions(): void {
|
|
42
|
+
this.facade
|
|
43
|
+
.isUpdating$()
|
|
44
|
+
.pipe(takeUntil(this.destroy$))
|
|
45
|
+
.subscribe((loading) => (this.isLoading = loading));
|
|
46
|
+
|
|
47
|
+
this.facade
|
|
48
|
+
.getItems$()
|
|
49
|
+
.pipe(takeUntil(this.destroy$))
|
|
50
|
+
.subscribe((items) => (this.items = items));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
protected async loadInitialData(): Promise<void> {
|
|
54
|
+
try {
|
|
55
|
+
await this.facade.loadItems();
|
|
56
|
+
} catch (error) {
|
|
57
|
+
// Handle error appropriately
|
|
58
|
+
console.error('Failed to load initial data:', error);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
onSearch(event: { key: string; value: string }): void {
|
|
63
|
+
this.facade.search(event.value);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async onLoadMore(): Promise<void> {
|
|
67
|
+
try {
|
|
68
|
+
await this.facade.loadMore();
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.error('Failed to load more:', error);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
onViewChange(isGridView: boolean): void {
|
|
75
|
+
this.isGridView = isGridView;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
onSelectionChange(selected: T[]): void {
|
|
79
|
+
this.selectedItems = selected;
|
|
80
|
+
this.selectionChange.emit(selected);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
onExport(data: Record<string, any>[]): void {
|
|
84
|
+
this.exportData.emit(data);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
Observable,
|
|
4
|
+
Subject,
|
|
5
|
+
debounceTime,
|
|
6
|
+
distinctUntilChanged,
|
|
7
|
+
takeUntil,
|
|
8
|
+
} from 'rxjs';
|
|
9
|
+
import { IQueryParams } from './models';
|
|
10
|
+
import { BaseDataState } from './base-data.state';
|
|
11
|
+
import { BaseDataService } from './base-data.service';
|
|
12
|
+
import { BaseModel } from '../models/base';
|
|
13
|
+
|
|
14
|
+
@Injectable()
|
|
15
|
+
export abstract class BaseDataFacade<T extends BaseModel> {
|
|
16
|
+
private searchSubject = new Subject<string>();
|
|
17
|
+
private destroy$ = new Subject<void>();
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
protected state: BaseDataState<T>,
|
|
21
|
+
protected service: BaseDataService<T>
|
|
22
|
+
) {
|
|
23
|
+
this.setupSearchHandler();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
private setupSearchHandler(): void {
|
|
27
|
+
this.searchSubject
|
|
28
|
+
.pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.destroy$))
|
|
29
|
+
.subscribe((searchTerm) => {
|
|
30
|
+
this.handleSearch(searchTerm);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
destroy(): void {
|
|
35
|
+
this.destroy$.next();
|
|
36
|
+
this.destroy$.complete();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// State Observables
|
|
40
|
+
isUpdating$(): Observable<boolean> {
|
|
41
|
+
return this.state.isUpdating$();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
getItems$(): Observable<T[]> {
|
|
45
|
+
return this.state.getItems$();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
getSearchTerm$(): Observable<string> {
|
|
49
|
+
return this.state.getSearchTerm$();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
getQueryParams$(): Observable<IQueryParams<T>> {
|
|
53
|
+
return this.state.getQueryParams$();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Actions
|
|
57
|
+
search(term: string): void {
|
|
58
|
+
this.searchSubject.next(term);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
protected async handleSearch(searchTerm: string): Promise<void> {
|
|
62
|
+
this.state.setSearchTerm(searchTerm);
|
|
63
|
+
this.state.resetPagination();
|
|
64
|
+
await this.loadItems();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async loadItems(): Promise<void> {
|
|
68
|
+
try {
|
|
69
|
+
this.state.setUpdating(true);
|
|
70
|
+
const params = this.state.getQueryParamsValue();
|
|
71
|
+
const searchTerm = this.state.getSearchTermValue();
|
|
72
|
+
|
|
73
|
+
const response = searchTerm
|
|
74
|
+
? await this.service
|
|
75
|
+
.getItemsBySearchTerm(
|
|
76
|
+
searchTerm,
|
|
77
|
+
params.skip,
|
|
78
|
+
params.limit,
|
|
79
|
+
params.sortParam!,
|
|
80
|
+
params.sortOrder
|
|
81
|
+
)
|
|
82
|
+
.toPromise()
|
|
83
|
+
: await this.service
|
|
84
|
+
.getItems(
|
|
85
|
+
params.skip,
|
|
86
|
+
params.limit,
|
|
87
|
+
params.sortParam!,
|
|
88
|
+
params.sortOrder
|
|
89
|
+
)
|
|
90
|
+
.toPromise();
|
|
91
|
+
|
|
92
|
+
if (response?.Result) {
|
|
93
|
+
this.state.setItems(response?.Result);
|
|
94
|
+
}
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error('Failed to load items:', error);
|
|
97
|
+
throw error;
|
|
98
|
+
} finally {
|
|
99
|
+
this.state.setUpdating(false);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async loadMore(): Promise<void> {
|
|
104
|
+
try {
|
|
105
|
+
this.state.setUpdating(true);
|
|
106
|
+
const currentParams = this.state.getQueryParamsValue();
|
|
107
|
+
const newSkip = currentParams.skip + currentParams.limit;
|
|
108
|
+
this.state.updateQueryParams({ skip: newSkip });
|
|
109
|
+
|
|
110
|
+
const response = await this.service
|
|
111
|
+
.getItems(
|
|
112
|
+
newSkip,
|
|
113
|
+
currentParams.limit,
|
|
114
|
+
currentParams.sortParam!,
|
|
115
|
+
currentParams.sortOrder
|
|
116
|
+
)
|
|
117
|
+
.toPromise();
|
|
118
|
+
|
|
119
|
+
if (response?.Result) {
|
|
120
|
+
this.state.appendItems(response.Result);
|
|
121
|
+
}
|
|
122
|
+
} catch (error) {
|
|
123
|
+
console.error('Failed to load more items:', error);
|
|
124
|
+
throw error;
|
|
125
|
+
} finally {
|
|
126
|
+
this.state.setUpdating(false);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async saveItem(item: T): Promise<void> {
|
|
131
|
+
try {
|
|
132
|
+
this.state.setUpdating(true);
|
|
133
|
+
const response = await this.service.saveItems([item]).toPromise();
|
|
134
|
+
if (response?.[0]) {
|
|
135
|
+
this.state.updateItem(response[0]);
|
|
136
|
+
}
|
|
137
|
+
} catch (error) {
|
|
138
|
+
console.error('Failed to save item:', error);
|
|
139
|
+
throw error;
|
|
140
|
+
} finally {
|
|
141
|
+
this.state.setUpdating(false);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async deleteItem(itemId: string): Promise<void> {
|
|
146
|
+
try {
|
|
147
|
+
this.state.setUpdating(true);
|
|
148
|
+
await this.service.deleteItems([itemId]).toPromise();
|
|
149
|
+
this.state.removeItem(itemId);
|
|
150
|
+
} catch (error) {
|
|
151
|
+
console.error('Failed to delete item:', error);
|
|
152
|
+
throw error;
|
|
153
|
+
} finally {
|
|
154
|
+
this.state.setUpdating(false);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { BaseModel } from '../models/base';
|
|
4
|
+
import { Paged } from '../models/paged';
|
|
5
|
+
|
|
6
|
+
export abstract class BaseDataService<T extends BaseModel> {
|
|
7
|
+
constructor(protected http: HttpClient, protected baseUrl: string) {}
|
|
8
|
+
|
|
9
|
+
abstract getEndpoint(): string;
|
|
10
|
+
|
|
11
|
+
getItems(
|
|
12
|
+
skip: number,
|
|
13
|
+
limit: number,
|
|
14
|
+
sortParam: keyof T,
|
|
15
|
+
sortOrder: string
|
|
16
|
+
): Observable<Paged<T>> {
|
|
17
|
+
return this.http.get<Paged<T>>(
|
|
18
|
+
`${this.baseUrl}/${this.getEndpoint()}/${skip}/${limit}/${String(
|
|
19
|
+
sortParam
|
|
20
|
+
)}/${sortOrder}`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getItemsBySearchTerm(
|
|
25
|
+
searchTerm: string,
|
|
26
|
+
skip: number,
|
|
27
|
+
limit: number,
|
|
28
|
+
sortParam: keyof T,
|
|
29
|
+
sortOrder: string
|
|
30
|
+
): Observable<Paged<T>> {
|
|
31
|
+
return this.http.get<Paged<T>>(
|
|
32
|
+
`${
|
|
33
|
+
this.baseUrl
|
|
34
|
+
}/${this.getEndpoint()}/search/${searchTerm}/${skip}/${limit}/${String(
|
|
35
|
+
sortParam
|
|
36
|
+
)}/${sortOrder}`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
saveItems(items: T[]): Observable<T[]> {
|
|
41
|
+
return this.http.post<T[]>(`${this.baseUrl}/${this.getEndpoint()}`, items);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
deleteItems(itemIds: string[]): Observable<void> {
|
|
45
|
+
return this.http.delete<void>(
|
|
46
|
+
`${this.baseUrl}/${this.getEndpoint()}?ids=${itemIds.join(',')}`
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { BaseModel } from '../models/base';
|
|
3
|
+
import { IQueryParams } from './models';
|
|
4
|
+
import { ColumnDefinition } from 'verben-ng-ui';
|
|
5
|
+
|
|
6
|
+
export abstract class BaseDataState<T extends BaseModel> {
|
|
7
|
+
protected updating$ = new BehaviorSubject<boolean>(false);
|
|
8
|
+
protected items$ = new BehaviorSubject<T[]>([]);
|
|
9
|
+
protected searchTerm$ = new BehaviorSubject<string>('');
|
|
10
|
+
protected queryParams$ = new BehaviorSubject<IQueryParams<T>>({
|
|
11
|
+
skip: 0,
|
|
12
|
+
limit: 20,
|
|
13
|
+
sortOrder: 'asc',
|
|
14
|
+
});
|
|
15
|
+
protected columns$ = new BehaviorSubject<ColumnDefinition<T>[]>([]);
|
|
16
|
+
|
|
17
|
+
isUpdating$(): Observable<boolean> {
|
|
18
|
+
return this.updating$.asObservable();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
setUpdating(isUpdating: boolean): void {
|
|
22
|
+
this.updating$.next(isUpdating);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
getItems$(): Observable<T[]> {
|
|
26
|
+
return this.items$.asObservable();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
setItems(items: T[]): void {
|
|
30
|
+
this.items$.next(items);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
appendItems(newItems: T[]): void {
|
|
34
|
+
const currentItems = this.items$.getValue();
|
|
35
|
+
this.items$.next([...currentItems, ...newItems]);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
getSearchTerm$(): Observable<string> {
|
|
39
|
+
return this.searchTerm$.asObservable();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
getSearchTermValue(): string {
|
|
43
|
+
return this.searchTerm$.getValue();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
setSearchTerm(term: string): void {
|
|
47
|
+
this.searchTerm$.next(term);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
getQueryParams$(): Observable<IQueryParams<T>> {
|
|
51
|
+
return this.queryParams$.asObservable();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
getQueryParamsValue(): IQueryParams<T> {
|
|
55
|
+
return this.queryParams$.getValue();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
updateQueryParams(params: Partial<IQueryParams<T>>): void {
|
|
59
|
+
this.queryParams$.next({ ...this.queryParams$.getValue(), ...params });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
resetPagination(): void {
|
|
63
|
+
const currentParams = this.queryParams$.getValue();
|
|
64
|
+
this.queryParams$.next({ ...currentParams, skip: 0 });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
getColumns$(): Observable<ColumnDefinition<T>[]> {
|
|
68
|
+
return this.columns$.asObservable();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
setColumns(columns: ColumnDefinition<T>[]): void {
|
|
72
|
+
this.columns$.next(columns);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// CRUD Operations
|
|
76
|
+
addItem(item: T): void {
|
|
77
|
+
const currentItems = this.items$.getValue();
|
|
78
|
+
this.items$.next([...currentItems, item]);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
updateItem(updatedItem: T): void {
|
|
82
|
+
const items = this.items$.getValue();
|
|
83
|
+
const index = items.findIndex((item) => item.Id === updatedItem.Id);
|
|
84
|
+
if (index !== -1) {
|
|
85
|
+
items[index] = updatedItem;
|
|
86
|
+
this.items$.next([...items]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
removeItem(itemId: string): void {
|
|
91
|
+
const currentItems = this.items$.getValue();
|
|
92
|
+
this.items$.next(currentItems.filter((item) => item.Id !== itemId));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// base-data.model.ts
|
|
2
|
+
export interface IBaseDataModel {
|
|
3
|
+
id: string;
|
|
4
|
+
createdAt?: Date;
|
|
5
|
+
updatedAt?: Date;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// base-query-params.model.ts
|
|
9
|
+
export interface IQueryParams<T> {
|
|
10
|
+
skip: number;
|
|
11
|
+
limit: number;
|
|
12
|
+
sortParam?: keyof T;
|
|
13
|
+
sortOrder: 'asc' | 'desc';
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.wrapper{
|
|
2
|
+
width: 100%;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
}
|
|
8
|
+
.flexWrapper{
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
.loader {
|
|
14
|
+
border: 2px solid white;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
border-top: 2px solid black;
|
|
17
|
+
width: 40px;
|
|
18
|
+
height: 40px;
|
|
19
|
+
-webkit-animation: spin 2s linear infinite;
|
|
20
|
+
animation: spin 2s linear infinite;
|
|
21
|
+
}
|
|
22
|
+
@-webkit-keyframes spin {
|
|
23
|
+
0% { -webkit-transform: rotate(0deg); }
|
|
24
|
+
100% { -webkit-transform: rotate(360deg); }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes spin {
|
|
28
|
+
0% { transform: rotate(0deg); }
|
|
29
|
+
100% { transform: rotate(360deg); }
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AuthCallbackComponent } from './auth-callback.component';
|
|
4
|
+
|
|
5
|
+
describe('AuthCallbackComponent', () => {
|
|
6
|
+
let component: AuthCallbackComponent;
|
|
7
|
+
let fixture: ComponentFixture<AuthCallbackComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [AuthCallbackComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(AuthCallbackComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'verben-auth-callback',
|
|
6
|
+
templateUrl: './auth-callback.component.html',
|
|
7
|
+
styleUrl: './auth-callback.component.css'
|
|
8
|
+
})
|
|
9
|
+
export class AuthCallbackComponent implements OnInit {
|
|
10
|
+
code: string = '';
|
|
11
|
+
previousUrl: string = '';
|
|
12
|
+
type: string = '';
|
|
13
|
+
@Input() redirectText?:string;
|
|
14
|
+
|
|
15
|
+
constructor(private router: Router,
|
|
16
|
+
private route: ActivatedRoute
|
|
17
|
+
) {}
|
|
18
|
+
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
this.getType()
|
|
21
|
+
this.handleRedirect();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getType(){
|
|
25
|
+
const data = localStorage.getItem('type')
|
|
26
|
+
if(data){
|
|
27
|
+
this.type = JSON.parse(data)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
handleRedirect() {
|
|
31
|
+
const params = new URLSearchParams(window.location.search);
|
|
32
|
+
const code = params.get('code');
|
|
33
|
+
const stateParam = params.get('state');
|
|
34
|
+
console.log({code:code, state:stateParam}, 'data');
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if (code && stateParam) {
|
|
38
|
+
try {
|
|
39
|
+
const state = JSON.parse(decodeURIComponent(stateParam));
|
|
40
|
+
// const returnTo = state.returnTo || '/';
|
|
41
|
+
const splitStateArray=state.returnTo.split('?');
|
|
42
|
+
const returnTo = splitStateArray.length>0?splitStateArray[0]:state.returnTo;
|
|
43
|
+
const queryParams: any = { code };
|
|
44
|
+
if (this.type) {
|
|
45
|
+
queryParams.type = this.type;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
this.router.navigate([returnTo], { queryParams });
|
|
49
|
+
// this.router.navigate([returnTo], { queryParams: { code } });
|
|
50
|
+
} catch (e) {
|
|
51
|
+
const msg = e
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { AuthCallbackComponent } from './auth-callback.component';
|
|
4
|
+
|
|
5
|
+
@NgModule({
|
|
6
|
+
declarations: [AuthCallbackComponent],
|
|
7
|
+
imports: [CommonModule],
|
|
8
|
+
exports: [AuthCallbackComponent]
|
|
9
|
+
})
|
|
10
|
+
export class AuthCallbackModule {}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<verbena-button
|
|
2
|
+
[text]="text"
|
|
3
|
+
[bgColor]="bgColor"
|
|
4
|
+
[textColor]="color"
|
|
5
|
+
[border]="border"
|
|
6
|
+
[borderRadius]="borderRadius"
|
|
7
|
+
[pd]="pd"
|
|
8
|
+
[width]="width"
|
|
9
|
+
[disable]="disabled"
|
|
10
|
+
[ngStyle]="{'cursor': disabled ? 'not-allowed' : 'pointer' }"
|
|
11
|
+
buttonClass="font-medium text-[22px] leading-[33px] {{buttonClass}}"
|
|
12
|
+
(click)="handleClick()"
|
|
13
|
+
></verbena-button>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ButtonComponent } from './button.component';
|
|
4
|
+
|
|
5
|
+
describe('ButtonComponent', () => {
|
|
6
|
+
let component: ButtonComponent;
|
|
7
|
+
let fixture: ComponentFixture<ButtonComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ButtonComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ButtonComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-button',
|
|
5
|
+
templateUrl: './button.component.html',
|
|
6
|
+
styleUrl: './button.component.css'
|
|
7
|
+
})
|
|
8
|
+
export class ButtonComponent{
|
|
9
|
+
@Input() text: string = '';
|
|
10
|
+
@Input() color: string = 'black';
|
|
11
|
+
@Input() border: string = '1px solid #FFE681';
|
|
12
|
+
@Input() borderRadius:string = "40px"
|
|
13
|
+
@Input() bgColor: string = '#FFE681';
|
|
14
|
+
@Input() width: string = '100%';
|
|
15
|
+
@Input() pd: string = '10px 20px';
|
|
16
|
+
@Input() buttonClass: string = '';
|
|
17
|
+
@Input() disabled: boolean = false;
|
|
18
|
+
|
|
19
|
+
@Output() buttonClick = new EventEmitter<void>();
|
|
20
|
+
|
|
21
|
+
handleClick(){
|
|
22
|
+
this.buttonClick.emit();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { VerbenaButtonModule } from 'verben-ng-ui';
|
|
4
|
+
import { ButtonComponent } from './button.component';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
@NgModule({
|
|
7
|
+
declarations: [ButtonComponent],
|
|
8
|
+
imports: [CommonModule,VerbenaButtonModule,FormsModule],
|
|
9
|
+
exports: [ButtonComponent]
|
|
10
|
+
})
|
|
11
|
+
export class ButtonModule {}
|