@iapps/ng-dhis2-ui 1.2.168 → 1.2.170
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/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import React, { ComponentProps } from 'react';
|
|
|
4
4
|
import * as ReactDOM from 'react-dom/client';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
6
|
import * as _iapps_d2_web_sdk from '@iapps/d2-web-sdk';
|
|
7
|
-
import { TrackedEntityInstance, DHIS2Event, DataQueryFilter, LineListRowActionFilterConfig, EnrollmentStatus, EventStatus, Option as Option$1, ProgramRuleAction, ProgramRuleVariable, ProgramRule, Program, BaseTrackerQuery, BaseEventQuery,
|
|
7
|
+
import { TrackedEntityInstance, DHIS2Event, DataQueryFilter, LineListRowActionFilterConfig, EnrollmentStatus, EventStatus, Option as Option$1, ProgramRuleAction, ProgramRuleVariable, ProgramRule, Program, BaseTrackerQuery, BaseEventQuery, D2TrackerResponse, D2EventResponse } from '@iapps/d2-web-sdk';
|
|
8
8
|
import * as rxjs from 'rxjs';
|
|
9
9
|
import { Observable, Subject } from 'rxjs';
|
|
10
10
|
import * as i8 from '@angular/forms';
|
|
11
11
|
import { FormGroup, FormControl, UntypedFormGroup } from '@angular/forms';
|
|
12
|
-
import * as _dhis2_app_service_config from '@dhis2/app-service-config';
|
|
13
12
|
import * as _dhis2_ui_loader from '@dhis2-ui/loader';
|
|
13
|
+
import * as _dhis2_app_service_config from '@dhis2/app-service-config';
|
|
14
14
|
|
|
15
15
|
declare class ReactWrapperModule implements OnDestroy, AfterViewInit {
|
|
16
16
|
protected elementRef: ElementRef<HTMLElement>;
|
|
@@ -1078,6 +1078,10 @@ declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1078
1078
|
onImmediateChange(event: {
|
|
1079
1079
|
value: string;
|
|
1080
1080
|
}): void;
|
|
1081
|
+
onRuntimeOptionsChange(event: {
|
|
1082
|
+
field: IFormField<string>;
|
|
1083
|
+
options: any[];
|
|
1084
|
+
}): void;
|
|
1081
1085
|
onFieldUpdate(e?: any, isDate?: boolean, isDateTime?: boolean): void;
|
|
1082
1086
|
getDisplayField(field: IFormField<string>): IFormField<string>;
|
|
1083
1087
|
private getProgramRuleOptions;
|
|
@@ -1137,6 +1141,7 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
|
|
|
1137
1141
|
onFieldUpdate(form: FormGroup, field: IFormField<string>): void;
|
|
1138
1142
|
onClear(): void;
|
|
1139
1143
|
isFormInValid(): boolean;
|
|
1144
|
+
private getOptionValue;
|
|
1140
1145
|
onRunTimeOptionUpdate(result: any): void;
|
|
1141
1146
|
ngOnDestroy(): void;
|
|
1142
1147
|
private readonly hiddenFieldIds;
|
|
@@ -1388,6 +1393,7 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1388
1393
|
fieldError: _angular_core.InputSignal<string>;
|
|
1389
1394
|
fieldConfig: _angular_core.InputSignal<FieldConfig>;
|
|
1390
1395
|
programRuleOptions: _angular_core.InputSignal<any[]>;
|
|
1396
|
+
runtimeOptions: _angular_core.InputSignal<any[]>;
|
|
1391
1397
|
form: _angular_core.ModelSignal<FormGroup<any>>;
|
|
1392
1398
|
isValid: _angular_core.InputSignal<boolean>;
|
|
1393
1399
|
isValueAssigned: _angular_core.InputSignal<boolean>;
|
|
@@ -1403,6 +1409,7 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1403
1409
|
protected readonly isValueAssigned$: rxjs.Observable<boolean>;
|
|
1404
1410
|
protected readonly fieldError$: rxjs.Observable<string>;
|
|
1405
1411
|
protected readonly programRuleOptions$: rxjs.Observable<any[]>;
|
|
1412
|
+
protected readonly runtimeOptions$: rxjs.Observable<any[]>;
|
|
1406
1413
|
readonly label: Signal<string | undefined>;
|
|
1407
1414
|
readonly placeholder: Signal<string>;
|
|
1408
1415
|
InputField: () => React.JSX.Element | React.ReactElement | null;
|
|
@@ -1414,6 +1421,10 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1414
1421
|
form: FormGroup;
|
|
1415
1422
|
value: any;
|
|
1416
1423
|
}>;
|
|
1424
|
+
runtimeOptionsChange: EventEmitter<{
|
|
1425
|
+
field: IFormField<string>;
|
|
1426
|
+
options: any[];
|
|
1427
|
+
}>;
|
|
1417
1428
|
ngAfterViewInit(): Promise<void>;
|
|
1418
1429
|
formatValueForHtmlInputFromDhis(rawValue: string | null | undefined, isDateTimeField: boolean): string;
|
|
1419
1430
|
pickEarlierDateLimit(metadataMax?: string, systemMax?: string): string | undefined;
|
|
@@ -1438,7 +1449,7 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1438
1449
|
private getNowInEatIsoString;
|
|
1439
1450
|
searchForDuplicates(value: string): Promise<boolean>;
|
|
1440
1451
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormFieldComponent, never>;
|
|
1441
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseFormFieldComponent, never, never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldError": { "alias": "fieldError"; "required": false; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": false; "isSignal": true; }; "programRuleOptions": { "alias": "programRuleOptions"; "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; }; "dataId": { "alias": "dataId"; "required": false; "isSignal": true; }; "customOrgUnitRoots": { "alias": "customOrgUnitRoots"; "required": false; "isSignal": true; }; "optionCascadeConfigs": { "alias": "optionCascadeConfigs"; "required": false; "isSignal": true; }; "optionCascadeConfigMap": { "alias": "optionCascadeConfigMap"; "required": false; "isSignal": true; }; "coordinatePickerGeoConfig": { "alias": "coordinatePickerGeoConfig"; "required": false; "isSignal": true; }; "fieldControlKeyById": { "alias": "fieldControlKeyById"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "form": "formChange"; "value": "valueChange"; "update": "update"; "immediateUpdate": "immediateUpdate"; }, never, never, true, never>;
|
|
1452
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseFormFieldComponent, never, never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldError": { "alias": "fieldError"; "required": false; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": false; "isSignal": true; }; "programRuleOptions": { "alias": "programRuleOptions"; "required": false; "isSignal": true; }; "runtimeOptions": { "alias": "runtimeOptions"; "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; }; "dataId": { "alias": "dataId"; "required": false; "isSignal": true; }; "customOrgUnitRoots": { "alias": "customOrgUnitRoots"; "required": false; "isSignal": true; }; "optionCascadeConfigs": { "alias": "optionCascadeConfigs"; "required": false; "isSignal": true; }; "optionCascadeConfigMap": { "alias": "optionCascadeConfigMap"; "required": false; "isSignal": true; }; "coordinatePickerGeoConfig": { "alias": "coordinatePickerGeoConfig"; "required": false; "isSignal": true; }; "fieldControlKeyById": { "alias": "fieldControlKeyById"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "form": "formChange"; "value": "valueChange"; "update": "update"; "immediateUpdate": "immediateUpdate"; "runtimeOptionsChange": "runtimeOptionsChange"; }, never, never, true, never>;
|
|
1442
1453
|
}
|
|
1443
1454
|
|
|
1444
1455
|
declare class FormFieldItemComponent extends BaseFormFieldComponent {
|
|
@@ -1455,7 +1466,7 @@ declare class D2FormModule {
|
|
|
1455
1466
|
declare class FieldUtil {
|
|
1456
1467
|
static getFieldDropdownOptions(field: any): DropdownOption[];
|
|
1457
1468
|
static sanitizeOptions(options: any[]): any;
|
|
1458
|
-
static getFieldType(valueType: string): "date" | "
|
|
1469
|
+
static getFieldType(valueType: string): "date" | "date-time" | "org-unit" | "file" | "number" | "tel" | "coordinate" | "text" | "email";
|
|
1459
1470
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
1460
1471
|
static getOptionEntities?(options: any[]): any;
|
|
1461
1472
|
}
|
|
@@ -1465,7 +1476,7 @@ declare class FieldControlTypeUtil {
|
|
|
1465
1476
|
}
|
|
1466
1477
|
|
|
1467
1478
|
declare class FormFieldTypeUtil {
|
|
1468
|
-
static getFieldType(valueType: string): "
|
|
1479
|
+
static getFieldType(valueType: string): "date-time" | "image" | "org-unit" | "file" | "number" | "tel" | "coordinate" | "text";
|
|
1469
1480
|
}
|
|
1470
1481
|
|
|
1471
1482
|
declare class FormUtil {
|
|
@@ -1563,14 +1574,14 @@ declare class SelectionFiltersComponent extends ReactWrapperModule implements Af
|
|
|
1563
1574
|
FieldOrgUnitSelector: (props: {
|
|
1564
1575
|
onSelectOrgUnit: (selectedOrgUnits: any) => void;
|
|
1565
1576
|
onCancelOrgUnit: () => void;
|
|
1566
|
-
}) => React.FunctionComponentElement<
|
|
1577
|
+
}) => React.FunctionComponentElement<{
|
|
1567
1578
|
config: _dhis2_app_service_config.Config;
|
|
1568
1579
|
children: React.ReactNode;
|
|
1569
1580
|
offlineInterface?: any;
|
|
1570
1581
|
plugin: boolean;
|
|
1571
1582
|
parentAlertsAdd: any;
|
|
1572
1583
|
showAlertsInPlugin: boolean;
|
|
1573
|
-
}>;
|
|
1584
|
+
}> | React.FunctionComponentElement<_dhis2_ui_loader.CircularLoaderProps>;
|
|
1574
1585
|
showOrgUnitTree: _angular_core.WritableSignal<boolean>;
|
|
1575
1586
|
orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
|
|
1576
1587
|
selectedOrgUnitSignal: _angular_core.WritableSignal<any>;
|
|
@@ -1664,7 +1675,7 @@ declare class ProgramEntryFormModule {
|
|
|
1664
1675
|
instance: TrackedEntityInstance | DHIS2Event;
|
|
1665
1676
|
}) => void>;
|
|
1666
1677
|
instanceSave: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1667
|
-
instanceSaveCompleted: EventEmitter<
|
|
1678
|
+
instanceSaveCompleted: EventEmitter<D2TrackerResponse<TrackedEntityInstance> | D2EventResponse<DHIS2Event>>;
|
|
1668
1679
|
instanceUpdate: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1669
1680
|
formValidityUpdate: EventEmitter<boolean>;
|
|
1670
1681
|
formCancel: EventEmitter<any>;
|