@iapps/ng-dhis2-ui 1.0.9 → 1.1.0
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/fesm2022/iapps-ng-dhis2-ui.mjs +175 -45
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/lib/modules/line-list/containers/line-list.component.d.ts +12 -1
- package/lib/modules/line-list/models/attribute-filter.model.d.ts +2 -1
- package/lib/modules/line-list/models/filter-config.model.d.ts +6 -0
- package/lib/modules/line-list/models/line-list.models.d.ts +73 -14
- package/lib/modules/line-list/utils/filter-builder.d.ts +3 -0
- package/lib/modules/line-list/utils/line-list-utils.d.ts +2 -1
- package/lib/modules/react-wrapper/react-wrapper.component.d.ts +2 -3
- package/lib/shared/utils/predefinedDimensions.d.ts +6 -6
- package/package.json +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { EventEmitter, SimpleChanges } from '@angular/core';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { LineListService } from '../services/line-list.service';
|
|
3
4
|
import { DropdownMenuOption } from '../components/dropdown-menu';
|
|
5
|
+
import { TableRow } from '../models/line-list.models';
|
|
4
6
|
import { AttributeFilter } from '../models/attribute-filter.model';
|
|
5
7
|
import { ReactWrapperComponent } from '../../react-wrapper';
|
|
8
|
+
import { FilterConfig } from '../models/filter-config.model';
|
|
6
9
|
import * as i0 from "@angular/core";
|
|
7
10
|
export declare class LineListTableComponent extends ReactWrapperComponent {
|
|
8
11
|
programId: string;
|
|
@@ -12,9 +15,17 @@ export declare class LineListTableComponent extends ReactWrapperComponent {
|
|
|
12
15
|
attributeFilters?: AttributeFilter[];
|
|
13
16
|
startDate?: string;
|
|
14
17
|
endDate?: string;
|
|
18
|
+
filters?: FilterConfig[];
|
|
19
|
+
actionSelected: EventEmitter<{
|
|
20
|
+
action: string;
|
|
21
|
+
row: TableRow;
|
|
22
|
+
}>;
|
|
23
|
+
private reactStateUpdaters;
|
|
24
|
+
setReactStateUpdaters: (updaters: any) => void;
|
|
25
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
15
26
|
lineListService: LineListService;
|
|
16
27
|
LineList: () => React.JSX.Element;
|
|
17
28
|
ngAfterViewInit(): Promise<void>;
|
|
18
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<LineListTableComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "app-line-list", never, { "programId": { "alias": "programId"; "required": false; }; "orgUnit": { "alias": "orgUnit"; "required": false; }; "programStageId": { "alias": "programStageId"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "app-line-list", never, { "programId": { "alias": "programId"; "required": false; }; "orgUnit": { "alias": "orgUnit"; "required": false; }; "programStageId": { "alias": "programStageId"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
20
31
|
}
|
|
@@ -4,25 +4,72 @@ export interface Pager {
|
|
|
4
4
|
total: number;
|
|
5
5
|
pageCount: number;
|
|
6
6
|
}
|
|
7
|
+
export interface Attribute {
|
|
8
|
+
lastUpdated: string;
|
|
9
|
+
code: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
created: string;
|
|
12
|
+
valueType: string;
|
|
13
|
+
attribute: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
7
16
|
export interface EventsResponse {
|
|
8
|
-
events:
|
|
9
|
-
event: string;
|
|
10
|
-
programStage?: string;
|
|
11
|
-
dataValues: {
|
|
12
|
-
dataElement: string;
|
|
13
|
-
value: string;
|
|
14
|
-
}[];
|
|
15
|
-
}[];
|
|
17
|
+
events: Event[];
|
|
16
18
|
pager: Pager;
|
|
17
19
|
}
|
|
18
|
-
export interface
|
|
20
|
+
export interface Event {
|
|
21
|
+
dueDate: string;
|
|
22
|
+
program: string;
|
|
23
|
+
event: string;
|
|
24
|
+
programStage?: string;
|
|
25
|
+
orgUnit: string;
|
|
19
26
|
enrollment: string;
|
|
27
|
+
trackedEntityInstance: string;
|
|
28
|
+
enrollmentStatus: string;
|
|
29
|
+
orgUnitName: string;
|
|
30
|
+
status: string;
|
|
31
|
+
eventDate: string;
|
|
32
|
+
attributeCategoryOptions: string;
|
|
33
|
+
lastUpdated: string;
|
|
34
|
+
created: string;
|
|
35
|
+
completedDate: string;
|
|
36
|
+
followup: boolean;
|
|
37
|
+
deleted: boolean;
|
|
38
|
+
attributeOptionCombo: string;
|
|
39
|
+
completedBy: string;
|
|
40
|
+
lastUpdatedByUserInfo: LastUpdatedByUserInfo;
|
|
41
|
+
createdByUserInfo: CreatedByUserInfo;
|
|
42
|
+
dataValues: DataValue[];
|
|
43
|
+
notes: any[];
|
|
44
|
+
relationships: any[];
|
|
45
|
+
}
|
|
46
|
+
export interface DataValue {
|
|
47
|
+
lastUpdated: string;
|
|
48
|
+
created: string;
|
|
49
|
+
dataElement: string;
|
|
50
|
+
value: string;
|
|
51
|
+
providedElsewhere: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface Enrollment {
|
|
20
54
|
program: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
lastUpdated: string;
|
|
56
|
+
created: string;
|
|
57
|
+
orgUnit: string;
|
|
58
|
+
enrollment: string;
|
|
59
|
+
trackedEntityInstance: string;
|
|
60
|
+
trackedEntityType: string;
|
|
61
|
+
orgUnitName: string;
|
|
62
|
+
enrollmentDate: string;
|
|
63
|
+
followup: boolean;
|
|
64
|
+
deleted: boolean;
|
|
65
|
+
incidentDate: string;
|
|
66
|
+
status: string;
|
|
67
|
+
lastUpdatedByUserInfo: LastUpdatedByUserInfo;
|
|
68
|
+
createdByUserInfo: CreatedByUserInfo;
|
|
69
|
+
notes: any[];
|
|
70
|
+
relationships: any[];
|
|
71
|
+
events: Event[];
|
|
72
|
+
attributes: Attribute[];
|
|
26
73
|
}
|
|
27
74
|
export interface TrackedEntityInstance {
|
|
28
75
|
trackedEntityInstance: string;
|
|
@@ -68,3 +115,15 @@ export interface ColumnDefinition {
|
|
|
68
115
|
label: string;
|
|
69
116
|
key: string;
|
|
70
117
|
}
|
|
118
|
+
export interface LastUpdatedByUserInfo {
|
|
119
|
+
uid: string;
|
|
120
|
+
firstName: string;
|
|
121
|
+
surname: string;
|
|
122
|
+
username: string;
|
|
123
|
+
}
|
|
124
|
+
export interface CreatedByUserInfo {
|
|
125
|
+
uid: string;
|
|
126
|
+
firstName: string;
|
|
127
|
+
surname: string;
|
|
128
|
+
username: string;
|
|
129
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { AttributeFilter } from '../models/attribute-filter.model';
|
|
2
|
+
import { FilterConfig } from '../models/filter-config.model';
|
|
3
|
+
import { TrackedEntityInstance } from '../models/line-list.models';
|
|
2
4
|
export declare function buildFilters(filters: AttributeFilter[]): string;
|
|
5
|
+
export declare const getFilteredTrackedEntityInstances: (trackedEntityInstance: TrackedEntityInstance[], filters: FilterConfig[]) => TrackedEntityInstance[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { FilterConfig } from '../models/filter-config.model';
|
|
1
2
|
import { LineListResponse, ColumnDefinition, TableRow } from '../models/line-list.models';
|
|
2
3
|
export declare const getProgramStageData: (response: LineListResponse, programStageId: string, pager: any) => {
|
|
3
4
|
columns: ColumnDefinition[];
|
|
4
5
|
data: TableRow[];
|
|
5
6
|
};
|
|
6
|
-
export declare const getTrackedEntityData: (response: LineListResponse, programId: string, pager: any) => {
|
|
7
|
+
export declare const getTrackedEntityData: (response: LineListResponse, programId: string, pager: any, filters?: FilterConfig[]) => {
|
|
7
8
|
columns: ColumnDefinition[];
|
|
8
9
|
data: TableRow[];
|
|
9
10
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef,
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom/client';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ReactWrapperComponent implements
|
|
5
|
+
export declare class ReactWrapperComponent implements OnDestroy, AfterViewInit {
|
|
6
6
|
protected elementRef: ElementRef<HTMLElement>;
|
|
7
7
|
props?: ComponentProps<any>;
|
|
8
8
|
component: any;
|
|
@@ -10,7 +10,6 @@ export declare class ReactWrapperComponent implements OnChanges, OnDestroy, Afte
|
|
|
10
10
|
protected reactDomRoot?: ReactDOM.Root;
|
|
11
11
|
constructor(elementRef: ElementRef<HTMLElement>);
|
|
12
12
|
ngAfterViewInit(): void;
|
|
13
|
-
ngOnChanges(): void;
|
|
14
13
|
ngOnDestroy(): void;
|
|
15
14
|
protected render(): void;
|
|
16
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReactWrapperComponent, never>;
|
|
@@ -11,19 +11,19 @@ export declare const getFixedDimensions: () => {
|
|
|
11
11
|
id: string;
|
|
12
12
|
name: any;
|
|
13
13
|
iconName: string;
|
|
14
|
-
icon:
|
|
14
|
+
icon: React.FC<import("@dhis2/ui-icons").IconProps>;
|
|
15
15
|
};
|
|
16
16
|
pe: {
|
|
17
17
|
id: string;
|
|
18
18
|
name: any;
|
|
19
19
|
iconName: string;
|
|
20
|
-
icon:
|
|
20
|
+
icon: React.FC<import("@dhis2/ui-icons").IconProps>;
|
|
21
21
|
};
|
|
22
22
|
ou: {
|
|
23
23
|
id: string;
|
|
24
24
|
name: any;
|
|
25
25
|
iconName: string;
|
|
26
|
-
icon:
|
|
26
|
+
icon: React.FC<import("@dhis2/ui-icons").IconProps>;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
export declare const getDynamicDimensions: () => {
|
|
@@ -47,19 +47,19 @@ export declare const getPredefinedDimensions: () => {
|
|
|
47
47
|
id: string;
|
|
48
48
|
name: any;
|
|
49
49
|
iconName: string;
|
|
50
|
-
icon:
|
|
50
|
+
icon: React.FC<import("@dhis2/ui-icons").IconProps>;
|
|
51
51
|
};
|
|
52
52
|
pe: {
|
|
53
53
|
id: string;
|
|
54
54
|
name: any;
|
|
55
55
|
iconName: string;
|
|
56
|
-
icon:
|
|
56
|
+
icon: React.FC<import("@dhis2/ui-icons").IconProps>;
|
|
57
57
|
};
|
|
58
58
|
ou: {
|
|
59
59
|
id: string;
|
|
60
60
|
name: any;
|
|
61
61
|
iconName: string;
|
|
62
|
-
icon:
|
|
62
|
+
icon: React.FC<import("@dhis2/ui-icons").IconProps>;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
export declare const filterOutPredefinedDimensions: (dimensionIds: string[]) => string[];
|