@codex-ts/core-lib 1.1.5 → 1.1.6
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/README.md +362 -33
- package/fesm2022/codex-ts-core-lib.mjs +4167 -2737
- package/fesm2022/codex-ts-core-lib.mjs.map +1 -1
- package/lib/components/base-form.component.d.ts +3 -4
- package/lib/components/base-page.component.d.ts +2 -1
- package/lib/components/base-tabbed-form.component.d.ts +3 -4
- package/lib/components/base-table.component.d.ts +1 -0
- package/lib/components/base-task-dashboard.component.d.ts +16 -15
- package/lib/components/base-task-details.component.d.ts +4 -5
- package/lib/components/formly/field.interface.d.ts +34 -0
- package/lib/components/formly/form-field.wrapper.d.ts +6 -6
- package/lib/components/formly/formly.constants.d.ts +1 -0
- package/lib/components/formly/primeng-formly.module.d.ts +19 -0
- package/lib/components/formly/types/file-upload.type.d.ts +58 -0
- package/lib/components/formly/types/radio.type.d.ts +5 -0
- package/lib/components/formly/types/text-input.type.d.ts +10 -1
- package/lib/components/keycloak-error-banner/keycloak-error-page.component.d.ts +6 -0
- package/lib/components/not-found/not-found.component.d.ts +11 -0
- package/lib/components/unauthorized/unauthorized.component.d.ts +12 -0
- package/lib/keycloak/keycloak-service.token.d.ts +3 -0
- package/lib/keycloak/keycloak.guard.d.ts +1 -1
- package/lib/keycloak/keycloak.interface.d.ts +21 -0
- package/lib/keycloak/keycloak.service.d.ts +24 -3
- package/lib/models/base-task.model.d.ts +3 -6
- package/lib/models/base.comment.model.d.ts +5 -0
- package/lib/models/base.entity.model.d.ts +39 -0
- package/lib/models/base.model.d.ts +0 -44
- package/lib/models/department.interface.d.ts +4 -0
- package/lib/models/pagination/filter-criteria.interface.d.ts +3 -0
- package/lib/models/pagination/table-column-datatype.enum.d.ts +6 -0
- package/lib/models/reference-dto.interface.d.ts +5 -0
- package/lib/models/workflow.model.d.ts +18 -0
- package/lib/services/base-entity.service.d.ts +80 -0
- package/lib/services/base-error.service.d.ts +24 -0
- package/lib/services/base-task.service.d.ts +14 -19
- package/lib/services/entity-registry.service.d.ts +21 -0
- package/lib/services/entity-service.interface.d.ts +22 -0
- package/lib/services/form.service.d.ts +7 -8
- package/lib/services/http-utility.service.d.ts +15 -0
- package/lib/services/master-data-service.interface.d.ts +5 -0
- package/lib/services/task-entity-service.interface.d.ts +21 -0
- package/lib/validators/common-validators.d.ts +61 -0
- package/package.json +2 -2
- package/public-api.d.ts +51 -33
- package/lib/services/base-crud.service.d.ts +0 -36
- package/lib/services/entity.service.d.ts +0 -9
|
@@ -4,16 +4,15 @@ import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { AppConstants } from '../constants/app.constants';
|
|
6
6
|
import { ComponentContext } from '../enums/component-context.enum';
|
|
7
|
-
import { EntityService } from '../services/entity.
|
|
7
|
+
import { EntityService } from '../services/entity-service.interface';
|
|
8
8
|
import { FormlyConfigService } from '../services/formly-config.service';
|
|
9
9
|
import { NotificationService } from '../services/notification.service';
|
|
10
10
|
import { UtilsService } from '../services/utils.service';
|
|
11
|
+
import { BaseModel } from '../models/base.model';
|
|
11
12
|
import { FormComponentState } from '../states/form-component.state';
|
|
12
13
|
import { BasePageComponent } from './base-page.component';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
|
-
export declare abstract class BaseFormComponent<T extends {
|
|
15
|
-
uuid: string;
|
|
16
|
-
}> extends BasePageComponent implements OnInit, OnDestroy {
|
|
15
|
+
export declare abstract class BaseFormComponent<T extends BaseModel> extends BasePageComponent implements OnInit, OnDestroy {
|
|
17
16
|
protected route: ActivatedRoute;
|
|
18
17
|
protected router: Router;
|
|
19
18
|
protected notificationService: NotificationService;
|
|
@@ -3,7 +3,8 @@ import { NotificationService } from '../services/notification.service';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Base component for all page components in the application.
|
|
6
|
-
* Provides common functionality like loading state
|
|
6
|
+
* Provides common functionality like loading state, message display,
|
|
7
|
+
* and role-based access control.
|
|
7
8
|
*/
|
|
8
9
|
export declare abstract class BasePageComponent {
|
|
9
10
|
protected utilsService: UtilsService;
|
|
@@ -3,12 +3,11 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|
|
3
3
|
import { BasePageComponent } from './base-page.component';
|
|
4
4
|
import { UtilsService } from '../services/utils.service';
|
|
5
5
|
import { NotificationService } from '../services/notification.service';
|
|
6
|
-
import { EntityService } from '../services/entity.
|
|
6
|
+
import { EntityService } from '../services/entity-service.interface';
|
|
7
7
|
import { TabConfig, TabbedFormState } from '../states/tabbed-form.state';
|
|
8
|
+
import { BaseModel } from '../models/base.model';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare abstract class BaseTabbedFormComponent<T extends {
|
|
10
|
-
uuid: string;
|
|
11
|
-
}> extends BasePageComponent implements OnInit, OnDestroy {
|
|
10
|
+
export declare abstract class BaseTabbedFormComponent<T extends BaseModel> extends BasePageComponent implements OnInit, OnDestroy {
|
|
12
11
|
protected route: ActivatedRoute;
|
|
13
12
|
protected router: Router;
|
|
14
13
|
protected notificationService: NotificationService;
|
|
@@ -22,6 +22,7 @@ export declare abstract class BaseTableComponent<T extends {
|
|
|
22
22
|
rows: number;
|
|
23
23
|
totalRecords: number;
|
|
24
24
|
filters: FilterCriteria[];
|
|
25
|
+
protected columns: any[];
|
|
25
26
|
protected subscriptions: Subscription[];
|
|
26
27
|
constructor(utilsService: UtilsService, notificationService: NotificationService);
|
|
27
28
|
/**
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Router } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
2
|
import { ConfirmationService } from 'primeng/api';
|
|
4
3
|
import { BaseTableComponent } from './base-table.component';
|
|
5
4
|
import { NotificationService } from '../services/notification.service';
|
|
6
5
|
import { UtilsService } from '../services/utils.service';
|
|
6
|
+
import { TaskEntityService } from '../services/task-entity-service.interface';
|
|
7
|
+
import { BaseTask } from '../models/base-task.model';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* Base component for all task dashboard components in the application.
|
|
10
11
|
* Provides common functionality for task management operations while
|
|
11
12
|
* inheriting table functionality from BaseTableComponent.
|
|
12
13
|
*/
|
|
13
|
-
export declare abstract class BaseTaskDashboardComponent<T extends {
|
|
14
|
-
|
|
15
|
-
}> extends BaseTableComponent<T> {
|
|
14
|
+
export declare abstract class BaseTaskDashboardComponent<T extends BaseTask, S extends string = string, E extends string = string> extends BaseTableComponent<T> {
|
|
15
|
+
protected entityService: TaskEntityService<T, S, E>;
|
|
16
16
|
protected router: Router;
|
|
17
17
|
protected notificationService: NotificationService;
|
|
18
18
|
protected utilsService: UtilsService;
|
|
@@ -25,11 +25,19 @@ export declare abstract class BaseTaskDashboardComponent<T extends {
|
|
|
25
25
|
start: Date | null;
|
|
26
26
|
end: Date | null;
|
|
27
27
|
};
|
|
28
|
-
constructor(router: Router, notificationService: NotificationService, utilsService: UtilsService, confirmationService: ConfirmationService);
|
|
28
|
+
constructor(entityService: TaskEntityService<T, S, E>, router: Router, notificationService: NotificationService, utilsService: UtilsService, confirmationService: ConfirmationService);
|
|
29
29
|
/**
|
|
30
|
-
* Initialize the component and
|
|
30
|
+
* Initialize the component and handle loading state subscription
|
|
31
31
|
*/
|
|
32
32
|
ngOnInit(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Direct loadData call, no debounce or skip logic
|
|
35
|
+
*/
|
|
36
|
+
loadData(event?: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* Cleanup resources
|
|
39
|
+
*/
|
|
40
|
+
ngOnDestroy(): void;
|
|
33
41
|
/**
|
|
34
42
|
* Load all reference data needed for the task dashboard
|
|
35
43
|
*/
|
|
@@ -68,13 +76,6 @@ export declare abstract class BaseTaskDashboardComponent<T extends {
|
|
|
68
76
|
* @returns true if valid, false otherwise
|
|
69
77
|
*/
|
|
70
78
|
protected validateItemUuid(item: T, action: string): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Override the getEntityService to include task-specific operations
|
|
73
|
-
*/
|
|
74
|
-
protected abstract getEntityService(): {
|
|
75
|
-
getAll: (pageRequest?: any) => Observable<any>;
|
|
76
|
-
delete: (uuid: string) => Observable<any>;
|
|
77
|
-
};
|
|
78
79
|
/**
|
|
79
80
|
* Get the entity name for display in messages
|
|
80
81
|
*/
|
|
@@ -83,6 +84,6 @@ export declare abstract class BaseTaskDashboardComponent<T extends {
|
|
|
83
84
|
* Get the route to the entity form
|
|
84
85
|
*/
|
|
85
86
|
protected abstract getFormRoute(): string;
|
|
86
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseTaskDashboardComponent<any>, never>;
|
|
87
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseTaskDashboardComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseTaskDashboardComponent<any, any, any>, never>;
|
|
88
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseTaskDashboardComponent<any, any, any>, never, never, {}, {}, never, never, true, never>;
|
|
88
89
|
}
|
|
@@ -5,18 +5,17 @@ import { BasePageComponent } from './base-page.component';
|
|
|
5
5
|
import { UtilsService } from '../services/utils.service';
|
|
6
6
|
import { NotificationService } from '../services/notification.service';
|
|
7
7
|
import { FormlyConfigService } from '../services/formly-config.service';
|
|
8
|
-
import { EntityService } from '../services/entity.
|
|
8
|
+
import { EntityService } from '../services/entity-service.interface';
|
|
9
9
|
import { FormService } from '../services/form.service';
|
|
10
10
|
import { ComponentContext } from '../enums/component-context.enum';
|
|
11
|
+
import { BaseModel } from '../models/base.model';
|
|
11
12
|
import { FormComponentState } from '../states/form-component.state';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
/**
|
|
14
15
|
* Base component for all task detail components in the application.
|
|
15
16
|
* Uses composition with FormService for form functionality.
|
|
16
17
|
*/
|
|
17
|
-
export declare abstract class BaseTaskDetailsComponent<T extends {
|
|
18
|
-
uuid: string;
|
|
19
|
-
}> extends BasePageComponent implements OnInit, OnDestroy {
|
|
18
|
+
export declare abstract class BaseTaskDetailsComponent<T extends BaseModel> extends BasePageComponent implements OnInit, OnDestroy {
|
|
20
19
|
protected route: ActivatedRoute;
|
|
21
20
|
protected router: Router;
|
|
22
21
|
protected notificationService: NotificationService;
|
|
@@ -30,9 +29,9 @@ export declare abstract class BaseTaskDetailsComponent<T extends {
|
|
|
30
29
|
ngOnInit(): void;
|
|
31
30
|
private initializeFromRoute;
|
|
32
31
|
protected loadData(uuid: string): void;
|
|
32
|
+
private syncWithFormService;
|
|
33
33
|
protected onSubmit(): void;
|
|
34
34
|
protected navigateAfterSubmit(): void;
|
|
35
|
-
private onInitialized;
|
|
36
35
|
private handleInitError;
|
|
37
36
|
protected handleLoadError(error: any): void;
|
|
38
37
|
protected handleSubmitError(error: any): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface FormlyFieldProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
description?: string;
|
|
7
|
+
validation?: {
|
|
8
|
+
messages?: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
rules?: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
attributes?: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
appearance?: 'outlined' | 'filled';
|
|
19
|
+
size?: 'small' | 'normal' | 'large';
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
textTransform?: 'uppercase' | 'lowercase' | 'capitalize' | 'none';
|
|
22
|
+
}
|
|
23
|
+
export interface FormlyValidationMessages {
|
|
24
|
+
required?: string;
|
|
25
|
+
minlength?: string;
|
|
26
|
+
maxlength?: string;
|
|
27
|
+
min?: string;
|
|
28
|
+
max?: string;
|
|
29
|
+
email?: string;
|
|
30
|
+
pattern?: string;
|
|
31
|
+
panCard?: string;
|
|
32
|
+
mobileNumber?: string;
|
|
33
|
+
[key: string]: string | undefined;
|
|
34
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';
|
|
1
|
+
import { FieldWrapper, FormlyFieldConfig, FormlyConfig } from '@ngx-formly/core';
|
|
2
|
+
import { FormlyValidationMessages } from './field.interface';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
interface FormlyValidationMessage {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
}
|
|
6
4
|
interface FormlyFieldProps {
|
|
7
5
|
label?: string;
|
|
8
6
|
required?: boolean;
|
|
9
7
|
tooltip?: string;
|
|
10
8
|
description?: string;
|
|
11
9
|
validation?: {
|
|
12
|
-
messages?:
|
|
10
|
+
messages?: FormlyValidationMessages;
|
|
13
11
|
};
|
|
14
12
|
}
|
|
15
13
|
export declare class FormFieldWrapper extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {
|
|
14
|
+
private formlyConfig;
|
|
15
|
+
constructor(formlyConfig: FormlyConfig);
|
|
16
16
|
get errorMessage(): string;
|
|
17
17
|
get showError(): boolean;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldWrapper,
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldWrapper, [{ optional: true; }]>;
|
|
19
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldWrapper, "formly-wrapper-form-field", never, {}, {}, never, never, true, never>;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "@angular/forms";
|
|
4
|
+
import * as i3 from "primeng/inputtext";
|
|
5
|
+
import * as i4 from "primeng/dropdown";
|
|
6
|
+
import * as i5 from "primeng/datepicker";
|
|
7
|
+
import * as i6 from "primeng/checkbox";
|
|
8
|
+
import * as i7 from "primeng/radiobutton";
|
|
9
|
+
import * as i8 from "primeng/multiselect";
|
|
10
|
+
import * as i9 from "primeng/fileupload";
|
|
11
|
+
import * as i10 from "primeng/toast";
|
|
12
|
+
import * as i11 from "primeng/button";
|
|
13
|
+
import * as i12 from "primeng/progressbar";
|
|
14
|
+
import * as i13 from "@ngx-formly/core";
|
|
15
|
+
export declare class PrimeNGFormlyModule {
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrimeNGFormlyModule, never>;
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PrimeNGFormlyModule, never, [typeof i1.CommonModule, typeof i2.ReactiveFormsModule, typeof i3.InputTextModule, typeof i4.DropdownModule, typeof i5.DatePickerModule, typeof i6.CheckboxModule, typeof i7.RadioButtonModule, typeof i8.MultiSelectModule, typeof i9.FileUploadModule, typeof i10.ToastModule, typeof i11.ButtonModule, typeof i12.ProgressBarModule, typeof i13.FormlyModule], [typeof i13.FormlyModule]>;
|
|
18
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PrimeNGFormlyModule>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FieldType } from '@ngx-formly/core';
|
|
2
|
+
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* File upload formly field type component
|
|
6
|
+
*
|
|
7
|
+
* Can be used for:
|
|
8
|
+
* 1. Simple file uploads with customizable UI
|
|
9
|
+
* 2. Document management with list, download, and delete functionality
|
|
10
|
+
*/
|
|
11
|
+
export declare class FileUploadType extends FieldType {
|
|
12
|
+
private confirmationService;
|
|
13
|
+
private messageService;
|
|
14
|
+
uploading: boolean;
|
|
15
|
+
progress: number;
|
|
16
|
+
selectedFiles: File[];
|
|
17
|
+
get allDocuments(): any[];
|
|
18
|
+
constructor(confirmationService: ConfirmationService, messageService: MessageService);
|
|
19
|
+
onFileSelect(event: Event): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get selected files for upload on form submit
|
|
22
|
+
*/
|
|
23
|
+
getSelectedFiles(): File[];
|
|
24
|
+
defaultOptions: {
|
|
25
|
+
props: {
|
|
26
|
+
multiple: boolean;
|
|
27
|
+
accept: string;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
chooseLabel: string;
|
|
30
|
+
buttonSize: string;
|
|
31
|
+
documentList: any[] | undefined;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
onDownloadDocument: ((document: any) => void) | undefined;
|
|
34
|
+
onDeleteDocument: ((document: any) => void) | undefined;
|
|
35
|
+
onRefreshDocuments: (() => void) | undefined;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
formatFileSize(bytes: number): string;
|
|
39
|
+
/**
|
|
40
|
+
* Download a document
|
|
41
|
+
* Uses the onDownloadDocument callback from props if provided
|
|
42
|
+
*/
|
|
43
|
+
downloadDocument(document: any): void;
|
|
44
|
+
/**
|
|
45
|
+
* Confirm document deletion with confirmation dialog
|
|
46
|
+
*/
|
|
47
|
+
confirmDeleteDocument(document: any): void;
|
|
48
|
+
/**
|
|
49
|
+
* Remove document handler for selected files
|
|
50
|
+
*/
|
|
51
|
+
removeDocument(document: any, rowIndex: number): void;
|
|
52
|
+
/**
|
|
53
|
+
* Delete a document (existing uploaded document)
|
|
54
|
+
*/
|
|
55
|
+
deleteDocument(document: any): void;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadType, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadType, "formly-field-file-upload", never, {}, {}, never, never, true, never>;
|
|
58
|
+
}
|
|
@@ -7,6 +7,11 @@ interface RadioOption {
|
|
|
7
7
|
}
|
|
8
8
|
export declare class RadioType extends FieldType {
|
|
9
9
|
get options$(): Observable<RadioOption[]>;
|
|
10
|
+
defaultOptions: {
|
|
11
|
+
props: {
|
|
12
|
+
options: never[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
10
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<RadioType, never>;
|
|
11
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<RadioType, "formly-field-radio", never, {}, {}, never, never, true, never>;
|
|
12
17
|
}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { FieldType } from '@ngx-formly/core';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export
|
|
4
|
+
export type TextTransform = 'uppercase' | 'lowercase' | 'capitalize' | 'none';
|
|
5
|
+
export declare class TextInputType extends FieldType implements OnInit {
|
|
4
6
|
defaultOptions: {
|
|
5
7
|
props: {
|
|
6
8
|
type: string;
|
|
7
9
|
placeholder: string;
|
|
10
|
+
textTransform: TextTransform;
|
|
8
11
|
};
|
|
9
12
|
};
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
onInputChange(event: Event): void;
|
|
15
|
+
get textTransformStyle(): string;
|
|
16
|
+
get shouldTransformText(): boolean;
|
|
17
|
+
transformText(value: string): string;
|
|
18
|
+
get showError(): boolean;
|
|
10
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextInputType, never>;
|
|
11
20
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextInputType, "formly-field-text-input", never, {}, {}, never, never, true, never>;
|
|
12
21
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class KeycloakErrorPageComponent {
|
|
3
|
+
reload(): void;
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KeycloakErrorPageComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KeycloakErrorPageComponent, "app-keycloak-error-page", never, {}, {}, never, never, true, never>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NotFoundComponent implements OnDestroy {
|
|
4
|
+
private readonly errorService;
|
|
5
|
+
readonly error: import("@angular/core").Signal<import("@codex-ts/core-lib").ErrorState | null>;
|
|
6
|
+
get errorMessage(): string;
|
|
7
|
+
clearError(): void;
|
|
8
|
+
ngOnDestroy(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotFoundComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotFoundComponent, "app-not-found", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UnauthorizedComponent implements OnDestroy {
|
|
4
|
+
private readonly errorService;
|
|
5
|
+
readonly error: import("@angular/core").Signal<import("@codex-ts/core-lib").ErrorState | null>;
|
|
6
|
+
get statusCode(): string;
|
|
7
|
+
get errorMessage(): string;
|
|
8
|
+
clearError(): void;
|
|
9
|
+
ngOnDestroy(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "app-unauthorized", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -5,7 +5,7 @@ export declare class KeycloakAuthGuard {
|
|
|
5
5
|
private readonly keycloakService;
|
|
6
6
|
private readonly config;
|
|
7
7
|
private readonly router;
|
|
8
|
-
private readonly
|
|
8
|
+
private readonly errorService;
|
|
9
9
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree>;
|
|
10
10
|
private processAuthentication;
|
|
11
11
|
private hasRequiredRoles;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for the KeycloakService functionality
|
|
3
|
+
*/
|
|
4
|
+
export interface IKeycloakService {
|
|
5
|
+
error$: import('@angular/core').Signal<import('../services/base-error.service').ErrorState | null>;
|
|
6
|
+
clearError: () => void;
|
|
7
|
+
isAuthenticated$: () => boolean;
|
|
8
|
+
userProfile$: () => any;
|
|
9
|
+
token$: () => string | undefined;
|
|
10
|
+
initialize(): Promise<boolean>;
|
|
11
|
+
login(options?: {
|
|
12
|
+
redirectUri?: string;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
logout(): Promise<void>;
|
|
15
|
+
getRoles(): string[];
|
|
16
|
+
hasRole(role: string): boolean;
|
|
17
|
+
getToken(): Promise<string | null>;
|
|
18
|
+
isUrlExcluded(url: string): boolean;
|
|
19
|
+
getCurrentUserId(): string | null;
|
|
20
|
+
getCurrentUsername(): string | null;
|
|
21
|
+
}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
+
import { ErrorState } from '../services/base-error.service';
|
|
2
|
+
import { IKeycloakService } from './keycloak.interface';
|
|
1
3
|
import * as i0 from "@angular/core";
|
|
2
4
|
/**
|
|
3
5
|
* Service for handling Keycloak authentication and authorization
|
|
4
6
|
*/
|
|
5
|
-
export declare class KeycloakService {
|
|
7
|
+
export declare class KeycloakService implements IKeycloakService {
|
|
6
8
|
#private;
|
|
7
|
-
private readonly platformId;
|
|
8
9
|
private readonly config;
|
|
9
|
-
private readonly
|
|
10
|
+
private readonly errorService;
|
|
10
11
|
readonly isAuthenticated$: import("@angular/core").Signal<boolean>;
|
|
11
12
|
readonly userProfile$: import("@angular/core").Signal<any>;
|
|
12
13
|
readonly token$: import("@angular/core").Signal<string | undefined>;
|
|
14
|
+
get error$(): import("@angular/core").Signal<ErrorState | null>;
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Starts logging the user profile every 100 ms to the console for debugging.
|
|
18
|
+
* Call this method after initialization to monitor profile changes.
|
|
19
|
+
*/
|
|
13
20
|
/** Check if URL should be excluded from bearer token */
|
|
14
21
|
isUrlExcluded(url: string): boolean;
|
|
15
22
|
/** Initialize Keycloak authentication */
|
|
16
23
|
initialize(): Promise<boolean>;
|
|
24
|
+
/** Clear any Keycloak errors */
|
|
25
|
+
clearError(): void;
|
|
17
26
|
/** Login with optional redirect URI */
|
|
18
27
|
login(options?: {
|
|
19
28
|
redirectUri?: string;
|
|
@@ -28,7 +37,19 @@ export declare class KeycloakService {
|
|
|
28
37
|
getToken(): Promise<string | null>;
|
|
29
38
|
/** Update token if it's close to expiring */
|
|
30
39
|
private updateToken;
|
|
40
|
+
getCurrentUserId(): string | null;
|
|
41
|
+
getCurrentUsername(): string | null;
|
|
42
|
+
getCurrentUserFullName(): string | null;
|
|
31
43
|
private loadUserProfile;
|
|
44
|
+
/**
|
|
45
|
+
* Check the current authentication state and return diagnostic information
|
|
46
|
+
* Useful for debugging authentication issues
|
|
47
|
+
*/
|
|
48
|
+
getAuthenticationState(): {
|
|
49
|
+
authenticated: boolean;
|
|
50
|
+
hasProfile: boolean;
|
|
51
|
+
hasToken: boolean;
|
|
52
|
+
};
|
|
32
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<KeycloakService, never>;
|
|
33
54
|
static ɵprov: i0.ɵɵInjectableDeclaration<KeycloakService>;
|
|
34
55
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Contains common fields used across different types of tasks
|
|
5
|
-
*/
|
|
6
|
-
export interface BaseTaskModel extends BaseModel {
|
|
1
|
+
import { Workflow } from './workflow.model';
|
|
2
|
+
import { BaseComment } from './base.comment.model';
|
|
3
|
+
export interface BaseTask<S = string, C = BaseComment> extends Workflow<S, C> {
|
|
7
4
|
title: string;
|
|
8
5
|
description: string;
|
|
9
6
|
type: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BaseModel } from './base.model';
|
|
2
|
+
export interface BaseEntity extends BaseModel {
|
|
3
|
+
/**
|
|
4
|
+
* Database generated ID
|
|
5
|
+
*/
|
|
6
|
+
id: number;
|
|
7
|
+
/**
|
|
8
|
+
* User who created the entity
|
|
9
|
+
*/
|
|
10
|
+
createdBy: string;
|
|
11
|
+
/**
|
|
12
|
+
* Timestamp when entity was created
|
|
13
|
+
*/
|
|
14
|
+
createdDate: Date;
|
|
15
|
+
/**
|
|
16
|
+
* User who last modified the entity
|
|
17
|
+
*/
|
|
18
|
+
lastModifiedBy: string;
|
|
19
|
+
/**
|
|
20
|
+
* Timestamp when entity was last modified
|
|
21
|
+
*/
|
|
22
|
+
lastModifiedDate: Date;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the entity is marked as deleted
|
|
25
|
+
*/
|
|
26
|
+
deleted: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the entity is currently active
|
|
29
|
+
*/
|
|
30
|
+
active: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* User who deleted the entity
|
|
33
|
+
*/
|
|
34
|
+
deletedBy: string;
|
|
35
|
+
/**
|
|
36
|
+
* Timestamp when entity was deleted
|
|
37
|
+
*/
|
|
38
|
+
deletedDate: Date;
|
|
39
|
+
}
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
* Maps to Java BaseEntity
|
|
5
5
|
*/
|
|
6
6
|
export interface BaseModel {
|
|
7
|
-
/**
|
|
8
|
-
* Database generated ID
|
|
9
|
-
*/
|
|
10
|
-
id?: number;
|
|
11
7
|
/**
|
|
12
8
|
* Unique identifier, used for external reference
|
|
13
9
|
*/
|
|
@@ -16,44 +12,4 @@ export interface BaseModel {
|
|
|
16
12
|
* Version number for optimistic locking
|
|
17
13
|
*/
|
|
18
14
|
version?: number;
|
|
19
|
-
/**
|
|
20
|
-
* User who created the entity
|
|
21
|
-
*/
|
|
22
|
-
createdBy: string;
|
|
23
|
-
/**
|
|
24
|
-
* Timestamp when entity was created
|
|
25
|
-
*/
|
|
26
|
-
createdDate: Date;
|
|
27
|
-
/**
|
|
28
|
-
* User who last modified the entity
|
|
29
|
-
*/
|
|
30
|
-
lastModifiedBy?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Timestamp when entity was last modified
|
|
33
|
-
*/
|
|
34
|
-
lastModifiedDate?: Date;
|
|
35
|
-
/**
|
|
36
|
-
* Whether the entity is marked as deleted
|
|
37
|
-
*/
|
|
38
|
-
deleted: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Whether the entity is currently active
|
|
41
|
-
*/
|
|
42
|
-
active: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* User who deleted the entity
|
|
45
|
-
*/
|
|
46
|
-
deletedBy?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Timestamp when entity was deleted
|
|
49
|
-
*/
|
|
50
|
-
deletedDate?: Date;
|
|
51
|
-
/**
|
|
52
|
-
* Get unique identifier string
|
|
53
|
-
*/
|
|
54
|
-
getKey?(): string;
|
|
55
|
-
/**
|
|
56
|
-
* Get display label for the entity
|
|
57
|
-
*/
|
|
58
|
-
getDisplayLabel?(): string;
|
|
59
15
|
}
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
* Matches backend FilterCriteria and FilterOperator
|
|
3
3
|
*/
|
|
4
4
|
export type FilterOperator = 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'LESS_THAN' | 'LESS_THAN_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_EQUALS';
|
|
5
|
+
import { TableColumnDatatype } from './table-column-datatype.enum';
|
|
5
6
|
export interface FilterCriteria {
|
|
6
7
|
field: string;
|
|
7
8
|
value: string;
|
|
8
9
|
operator: FilterOperator;
|
|
10
|
+
datatype: TableColumnDatatype;
|
|
11
|
+
ignoreCase?: boolean;
|
|
9
12
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseEntity } from './base.entity.model';
|
|
2
|
+
import { BaseComment } from './base.comment.model';
|
|
3
|
+
export interface Workflow<S = string, C = BaseComment> extends BaseEntity {
|
|
4
|
+
status: S;
|
|
5
|
+
comments: C[];
|
|
6
|
+
currentAssignee: string;
|
|
7
|
+
currentAssigneeName: string;
|
|
8
|
+
currentDepartment: string;
|
|
9
|
+
currentSegment: string;
|
|
10
|
+
previousAssignee: string;
|
|
11
|
+
previousAssigneeName: string;
|
|
12
|
+
statusChangedDate: Date;
|
|
13
|
+
statusChangedBy: string;
|
|
14
|
+
workflowType: string;
|
|
15
|
+
currentWorkflowStep: string;
|
|
16
|
+
workflowVersion: number;
|
|
17
|
+
requiresApproval: boolean;
|
|
18
|
+
}
|