@codex-ts/core-lib 1.0.13 → 1.0.14
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.
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ConfirmationService } from 'primeng/api';
|
|
4
|
+
import { BaseTableComponent } from './base-table.component';
|
|
5
|
+
import { NotificationService } from '../services/notification.service';
|
|
6
|
+
import { UtilsService } from '../services/utils.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Base component for all task dashboard components in the application.
|
|
10
|
+
* Provides common functionality for task management operations while
|
|
11
|
+
* inheriting table functionality from BaseTableComponent.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class BaseTaskDashboardComponent<T extends {
|
|
14
|
+
uuid: string;
|
|
15
|
+
}> extends BaseTableComponent<T> {
|
|
16
|
+
protected router: Router;
|
|
17
|
+
protected notificationService: NotificationService;
|
|
18
|
+
protected utilsService: UtilsService;
|
|
19
|
+
protected confirmationService: ConfirmationService;
|
|
20
|
+
actionLoading: boolean;
|
|
21
|
+
protected taskStatuses: any[];
|
|
22
|
+
protected taskPriorities: any[];
|
|
23
|
+
protected assignedToOptions: any[];
|
|
24
|
+
protected dateRange: {
|
|
25
|
+
start: Date | null;
|
|
26
|
+
end: Date | null;
|
|
27
|
+
};
|
|
28
|
+
constructor(router: Router, notificationService: NotificationService, utilsService: UtilsService, confirmationService: ConfirmationService);
|
|
29
|
+
/**
|
|
30
|
+
* Initialize the component and load reference data
|
|
31
|
+
*/
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Load all reference data needed for the task dashboard
|
|
35
|
+
*/
|
|
36
|
+
protected loadReferenceData(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Create a new task
|
|
39
|
+
*/
|
|
40
|
+
onCreate(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Navigate to view a task
|
|
43
|
+
* @param item The task to view
|
|
44
|
+
*/
|
|
45
|
+
onView(item: T): void;
|
|
46
|
+
/**
|
|
47
|
+
* Navigate to edit a task
|
|
48
|
+
* @param item The task to edit
|
|
49
|
+
*/
|
|
50
|
+
onEdit(item: T): void;
|
|
51
|
+
/**
|
|
52
|
+
* Delete a task with confirmation
|
|
53
|
+
* @param item The task to delete
|
|
54
|
+
*/
|
|
55
|
+
onDelete(item: T): void;
|
|
56
|
+
/**
|
|
57
|
+
* Navigate to a route with error handling
|
|
58
|
+
* @param path The route path
|
|
59
|
+
* @param matrixParams Optional matrix parameters
|
|
60
|
+
*/
|
|
61
|
+
protected navigateTo(path: any[], matrixParams?: {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}): void;
|
|
64
|
+
/**
|
|
65
|
+
* Validate that an item has a UUID
|
|
66
|
+
* @param item The item to validate
|
|
67
|
+
* @param action The action being performed
|
|
68
|
+
* @returns true if valid, false otherwise
|
|
69
|
+
*/
|
|
70
|
+
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
|
+
* Get the entity name for display in messages
|
|
80
|
+
*/
|
|
81
|
+
protected abstract getEntityName(): string;
|
|
82
|
+
/**
|
|
83
|
+
* Get the route to the entity form
|
|
84
|
+
*/
|
|
85
|
+
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>;
|
|
88
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './lib/components/base-list-page.component';
|
|
|
30
30
|
export * from './lib/components/base-tabbed-form.component';
|
|
31
31
|
export * from './lib/components/base-list-tabbed-form.component';
|
|
32
32
|
export * from './lib/components/base-task-details.component';
|
|
33
|
+
export * from './lib/components/base-task-dashboard.component';
|
|
33
34
|
export * from './lib/states/form.state';
|
|
34
35
|
export * from './lib/states/form-component.state';
|
|
35
36
|
export * from './lib/states/tabbed-form.state';
|