@iapps/ng-dhis2-ui 1.2.129 → 1.2.132
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 +475 -4
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +27 -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
|
|
|
@@ -398,7 +398,8 @@ declare enum FieldType {
|
|
|
398
398
|
DATE_TIME = "DATETIME",
|
|
399
399
|
ORG_UNIT = "ORGANISATION_UNIT",
|
|
400
400
|
PHONE_NUMBER = "PHONE_NUMBER",
|
|
401
|
-
EMAIL = "EMAIL"
|
|
401
|
+
EMAIL = "EMAIL",
|
|
402
|
+
COORDINATE = "COORDINATE"
|
|
402
403
|
}
|
|
403
404
|
|
|
404
405
|
interface FormGroupField {
|
|
@@ -1170,6 +1171,24 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1170
1171
|
}>;
|
|
1171
1172
|
ngAfterViewInit(): Promise<void>;
|
|
1172
1173
|
onChange(event: any): void;
|
|
1174
|
+
formatValueForHtmlDateInput(rawValue: string | null | undefined, isDateTimeField: boolean): string;
|
|
1175
|
+
formatValueForHtmlInputFromDhis(rawValue: string | null | undefined, isDateTimeField: boolean): string;
|
|
1176
|
+
getNowForHtmlDateInput(isDateTimeField: boolean): string;
|
|
1177
|
+
pickEarlierDateLimit(metadataMax?: string, systemMax?: string): string | undefined;
|
|
1178
|
+
/**
|
|
1179
|
+
* Normalizes value from the HTML input into DHIS storage format.
|
|
1180
|
+
*
|
|
1181
|
+
* For date:
|
|
1182
|
+
* - Input: "YYYY-MM-DD"
|
|
1183
|
+
* - Output: "YYYY-MM-DD"
|
|
1184
|
+
*
|
|
1185
|
+
* For datetime:
|
|
1186
|
+
* - Input: "YYYY-MM-DDTHH:mm" (local)
|
|
1187
|
+
* - Output: ISO string in UTC: "YYYY-MM-DDTHH:mm:ss.sssZ"
|
|
1188
|
+
*
|
|
1189
|
+
* If disallowFuture = true, any value beyond "now" is clamped to now.
|
|
1190
|
+
*/
|
|
1191
|
+
normalizeDateValueFromHtmlInput(inputValue: string | null | undefined, isDateTimeField: boolean, disallowFuture: boolean): string | null;
|
|
1173
1192
|
searchForDuplicates(value: string): Promise<boolean>;
|
|
1174
1193
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormFieldComponent, never>;
|
|
1175
1194
|
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 +1208,7 @@ declare class D2FormModule {
|
|
|
1189
1208
|
declare class FieldUtil {
|
|
1190
1209
|
static getFieldDropdownOptions(field: any): DropdownOption[];
|
|
1191
1210
|
static sanitizeOptions(options: any[]): any;
|
|
1192
|
-
static getFieldType(valueType: string): "
|
|
1211
|
+
static getFieldType(valueType: string): "date" | "date-time" | "org-unit" | "file" | "coordinate" | "text" | "number" | "email" | "tel";
|
|
1193
1212
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
1194
1213
|
static getOptionEntities?(options: any[]): any;
|
|
1195
1214
|
}
|
|
@@ -1199,14 +1218,14 @@ declare class FieldControlTypeUtil {
|
|
|
1199
1218
|
}
|
|
1200
1219
|
|
|
1201
1220
|
declare class FormFieldTypeUtil {
|
|
1202
|
-
static getFieldType(valueType: string): "
|
|
1221
|
+
static getFieldType(valueType: string): "date-time" | "image" | "org-unit" | "file" | "coordinate" | "text" | "number";
|
|
1203
1222
|
}
|
|
1204
1223
|
|
|
1205
1224
|
declare class FormUtil {
|
|
1206
1225
|
static getFormGroup(fields: IFormField<string>[], dataEntities: any): UntypedFormGroup;
|
|
1207
1226
|
static getFieldValue(field: IFormField<string>, dataEntities: Record<string, any>): any;
|
|
1208
1227
|
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>;
|
|
1228
|
+
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
1229
|
}
|
|
1211
1230
|
|
|
1212
1231
|
declare class FormValueUtil {
|
|
@@ -1397,7 +1416,7 @@ declare class ProgramEntryFormModule {
|
|
|
1397
1416
|
instance: TrackedEntityInstance | DHIS2Event;
|
|
1398
1417
|
}) => void>;
|
|
1399
1418
|
instanceSave: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1400
|
-
instanceSaveCompleted: EventEmitter<
|
|
1419
|
+
instanceSaveCompleted: EventEmitter<D2TrackerResponse<TrackedEntityInstance> | D2EventResponse<DHIS2Event>>;
|
|
1401
1420
|
instanceUpdate: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1402
1421
|
formValidityUpdate: EventEmitter<boolean>;
|
|
1403
1422
|
formCancel: EventEmitter<any>;
|