@iapps/ng-dhis2-ui 1.1.8 → 1.1.10
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 +34 -25
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/lib/modules/form/utils/field-type.util.d.ts +1 -1
- package/lib/modules/form/utils/field.util.d.ts +1 -1
- package/lib/modules/selection-filters-ui/containers/selection-filters-ui/selection-filters-ui.component.d.ts +6 -5
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.model.d.ts +30 -14
- package/package.json +1 -1
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.models.d.ts +0 -10
|
@@ -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" | "
|
|
6
|
+
static getFieldType(valueType: string): "number" | "date" | "org-unit" | "file" | "tel" | "text";
|
|
7
7
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
8
8
|
static getOptionEntities?(options: any[]): any;
|
|
9
9
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, NgZone } from '@angular/core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
|
-
import {
|
|
5
|
-
import { TableRow } from '../../models/selection-filters-ui.models';
|
|
4
|
+
import { ProgramAttributesFilter, ProgramStageDataElementFilter, SelectionFiltersProps, TableRow } from '../../models/selection-filters-ui.model';
|
|
6
5
|
import { Observable } from 'rxjs';
|
|
7
6
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
8
7
|
import { OrganisationUnitSelectionConfig } from '../../../organisation-unit-selector';
|
|
@@ -12,10 +11,12 @@ export declare class SelectionFiltersComponent extends ReactWrapperModule implem
|
|
|
12
11
|
label: string;
|
|
13
12
|
onClick: (row: TableRow) => void;
|
|
14
13
|
}[];
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
programAttributesFilters: ProgramAttributesFilter[];
|
|
15
|
+
programStageDataElementFilters: ProgramStageDataElementFilter[];
|
|
17
16
|
startDate?: string;
|
|
18
17
|
endDate?: string;
|
|
18
|
+
program?: string;
|
|
19
|
+
organisationUnit?: string;
|
|
19
20
|
actionSelected: EventEmitter<SelectionFiltersProps>;
|
|
20
21
|
httpClient: NgxDhis2HttpClientService;
|
|
21
22
|
ngZone: NgZone;
|
|
@@ -36,5 +37,5 @@ export declare class SelectionFiltersComponent extends ReactWrapperModule implem
|
|
|
36
37
|
SelectionFiltersUI: () => React.JSX.Element;
|
|
37
38
|
ngAfterViewInit(): Promise<void>;
|
|
38
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFiltersComponent, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionFiltersComponent, "app-selection-filters-ui", never, { "actionOptions": { "alias": "actionOptions"; "required": false; }; "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionFiltersComponent, "app-selection-filters-ui", never, { "actionOptions": { "alias": "actionOptions"; "required": false; }; "programAttributesFilters": { "alias": "programAttributesFilters"; "required": false; }; "programStageDataElementFilters": { "alias": "programStageDataElementFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "program": { "alias": "program"; "required": false; }; "organisationUnit": { "alias": "organisationUnit"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
40
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface SelectionFiltersProps {
|
|
2
2
|
actionOptions: ActionOption[];
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
programAttributesFilters: ProgramAttributesFilter[];
|
|
4
|
+
programStageDataElementFilters: ProgramStageDataElementFilter[];
|
|
5
5
|
startDate: string;
|
|
6
6
|
endDate: string;
|
|
7
7
|
}
|
|
@@ -9,28 +9,44 @@ export interface ActionOption {
|
|
|
9
9
|
label: string;
|
|
10
10
|
onClick: () => void;
|
|
11
11
|
}
|
|
12
|
-
export interface DataElementFilter {
|
|
13
|
-
programStage: string;
|
|
14
|
-
dataElement: string;
|
|
15
|
-
name: string;
|
|
16
|
-
valueType: string;
|
|
17
|
-
hasOptions: boolean;
|
|
18
|
-
operator: string;
|
|
19
|
-
value: string;
|
|
20
|
-
options: Option[];
|
|
21
|
-
}
|
|
22
12
|
export interface Option {
|
|
23
13
|
id: string;
|
|
24
14
|
code: string;
|
|
25
15
|
name: string;
|
|
26
16
|
}
|
|
27
|
-
export interface
|
|
17
|
+
export interface ProgramAttributesFilter {
|
|
28
18
|
attribute: string;
|
|
19
|
+
program: string;
|
|
29
20
|
operator: string;
|
|
21
|
+
valueType?: string;
|
|
30
22
|
name: string;
|
|
31
|
-
valueType: string;
|
|
32
23
|
hasOptions: boolean;
|
|
24
|
+
shortName: string;
|
|
25
|
+
formName: string;
|
|
33
26
|
code: string;
|
|
34
27
|
value: string;
|
|
35
28
|
options: Option[];
|
|
36
29
|
}
|
|
30
|
+
export interface ProgramStageDataElementFilter {
|
|
31
|
+
programStage: string;
|
|
32
|
+
program: string;
|
|
33
|
+
dataElement: string;
|
|
34
|
+
hasOptions: boolean;
|
|
35
|
+
valueType?: string;
|
|
36
|
+
name: string;
|
|
37
|
+
operator: string;
|
|
38
|
+
shortName: string;
|
|
39
|
+
formName: string;
|
|
40
|
+
value: string;
|
|
41
|
+
options: Option[];
|
|
42
|
+
}
|
|
43
|
+
export interface TableRow {
|
|
44
|
+
[key: string]: string | number;
|
|
45
|
+
index: number;
|
|
46
|
+
}
|
|
47
|
+
export interface ColumnDefinition {
|
|
48
|
+
column: string;
|
|
49
|
+
display: string;
|
|
50
|
+
index?: string;
|
|
51
|
+
visible?: boolean;
|
|
52
|
+
}
|
package/package.json
CHANGED