@iapps/ng-dhis2-ui 1.1.58 → 1.1.59

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.
@@ -17,7 +17,7 @@ export declare class FormMetadataSection implements IFormMetadataSection {
17
17
  sortOrder: unknown;
18
18
  mandatory: unknown;
19
19
  allowFutureDate: unknown;
20
- trackedEntityType: any;
20
+ trackedEntityType: unknown;
21
21
  metaType: string;
22
22
  }[];
23
23
  get dataElements(): {
@@ -1,3 +1,3 @@
1
1
  export declare class FormFieldTypeUtil {
2
- static getFieldType(valueType: string): "image" | "org-unit" | "file" | "number" | "text";
2
+ static getFieldType(valueType: string): "text" | "number" | "image" | "org-unit" | "file";
3
3
  }
@@ -3,7 +3,7 @@ import { DropdownOption } from '../models';
3
3
  export declare class FieldUtil {
4
4
  static getFieldDropdownOptions(field: any): DropdownOption[];
5
5
  static sanitizeOptions(options: any[]): any;
6
- static getFieldType(valueType: string): "date" | "org-unit" | "file" | "email" | "number" | "text" | "tel";
6
+ static getFieldType(valueType: string): "text" | "tel" | "email" | "date" | "number" | "org-unit" | "file";
7
7
  static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
8
8
  static getOptionEntities?(options: any[]): any;
9
9
  }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ key: string;
4
+ label?: string;
5
+ required?: boolean;
6
+ onSelectOrgUnit: (selectedOrgUnits: any) => void;
7
+ onBlur?: (selectedOrgUnit: Record<string, unknown>) => void;
8
+ selected?: string;
9
+ maxTreeHeight?: number;
10
+ disabled?: boolean;
11
+ previousOrgUnitId?: string;
12
+ };
13
+ export declare const OrgUnitFormField: (props: Props) => React.JSX.Element;
14
+ export {};
@@ -18,7 +18,6 @@ export declare class LineListTableComponent extends ReactWrapperModule {
18
18
  filters?: FilterConfig[];
19
19
  ouMode?: string;
20
20
  dispatchTeis: boolean;
21
- showFilterButton: boolean;
22
21
  actionSelected: EventEmitter<{
23
22
  action: string;
24
23
  row: TableRow;
@@ -33,11 +32,12 @@ export declare class LineListTableComponent extends ReactWrapperModule {
33
32
  firstValue: EventEmitter<string>;
34
33
  buttonFilter: string;
35
34
  filterRootOrgUnit: boolean;
35
+ showFilters: boolean;
36
36
  setReactStateUpdaters: (updaters: any) => void;
37
37
  ngOnChanges(changes: SimpleChanges): void;
38
38
  lineListService: LineListService;
39
39
  LineList: () => React.JSX.Element;
40
40
  ngAfterViewInit(): Promise<void>;
41
41
  static ɵfac: i0.ɵɵFactoryDeclaration<LineListTableComponent, never>;
42
- 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; }; "ouMode": { "alias": "ouMode"; "required": false; }; "dispatchTeis": { "alias": "dispatchTeis"; "required": false; }; "showFilterButton": { "alias": "showFilterButton"; "required": false; }; "isButtonLoading": { "alias": "isButtonLoading"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonFilter": { "alias": "buttonFilter"; "required": false; }; "filterRootOrgUnit": { "alias": "filterRootOrgUnit"; "required": false; }; }, { "actionSelected": "actionSelected"; "approvalSelected": "approvalSelected"; "firstValue": "firstValue"; }, never, ["*"], false, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "ng-dhis2-ui-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; }; "ouMode": { "alias": "ouMode"; "required": false; }; "dispatchTeis": { "alias": "dispatchTeis"; "required": false; }; "isButtonLoading": { "alias": "isButtonLoading"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonFilter": { "alias": "buttonFilter"; "required": false; }; "filterRootOrgUnit": { "alias": "filterRootOrgUnit"; "required": false; }; "showFilters": { "alias": "showFilters"; "required": false; }; }, { "actionSelected": "actionSelected"; "approvalSelected": "approvalSelected"; "firstValue": "firstValue"; }, never, ["*"], false, never>;
43
43
  }
@@ -2,8 +2,9 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./containers/line-list.component.tsx";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "../../shared/shared.module";
5
+ import * as i4 from "../react-wrapper/react-wrapper.component.tsx";
5
6
  export declare class LineListModule {
6
7
  static ɵfac: i0.ɵɵFactoryDeclaration<LineListModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<LineListModule, [typeof i1.LineListTableComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule], [typeof i1.LineListTableComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LineListModule, [typeof i1.LineListTableComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule, typeof i4.ReactWrapperModule], [typeof i1.LineListTableComponent]>;
8
9
  static ɵinj: i0.ɵɵInjectorDeclaration<LineListModule>;
9
10
  }
@@ -5,10 +5,10 @@ export interface Pager {
5
5
  pageCount: number;
6
6
  }
7
7
  export interface Attribute {
8
- lastUpdated: string;
8
+ updatedAt: string;
9
9
  code: string;
10
10
  displayName: string;
11
- created: string;
11
+ createdAt: string;
12
12
  valueType: string;
13
13
  attribute: string;
14
14
  value: string;
@@ -24,7 +24,7 @@ export interface Event {
24
24
  programStage?: string;
25
25
  orgUnit: string;
26
26
  enrollment: string;
27
- trackedEntityInstance: string;
27
+ trackedEntity: string;
28
28
  enrollmentStatus: string;
29
29
  orgUnitName: string;
30
30
  status: string;
@@ -36,12 +36,18 @@ export interface Event {
36
36
  followup: boolean;
37
37
  deleted: boolean;
38
38
  attributeOptionCombo: string;
39
+ createdAt: string;
40
+ updatedAt: string;
39
41
  completedBy: string;
42
+ createdBy: CreatedByUserInfo;
43
+ updatedBy: LastUpdatedByUserInfo;
40
44
  lastUpdatedByUserInfo: LastUpdatedByUserInfo;
41
45
  createdByUserInfo: CreatedByUserInfo;
42
46
  dataValues: DataValue[];
43
47
  notes: any[];
44
48
  relationships: any[];
49
+ followUp: boolean;
50
+ scheduledAt: string;
45
51
  }
46
52
  export interface DataValue {
47
53
  lastUpdated: string;
@@ -49,23 +55,30 @@ export interface DataValue {
49
55
  dataElement: string;
50
56
  value: string;
51
57
  providedElsewhere: boolean;
58
+ createdAt: string;
59
+ updatedAt: string;
52
60
  }
53
61
  export interface Enrollment {
54
62
  program: string;
55
63
  lastUpdated: string;
56
- created: string;
64
+ createdAt: string;
65
+ updatedAt: string;
57
66
  orgUnit: string;
58
67
  enrollment: string;
59
- trackedEntityInstance: string;
68
+ trackedEntity: string;
60
69
  trackedEntityType: string;
61
70
  orgUnitName: string;
62
71
  enrollmentDate: string;
63
- followup: boolean;
72
+ enrolledAt: string;
73
+ occurredAt: string;
74
+ followUp: boolean;
64
75
  deleted: boolean;
76
+ completedBy?: string;
77
+ completedAt?: string;
65
78
  incidentDate: string;
66
79
  status: string;
67
- lastUpdatedByUserInfo: LastUpdatedByUserInfo;
68
- createdByUserInfo: CreatedByUserInfo;
80
+ updatedBy: LastUpdatedByUserInfo;
81
+ createdBy: CreatedByUserInfo;
69
82
  notes: any[];
70
83
  relationships: any[];
71
84
  events: Event[];
@@ -79,9 +92,49 @@ export interface TrackedEntityInstance {
79
92
  displayName?: string;
80
93
  }[];
81
94
  enrollments: Enrollment[];
95
+ trackedEntity: string;
96
+ trackedEntityType: string;
97
+ createdAt: string;
98
+ createdAtClient: string;
99
+ updatedAt: string;
100
+ orgUnit: string;
101
+ inactive: boolean;
102
+ deleted: boolean;
103
+ potentialDuplicate: boolean;
104
+ programOwners: ProgramOwner[];
105
+ }
106
+ export interface TrackedEntity {
107
+ trackedEntityInstance: string;
108
+ attributes: Attribute[];
109
+ enrollments: Enrollment[];
110
+ trackedEntity: string;
111
+ trackedEntityType: string;
112
+ createdAt: string;
113
+ createdAtClient: string;
114
+ updatedAt: string;
115
+ orgUnit: string;
116
+ inactive: boolean;
117
+ deleted: boolean;
118
+ potentialDuplicate: boolean;
119
+ programOwners: ProgramOwner[];
120
+ }
121
+ export interface ProgramOwner {
122
+ orgUnit: string;
123
+ trackedEntity: string;
124
+ program: string;
82
125
  }
83
126
  export interface TrackedEntityInstancesResponse {
84
127
  trackedEntityInstances: TrackedEntityInstance[];
128
+ trackedEntity: TrackedEntity[];
129
+ pager: Pager;
130
+ }
131
+ export interface TrackedEntityResponse {
132
+ trackedEntities: TrackedEntity[];
133
+ pager: Pager;
134
+ orgUnitsMap?: Map<string, string>;
135
+ }
136
+ export interface EnrollmentsResponse {
137
+ enrollments: Enrollment[];
85
138
  pager: Pager;
86
139
  }
87
140
  export interface ProgramStageDataElement {
@@ -106,7 +159,7 @@ export interface ProgramMetadata {
106
159
  }
107
160
  export interface LineListResponse {
108
161
  metadata: ProgramMetadata;
109
- data: EventsResponse | TrackedEntityInstancesResponse;
162
+ data: EventsResponse | TrackedEntityInstancesResponse | EnrollmentsResponse | TrackedEntityResponse;
110
163
  }
111
164
  export interface TableRow {
112
165
  [key: string]: string | number;
@@ -8,6 +8,10 @@ export declare class LineListService {
8
8
  constructor(httpClient: NgxDhis2HttpClientService);
9
9
  private getProgramMetadata;
10
10
  private getTrackedEntityInstances;
11
+ /**
12
+ * Fetch orgUnit names for given orgUnit IDs
13
+ */
14
+ private fetchOrgUnits;
11
15
  private getEvents;
12
16
  private getEventsByProgramStage;
13
17
  getLineListData(programId: string, orgUnit?: string, programStageId?: string, page?: number, pageSize?: number, filters?: AttributeFilter[], startDate?: string, endDate?: string, ouMode?: string, filterRootOrgUnit?: boolean): Observable<LineListResponse>;
@@ -1,5 +1,6 @@
1
1
  import { AttributeFilter } from '../models/attribute-filter.model';
2
2
  import { FilterConfig } from '../models/filter-config.model';
3
- import { TrackedEntityInstance } from '../models/line-list.models';
3
+ import { TrackedEntity, TrackedEntityInstance } from '../models/line-list.models';
4
4
  export declare function buildFilters(filters: AttributeFilter[]): string;
5
5
  export declare const getFilteredTrackedEntityInstances: (trackedEntityInstances: TrackedEntityInstance[], filters: FilterConfig[]) => TrackedEntityInstance[];
6
+ export declare const getFilteredTrackedEntites: (trackedEntities: TrackedEntity[], filters: FilterConfig[]) => TrackedEntity[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iapps/ng-dhis2-ui",
3
- "version": "1.1.58",
3
+ "version": "1.1.59",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0",