verben-authentication-ui 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ng-package.json +8 -0
- package/package.json +8 -14
- 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 +29 -0
- package/src/lib/components/forgot-password/forgot-password.component.html +13 -0
- package/src/lib/components/forgot-password/forgot-password.component.spec.ts +23 -0
- package/src/lib/components/forgot-password/forgot-password.component.ts +86 -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 +21 -0
- package/src/lib/components/o-auth/o-auth.component.html +60 -0
- package/src/lib/components/o-auth/o-auth.component.spec.ts +23 -0
- package/src/lib/components/o-auth/o-auth.component.ts +43 -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 +14 -0
- package/src/lib/components/otp-input/otp-input.component.spec.ts +23 -0
- package/src/lib/components/otp-input/otp-input.component.ts +73 -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 +22 -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/sign-in/sign-in.component.css +21 -0
- package/src/lib/components/sign-in/sign-in.component.html +84 -0
- package/src/lib/components/sign-in/sign-in.component.spec.ts +23 -0
- package/src/lib/components/sign-in/sign-in.component.ts +184 -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 +176 -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 +15 -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 +183 -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/helper.ts +29 -0
- package/src/lib/components/user-management/index.ts +4 -0
- package/src/lib/components/user-management/useer-management.module.ts +48 -0
- package/src/lib/components/user-management/user-management-form/use-management-form.component.ts +61 -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 +91 -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 +45 -0
- package/src/lib/components/user-management/user-management.component.css +26 -0
- package/src/lib/components/user-management/user-management.component.html +275 -0
- package/src/lib/components/user-management/user-management.component.spec.ts +23 -0
- package/src/lib/components/user-management/user-management.component.ts +380 -0
- package/src/lib/components/user-management/user-management.service.ts +42 -0
- package/src/lib/components/user-request/user-request.component.css +91 -0
- package/src/lib/components/user-request/user-request.component.html +165 -0
- package/src/lib/components/user-request/user-request.component.spec.ts +23 -0
- package/src/lib/components/user-request/user-request.component.ts +167 -0
- package/src/lib/components/user-request/user-request.module.ts +18 -0
- package/src/lib/components/user-request-approval/access-request.columns.ts +26 -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 +152 -0
- package/src/lib/components/user-request-approval/helper.ts +39 -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 +87 -0
- package/src/lib/components/user-request-approval/states/user-access-request.state.ts +65 -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 +7 -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 +1 -0
- package/src/lib/components/user-request-approval/user-request-approval.component.html +218 -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 +301 -0
- package/src/lib/components/user-request-approval/user-request-approval.module.ts +52 -0
- package/src/lib/components/user-request-approval/user-request-approval.service.spec.ts +16 -0
- package/src/lib/components/user-request-approval/user-request-approval.service.ts +58 -0
- package/src/lib/components/user-request-approval/user-request-form/use-request-form.component.ts +66 -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 +97 -0
- package/src/lib/components/user-request-approval/user-request-form/user-request-form.component.spec.ts +23 -0
- package/src/lib/models/ErrorResponse.ts +7 -0
- package/src/lib/models/PasswordRequestParam.ts +5 -0
- package/src/lib/models/ResponseKeyValue.ts +5 -0
- package/src/lib/models/UserRequest.ts +28 -0
- package/src/lib/models/auth-mechanism.ts +14 -0
- package/src/lib/models/base.ts +11 -0
- package/src/lib/models/log-in.ts +7 -0
- package/{lib/models/mainUser.d.ts → src/lib/models/mainUser.ts} +3 -2
- package/src/lib/models/object-state.ts +6 -0
- package/{lib/models/otpValue.d.ts → src/lib/models/otpValue.ts} +3 -1
- package/src/lib/models/paged.ts +9 -0
- package/src/lib/models/query-params.ts +7 -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} +4 -3
- package/src/lib/models/user.ts +24 -0
- package/src/lib/services/environment.service.spec.ts +16 -0
- package/src/lib/services/environment.service.ts +23 -0
- package/src/lib/services/http-web-request.service.spec.ts +16 -0
- package/src/lib/services/http-web-request.service.ts +101 -0
- package/src/lib/services/util.service.spec.ts +16 -0
- package/src/lib/services/util.service.ts +28 -0
- package/{public-api.d.ts → src/public-api.ts} +21 -0
- package/src/styles.css +96 -0
- package/src/theme/tailwind-setup.css +3 -0
- package/src/theme/tailwind.css +980 -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/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 -86
- 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 -25
- package/esm2022/lib/components/o-auth/o-auth.module.mjs +0 -19
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +0 -75
- 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 -107
- package/esm2022/lib/components/reset-password/reset-password.module.mjs +0 -34
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +0 -214
- package/esm2022/lib/components/sign-in/sign-in.module.mjs +0 -24
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +0 -223
- 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 -14
- 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 -201
- 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/helper.mjs +0 -26
- package/esm2022/lib/components/user-management/useer-management.module.mjs +0 -68
- package/esm2022/lib/components/user-management/user-management-form/use-management-form.component.mjs +0 -57
- package/esm2022/lib/components/user-management/user-management.columns.mjs +0 -43
- package/esm2022/lib/components/user-management/user-management.component.mjs +0 -323
- package/esm2022/lib/components/user-request/user-request.component.mjs +0 -206
- package/esm2022/lib/components/user-request/user-request.module.mjs +0 -34
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +0 -24
- 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 -128
- package/esm2022/lib/components/user-request-approval/helper.mjs +0 -35
- package/esm2022/lib/components/user-request-approval/services/user-access-request.service.mjs +0 -72
- package/esm2022/lib/components/user-request-approval/states/user-access-request.state.mjs +0 -59
- 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 -251
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +0 -77
- package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +0 -32
- package/esm2022/lib/components/user-request-approval/user-request-form/use-request-form.component.mjs +0 -64
- package/esm2022/lib/models/ErrorResponse.mjs +0 -11
- package/esm2022/lib/models/PasswordRequestParam.mjs +0 -2
- package/esm2022/lib/models/ResponseKeyValue.mjs +0 -2
- package/esm2022/lib/models/UserRequest.mjs +0 -2
- package/esm2022/lib/models/base.mjs +0 -2
- package/esm2022/lib/models/log-in.mjs +0 -2
- package/esm2022/lib/models/mainUser.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/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/services/environment.service.mjs +0 -26
- package/esm2022/lib/services/http-web-request.service.mjs +0 -83
- package/esm2022/lib/services/util.service.mjs +0 -32
- package/esm2022/public-api.mjs +0 -43
- package/esm2022/verben-authentication-ui.mjs +0 -5
- package/fesm2022/verben-authentication-ui.mjs +0 -3545
- package/fesm2022/verben-authentication-ui.mjs.map +0 -1
- package/index.d.ts +0 -5
- 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 -28
- 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 -10
- package/lib/components/o-auth/o-auth.module.d.ts +0 -9
- package/lib/components/otp-input/otp-input.component.d.ts +0 -20
- 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/sign-in/sign-in.component.d.ts +0 -77
- package/lib/components/sign-in/sign-in.module.d.ts +0 -13
- package/lib/components/sign-up/sign-up.component.d.ts +0 -66
- 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 -65
- 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/helper.d.ts +0 -2
- package/lib/components/user-management/useer-management.module.d.ts +0 -11
- package/lib/components/user-management/user-management-form/use-management-form.component.d.ts +0 -20
- package/lib/components/user-management/user-management.columns.d.ts +0 -3
- package/lib/components/user-management/user-management.component.d.ts +0 -60
- package/lib/components/user-request/user-request.component.d.ts +0 -60
- package/lib/components/user-request/user-request.module.d.ts +0 -10
- 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 -23
- package/lib/components/user-request-approval/helper.d.ts +0 -6
- package/lib/components/user-request-approval/services/user-access-request.service.d.ts +0 -50
- package/lib/components/user-request-approval/states/user-access-request.state.d.ts +0 -21
- 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 -59
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +0 -12
- package/lib/components/user-request-approval/user-request-approval.service.d.ts +0 -18
- package/lib/components/user-request-approval/user-request-form/use-request-form.component.d.ts +0 -21
- package/lib/models/ErrorResponse.d.ts +0 -6
- package/lib/models/PasswordRequestParam.d.ts +0 -5
- package/lib/models/ResponseKeyValue.d.ts +0 -5
- package/lib/models/UserRequest.d.ts +0 -24
- package/lib/models/base.d.ts +0 -10
- package/lib/models/log-in.d.ts +0 -7
- 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 -7
- package/lib/models/request-status.d.ts +0 -3
- 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 -23
- package/lib/services/environment.service.d.ts +0 -16
- package/lib/services/http-web-request.service.d.ts +0 -23
- package/lib/services/util.service.d.ts +0 -8
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ObjectState } from "./object-state";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
export interface MainUser {
|
|
3
4
|
Code: string;
|
|
4
5
|
TenantId: string;
|
|
5
6
|
Id: string;
|
|
@@ -16,4 +17,4 @@ export interface MainUser {
|
|
|
16
17
|
CreatedAt: Date;
|
|
17
18
|
UpdatedAt: Date;
|
|
18
19
|
DataState: ObjectState;
|
|
19
|
-
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseModel } from './base';
|
|
2
|
+
import { ObjectState } from './object-state';
|
|
3
|
+
|
|
4
|
+
export abstract class ResourceModel<T extends BaseModel> implements BaseModel {
|
|
5
|
+
public Id: string;
|
|
6
|
+
public CreatedAt: Date;
|
|
7
|
+
public UpdatedAt: Date;
|
|
8
|
+
public State: ObjectState;
|
|
9
|
+
public Tenant: string;
|
|
10
|
+
public id: string | number;
|
|
11
|
+
|
|
12
|
+
constructor(model?: Partial<T>) {
|
|
13
|
+
if (model) {
|
|
14
|
+
Object.assign(this, model);
|
|
15
|
+
}
|
|
16
|
+
this.Id = model?.Id || '';
|
|
17
|
+
this.CreatedAt = model?.CreatedAt ? new Date(model.CreatedAt) : new Date();
|
|
18
|
+
this.UpdatedAt = model?.UpdatedAt ? new Date(model.UpdatedAt) : new Date();
|
|
19
|
+
this.State = model?.State ?? ObjectState.New;
|
|
20
|
+
this.Tenant = model?.Tenant ?? '';
|
|
21
|
+
this.id = model?.Id ?? Math.random();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public toJson(): any {
|
|
25
|
+
return JSON.parse(JSON.stringify(this));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { User } from './user';
|
|
2
2
|
import { UserAccessRequestStatus } from './user-access-request-status';
|
|
3
|
+
|
|
3
4
|
export interface UserAccessRequest extends User {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
RequestStatus: UserAccessRequestStatus;
|
|
6
|
+
ActionBy?: string;
|
|
7
|
+
Comment?: string;
|
|
7
8
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseModel } from './base';
|
|
2
|
+
|
|
3
|
+
export interface User extends BaseModel {
|
|
4
|
+
Password: string;
|
|
5
|
+
OldPassword?: string;
|
|
6
|
+
PhoneNumber?: string;
|
|
7
|
+
FirstName: string;
|
|
8
|
+
LastName: string;
|
|
9
|
+
OtherName?: string;
|
|
10
|
+
MailAddress: string;
|
|
11
|
+
Token?: string;
|
|
12
|
+
ExpireOn: Date;
|
|
13
|
+
IsSeeded: boolean;
|
|
14
|
+
RoleID?: string;
|
|
15
|
+
OTP?: string;
|
|
16
|
+
Department?: string;
|
|
17
|
+
Faculty?: string;
|
|
18
|
+
OTPExpireOn: Date;
|
|
19
|
+
Tenants: string[];
|
|
20
|
+
DepartmentName?: string;
|
|
21
|
+
Address?: string;
|
|
22
|
+
Role?: string[];
|
|
23
|
+
Status?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { EnvironmentService } from './environment.service';
|
|
4
|
+
|
|
5
|
+
describe('EnvironmentService', () => {
|
|
6
|
+
let service: EnvironmentService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(EnvironmentService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// In your library's services/environment.service.ts
|
|
2
|
+
import { Injectable, InjectionToken, Inject } from '@angular/core';
|
|
3
|
+
// import { ENVIRONMENT } from '../models/ENVIRONMENT_TOKEN';
|
|
4
|
+
|
|
5
|
+
export const ENVIRONMENT = new InjectionToken<Environment>('environment');
|
|
6
|
+
|
|
7
|
+
export interface Environment {
|
|
8
|
+
production: boolean;
|
|
9
|
+
AuthenticationAPI: string;
|
|
10
|
+
APIKey:string,
|
|
11
|
+
Secret:string,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Injectable({
|
|
15
|
+
providedIn: 'root',
|
|
16
|
+
})
|
|
17
|
+
export class EnvironmentService {
|
|
18
|
+
constructor(@Inject(ENVIRONMENT) private env: Environment) {}
|
|
19
|
+
|
|
20
|
+
get environment(): Environment {
|
|
21
|
+
return this.env;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { HttpWebRequestService } from './http-web-request.service';
|
|
4
|
+
|
|
5
|
+
describe('HttpWebRequestService', () => {
|
|
6
|
+
let service: HttpWebRequestService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(HttpWebRequestService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { ErrorResponse } from '../models/ErrorResponse';
|
|
5
|
+
import { EnvironmentService } from './environment.service';
|
|
6
|
+
import { NotificationService } from 'verben-ng-ui';
|
|
7
|
+
|
|
8
|
+
@Injectable({
|
|
9
|
+
providedIn: 'root',
|
|
10
|
+
})
|
|
11
|
+
export class HttpWebRequestService {
|
|
12
|
+
isProd: boolean;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
private http: HttpClient,
|
|
16
|
+
private envSvc: EnvironmentService,
|
|
17
|
+
private notificationService: NotificationService
|
|
18
|
+
) {
|
|
19
|
+
this.isProd = this.envSvc.environment.production;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private buildHeaders(){
|
|
23
|
+
return {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private buildUrl(url: string, baseUrl: string): string {
|
|
29
|
+
return `${baseUrl}/${url}`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private handleError(err: any): ErrorResponse {
|
|
33
|
+
|
|
34
|
+
const msg =
|
|
35
|
+
err.error?.ErrorMsg ||
|
|
36
|
+
(err.error?.errors?.values as string[])?.toString() ||
|
|
37
|
+
`${err.status} ${err.statusText}`;
|
|
38
|
+
|
|
39
|
+
this.notificationService.error(msg, { timeout: 3000 });
|
|
40
|
+
return new ErrorResponse(msg);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private request<T>(
|
|
44
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE',
|
|
45
|
+
url: string,
|
|
46
|
+
body?: any,
|
|
47
|
+
baseUrl: string = this.envSvc.environment.AuthenticationAPI,
|
|
48
|
+
): Promise<T> | Observable<T> {
|
|
49
|
+
const options = {
|
|
50
|
+
headers: this.buildHeaders(),
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const requestUrl = this.buildUrl(url, baseUrl);
|
|
54
|
+
|
|
55
|
+
switch (method) {
|
|
56
|
+
case 'GET':
|
|
57
|
+
return new Promise((resolve) =>
|
|
58
|
+
this.http.get<T>(requestUrl, options).subscribe({
|
|
59
|
+
next: resolve,
|
|
60
|
+
error: (err) => resolve(this.handleError(err) as T),
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
case 'POST':
|
|
64
|
+
return new Promise((resolve) =>
|
|
65
|
+
this.http.post<T>(requestUrl, body, options).subscribe({
|
|
66
|
+
next: resolve,
|
|
67
|
+
error: (err) => resolve(this.handleError(err) as T),
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
case 'PUT':
|
|
71
|
+
return this.http.put<T>(requestUrl, body, options);
|
|
72
|
+
case 'DELETE':
|
|
73
|
+
return this.http.delete<T>(requestUrl, options);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
get<T>(url: string, baseUrl?: string): Promise<T> {
|
|
78
|
+
return this.request('GET', url, undefined, baseUrl) as Promise<T>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
post<T>(url: string, body: any, baseUrl?: string): Promise<T> {
|
|
82
|
+
return this.request('POST', url, JSON.stringify(body), baseUrl) as Promise<T>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
postFile<T>(url: string, formData: FormData, baseUrl?: string): Promise<T> {
|
|
86
|
+
return new Promise((resolve) =>
|
|
87
|
+
this.http.post<T>(this.buildUrl(url, baseUrl || this.envSvc.environment.AuthenticationAPI), formData).subscribe({
|
|
88
|
+
next: resolve,
|
|
89
|
+
error: (err) => resolve(this.handleError(err) as T),
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
put<T>(url: string, body: any, baseUrl?: string): Observable<T> {
|
|
95
|
+
return this.request('PUT', url, body, baseUrl) as Observable<T>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
delete<T>(url: string, baseUrl?: string): Observable<T> {
|
|
99
|
+
return this.request('DELETE', url, undefined, baseUrl) as Observable<T>;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { UtilService } from './util.service';
|
|
4
|
+
|
|
5
|
+
describe('UtilService', () => {
|
|
6
|
+
let service: UtilService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(UtilService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Inject,
|
|
3
|
+
Injectable,
|
|
4
|
+
InjectionToken,
|
|
5
|
+
Optional,
|
|
6
|
+
SkipSelf,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { UTIL_SERVICE } from 'verben-ng-ui';
|
|
9
|
+
|
|
10
|
+
@Injectable({
|
|
11
|
+
providedIn: 'root',
|
|
12
|
+
})
|
|
13
|
+
export class UtilService {
|
|
14
|
+
constructor(
|
|
15
|
+
@Optional()
|
|
16
|
+
@Inject(UTIL_SERVICE)
|
|
17
|
+
private parentUtilService: any
|
|
18
|
+
) {}
|
|
19
|
+
|
|
20
|
+
sendBI(state: boolean): void {
|
|
21
|
+
console.log({ Service: this.parentUtilService });
|
|
22
|
+
if (this.parentUtilService && this.parentUtilService.sendBI) {
|
|
23
|
+
this.parentUtilService.sendBI(state);
|
|
24
|
+
} else {
|
|
25
|
+
console.warn('Util Service is not provided');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,29 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of verben-ng-ui
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// export * from './lib/verben-ng-ui.service';
|
|
6
|
+
// export * from './lib/verben-ng-ui.component';
|
|
7
|
+
|
|
8
|
+
// Exporting modules
|
|
9
|
+
|
|
1
10
|
export * from './lib/components/reset-password/reset-password.component';
|
|
2
11
|
export * from './lib/components/reset-password/reset-password.module';
|
|
3
12
|
export * from './lib/components/reset-password/ResetPasswordData';
|
|
13
|
+
//user-request-lib
|
|
4
14
|
export * from './lib/components/user-request/user-request.component';
|
|
5
15
|
export * from './lib/components/user-request/user-request.module';
|
|
6
16
|
export * from './lib/models/UserRequest';
|
|
17
|
+
//mail-validation
|
|
7
18
|
export * from './lib/components/mail-validation/mail-validation.component';
|
|
8
19
|
export * from './lib/components/mail-validation/mail-validation.module';
|
|
20
|
+
|
|
21
|
+
//sign up
|
|
9
22
|
export * from './lib/components/sign-up/sign-up.component';
|
|
10
23
|
export * from './lib/components/sign-up/sign-up.module';
|
|
24
|
+
//sign in
|
|
11
25
|
export * from './lib/components/sign-in/sign-in.module';
|
|
12
26
|
export * from './lib/components/sign-in/sign-in.component';
|
|
27
|
+
//Otp
|
|
13
28
|
export * from './lib/components/two-factor-auth-otp/two-factor-auth-otp.module';
|
|
14
29
|
export * from './lib/components/two-factor-auth-otp/two-factor-auth-otp.component';
|
|
30
|
+
//2FA
|
|
15
31
|
export * from './lib/components/two-factor-auth-setup/two-factor-auth-setup.module';
|
|
16
32
|
export * from './lib/components/two-factor-auth-setup/two-factor-auth-setup.component';
|
|
33
|
+
//sign up
|
|
17
34
|
export * from './lib/components/mail/mail.module';
|
|
18
35
|
export * from './lib/components/mail/mail.component';
|
|
36
|
+
|
|
19
37
|
export * from './lib/components/forgot-password/forgot-password.component';
|
|
20
38
|
export * from './lib/components/forgot-password/forgot-password.module';
|
|
21
39
|
export * from './lib/components/forgot-password/ForgotPasswordData';
|
|
22
40
|
export * from './lib/components/sso/sso.component';
|
|
23
41
|
export * from './lib/components/sso/sso.module';
|
|
42
|
+
|
|
24
43
|
export * from './lib/components/user-request-approval/user-request-approval.module';
|
|
25
44
|
export * from './lib/components/user-request-approval/user-request-approval.component';
|
|
45
|
+
|
|
26
46
|
export * from './lib/components/user-management/useer-management.module';
|
|
27
47
|
export * from './lib/components/user-management/user-management.component';
|
|
28
48
|
export * from './lib/components/user-request-approval/user-request-approval.service';
|
|
29
49
|
export * from './lib/services/environment.service';
|
|
50
|
+
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
* {
|
|
2
|
+
font-family: sans-serif;
|
|
3
|
+
font-size: 16px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.flex {
|
|
7
|
+
display: flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.flex-col {
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.font-bold {
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.justify-center {
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.justify-end {
|
|
23
|
+
justify-content: end;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.align-items-center {
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.grid {
|
|
31
|
+
display: grid;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.verben-error-message {
|
|
35
|
+
font-size: 0.8rem;
|
|
36
|
+
color: red;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.verben-input {
|
|
40
|
+
border: 1px solid #cbd5e1;
|
|
41
|
+
outline: none;
|
|
42
|
+
border-radius: 5px;
|
|
43
|
+
color: #334155;
|
|
44
|
+
transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, outline-color 0.2s;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.verben-input::placeholder {
|
|
48
|
+
color: #64748b;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.verben-input:hover {
|
|
52
|
+
border: 1px solid #697e97
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.verben-input.disabled {
|
|
56
|
+
opacity: 1;
|
|
57
|
+
background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3));
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
color: #64748b;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.verben-input:disabled {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3));
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
color: #64748b;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.verben-input.focused {
|
|
70
|
+
border-color: #3b82f6;
|
|
71
|
+
outline: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.verben-input:focus {
|
|
75
|
+
border-color: #3b82f6;
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.verben-input.ng-invalid {
|
|
80
|
+
border-color: red;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.verben-button {
|
|
84
|
+
padding: 8px 15px;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
border: none;
|
|
87
|
+
text-align: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.verben-button.primary {
|
|
91
|
+
background-color: rgba(255, 230, 129, 1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.verben-button.secondary {
|
|
95
|
+
background-color: rgba(217, 217, 217, 0.25);
|
|
96
|
+
}
|