@iapps/ng-dhis2-ui 1.2.129 → 1.2.133
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 +823 -52
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +35 -8
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ 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, EnrollmentStatus, EventStatus, Option as Option$1, ProgramRuleAction, ProgramRuleVariable, ProgramRule, Program, BaseTrackerQuery, BaseEventQuery,
|
|
7
|
+
import { TrackedEntityInstance, DHIS2Event, DataQueryFilter, 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';
|
|
@@ -257,7 +257,7 @@ declare class LineListTableComponent extends ReactWrapperModule {
|
|
|
257
257
|
action: string;
|
|
258
258
|
data: TrackedEntityInstance | DHIS2Event;
|
|
259
259
|
}>;
|
|
260
|
-
rowsSelected: EventEmitter<
|
|
260
|
+
rowsSelected: EventEmitter<TrackedEntityInstance[] | DHIS2Event[]>;
|
|
261
261
|
showActionButtons: boolean;
|
|
262
262
|
showEnrollmentDates: boolean;
|
|
263
263
|
showDownloadButton: boolean;
|
|
@@ -327,7 +327,7 @@ interface IFieldDropdown {
|
|
|
327
327
|
code?: string;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
type FieldControlType = 'dropdown' | 'multi-dropdown' | 'textbox' | 'textarea' | 'checkbox' | 'date' | 'date-time' | 'image' | 'org-unit' | 'file' | 'boolean' | 'transfer' | 'search';
|
|
330
|
+
type FieldControlType = 'dropdown' | 'multi-dropdown' | 'textbox' | 'textarea' | 'checkbox' | 'date' | 'date-time' | 'image' | 'org-unit' | 'file' | 'boolean' | 'transfer' | 'coordinate' | 'search';
|
|
331
331
|
|
|
332
332
|
type FormFieldMetaType = 'DATA_ELEMENT' | 'ATTRIBUTE';
|
|
333
333
|
|
|
@@ -363,6 +363,7 @@ interface IFormField<T> {
|
|
|
363
363
|
isDataElement?: boolean;
|
|
364
364
|
isAttribute?: boolean;
|
|
365
365
|
isOrgUnit?: boolean;
|
|
366
|
+
isGeometryField?: boolean;
|
|
366
367
|
isEnrollmentDate?: boolean;
|
|
367
368
|
event?: string;
|
|
368
369
|
programStage?: string;
|
|
@@ -398,7 +399,8 @@ declare enum FieldType {
|
|
|
398
399
|
DATE_TIME = "DATETIME",
|
|
399
400
|
ORG_UNIT = "ORGANISATION_UNIT",
|
|
400
401
|
PHONE_NUMBER = "PHONE_NUMBER",
|
|
401
|
-
EMAIL = "EMAIL"
|
|
402
|
+
EMAIL = "EMAIL",
|
|
403
|
+
COORDINATE = "COORDINATE"
|
|
402
404
|
}
|
|
403
405
|
|
|
404
406
|
interface FormGroupField {
|
|
@@ -527,6 +529,7 @@ declare class FormField<T> implements IFormField<T>, FormFieldFunction<T> {
|
|
|
527
529
|
isDataElement?: boolean;
|
|
528
530
|
isAttribute?: boolean;
|
|
529
531
|
isOrgUnit?: boolean;
|
|
532
|
+
isGeometryField?: boolean;
|
|
530
533
|
isEnrollmentDate?: boolean;
|
|
531
534
|
event?: string;
|
|
532
535
|
programStage?: string;
|
|
@@ -1010,12 +1013,15 @@ interface IProgramEntryFormConfig {
|
|
|
1010
1013
|
formType: 'TRACKER' | 'EVENT';
|
|
1011
1014
|
hideRegistrationUnit?: boolean;
|
|
1012
1015
|
hideEnrollmentDate?: boolean;
|
|
1016
|
+
hideGeometryField?: boolean;
|
|
1013
1017
|
hideTrackedEntityTypeAttributes?: boolean;
|
|
1014
1018
|
disableRegistrationUnit?: boolean;
|
|
1015
1019
|
disableEnrollmentDate?: boolean;
|
|
1016
1020
|
disabledIncidentDate?: boolean;
|
|
1017
1021
|
excludeProgramStages?: boolean;
|
|
1018
1022
|
excludeInheritedAttributes?: boolean;
|
|
1023
|
+
disableEventDate?: boolean;
|
|
1024
|
+
hideEventDate?: boolean;
|
|
1019
1025
|
includedProgramStages?: string[];
|
|
1020
1026
|
submitButtonLabel?: string;
|
|
1021
1027
|
cancelButtonLabel?: string;
|
|
@@ -1036,10 +1042,13 @@ declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
|
|
|
1036
1042
|
formType: 'TRACKER' | 'EVENT';
|
|
1037
1043
|
hideRegistrationUnit?: boolean;
|
|
1038
1044
|
hideEnrollmentDate?: boolean;
|
|
1045
|
+
hideGeometryField?: boolean;
|
|
1039
1046
|
hideTrackedEntityTypeAttributes?: boolean;
|
|
1040
1047
|
disableRegistrationUnit?: boolean;
|
|
1041
1048
|
disableEnrollmentDate?: boolean;
|
|
1042
1049
|
disabledIncidentDate?: boolean;
|
|
1050
|
+
disableEventDate?: boolean;
|
|
1051
|
+
hideEventDate?: boolean;
|
|
1043
1052
|
excludeProgramStages?: boolean;
|
|
1044
1053
|
excludeInheritedAttributes?: boolean;
|
|
1045
1054
|
includedProgramStages?: string[];
|
|
@@ -1170,6 +1179,24 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1170
1179
|
}>;
|
|
1171
1180
|
ngAfterViewInit(): Promise<void>;
|
|
1172
1181
|
onChange(event: any): void;
|
|
1182
|
+
formatValueForHtmlDateInput(rawValue: string | null | undefined, isDateTimeField: boolean): string;
|
|
1183
|
+
formatValueForHtmlInputFromDhis(rawValue: string | null | undefined, isDateTimeField: boolean): string;
|
|
1184
|
+
getNowForHtmlDateInput(isDateTimeField: boolean): string;
|
|
1185
|
+
pickEarlierDateLimit(metadataMax?: string, systemMax?: string): string | undefined;
|
|
1186
|
+
/**
|
|
1187
|
+
* Normalizes value from the HTML input into DHIS storage format.
|
|
1188
|
+
*
|
|
1189
|
+
* For date:
|
|
1190
|
+
* - Input: "YYYY-MM-DD"
|
|
1191
|
+
* - Output: "YYYY-MM-DD"
|
|
1192
|
+
*
|
|
1193
|
+
* For datetime:
|
|
1194
|
+
* - Input: "YYYY-MM-DDTHH:mm" (local)
|
|
1195
|
+
* - Output: ISO string in UTC: "YYYY-MM-DDTHH:mm:ss.sssZ"
|
|
1196
|
+
*
|
|
1197
|
+
* If disallowFuture = true, any value beyond "now" is clamped to now.
|
|
1198
|
+
*/
|
|
1199
|
+
normalizeDateValueFromHtmlInput(inputValue: string | null | undefined, isDateTimeField: boolean, disallowFuture: boolean): string | null;
|
|
1173
1200
|
searchForDuplicates(value: string): Promise<boolean>;
|
|
1174
1201
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormFieldComponent, never>;
|
|
1175
1202
|
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; }; "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; }; "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>;
|
|
@@ -1189,7 +1216,7 @@ declare class D2FormModule {
|
|
|
1189
1216
|
declare class FieldUtil {
|
|
1190
1217
|
static getFieldDropdownOptions(field: any): DropdownOption[];
|
|
1191
1218
|
static sanitizeOptions(options: any[]): any;
|
|
1192
|
-
static getFieldType(valueType: string): "
|
|
1219
|
+
static getFieldType(valueType: string): "org-unit" | "date" | "date-time" | "file" | "coordinate" | "number" | "tel" | "email" | "text";
|
|
1193
1220
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
1194
1221
|
static getOptionEntities?(options: any[]): any;
|
|
1195
1222
|
}
|
|
@@ -1199,14 +1226,14 @@ declare class FieldControlTypeUtil {
|
|
|
1199
1226
|
}
|
|
1200
1227
|
|
|
1201
1228
|
declare class FormFieldTypeUtil {
|
|
1202
|
-
static getFieldType(valueType: string): "
|
|
1229
|
+
static getFieldType(valueType: string): "org-unit" | "date-time" | "image" | "file" | "coordinate" | "number" | "text";
|
|
1203
1230
|
}
|
|
1204
1231
|
|
|
1205
1232
|
declare class FormUtil {
|
|
1206
1233
|
static getFormGroup(fields: IFormField<string>[], dataEntities: any): UntypedFormGroup;
|
|
1207
1234
|
static getFieldValue(field: IFormField<string>, dataEntities: Record<string, any>): any;
|
|
1208
1235
|
static getFormFields(fields: any[]): FormField<string>[];
|
|
1209
|
-
static createField(id: string, label: string, required: boolean, controlType: 'textbox' | 'dropdown' | 'textarea' | 'transfer' | 'search' | 'file', disabled?: boolean, placeholder?: string, options?: Array<any>): FormField<string>;
|
|
1236
|
+
static createField(id: string, label: string, required: boolean, controlType: 'textbox' | 'dropdown' | 'textarea' | 'coordinate' | 'date-time' | 'transfer' | 'search' | 'file', disabled?: boolean, placeholder?: string, options?: Array<any>): FormField<string>;
|
|
1210
1237
|
}
|
|
1211
1238
|
|
|
1212
1239
|
declare class FormValueUtil {
|
|
@@ -1397,7 +1424,7 @@ declare class ProgramEntryFormModule {
|
|
|
1397
1424
|
instance: TrackedEntityInstance | DHIS2Event;
|
|
1398
1425
|
}) => void>;
|
|
1399
1426
|
instanceSave: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1400
|
-
instanceSaveCompleted: EventEmitter<
|
|
1427
|
+
instanceSaveCompleted: EventEmitter<D2TrackerResponse<TrackedEntityInstance> | D2EventResponse<DHIS2Event>>;
|
|
1401
1428
|
instanceUpdate: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1402
1429
|
formValidityUpdate: EventEmitter<boolean>;
|
|
1403
1430
|
formCancel: EventEmitter<any>;
|