@iapps/ng-dhis2-ui 1.1.53 → 1.1.55
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 +335 -271
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/modules/event-form/event-form.component.d.ts +21 -0
- package/lib/modules/event-form/event-form.module.d.ts +9 -0
- package/lib/modules/event-form/index.d.ts +2 -0
- package/lib/modules/form/components/base-form-field.component.d.ts +8 -23
- package/lib/modules/form/containers/form/form.component.d.ts +14 -10
- package/lib/modules/form/containers/form-field/form-field.component.d.ts +10 -5
- package/lib/modules/form/containers/section-form/section-form.component.d.ts +1 -1
- package/lib/modules/form/hooks/field-validation.hook.d.ts +2 -2
- package/lib/modules/form/interfaces/form-field.interface.d.ts +4 -0
- package/lib/modules/form/models/form-field.model.d.ts +7 -1
- package/lib/modules/form/models/form-metadata-rule.model.d.ts +9 -2
- package/lib/modules/form/models/form-metadata-section.model.d.ts +2 -0
- package/lib/modules/form/models/form-metadata.model.d.ts +3 -3
- package/lib/modules/form/models/form-value.model.d.ts +4 -4
- package/lib/modules/form/utils/form.util.d.ts +3 -2
- package/lib/modules/line-list/containers/line-list.component.d.ts +2 -1
- package/lib/modules/line-list/services/line-list.service.d.ts +1 -1
- package/lib/modules/tracker-form/tracker-form.component.d.ts +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { BaseEventQuery, DHIS2Event } from '@iapps/d2-web-sdk';
|
|
3
|
+
import { IFormMetadata } from '../form';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class EventFormComponent implements OnInit {
|
|
6
|
+
program: import("@angular/core").InputSignal<string>;
|
|
7
|
+
programStage: import("@angular/core").InputSignal<string>;
|
|
8
|
+
eventId: import("@angular/core").InputSignal<string>;
|
|
9
|
+
enrollment: import("@angular/core").InputSignal<string>;
|
|
10
|
+
trackedEntity: import("@angular/core").InputSignal<string>;
|
|
11
|
+
d2: import("@iapps/d2-web-sdk").D2Web;
|
|
12
|
+
eventQuery: BaseEventQuery<DHIS2Event>;
|
|
13
|
+
formMetaData: IFormMetadata;
|
|
14
|
+
instance: DHIS2Event;
|
|
15
|
+
ngOnInit(): Promise<void>;
|
|
16
|
+
onFormUpdate(values: any): void;
|
|
17
|
+
onSave(event: any): void;
|
|
18
|
+
onCancel(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EventFormComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EventFormComponent, "ng-dhis2-ui-event-form", never, { "program": { "alias": "program"; "required": true; "isSignal": true; }; "programStage": { "alias": "programStage"; "required": true; "isSignal": true; }; "eventId": { "alias": "eventId"; "required": false; "isSignal": true; }; "enrollment": { "alias": "enrollment"; "required": false; "isSignal": true; }; "trackedEntity": { "alias": "trackedEntity"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./event-form.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../form/form.module";
|
|
5
|
+
export declare class EventFormModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EventFormModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EventFormModule, [typeof i1.EventFormComponent], [typeof i2.CommonModule, typeof i3.D2FormModule], [typeof i1.EventFormComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EventFormModule>;
|
|
9
|
+
}
|
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
import { EventEmitter, NgZone, OnChanges, Signal, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import { ReactWrapperModule } from '../../react-wrapper/react-wrapper.component';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Observable } from 'rxjs';
|
|
8
|
-
import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
|
|
6
|
+
import { IFormField } from '../interfaces';
|
|
7
|
+
import { FieldConfig } from '../models';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare class BaseFormFieldComponent extends ReactWrapperModule implements OnChanges {
|
|
11
10
|
#private;
|
|
12
11
|
ngZone: NgZone;
|
|
13
12
|
httpClient: NgxDhis2HttpClientService;
|
|
14
13
|
fieldType: string;
|
|
15
|
-
field: import("@angular/core").InputSignal<
|
|
14
|
+
field: import("@angular/core").InputSignal<IFormField<string>>;
|
|
16
15
|
fieldConfig: import("@angular/core").InputSignal<FieldConfig>;
|
|
17
16
|
form: import("@angular/core").ModelSignal<FormGroup<any>>;
|
|
18
17
|
isValid: import("@angular/core").InputSignal<boolean>;
|
|
19
|
-
|
|
18
|
+
isValueAssigned: import("@angular/core").InputSignal<boolean>;
|
|
20
19
|
value: import("@angular/core").ModelSignal<string>;
|
|
21
|
-
protected value$: Observable<string>;
|
|
22
|
-
|
|
23
|
-
selectedOrgUnits: any;
|
|
24
|
-
onSelectOrgUnit: (selectedOrgUnits: any) => void;
|
|
25
|
-
}) => React.JSX.Element;
|
|
26
|
-
showOrgUnitTree: import("@angular/core").WritableSignal<boolean>;
|
|
27
|
-
orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
|
|
28
|
-
selectedOrgUnit: import("@angular/core").WritableSignal<any>;
|
|
29
|
-
selectedOrgUnit$: Observable<any>;
|
|
20
|
+
protected value$: import("rxjs").Observable<string>;
|
|
21
|
+
protected isValueAssigned$: import("rxjs").Observable<boolean>;
|
|
30
22
|
label: Signal<string | undefined>;
|
|
31
23
|
placeholder: Signal<string>;
|
|
32
24
|
InputField: () => React.JSX.Element;
|
|
@@ -41,13 +33,6 @@ export declare class BaseFormFieldComponent extends ReactWrapperModule implement
|
|
|
41
33
|
ngAfterViewInit(): Promise<void>;
|
|
42
34
|
ngOnChanges(changes: SimpleChanges): void;
|
|
43
35
|
onChange(event: any): void;
|
|
44
|
-
onSelectOrgUnit(selectedOrgUnits: Record<string, string>[]): void;
|
|
45
|
-
onCancelOrgUnit(): void;
|
|
46
|
-
private getAppConfig;
|
|
47
|
-
getOrgUnitAttributeByUsage(usageType: string): "organisationUnits" | "dataViewOrganisationUnits";
|
|
48
|
-
getRootOrgUnits(): Observable<string[]>;
|
|
49
|
-
getOrgUnitGroups(): Promise<any>;
|
|
50
|
-
getOrgUnitLevels(): Promise<any>;
|
|
51
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormFieldComponent, never>;
|
|
52
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormFieldComponent, never, never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "isValid": { "alias": "isValid"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "form": "formChange"; "value": "valueChange"; "update": "update"; "immediateUpdate": "immediateUpdate"; }, never, never, true, never>;
|
|
37
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormFieldComponent, never, never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "isValid": { "alias": "isValid"; "required": false; "isSignal": true; }; "isValueAssigned": { "alias": "isValueAssigned"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "form": "formChange"; "value": "valueChange"; "update": "update"; "immediateUpdate": "immediateUpdate"; }, never, never, true, never>;
|
|
53
38
|
}
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges } from '@angular/core';
|
|
1
|
+
import { EffectRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { FieldsData, FormConfig,
|
|
3
|
+
import { FieldsData, FormConfig, IMetadataRuleAction } from '../../models';
|
|
4
4
|
import { FormFieldComponent } from '../form-field/form-field.component';
|
|
5
|
+
import { IFormField } from '../../interfaces';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class FormComponent implements OnChanges {
|
|
7
|
+
export declare class FormComponent implements OnChanges, OnDestroy {
|
|
8
|
+
#private;
|
|
7
9
|
formConfig: import("@angular/core").InputSignal<FormConfig>;
|
|
8
|
-
fields:
|
|
10
|
+
fields: IFormField<string>[];
|
|
9
11
|
form: FormGroup;
|
|
10
12
|
isFormHorizontal: boolean;
|
|
11
13
|
showSaveButton: boolean;
|
|
12
14
|
fieldsData: FieldsData;
|
|
13
15
|
fieldClass: string;
|
|
14
16
|
shouldRenderAsCheckBoxesButton: boolean;
|
|
15
|
-
programRuleActions:
|
|
17
|
+
programRuleActions: import("@angular/core").InputSignal<IMetadataRuleAction[]>;
|
|
16
18
|
dataEntities: any;
|
|
17
19
|
configuration: import("@angular/core").Signal<FormConfig>;
|
|
18
20
|
formUpdate: EventEmitter<any>;
|
|
19
21
|
fieldComponents: FormFieldComponent[];
|
|
20
22
|
values: any;
|
|
21
|
-
get sanitizedFields():
|
|
23
|
+
get sanitizedFields(): IFormField<string>[];
|
|
22
24
|
get layoutCssClass(): string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
ruleProcessor: EffectRef;
|
|
26
|
+
constructor();
|
|
27
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
28
|
onSubmit(): void;
|
|
26
|
-
onFieldUpdate(form: FormGroup, field:
|
|
29
|
+
onFieldUpdate(form: FormGroup, field: IFormField<string>): void;
|
|
27
30
|
onClear(): void;
|
|
28
31
|
isFormInValid(): boolean;
|
|
29
32
|
onRunTimeOptionUpdate(result: any): void;
|
|
33
|
+
ngOnDestroy(): void;
|
|
30
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "ng-dhis2-ui-form", never, { "formConfig": { "alias": "formConfig"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isFormHorizontal": { "alias": "isFormHorizontal"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "fieldsData": { "alias": "fieldsData"; "required": false; }; "fieldClass": { "alias": "fieldClass"; "required": false; }; "shouldRenderAsCheckBoxesButton": { "alias": "shouldRenderAsCheckBoxesButton"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; }; "dataEntities": { "alias": "dataEntities"; "required": false; }; }, { "formUpdate": "formUpdate"; }, never, never, false, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "ng-dhis2-ui-form", never, { "formConfig": { "alias": "formConfig"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isFormHorizontal": { "alias": "isFormHorizontal"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "fieldsData": { "alias": "fieldsData"; "required": false; }; "fieldClass": { "alias": "fieldClass"; "required": false; }; "shouldRenderAsCheckBoxesButton": { "alias": "shouldRenderAsCheckBoxesButton"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; "isSignal": true; }; "dataEntities": { "alias": "dataEntities"; "required": false; }; }, { "formUpdate": "formUpdate"; }, never, never, false, never>;
|
|
32
36
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { EffectRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
|
-
import { FieldConfig,
|
|
4
|
+
import { FieldConfig, IMetadataRuleAction } from '../../models';
|
|
5
|
+
import { IFormField } from '../../interfaces';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
|
|
7
|
-
|
|
8
|
+
#private;
|
|
9
|
+
field: import("@angular/core").InputSignal<IFormField<string>>;
|
|
8
10
|
fieldConfig: FieldConfig;
|
|
9
11
|
form: FormGroup;
|
|
10
12
|
isCheckBoxButton: boolean;
|
|
11
13
|
fieldClass: string;
|
|
12
|
-
programRuleActions:
|
|
14
|
+
programRuleActions: import("@angular/core").InputSignal<IMetadataRuleAction[]>;
|
|
13
15
|
dataEntities: any;
|
|
14
16
|
minDate: any;
|
|
15
17
|
maxDate: Date;
|
|
@@ -25,6 +27,9 @@ export declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy
|
|
|
25
27
|
fieldFilterControl: FormControl;
|
|
26
28
|
protected _onDestroy: Subject<void>;
|
|
27
29
|
optionSearchTerm: string;
|
|
30
|
+
isValueAssigned: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
ruleProcessor: EffectRef;
|
|
32
|
+
constructor();
|
|
28
33
|
ngOnChanges(changes: SimpleChanges): void;
|
|
29
34
|
ngOnInit(): void;
|
|
30
35
|
ngOnDestroy(): void;
|
|
@@ -46,5 +51,5 @@ export declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy
|
|
|
46
51
|
onFieldUpdate(e?: any, isDate?: boolean, isDateTime?: boolean): void;
|
|
47
52
|
onUpdateRuntimeOptions(options: any[]): void;
|
|
48
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "ng-dhis2-ui-form-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isCheckBoxButton": { "alias": "isCheckBoxButton"; "required": false; }; "fieldClass": { "alias": "fieldClass"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; }; "dataEntities": { "alias": "dataEntities"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "fieldUpdate": "fieldUpdate"; "immediateFieldUpdate": "immediateFieldUpdate"; "runtimeOptionChange": "runtimeOptionChange"; }, never, never, false, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "ng-dhis2-ui-form-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isCheckBoxButton": { "alias": "isCheckBoxButton"; "required": false; }; "fieldClass": { "alias": "fieldClass"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; "isSignal": true; }; "dataEntities": { "alias": "dataEntities"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "fieldUpdate": "fieldUpdate"; "immediateFieldUpdate": "immediateFieldUpdate"; "runtimeOptionChange": "runtimeOptionChange"; }, never, never, false, never>;
|
|
50
55
|
}
|
|
@@ -14,7 +14,7 @@ export declare class SectionFormComponent implements OnInit {
|
|
|
14
14
|
formGroups: Record<string, FormGroup>;
|
|
15
15
|
formValueEntity: Record<string, FormValue>;
|
|
16
16
|
repeatableFormValueEntity: Record<string, Record<number, FormValue>>;
|
|
17
|
-
ruleActions:
|
|
17
|
+
ruleActions: import("@angular/core").WritableSignal<any[]>;
|
|
18
18
|
save: EventEmitter<Record<string, unknown>>;
|
|
19
19
|
formUpdate: EventEmitter<Record<string, unknown>>;
|
|
20
20
|
cancel: EventEmitter<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormGroup } from '@angular/forms';
|
|
2
|
-
import {
|
|
2
|
+
import { IFormField } from '../interfaces';
|
|
3
3
|
export declare const useFieldValidation: (props: {
|
|
4
4
|
form: FormGroup;
|
|
5
|
-
field:
|
|
5
|
+
field: IFormField<string>;
|
|
6
6
|
touched: boolean;
|
|
7
7
|
value: string;
|
|
8
8
|
}) => {
|
|
@@ -20,6 +20,7 @@ export interface IFormField<T> {
|
|
|
20
20
|
maxLength?: number | string;
|
|
21
21
|
hidden: boolean;
|
|
22
22
|
units?: string;
|
|
23
|
+
generated?: boolean;
|
|
23
24
|
isDataElement?: boolean;
|
|
24
25
|
isAttribute?: boolean;
|
|
25
26
|
isOrgUnit?: boolean;
|
|
@@ -37,4 +38,7 @@ export interface IFormField<T> {
|
|
|
37
38
|
unique?: boolean;
|
|
38
39
|
metaType?: FormFieldMetaType;
|
|
39
40
|
stepId?: string;
|
|
41
|
+
availableOptionsLabel?: string;
|
|
42
|
+
selectedOptionsLabel?: string;
|
|
43
|
+
allowFutureDate?: boolean;
|
|
40
44
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { FieldControlType, FormFieldMetaType, IFormField, IFieldDropdown } from '../interfaces';
|
|
2
|
-
|
|
2
|
+
interface FormFieldFunction<T> {
|
|
3
|
+
setMax: (field: Partial<IFormField<T>>) => string | number | Date | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare class FormField<T> implements IFormField<T>, FormFieldFunction<T> {
|
|
3
6
|
value?: T | '';
|
|
4
7
|
id: string;
|
|
5
8
|
code?: string;
|
|
@@ -38,5 +41,8 @@ export declare class FormField<T> implements IFormField<T> {
|
|
|
38
41
|
stepId?: string;
|
|
39
42
|
availableOptionsLabel?: string;
|
|
40
43
|
selectedOptionsLabel?: string;
|
|
44
|
+
allowFutureDate?: boolean;
|
|
41
45
|
constructor(options?: Partial<FormField<T>>);
|
|
46
|
+
setMax(field: Partial<FormField<T>>): string | number | Date | undefined;
|
|
42
47
|
}
|
|
48
|
+
export {};
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
import { ProgramRule, ProgramRuleAction, ProgramRuleVariable } from '@iapps/d2-web-sdk';
|
|
1
|
+
import { Option, ProgramRule, ProgramRuleAction, ProgramRuleVariable } from '@iapps/d2-web-sdk';
|
|
2
2
|
interface JsonTransformer<T> {
|
|
3
3
|
toJson: () => T;
|
|
4
4
|
}
|
|
5
5
|
export interface IMetadataRuleAction {
|
|
6
6
|
field: string;
|
|
7
7
|
actionType: string;
|
|
8
|
+
assignedData?: string;
|
|
9
|
+
displayedContent?: string;
|
|
10
|
+
options?: Partial<Option>[];
|
|
8
11
|
}
|
|
9
12
|
export declare class MetadataRuleAction implements IMetadataRuleAction, JsonTransformer<IMetadataRuleAction> {
|
|
10
13
|
private ruleAction;
|
|
11
|
-
|
|
14
|
+
private ruleVariables;
|
|
15
|
+
constructor(ruleAction: ProgramRuleAction, ruleVariables: ProgramRuleVariable[]);
|
|
12
16
|
get field(): string;
|
|
13
17
|
get actionType(): string;
|
|
18
|
+
get assignedData(): string | undefined;
|
|
19
|
+
get displayedContent(): string | undefined;
|
|
20
|
+
get options(): Partial<Option>[] | undefined;
|
|
14
21
|
toJson(): IMetadataRuleAction;
|
|
15
22
|
}
|
|
16
23
|
export interface IMetadataRule {
|
|
@@ -16,10 +16,12 @@ export declare class FormMetadataSection implements IFormMetadataSection {
|
|
|
16
16
|
formName: unknown;
|
|
17
17
|
sortOrder: unknown;
|
|
18
18
|
mandatory: unknown;
|
|
19
|
+
allowFutureDate: unknown;
|
|
19
20
|
metaType: string;
|
|
20
21
|
}[];
|
|
21
22
|
get dataElements(): {
|
|
22
23
|
mandatory: unknown;
|
|
24
|
+
allowFutureDate: unknown;
|
|
23
25
|
stepId: unknown;
|
|
24
26
|
metaType: string;
|
|
25
27
|
}[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IMetadataRule } from './form-metadata-rule.model';
|
|
2
|
-
import { FormField } from './form-field.model';
|
|
3
2
|
import { Program } from '@iapps/d2-web-sdk';
|
|
4
|
-
import { IFormMetadata, IFormMetadataSection } from '../interfaces';
|
|
3
|
+
import { IFormField, IFormMetadata, IFormMetadataSection } from '../interfaces';
|
|
5
4
|
export declare class FormMetaData implements IFormMetadata {
|
|
6
5
|
#private;
|
|
7
6
|
private params;
|
|
@@ -14,11 +13,12 @@ export declare class FormMetaData implements IFormMetadata {
|
|
|
14
13
|
locale?: string;
|
|
15
14
|
splitRegistrationSection?: boolean;
|
|
16
15
|
includeAllProgramStages?: boolean;
|
|
16
|
+
disableEnrollmentDate?: boolean;
|
|
17
17
|
programStage?: string;
|
|
18
18
|
customFormMetaData?: Partial<FormMetaData>;
|
|
19
19
|
});
|
|
20
20
|
get sections(): IFormMetadataSection[];
|
|
21
|
-
get fields():
|
|
21
|
+
get fields(): IFormField<string>[];
|
|
22
22
|
get rules(): IMetadataRule[];
|
|
23
23
|
toJson(): IFormMetadata;
|
|
24
24
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FormGroup } from '@angular/forms';
|
|
2
|
-
import {
|
|
2
|
+
import { IFormField } from '../interfaces';
|
|
3
3
|
export declare class FormValue {
|
|
4
4
|
form: FormGroup;
|
|
5
|
-
fields:
|
|
6
|
-
changedField?:
|
|
7
|
-
constructor(form: FormGroup, fields:
|
|
5
|
+
fields: IFormField<string>[];
|
|
6
|
+
changedField?: IFormField<string>;
|
|
7
|
+
constructor(form: FormGroup, fields: IFormField<string>[], changedField?: IFormField<string>);
|
|
8
8
|
get isValid(): boolean;
|
|
9
9
|
clear(): void;
|
|
10
10
|
getValues(options?: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UntypedFormGroup } from '@angular/forms';
|
|
2
2
|
import { FormField } from '../models';
|
|
3
|
+
import { IFormField } from '../interfaces';
|
|
3
4
|
export declare class FormUtil {
|
|
4
|
-
static getFormGroup(fields:
|
|
5
|
-
static getFieldValue(field:
|
|
5
|
+
static getFormGroup(fields: IFormField<string>[], dataEntities: any): UntypedFormGroup;
|
|
6
|
+
static getFieldValue(field: IFormField<string>, dataEntities: Record<string, any>): any;
|
|
6
7
|
static getFormFields(fields: any[]): FormField<string>[];
|
|
7
8
|
static createField(id: string, label: string, required: boolean, controlType: 'textbox' | 'dropdown' | 'textarea' | 'transfer' | 'search' | 'file', disabled?: boolean, placeholder?: string, options?: Array<any>): FormField<string>;
|
|
8
9
|
}
|
|
@@ -32,11 +32,12 @@ export declare class LineListTableComponent extends ReactWrapperModule {
|
|
|
32
32
|
buttonLabel: string;
|
|
33
33
|
firstValue: EventEmitter<string>;
|
|
34
34
|
buttonFilter: string;
|
|
35
|
+
filterRootOrgUnit: boolean;
|
|
35
36
|
setReactStateUpdaters: (updaters: any) => void;
|
|
36
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
37
38
|
lineListService: LineListService;
|
|
38
39
|
LineList: () => React.JSX.Element;
|
|
39
40
|
ngAfterViewInit(): Promise<void>;
|
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<LineListTableComponent, never>;
|
|
41
|
-
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; }; }, { "actionSelected": "actionSelected"; "approvalSelected": "approvalSelected"; "firstValue": "firstValue"; }, never, ["*"], false, 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
43
|
}
|
|
@@ -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, ouMode?: string): Observable<LineListResponse>;
|
|
13
|
+
getLineListData(programId: string, orgUnit?: string, programStageId?: string, page?: number, pageSize?: number, filters?: AttributeFilter[], startDate?: string, endDate?: string, ouMode?: string, filterRootOrgUnit?: boolean): Observable<LineListResponse>;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<LineListService, never>;
|
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<LineListService>;
|
|
16
16
|
}
|
|
@@ -11,6 +11,7 @@ export declare class TrackerFormComponent implements OnInit {
|
|
|
11
11
|
formMetaData: IFormMetadata;
|
|
12
12
|
instance: TrackedEntityInstance;
|
|
13
13
|
ngOnInit(): Promise<void>;
|
|
14
|
+
onFormUpdate(values: any): void;
|
|
14
15
|
onSave(event: any): void;
|
|
15
16
|
onCancel(): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TrackerFormComponent, never>;
|