@iapps/ng-dhis2-ui 1.1.1 → 1.1.3
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 +786 -232
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +4 -1
- package/lib/modules/button/button.component.d.ts +2 -2
- package/lib/modules/data-table-ui/components/dropdown-menu/dropdown-menu.d.ts +19 -0
- package/lib/modules/data-table-ui/components/dropdown-menu/dropdown-menu.styles.d.ts +5 -0
- package/lib/modules/data-table-ui/components/dropdown-menu/index.d.ts +1 -0
- package/lib/modules/data-table-ui/containers/data-table-ui/data-table-ui.component.d.ts +19 -0
- package/lib/modules/data-table-ui/data-table-ui.module.d.ts +10 -0
- package/lib/modules/data-table-ui/hooks/index.d.ts +1 -0
- package/lib/modules/data-table-ui/hooks/use-dynamic-styles.hook.d.ts +1 -0
- package/lib/modules/data-table-ui/index.d.ts +3 -0
- package/lib/modules/data-table-ui/models/data-table.models.d.ts +10 -0
- package/lib/modules/form/components/base-form-field.component.d.ts +2 -2
- package/lib/modules/form/containers/repeatable-form/repeatable-form.component.d.ts +11 -4
- package/lib/modules/form/containers/section-form/section-form.component.d.ts +10 -9
- package/lib/modules/form/form.module.d.ts +3 -2
- package/lib/modules/form/interfaces/form-field-group.interface.d.ts +2 -1
- package/lib/modules/form/models/form-field-group.model.d.ts +1 -1
- package/lib/modules/form/models/form-metadata.model.d.ts +2 -1
- package/lib/modules/form/models/form-value.model.d.ts +3 -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/form/utils/index.d.ts +1 -0
- package/lib/modules/form/utils/translation.util.d.ts +3 -0
- package/lib/modules/header-bar/header-bar.component.d.ts +2 -2
- package/lib/modules/line-list/containers/line-list.component.d.ts +6 -5
- package/lib/modules/line-list/models/line-list.models.d.ts +43 -0
- package/lib/modules/line-list/services/line-list.service.d.ts +1 -1
- package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.d.ts +2 -2
- package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector-modal/organisation-unit-selector-modal.component-modal.d.ts +2 -2
- package/lib/modules/period-selector/containers/period-selector/period-selector.component.d.ts +2 -2
- package/lib/modules/period-selector/containers/period-selector-modal/period-selector-modal.component.d.ts +2 -2
- package/lib/modules/react-wrapper/react-wrapper.component.d.ts +3 -3
- package/lib/modules/selection-filters-ui/containers/selection-filters-ui/selection-filters-ui.component.d.ts +20 -0
- package/lib/modules/selection-filters-ui/index.d.ts +2 -0
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.model.d.ts +36 -0
- package/lib/modules/selection-filters-ui/selection-filters-ui.module.d.ts +10 -0
- package/lib/modules/tracker-form/index.d.ts +2 -0
- package/lib/modules/tracker-form/tracker-form.component.d.ts +15 -0
- package/lib/modules/tracker-form/tracker-form.module.d.ts +9 -0
- package/package.json +1 -1
- package/lib/modules/react-wrapper/index.d.ts +0 -2
- package/lib/modules/react-wrapper/react-wrapper.module.d.ts +0 -8
package/index.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ export * from './lib/modules/header-bar';
|
|
|
2
2
|
export * from './lib/modules/button';
|
|
3
3
|
export * from './lib/modules/period-selector';
|
|
4
4
|
export * from './lib/modules/organisation-unit-selector';
|
|
5
|
-
export * from './lib/modules/react-wrapper';
|
|
5
|
+
export * from './lib/modules/react-wrapper/react-wrapper.component';
|
|
6
6
|
export * from './lib/modules/line-list';
|
|
7
|
+
export * from './lib/modules/data-table-ui';
|
|
7
8
|
export * from './lib/modules/form';
|
|
9
|
+
export * from './lib/modules/selection-filters-ui';
|
|
10
|
+
export * from './lib/modules/tracker-form';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactWrapperModule } from '../react-wrapper/react-wrapper.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ButtonComponent extends
|
|
4
|
+
export declare class ButtonComponent extends ReactWrapperModule {
|
|
5
5
|
label: string;
|
|
6
6
|
primary?: boolean;
|
|
7
7
|
secondary?: boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DropdownMenuOption {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: any;
|
|
7
|
+
destructive?: boolean;
|
|
8
|
+
onClick?: Function;
|
|
9
|
+
}
|
|
10
|
+
export declare const ContextMenu: (params: {
|
|
11
|
+
dropDownOptions: DropdownMenuOption[];
|
|
12
|
+
anchorRef: any;
|
|
13
|
+
onClose: Function;
|
|
14
|
+
onMenuClick: (dropdownOption: DropdownMenuOption) => void;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export declare const DropdownMenu: (props: {
|
|
17
|
+
dropdownOptions: DropdownMenuOption[];
|
|
18
|
+
onClick: (dropdownOption: DropdownMenuOption) => void;
|
|
19
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dropdown-menu';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
|
+
import { ColumnDefinition, TableRow } from '../../models/data-table.models';
|
|
5
|
+
import { DropdownMenuOption } from '../../components/dropdown-menu';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DataTableUIComponent extends ReactWrapperModule implements AfterViewInit {
|
|
8
|
+
data: TableRow[];
|
|
9
|
+
columnDefinitions: ColumnDefinition[];
|
|
10
|
+
actionOptions?: DropdownMenuOption[];
|
|
11
|
+
actionSelected: EventEmitter<{
|
|
12
|
+
action: string;
|
|
13
|
+
row: TableRow;
|
|
14
|
+
}>;
|
|
15
|
+
DataTableUI: () => React.JSX.Element;
|
|
16
|
+
ngAfterViewInit(): Promise<void>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableUIComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableUIComponent, "app-data-table-ui", never, { "data": { "alias": "data"; "required": false; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./containers/data-table-ui/data-table-ui.component.tsx";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../../shared/shared.module";
|
|
5
|
+
import * as i4 from "../react-wrapper/react-wrapper.component.tsx";
|
|
6
|
+
export declare class DataTableUIModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableUIModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DataTableUIModule, [typeof i1.DataTableUIComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule, typeof i4.ReactWrapperModule], [typeof i1.DataTableUIComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DataTableUIModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-dynamic-styles.hook';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDynamicStyles: <T extends Record<string, React.CSSProperties | any>>(stylesObj: T) => { [K in keyof T]: string; };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EventEmitter, NgZone, OnChanges, Signal, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { ReactWrapperModule } from '../../react-wrapper/react-wrapper.component';
|
|
5
5
|
import { FieldConfig, FormField } from '../models';
|
|
6
6
|
import { OrganisationUnitSelectionConfig } from '../../organisation-unit-selector';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
8
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class BaseFormFieldComponent extends
|
|
10
|
+
export declare class BaseFormFieldComponent extends ReactWrapperModule implements OnChanges {
|
|
11
11
|
#private;
|
|
12
12
|
ngZone: NgZone;
|
|
13
13
|
httpClient: NgxDhis2HttpClientService;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, NgZone, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { IFormFieldGroup } from '../../interfaces';
|
|
4
4
|
import { FormValue } from '../../models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class RepeatableFormComponent implements OnInit {
|
|
7
|
+
#private;
|
|
8
|
+
ngZone: NgZone;
|
|
7
9
|
formObject: any;
|
|
8
10
|
formData: any;
|
|
9
11
|
fieldGroup: import("@angular/core").InputSignal<IFormFieldGroup>;
|
|
10
12
|
form: FormGroup;
|
|
11
13
|
numberOfRows: number | string;
|
|
12
14
|
programRuleActions: any[];
|
|
13
|
-
events
|
|
15
|
+
events: import("@angular/core").ModelSignal<unknown>;
|
|
14
16
|
program: string;
|
|
15
17
|
programStage: string;
|
|
16
18
|
repeatDependentField: string;
|
|
@@ -23,9 +25,14 @@ export declare class RepeatableFormComponent implements OnInit {
|
|
|
23
25
|
repeatableFormEntities: {
|
|
24
26
|
[event: string]: FormGroup;
|
|
25
27
|
};
|
|
28
|
+
eventForm: FormGroup;
|
|
29
|
+
eventFormValue: import("@angular/core").WritableSignal<FormValue>;
|
|
30
|
+
showForm: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
eventIndex: import("@angular/core").WritableSignal<number>;
|
|
32
|
+
constructor();
|
|
26
33
|
get isValid(): boolean;
|
|
27
34
|
ngOnInit(): void;
|
|
28
|
-
onFormUpdate(formValue: FormValue
|
|
35
|
+
onFormUpdate(formValue: FormValue): void;
|
|
29
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<RepeatableFormComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RepeatableFormComponent, "ng-dhis2-ui-repeatable-form", never, { "formObject": { "alias": "formObject"; "required": false; }; "formData": { "alias": "formData"; "required": false; }; "fieldGroup": { "alias": "fieldGroup"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; }; "numberOfRows": { "alias": "numberOfRows"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; }; "events": { "alias": "events"; "required": false; }; "program": { "alias": "program"; "required": false; }; "programStage": { "alias": "programStage"; "required": false; }; "repeatDependentField": { "alias": "repeatDependentField"; "required": false; }; "dataEntities": { "alias": "dataEntities"; "required": true; "isSignal": true; }; }, { "repeatableStageUpdate": "repeatableStageUpdate"; }, never, never, false, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RepeatableFormComponent, "ng-dhis2-ui-repeatable-form", never, { "formObject": { "alias": "formObject"; "required": false; }; "formData": { "alias": "formData"; "required": false; }; "fieldGroup": { "alias": "fieldGroup"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; }; "numberOfRows": { "alias": "numberOfRows"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; }; "programStage": { "alias": "programStage"; "required": false; }; "repeatDependentField": { "alias": "repeatDependentField"; "required": false; }; "dataEntities": { "alias": "dataEntities"; "required": true; "isSignal": true; }; }, { "events": "eventsChange"; "repeatableStageUpdate": "repeatableStageUpdate"; }, never, never, false, never>;
|
|
31
38
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, NgZone, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
3
4
|
import { IFormFieldGroup, IFormMetadata } from '../../interfaces';
|
|
4
5
|
import { FormValue } from '../../models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class SectionFormComponent implements OnInit {
|
|
7
8
|
#private;
|
|
9
|
+
ngZone: NgZone;
|
|
8
10
|
loading: import("@angular/core").InputSignal<boolean>;
|
|
9
|
-
isLab?: boolean;
|
|
10
|
-
isLabResulst: boolean;
|
|
11
|
-
clientId?: string;
|
|
12
11
|
isloading: boolean;
|
|
13
|
-
labNumber?: any;
|
|
14
12
|
formMetaData: import("@angular/core").InputSignal<IFormMetadata>;
|
|
15
13
|
dataValueEntities: import("@angular/core").InputSignal<Record<string, unknown>>;
|
|
16
14
|
formGroups: Record<string, FormGroup>;
|
|
@@ -20,12 +18,15 @@ export declare class SectionFormComponent implements OnInit {
|
|
|
20
18
|
save: EventEmitter<Record<string, unknown>>;
|
|
21
19
|
formUpdate: EventEmitter<Record<string, unknown>>;
|
|
22
20
|
cancel: EventEmitter<any>;
|
|
23
|
-
|
|
21
|
+
inValid: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
inValid$: Observable<boolean>;
|
|
23
|
+
constructor();
|
|
24
24
|
ngOnInit(): void;
|
|
25
25
|
onUpdateRepeatableStage(repeatableData: Record<number, FormValue>, fieldGroup: IFormFieldGroup): void;
|
|
26
26
|
onFormUpdate(formValue: FormValue, fieldGroupId: string): void;
|
|
27
|
-
onSubmit(
|
|
28
|
-
onCancel(event
|
|
27
|
+
onSubmit(): void;
|
|
28
|
+
onCancel(event?: MouseEvent): void;
|
|
29
|
+
checkIfInValid(): boolean;
|
|
29
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<SectionFormComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SectionFormComponent, "ng-dhis2-ui-section-form", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionFormComponent, "ng-dhis2-ui-section-form", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": true; "isSignal": true; }; "dataValueEntities": { "alias": "dataValueEntities"; "required": true; "isSignal": true; }; }, { "save": "save"; "formUpdate": "formUpdate"; "cancel": "cancel"; }, never, never, false, never>;
|
|
31
32
|
}
|
|
@@ -6,9 +6,10 @@ import * as i4 from "./containers/section-form/section-form.component";
|
|
|
6
6
|
import * as i5 from "./components/form-field-item.component";
|
|
7
7
|
import * as i6 from "@angular/common";
|
|
8
8
|
import * as i7 from "@angular/forms";
|
|
9
|
-
import * as i8 from "../
|
|
9
|
+
import * as i8 from "../react-wrapper/react-wrapper.component.tsx";
|
|
10
|
+
import * as i9 from "../organisation-unit-selector/organisation-unit-selector.module";
|
|
10
11
|
export declare class D2FormModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<D2FormModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<D2FormModule, [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent, typeof i5.FormFieldItemComponent], [typeof i6.CommonModule, typeof i7.ReactiveFormsModule, typeof i8.OrganisationUnitSelectorModule], [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<D2FormModule, [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent, typeof i5.FormFieldItemComponent], [typeof i6.CommonModule, typeof i7.ReactiveFormsModule, typeof i8.ReactWrapperModule, typeof i9.OrganisationUnitSelectorModule], [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<D2FormModule>;
|
|
14
15
|
}
|
|
@@ -2,7 +2,8 @@ import { IFormField } from './form-field.interface';
|
|
|
2
2
|
export interface IFormFieldGroup {
|
|
3
3
|
dataKey?: string;
|
|
4
4
|
id: string;
|
|
5
|
-
name
|
|
5
|
+
name?: string;
|
|
6
|
+
sortOrder?: number;
|
|
6
7
|
translations?: any;
|
|
7
8
|
isFormHorizontal?: boolean;
|
|
8
9
|
attributes?: string[] | object[];
|
|
@@ -3,15 +3,16 @@ import { FormField } from './form-field.model';
|
|
|
3
3
|
import { Program } from '@iapps/d2-web-sdk';
|
|
4
4
|
import { IFormMetadata, IFormMetadataSection } from '../interfaces';
|
|
5
5
|
export declare class FormMetaData implements IFormMetadata {
|
|
6
|
+
#private;
|
|
6
7
|
private params;
|
|
7
8
|
id: string;
|
|
8
9
|
name: string;
|
|
9
10
|
description?: string | undefined;
|
|
10
11
|
downloadSqlView?: string | undefined;
|
|
11
12
|
constructor(params: {
|
|
12
|
-
formMetaData: Partial<FormMetaData>;
|
|
13
13
|
programs: Program[];
|
|
14
14
|
locale?: string;
|
|
15
|
+
customFormMetaData?: Partial<FormMetaData>;
|
|
15
16
|
});
|
|
16
17
|
get sections(): IFormMetadataSection[];
|
|
17
18
|
get fields(): FormField<string>[];
|
|
@@ -7,7 +7,9 @@ export declare class FormValue {
|
|
|
7
7
|
constructor(form: FormGroup, fields: FormField<string>[], changedField?: FormField<string>);
|
|
8
8
|
get isValid(): boolean;
|
|
9
9
|
clear(): void;
|
|
10
|
-
getValues(
|
|
10
|
+
getValues(options?: {
|
|
11
|
+
valueOnly?: boolean;
|
|
12
|
+
}): {
|
|
11
13
|
[id: string]: {
|
|
12
14
|
id: string;
|
|
13
15
|
value: string;
|
|
@@ -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): "
|
|
6
|
+
static getFieldType(valueType: string): "date" | "org-unit" | "file" | "tel" | "number" | "text";
|
|
7
7
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
8
8
|
static getOptionEntities?(options: any[]): any;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactWrapperModule } from '../react-wrapper/react-wrapper.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class HeaderBarComponent extends
|
|
5
|
+
export declare class HeaderBarComponent extends ReactWrapperModule {
|
|
6
6
|
private httpClient;
|
|
7
7
|
constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService);
|
|
8
8
|
ngAfterViewInit(): Promise<void>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EventEmitter, SimpleChanges } from '@angular/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactWrapperModule } from '../../react-wrapper/react-wrapper.component';
|
|
4
4
|
import { DropdownMenuOption } from '../components/dropdown-menu';
|
|
5
|
-
import { TableRow } from '../models/line-list.models';
|
|
6
5
|
import { AttributeFilter } from '../models/attribute-filter.model';
|
|
7
|
-
import { ReactWrapperComponent } from '../../react-wrapper';
|
|
8
6
|
import { FilterConfig } from '../models/filter-config.model';
|
|
7
|
+
import { TableRow } from '../models/line-list.models';
|
|
8
|
+
import { LineListService } from '../services/line-list.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class LineListTableComponent extends
|
|
10
|
+
export declare class LineListTableComponent extends ReactWrapperModule {
|
|
11
11
|
programId: string;
|
|
12
12
|
orgUnit: string;
|
|
13
13
|
programStageId?: string;
|
|
@@ -16,6 +16,7 @@ export declare class LineListTableComponent extends ReactWrapperComponent {
|
|
|
16
16
|
startDate?: string;
|
|
17
17
|
endDate?: string;
|
|
18
18
|
filters?: FilterConfig[];
|
|
19
|
+
ouMode?: string;
|
|
19
20
|
actionSelected: EventEmitter<{
|
|
20
21
|
action: string;
|
|
21
22
|
row: TableRow;
|
|
@@ -27,5 +28,5 @@ export declare class LineListTableComponent extends ReactWrapperComponent {
|
|
|
27
28
|
LineList: () => React.JSX.Element;
|
|
28
29
|
ngAfterViewInit(): Promise<void>;
|
|
29
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<LineListTableComponent, 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>;
|
|
31
|
+
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; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
31
32
|
}
|
|
@@ -102,6 +102,7 @@ export interface ProgramMetadata {
|
|
|
102
102
|
id: string;
|
|
103
103
|
name: string;
|
|
104
104
|
}[];
|
|
105
|
+
programTrackedEntityAttributes: ProgramTrackedEntityAttribute[];
|
|
105
106
|
}
|
|
106
107
|
export interface LineListResponse {
|
|
107
108
|
metadata: ProgramMetadata;
|
|
@@ -127,3 +128,45 @@ export interface CreatedByUserInfo {
|
|
|
127
128
|
surname: string;
|
|
128
129
|
username: string;
|
|
129
130
|
}
|
|
131
|
+
export interface ProgramTrackedEntityAttribute {
|
|
132
|
+
access: {
|
|
133
|
+
read: boolean;
|
|
134
|
+
update: boolean;
|
|
135
|
+
externalize: boolean;
|
|
136
|
+
delete: boolean;
|
|
137
|
+
write: boolean;
|
|
138
|
+
};
|
|
139
|
+
attributeValues: any[];
|
|
140
|
+
created: string;
|
|
141
|
+
displayInList: boolean;
|
|
142
|
+
displayName: string;
|
|
143
|
+
displayShortName: string;
|
|
144
|
+
externalAccess: boolean;
|
|
145
|
+
favorite: boolean;
|
|
146
|
+
favorites: any[];
|
|
147
|
+
id: string;
|
|
148
|
+
lastUpdated: string;
|
|
149
|
+
mandatory: boolean;
|
|
150
|
+
name: string;
|
|
151
|
+
program: {
|
|
152
|
+
id: string;
|
|
153
|
+
};
|
|
154
|
+
programTrackedEntityAttributeGroups: any[];
|
|
155
|
+
renderOptionsAsRadio: boolean;
|
|
156
|
+
searchable: boolean;
|
|
157
|
+
sharing: {
|
|
158
|
+
userGroups: any;
|
|
159
|
+
external: boolean;
|
|
160
|
+
users: any;
|
|
161
|
+
};
|
|
162
|
+
sortOrder: number;
|
|
163
|
+
trackedEntityAttribute: {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
valueType: string;
|
|
167
|
+
};
|
|
168
|
+
translations: any[];
|
|
169
|
+
userAccesses: any[];
|
|
170
|
+
userGroupAccesses: any[];
|
|
171
|
+
valueType: string;
|
|
172
|
+
}
|
|
@@ -10,7 +10,7 @@ export declare class LineListService {
|
|
|
10
10
|
private getTrackedEntityInstances;
|
|
11
11
|
private getEvents;
|
|
12
12
|
private getEventsByProgramStage;
|
|
13
|
-
getLineListData(programId: string, orgUnit?: string, programStageId?: string, page?: number, pageSize?: number, filters?: AttributeFilter[], startDate?: string, endDate?: string): Observable<LineListResponse>;
|
|
13
|
+
getLineListData(programId: string, orgUnit?: string, programStageId?: string, page?: number, pageSize?: number, filters?: AttributeFilter[], startDate?: string, endDate?: string, ouMode?: string): Observable<LineListResponse>;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<LineListService, never>;
|
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<LineListService>;
|
|
16
16
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
2
2
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
4
|
import { OrganisationUnitSelectionConfig, OrganisationUnitSelectionUsageType } from '../../models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
type OrganisationUnitSelectionEvent = {
|
|
7
7
|
dimensionId: string;
|
|
8
8
|
items: Record<string, unknown>[];
|
|
9
9
|
};
|
|
10
|
-
export declare class OrganisationUnitSelectorComponent extends
|
|
10
|
+
export declare class OrganisationUnitSelectorComponent extends ReactWrapperModule {
|
|
11
11
|
private httpClient;
|
|
12
12
|
private ngZone;
|
|
13
13
|
selectedOrgUnits: any[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
4
|
import { OrganisationUnitSelectionConfig, OrganisationUnitSelectionUsageType } from '../../models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
type OrganisationUnitSelectionEvent = {
|
|
7
7
|
dimensionId: string;
|
|
8
8
|
items: Record<string, unknown>[];
|
|
9
9
|
};
|
|
10
|
-
export declare class OrganisationUnitSelectorModalComponent extends
|
|
10
|
+
export declare class OrganisationUnitSelectorModalComponent extends ReactWrapperModule {
|
|
11
11
|
private httpClient;
|
|
12
12
|
selectedOrgUnits: any[];
|
|
13
13
|
orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
|
package/lib/modules/period-selector/containers/period-selector/period-selector.component.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
2
2
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
type PeriodSelectionEvent = {
|
|
6
6
|
dimensionId: string;
|
|
7
7
|
items: Record<string, unknown>[];
|
|
8
8
|
};
|
|
9
|
-
export declare class PeriodSelectorComponent extends
|
|
9
|
+
export declare class PeriodSelectorComponent extends ReactWrapperModule {
|
|
10
10
|
private httpClient;
|
|
11
11
|
private ngZone;
|
|
12
12
|
selectedPeriods: any[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class PeriodSelectorModalComponent extends
|
|
5
|
+
export declare class PeriodSelectorModalComponent extends ReactWrapperModule {
|
|
6
6
|
private httpClient;
|
|
7
7
|
selectedPeriods: any[];
|
|
8
8
|
cancel: EventEmitter<any>;
|
|
@@ -2,7 +2,7 @@ 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
|
|
5
|
+
export declare class ReactWrapperModule implements OnDestroy, AfterViewInit {
|
|
6
6
|
protected elementRef: ElementRef<HTMLElement>;
|
|
7
7
|
props?: ComponentProps<any>;
|
|
8
8
|
component: any;
|
|
@@ -12,6 +12,6 @@ export declare class ReactWrapperComponent implements OnDestroy, AfterViewInit {
|
|
|
12
12
|
ngAfterViewInit(): void;
|
|
13
13
|
ngOnDestroy(): void;
|
|
14
14
|
protected render(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReactWrapperModule, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ReactWrapperModule, "ng-dhis2-ui-wrapper", never, { "props": { "alias": "props"; "required": false; }; "component": { "alias": "component"; "required": false; }; }, {}, ["content"], never, true, never>;
|
|
17
17
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
|
+
import { AttributeFilter, DataElementFilter, SelectionFiltersProps } from '../../models/selection-filters-ui.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SelectionFiltersComponent extends ReactWrapperModule implements AfterViewInit {
|
|
7
|
+
actionOptions: {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: (row: any) => void;
|
|
10
|
+
}[];
|
|
11
|
+
attributeFilters: AttributeFilter[];
|
|
12
|
+
dataElementFilters: DataElementFilter[];
|
|
13
|
+
startDate?: string;
|
|
14
|
+
endDate?: string;
|
|
15
|
+
actionSelected: EventEmitter<SelectionFiltersProps>;
|
|
16
|
+
SelectionFiltersUI: () => React.JSX.Element;
|
|
17
|
+
ngAfterViewInit(): Promise<void>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFiltersComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionFiltersComponent, "app-selection-filters-ui", never, { "actionOptions": { "alias": "actionOptions"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "dataElementFilters": { "alias": "dataElementFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface SelectionFiltersProps {
|
|
2
|
+
actionOptions: ActionOption[];
|
|
3
|
+
attributeFilters: AttributeFilter[];
|
|
4
|
+
dataElementFilters: DataElementFilter[];
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ActionOption {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
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
|
+
export interface Option {
|
|
23
|
+
id: string;
|
|
24
|
+
code: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AttributeFilter {
|
|
28
|
+
attribute: string;
|
|
29
|
+
operator: string;
|
|
30
|
+
name: string;
|
|
31
|
+
valueType: string;
|
|
32
|
+
hasOptions: boolean;
|
|
33
|
+
code: string;
|
|
34
|
+
value: string;
|
|
35
|
+
options: Option[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./containers/selection-filters-ui/selection-filters-ui.component.tsx";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../../shared/shared.module";
|
|
5
|
+
import * as i4 from "../react-wrapper/react-wrapper.component.tsx";
|
|
6
|
+
export declare class SelectionFiltersUiModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFiltersUiModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SelectionFiltersUiModule, [typeof i1.SelectionFiltersComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule, typeof i4.ReactWrapperModule], [typeof i1.SelectionFiltersComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SelectionFiltersUiModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { BaseTrackerQuery, TrackedEntityInstance } from '@iapps/d2-web-sdk';
|
|
3
|
+
import { IFormMetadata } from '../form';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TrackerFormComponent implements OnInit {
|
|
6
|
+
program: import("@angular/core").InputSignal<string>;
|
|
7
|
+
d2: import("@iapps/d2-web-sdk").D2Web;
|
|
8
|
+
trackerQuery: BaseTrackerQuery<TrackedEntityInstance>;
|
|
9
|
+
formMetaData: IFormMetadata;
|
|
10
|
+
ngOnInit(): Promise<void>;
|
|
11
|
+
onSave(event: any): void;
|
|
12
|
+
onCancel(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TrackerFormComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TrackerFormComponent, "ng-dhis2-ui-tracker-form", never, { "program": { "alias": "program"; "required": true; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./tracker-form.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../form/form.module";
|
|
5
|
+
export declare class TrackerFormModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TrackerFormModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TrackerFormModule, [typeof i1.TrackerFormComponent], [typeof i2.CommonModule, typeof i3.D2FormModule], [typeof i1.TrackerFormComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TrackerFormModule>;
|
|
9
|
+
}
|
package/package.json
CHANGED