@iapps/ng-dhis2-ui 1.2.136 → 1.2.138
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 +2990 -841
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +204 -27
- 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, D2EventResponse, D2TrackerResponse } 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<DHIS2Event[] | TrackedEntityInstance[]>;
|
|
261
261
|
showActionButtons: boolean;
|
|
262
262
|
showEnrollmentDates: boolean;
|
|
263
263
|
showDownloadButton: boolean;
|
|
@@ -642,33 +642,48 @@ declare class FormFieldGroup implements IFormFieldGroup {
|
|
|
642
642
|
interface JsonTransformer<T> {
|
|
643
643
|
toJson: () => T;
|
|
644
644
|
}
|
|
645
|
+
type ProgramRuleActionType = 'HIDEFIELD' | 'SHOWFIELD' | 'ASSIGN' | 'HIDESECTION' | 'SHOWSECTION' | 'HIDEPROGRAMSTAGE' | 'SHOWPROGRAMSTAGE' | 'WARNINGONCOMPLETE' | 'WARNINGONCREATE' | 'ERRORONCOMPLETE' | 'ERRORONCREATE' | string;
|
|
645
646
|
interface IMetadataRuleAction {
|
|
646
647
|
field: string;
|
|
647
|
-
actionType:
|
|
648
|
+
actionType: ProgramRuleActionType;
|
|
648
649
|
assignedData?: string;
|
|
649
650
|
displayedContent?: string;
|
|
650
651
|
options?: Partial<Option$1>[];
|
|
652
|
+
programRule?: {
|
|
653
|
+
id: string;
|
|
654
|
+
};
|
|
655
|
+
evaluationTime?: 'ALWAYS' | 'ON_COMPLETE' | 'ON_CREATE' | string;
|
|
656
|
+
}
|
|
657
|
+
interface IMetadataRule {
|
|
658
|
+
actions: IMetadataRuleAction[];
|
|
659
|
+
condition: string;
|
|
660
|
+
programRule: {
|
|
661
|
+
id: string;
|
|
662
|
+
};
|
|
651
663
|
}
|
|
652
664
|
declare class MetadataRuleAction implements IMetadataRuleAction, JsonTransformer<IMetadataRuleAction> {
|
|
653
665
|
private ruleAction;
|
|
654
|
-
private
|
|
666
|
+
private variableMap;
|
|
655
667
|
constructor(ruleAction: ProgramRuleAction, ruleVariables: ProgramRuleVariable[]);
|
|
656
668
|
get field(): string;
|
|
657
|
-
get
|
|
669
|
+
get programRule(): {
|
|
670
|
+
id: string;
|
|
671
|
+
};
|
|
672
|
+
get evaluationTime(): string;
|
|
673
|
+
get actionType(): ProgramRuleActionType;
|
|
658
674
|
get assignedData(): string | undefined;
|
|
659
675
|
get displayedContent(): string | undefined;
|
|
660
676
|
get options(): Partial<Option$1>[] | undefined;
|
|
661
677
|
toJson(): IMetadataRuleAction;
|
|
662
678
|
}
|
|
663
|
-
interface IMetadataRule {
|
|
664
|
-
actions: IMetadataRuleAction[];
|
|
665
|
-
condition: string;
|
|
666
|
-
}
|
|
667
679
|
declare class MetadataRule implements IMetadataRule, JsonTransformer<IMetadataRule> {
|
|
668
680
|
private rule;
|
|
669
|
-
private
|
|
681
|
+
private variableMap;
|
|
670
682
|
constructor(rule: ProgramRule, ruleVariables: ProgramRuleVariable[]);
|
|
671
|
-
get actions():
|
|
683
|
+
get actions(): IMetadataRuleAction[];
|
|
684
|
+
get programRule(): {
|
|
685
|
+
id: string;
|
|
686
|
+
};
|
|
672
687
|
get condition(): string;
|
|
673
688
|
toJson(): IMetadataRule;
|
|
674
689
|
}
|
|
@@ -834,6 +849,148 @@ declare const FACILITY_KEYWORDS: string[];
|
|
|
834
849
|
declare const GLOBAL_TYPE_RULES: OrgUnitTypeKeywordRule[];
|
|
835
850
|
declare const LOWERCASE_FACILITY_KEYWORDS: string[];
|
|
836
851
|
|
|
852
|
+
/**
|
|
853
|
+
* Domain primitive types
|
|
854
|
+
* ----------------------
|
|
855
|
+
* These are semantic aliases over primitives.
|
|
856
|
+
* They improve readability, safety, and intent.
|
|
857
|
+
*/
|
|
858
|
+
/**
|
|
859
|
+
* Identifier of a form field.
|
|
860
|
+
*
|
|
861
|
+
* - Runtime type: string
|
|
862
|
+
* - Semantic meaning: "ID of a field in the form schema"
|
|
863
|
+
*/
|
|
864
|
+
type FieldId = string;
|
|
865
|
+
/**
|
|
866
|
+
* Cascade types for form fields.
|
|
867
|
+
*
|
|
868
|
+
* Supports configuration-driven "cascading" behaviors such as:
|
|
869
|
+
* - Filtering dropdown options based on the selected value of another field
|
|
870
|
+
* (e.g., path codes like "/Zanzibar/Unguja/...").
|
|
871
|
+
*
|
|
872
|
+
* This file intentionally contains:
|
|
873
|
+
* - enums
|
|
874
|
+
* - interfaces / types
|
|
875
|
+
* - defaults
|
|
876
|
+
*
|
|
877
|
+
* Runtime logic belongs in: field-cascade.util.ts
|
|
878
|
+
*/
|
|
879
|
+
/** Discriminator for all cascade configuration kinds */
|
|
880
|
+
declare enum CascadeKind {
|
|
881
|
+
OPTIONS_PATH = "OPTIONS_PATH"
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Strategy used to match the parent value against child option "path".
|
|
885
|
+
*
|
|
886
|
+
* Notes:
|
|
887
|
+
* - PREFIX: true "under this parent path" match. Best when parent value is a full path prefix.
|
|
888
|
+
* - LEAF_TOKEN: token-safe "includes" match (recommended for DHIS2-ish paths). Matches:
|
|
889
|
+
* child endsWith("/<leaf>") OR child contains("/<leaf>/")
|
|
890
|
+
* - CONTAINS: raw substring match anywhere (least strict; can produce false positives).
|
|
891
|
+
* - EXACT: exact path match.
|
|
892
|
+
*/
|
|
893
|
+
declare enum ParentMatchMode {
|
|
894
|
+
PREFIX = "PREFIX",
|
|
895
|
+
LEAF_TOKEN = "LEAF_TOKEN",
|
|
896
|
+
CONTAINS = "CONTAINS",
|
|
897
|
+
EXACT = "EXACT"
|
|
898
|
+
}
|
|
899
|
+
/** Where to read the child option path from */
|
|
900
|
+
declare enum OptionPathField {
|
|
901
|
+
CODE = "code",
|
|
902
|
+
ID = "id",
|
|
903
|
+
VALUE = "value"
|
|
904
|
+
}
|
|
905
|
+
/** What is stored in the parent field control value */
|
|
906
|
+
declare enum ParentValueType {
|
|
907
|
+
CODE = "CODE",
|
|
908
|
+
ID = "ID"
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Base shape for any cascade config.
|
|
912
|
+
* The `fieldId` indicates which field is affected (child).
|
|
913
|
+
*/
|
|
914
|
+
interface CascadeConfigBase {
|
|
915
|
+
/** Discriminator */
|
|
916
|
+
kind: CascadeKind;
|
|
917
|
+
/** The field whose options/value will be affected (child field) */
|
|
918
|
+
fieldId: FieldId;
|
|
919
|
+
/** The field whose value drives the cascade (parent field) */
|
|
920
|
+
parentFieldId: FieldId;
|
|
921
|
+
/**
|
|
922
|
+
* If true, child field should be disabled until parent has a value.
|
|
923
|
+
* Default: true
|
|
924
|
+
*/
|
|
925
|
+
disableUntilParentSelected?: boolean;
|
|
926
|
+
/**
|
|
927
|
+
* If true, child field should be cleared whenever parent changes.
|
|
928
|
+
* Default: true
|
|
929
|
+
*/
|
|
930
|
+
clearOnParentChange?: boolean;
|
|
931
|
+
/**
|
|
932
|
+
* If true, show all child options when parent is missing.
|
|
933
|
+
* If false, show none.
|
|
934
|
+
* Default: false
|
|
935
|
+
*/
|
|
936
|
+
allowAllIfParentMissing?: boolean;
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Cascade config for dropdown-like fields where child options include the parent path.
|
|
940
|
+
* Example:
|
|
941
|
+
* parent value: "/UNSNiNqkzEM"
|
|
942
|
+
* child option: "/UNSNiNqkzEM/l9kxy7vLv6t"
|
|
943
|
+
*/
|
|
944
|
+
interface OptionsPathCascadeConfig extends CascadeConfigBase {
|
|
945
|
+
kind: CascadeKind.OPTIONS_PATH;
|
|
946
|
+
/**
|
|
947
|
+
* Separator used to interpret path strings.
|
|
948
|
+
* Default: "/"
|
|
949
|
+
*/
|
|
950
|
+
optionPathSeparator?: string;
|
|
951
|
+
/**
|
|
952
|
+
* How we match parent against child.
|
|
953
|
+
* Default: LEAF_TOKEN (token-safe "includes" recommended for DHIS2-ish paths)
|
|
954
|
+
*/
|
|
955
|
+
parentMatchMode?: ParentMatchMode;
|
|
956
|
+
/**
|
|
957
|
+
* Which property on the option contains the path.
|
|
958
|
+
* Default: code
|
|
959
|
+
*/
|
|
960
|
+
childPathField?: OptionPathField;
|
|
961
|
+
/**
|
|
962
|
+
* What is stored in the parent field's value.
|
|
963
|
+
* Default: CODE
|
|
964
|
+
*/
|
|
965
|
+
parentValueType?: ParentValueType;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
/** ---------------- Types ---------------- */
|
|
969
|
+
type CoordinateAccuracySource = 'MANUAL' | 'DEVICE' | 'UNKNOWN';
|
|
970
|
+
interface CoordinatePickerGeoConfig {
|
|
971
|
+
/**
|
|
972
|
+
* Optional boundary area.
|
|
973
|
+
* Can arrive as Polygon/MultiPolygon, Feature/FeatureCollection, or JSON string.
|
|
974
|
+
*/
|
|
975
|
+
allowedAreaGeoJson?: GeoJSON.Polygon | GeoJSON.MultiPolygon | any | null;
|
|
976
|
+
allowedAreaName?: string;
|
|
977
|
+
requireWithinArea?: boolean;
|
|
978
|
+
captureAccuracy?: boolean;
|
|
979
|
+
accuracyKmValue?: number | null;
|
|
980
|
+
onAccuracyKmChange?: (km: number | null) => void;
|
|
981
|
+
accuracySource?: CoordinateAccuracySource;
|
|
982
|
+
onAccuracySourceChange?: (src: CoordinateAccuracySource) => void;
|
|
983
|
+
maxAccuracyKm?: number;
|
|
984
|
+
outsideAreaPolicyText?: string;
|
|
985
|
+
onOutsideAreaSelected?: (info: {
|
|
986
|
+
lat: number;
|
|
987
|
+
lng: number;
|
|
988
|
+
allowedAreaName?: string;
|
|
989
|
+
requireWithinArea: boolean;
|
|
990
|
+
accuracyKm?: number | null;
|
|
991
|
+
}) => void;
|
|
992
|
+
}
|
|
993
|
+
|
|
837
994
|
declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
|
|
838
995
|
#private;
|
|
839
996
|
field: _angular_core.InputSignal<IFormField<string>>;
|
|
@@ -848,6 +1005,10 @@ declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
848
1005
|
dataId: _angular_core.InputSignal<string>;
|
|
849
1006
|
customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
|
|
850
1007
|
program: _angular_core.InputSignal<string>;
|
|
1008
|
+
optionCascadeConfigs: _angular_core.InputSignal<OptionsPathCascadeConfig[]>;
|
|
1009
|
+
optionCascadeConfigMap: _angular_core.InputSignal<Readonly<Record<string, OptionsPathCascadeConfig>>>;
|
|
1010
|
+
coordinatePickerGeoConfig: _angular_core.InputSignal<CoordinatePickerGeoConfig>;
|
|
1011
|
+
fieldControlKeyById: _angular_core.InputSignal<Record<string, string>>;
|
|
851
1012
|
color: string;
|
|
852
1013
|
fieldUpdate: EventEmitter<FormGroup>;
|
|
853
1014
|
immediateFieldUpdate: EventEmitter<{
|
|
@@ -885,7 +1046,7 @@ declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
885
1046
|
onFieldUpdate(e?: any, isDate?: boolean, isDateTime?: boolean): void;
|
|
886
1047
|
onUpdateRuntimeOptions(options: any[]): void;
|
|
887
1048
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
888
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldComponent, "ng-dhis2-ui-form-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; }; "isCheckBoxButton": { "alias": "isCheckBoxButton"; "required": false; "isSignal": true; }; "fieldClass": { "alias": "fieldClass"; "required": false; "isSignal": true; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; "isSignal": true; }; "dataEntities": { "alias": "dataEntities"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "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; }; }, { "fieldUpdate": "fieldUpdate"; "immediateFieldUpdate": "immediateFieldUpdate"; "runtimeOptionChange": "runtimeOptionChange"; }, never, never, false, never>;
|
|
1049
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldComponent, "ng-dhis2-ui-form-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "fieldConfig": { "alias": "fieldConfig"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; }; "isCheckBoxButton": { "alias": "isCheckBoxButton"; "required": false; "isSignal": true; }; "fieldClass": { "alias": "fieldClass"; "required": false; "isSignal": true; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; "isSignal": true; }; "dataEntities": { "alias": "dataEntities"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "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; }; "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; }; }, { "fieldUpdate": "fieldUpdate"; "immediateFieldUpdate": "immediateFieldUpdate"; "runtimeOptionChange": "runtimeOptionChange"; }, never, never, false, never>;
|
|
889
1050
|
}
|
|
890
1051
|
|
|
891
1052
|
declare class FormComponent implements OnChanges, OnDestroy, OnInit {
|
|
@@ -905,6 +1066,10 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
|
|
|
905
1066
|
dataEntities: _angular_core.InputSignal<any>;
|
|
906
1067
|
dataId: _angular_core.InputSignal<string>;
|
|
907
1068
|
customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
|
|
1069
|
+
optionCascadeConfigs: _angular_core.InputSignal<OptionsPathCascadeConfig[]>;
|
|
1070
|
+
coordinatePickerGeoConfig: _angular_core.InputSignal<CoordinatePickerGeoConfig>;
|
|
1071
|
+
/** ✅ Build map once when configs change */
|
|
1072
|
+
optionCascadeConfigMap: _angular_core.Signal<Readonly<Record<string, OptionsPathCascadeConfig>>>;
|
|
908
1073
|
program: _angular_core.InputSignal<string>;
|
|
909
1074
|
collapsibleSections: _angular_core.InputSignal<boolean>;
|
|
910
1075
|
private openSectionId;
|
|
@@ -913,6 +1078,7 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
|
|
|
913
1078
|
formValidityUpdate: EventEmitter<boolean>;
|
|
914
1079
|
fieldComponents: FormFieldComponent[];
|
|
915
1080
|
values: any;
|
|
1081
|
+
readonly fieldControlKeyById: _angular_core.Signal<Record<string, string>>;
|
|
916
1082
|
get layoutCssClass(): string;
|
|
917
1083
|
ruleProcessor: EffectRef;
|
|
918
1084
|
constructor();
|
|
@@ -937,7 +1103,7 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
|
|
|
937
1103
|
getVisibleSectionFields(section: any): IFormField<string>[];
|
|
938
1104
|
private isFieldHiddenByRules;
|
|
939
1105
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
940
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormComponent, "ng-dhis2-ui-form", never, { "programEntryFormConfig": { "alias": "programEntryFormConfig"; "required": false; "isSignal": true; }; "formConfig": { "alias": "formConfig"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "isFormHorizontal": { "alias": "isFormHorizontal"; "required": false; "isSignal": true; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; "isSignal": true; }; "fieldsData": { "alias": "fieldsData"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": false; "isSignal": true; }; "programEntryFormMetaData": { "alias": "programEntryFormMetaData"; "required": false; "isSignal": true; }; "fieldClass": { "alias": "fieldClass"; "required": false; "isSignal": true; }; "shouldRenderAsCheckBoxesButton": { "alias": "shouldRenderAsCheckBoxesButton"; "required": false; "isSignal": true; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; "isSignal": true; }; "dataEntities": { "alias": "dataEntities"; "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; }; "collapsibleSections": { "alias": "collapsibleSections"; "required": false; "isSignal": true; }; }, { "formUpdate": "formUpdate"; "formValidityUpdate": "formValidityUpdate"; }, never, never, false, never>;
|
|
1106
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormComponent, "ng-dhis2-ui-form", never, { "programEntryFormConfig": { "alias": "programEntryFormConfig"; "required": false; "isSignal": true; }; "formConfig": { "alias": "formConfig"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "isFormHorizontal": { "alias": "isFormHorizontal"; "required": false; "isSignal": true; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; "isSignal": true; }; "fieldsData": { "alias": "fieldsData"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": false; "isSignal": true; }; "programEntryFormMetaData": { "alias": "programEntryFormMetaData"; "required": false; "isSignal": true; }; "fieldClass": { "alias": "fieldClass"; "required": false; "isSignal": true; }; "shouldRenderAsCheckBoxesButton": { "alias": "shouldRenderAsCheckBoxesButton"; "required": false; "isSignal": true; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; "isSignal": true; }; "dataEntities": { "alias": "dataEntities"; "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; }; "coordinatePickerGeoConfig": { "alias": "coordinatePickerGeoConfig"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; "isSignal": true; }; "collapsibleSections": { "alias": "collapsibleSections"; "required": false; "isSignal": true; }; }, { "formUpdate": "formUpdate"; "formValidityUpdate": "formValidityUpdate"; }, never, never, false, never>;
|
|
941
1107
|
}
|
|
942
1108
|
|
|
943
1109
|
declare class RepeatableFormComponent implements OnInit {
|
|
@@ -1034,6 +1200,8 @@ interface IProgramEntryFormConfig {
|
|
|
1034
1200
|
autoComplete?: boolean;
|
|
1035
1201
|
formFieldExtensions?: FormFieldExtension[];
|
|
1036
1202
|
updateTeiOrgUnit?: boolean;
|
|
1203
|
+
optionCascadeConfigs?: OptionsPathCascadeConfig[];
|
|
1204
|
+
coordinatePickerGeoConfig?: CoordinatePickerGeoConfig;
|
|
1037
1205
|
}
|
|
1038
1206
|
declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
|
|
1039
1207
|
program: string;
|
|
@@ -1042,6 +1210,7 @@ declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
|
|
|
1042
1210
|
formType: 'TRACKER' | 'EVENT';
|
|
1043
1211
|
hideRegistrationUnit?: boolean;
|
|
1044
1212
|
hideEnrollmentDate?: boolean;
|
|
1213
|
+
hideIncidentDate?: boolean;
|
|
1045
1214
|
hideGeometryField?: boolean;
|
|
1046
1215
|
hideTrackedEntityTypeAttributes?: boolean;
|
|
1047
1216
|
disableRegistrationUnit?: boolean;
|
|
@@ -1063,6 +1232,8 @@ declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
|
|
|
1063
1232
|
autoComplete?: boolean;
|
|
1064
1233
|
formFieldExtensions?: FormFieldExtension[];
|
|
1065
1234
|
updateTeiOrgUnit: boolean;
|
|
1235
|
+
optionCascadeConfigs?: OptionsPathCascadeConfig[];
|
|
1236
|
+
coordinatePickerGeoConfig?: CoordinatePickerGeoConfig;
|
|
1066
1237
|
constructor(config: IProgramEntryFormConfig);
|
|
1067
1238
|
}
|
|
1068
1239
|
|
|
@@ -1124,6 +1295,7 @@ declare class BaseFormWrapperComponent implements OnDestroy {
|
|
|
1124
1295
|
dataValues: _angular_core.InputSignal<Record<string, unknown>>;
|
|
1125
1296
|
dataId: _angular_core.InputSignal<string>;
|
|
1126
1297
|
customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
|
|
1298
|
+
coordinatePickerGeoConfig: _angular_core.InputSignal<CoordinatePickerGeoConfig>;
|
|
1127
1299
|
formMetaData: _angular_core.InputSignal<IFormMetadata>;
|
|
1128
1300
|
programEntryFormMetaData: _angular_core.InputSignal<IProgramEntryFormMetaData>;
|
|
1129
1301
|
programStage: _angular_core.InputSignal<string>;
|
|
@@ -1141,22 +1313,23 @@ declare class BaseFormWrapperComponent implements OnDestroy {
|
|
|
1141
1313
|
protected executeRules(): void;
|
|
1142
1314
|
ngOnDestroy(): void;
|
|
1143
1315
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormWrapperComponent, never>;
|
|
1144
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseFormWrapperComponent, never, never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": true; "isSignal": true; }; "rules": { "alias": "rules"; "required": false; "isSignal": true; }; "dataValues": { "alias": "dataValues"; "required": false; "isSignal": true; }; "dataId": { "alias": "dataId"; "required": false; "isSignal": true; }; "customOrgUnitRoots": { "alias": "customOrgUnitRoots"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": false; "isSignal": true; }; "programEntryFormMetaData": { "alias": "programEntryFormMetaData"; "required": false; "isSignal": true; }; "programStage": { "alias": "programStage"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; "isSignal": true; }; }, { "formSave": "formSave"; "formUpdate": "formUpdate"; "formCancel": "formCancel"; "formValidityUpdate": "formValidityUpdate"; }, never, never, true, never>;
|
|
1316
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseFormWrapperComponent, never, never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": true; "isSignal": true; }; "rules": { "alias": "rules"; "required": false; "isSignal": true; }; "dataValues": { "alias": "dataValues"; "required": false; "isSignal": true; }; "dataId": { "alias": "dataId"; "required": false; "isSignal": true; }; "customOrgUnitRoots": { "alias": "customOrgUnitRoots"; "required": false; "isSignal": true; }; "coordinatePickerGeoConfig": { "alias": "coordinatePickerGeoConfig"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": false; "isSignal": true; }; "programEntryFormMetaData": { "alias": "programEntryFormMetaData"; "required": false; "isSignal": true; }; "programStage": { "alias": "programStage"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; "isSignal": true; }; }, { "formSave": "formSave"; "formUpdate": "formUpdate"; "formCancel": "formCancel"; "formValidityUpdate": "formValidityUpdate"; }, never, never, true, never>;
|
|
1145
1317
|
}
|
|
1146
1318
|
|
|
1147
1319
|
declare class FlatFormComponent extends BaseFormWrapperComponent implements OnInit {
|
|
1148
1320
|
formGroup: FormGroup;
|
|
1149
1321
|
collapsibleSections: _angular_core.InputSignal<boolean>;
|
|
1150
1322
|
programEntryFormConfig: _angular_core.InputSignal<any>;
|
|
1323
|
+
optionCascadeConfigs: _angular_core.InputSignal<OptionsPathCascadeConfig[]>;
|
|
1151
1324
|
ngOnInit(): void;
|
|
1152
1325
|
onFormUpdate(): void;
|
|
1153
1326
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlatFormComponent, never>;
|
|
1154
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlatFormComponent, "ng-dhis2-ui-flat-form", never, { "collapsibleSections": { "alias": "collapsibleSections"; "required": false; "isSignal": true; }; "programEntryFormConfig": { "alias": "programEntryFormConfig"; "required": true; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
1327
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlatFormComponent, "ng-dhis2-ui-flat-form", never, { "collapsibleSections": { "alias": "collapsibleSections"; "required": false; "isSignal": true; }; "programEntryFormConfig": { "alias": "programEntryFormConfig"; "required": true; "isSignal": true; }; "optionCascadeConfigs": { "alias": "optionCascadeConfigs"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
1155
1328
|
}
|
|
1156
1329
|
|
|
1157
1330
|
declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
1158
1331
|
#private;
|
|
1159
|
-
ngZone
|
|
1332
|
+
private readonly ngZone;
|
|
1160
1333
|
fieldType: string;
|
|
1161
1334
|
field: _angular_core.InputSignal<IFormField<string>>;
|
|
1162
1335
|
fieldError: _angular_core.InputSignal<string>;
|
|
@@ -1166,14 +1339,18 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1166
1339
|
isValueAssigned: _angular_core.InputSignal<boolean>;
|
|
1167
1340
|
dataId: _angular_core.InputSignal<string>;
|
|
1168
1341
|
customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
|
|
1342
|
+
optionCascadeConfigs: _angular_core.InputSignal<OptionsPathCascadeConfig[]>;
|
|
1343
|
+
optionCascadeConfigMap: _angular_core.InputSignal<Readonly<Record<string, OptionsPathCascadeConfig>>>;
|
|
1344
|
+
coordinatePickerGeoConfig: _angular_core.InputSignal<CoordinatePickerGeoConfig>;
|
|
1345
|
+
fieldControlKeyById: _angular_core.InputSignal<Record<string, string>>;
|
|
1169
1346
|
program: _angular_core.InputSignal<string>;
|
|
1170
1347
|
value: _angular_core.ModelSignal<string>;
|
|
1171
|
-
protected value$: rxjs.Observable<string>;
|
|
1172
|
-
protected isValueAssigned$: rxjs.Observable<boolean>;
|
|
1173
|
-
protected fieldError$: rxjs.Observable<string>;
|
|
1174
|
-
label: Signal<string | undefined>;
|
|
1175
|
-
placeholder: Signal<string>;
|
|
1176
|
-
InputField: () => React.JSX.Element;
|
|
1348
|
+
protected readonly value$: rxjs.Observable<string>;
|
|
1349
|
+
protected readonly isValueAssigned$: rxjs.Observable<boolean>;
|
|
1350
|
+
protected readonly fieldError$: rxjs.Observable<string>;
|
|
1351
|
+
readonly label: Signal<string | undefined>;
|
|
1352
|
+
readonly placeholder: Signal<string>;
|
|
1353
|
+
InputField: () => React.JSX.Element | React.ReactElement | null;
|
|
1177
1354
|
update: EventEmitter<{
|
|
1178
1355
|
form: FormGroup;
|
|
1179
1356
|
value: any;
|
|
@@ -1204,7 +1381,7 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
|
|
|
1204
1381
|
normalizeDateValueFromHtmlInput(inputValue: string | null | undefined, isDateTimeField: boolean, disallowFuture: boolean): string | null;
|
|
1205
1382
|
searchForDuplicates(value: string): Promise<boolean>;
|
|
1206
1383
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormFieldComponent, never>;
|
|
1207
|
-
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>;
|
|
1384
|
+
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; }; "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>;
|
|
1208
1385
|
}
|
|
1209
1386
|
|
|
1210
1387
|
declare class FormFieldItemComponent extends BaseFormFieldComponent {
|
|
@@ -1221,7 +1398,7 @@ declare class D2FormModule {
|
|
|
1221
1398
|
declare class FieldUtil {
|
|
1222
1399
|
static getFieldDropdownOptions(field: any): DropdownOption[];
|
|
1223
1400
|
static sanitizeOptions(options: any[]): any;
|
|
1224
|
-
static getFieldType(valueType: string): "
|
|
1401
|
+
static getFieldType(valueType: string): "date" | "date-time" | "org-unit" | "file" | "number" | "tel" | "coordinate" | "email" | "text";
|
|
1225
1402
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
1226
1403
|
static getOptionEntities?(options: any[]): any;
|
|
1227
1404
|
}
|
|
@@ -1231,7 +1408,7 @@ declare class FieldControlTypeUtil {
|
|
|
1231
1408
|
}
|
|
1232
1409
|
|
|
1233
1410
|
declare class FormFieldTypeUtil {
|
|
1234
|
-
static getFieldType(valueType: string): "
|
|
1411
|
+
static getFieldType(valueType: string): "date-time" | "image" | "org-unit" | "file" | "number" | "tel" | "coordinate" | "text";
|
|
1235
1412
|
}
|
|
1236
1413
|
|
|
1237
1414
|
declare class FormUtil {
|
|
@@ -1429,7 +1606,7 @@ declare class ProgramEntryFormModule {
|
|
|
1429
1606
|
instance: TrackedEntityInstance | DHIS2Event;
|
|
1430
1607
|
}) => void>;
|
|
1431
1608
|
instanceSave: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1432
|
-
instanceSaveCompleted: EventEmitter<
|
|
1609
|
+
instanceSaveCompleted: EventEmitter<D2EventResponse<DHIS2Event> | D2TrackerResponse<TrackedEntityInstance>>;
|
|
1433
1610
|
instanceUpdate: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
1434
1611
|
formValidityUpdate: EventEmitter<boolean>;
|
|
1435
1612
|
formCancel: EventEmitter<any>;
|
|
@@ -1445,4 +1622,4 @@ declare class ProgramEntryFormModule {
|
|
|
1445
1622
|
}
|
|
1446
1623
|
|
|
1447
1624
|
export { Boolean, BreadcrumbComponent, BreadcrumbModule, ButtonComponent, ButtonModule, CheckBox, D2FormModule, DEFAULT_KEYWORD_TO_LEVEL, DataTableUIComponent, DataTableUIModule, DateField, DateRangeValue, Dropdown, EventFormComponent, EventFormModule, FACILITY_KEYWORDS, FieldConfig, FieldControlTypeUtil, FieldDropdown, FieldType, FieldUtil, FlatFormComponent, FormComponent, FormConfig, FormField, FormFieldComponent, FormFieldGroup, FormFieldTypeUtil, FormMetaData, FormMetadataSection, FormUtil, FormValue, FormValueUtil, GLOBAL_TYPE_RULES, HeaderBarComponent, HeaderBarModule, LOWERCASE_FACILITY_KEYWORDS, LevelMatchMode, LevelSelectorMode, LineListModule, LineListTableComponent, MetadataRule, MetadataRuleAction, ORG_UNIT_LEVEL_TO_KEYWORD, OrgUnitLevel, OrganisationUnitSelectionConfig, OrganisationUnitSelectorComponent, OrganisationUnitSelectorModalComponent, OrganisationUnitSelectorModule, PeriodSelectorComponent, PeriodSelectorModalComponent, PeriodSelectorModule, ProgramEntryFormConfig, ProgramEntryFormMetaData, ProgramEntryFormModule, ProgramEntryFormSection, ReactWrapperModule, RepeatableFormComponent, SectionFormComponent, SelectionFiltersComponent, SelectionFiltersUiModule, TrackerFormComponent, TrackerFormModule, TranslationUtil };
|
|
1448
|
-
export type { AbsoluteLevelSelector, ActionOption, ActionOptionOrientation, AddtionalAttributeFilter, AutoAssignedValues, BreadcrumbItem, ColumnDefinition, CustomOrgUnitConfig, CustomOrgUnitRootConfig, DropdownMenuOption$1 as DropdownMenuOption, DropdownOption, EocForm, FieldControlType, FieldData, FieldsData, FormConfiguration, FormDirection, FormFieldExtension, FormFieldMetaType, FormGroupField, FormSection, IFieldDropdown, IFormField, IFormFieldGroup, IFormMetadata, IFormMetadataSection, IMetadataRule, IMetadataRuleAction, IProgramEntryFormConfig, IProgramEntryFormMetaData, IProgramEntryFormSection, KeywordLevelMap, KeywordLevelSelector, LevelSelector, LineListActionOption, Option, OrgUnitLevelKeyword, OrgUnitSemanticType, OrgUnitTypeKeywordRule, OrgUnitTypeMatch, OrganisationUnitSelectionUsageType, ProgramAttributesFilter, ProgramStageDataElementFilter, RelativeLevelSelector, SelectionFilterColumnDefinition, SelectionFilterTableRow, SelectionFiltersProps, TableRow };
|
|
1625
|
+
export type { AbsoluteLevelSelector, ActionOption, ActionOptionOrientation, AddtionalAttributeFilter, AutoAssignedValues, BreadcrumbItem, ColumnDefinition, CustomOrgUnitConfig, CustomOrgUnitRootConfig, DropdownMenuOption$1 as DropdownMenuOption, DropdownOption, EocForm, FieldControlType, FieldData, FieldsData, FormConfiguration, FormDirection, FormFieldExtension, FormFieldMetaType, FormGroupField, FormSection, IFieldDropdown, IFormField, IFormFieldGroup, IFormMetadata, IFormMetadataSection, IMetadataRule, IMetadataRuleAction, IProgramEntryFormConfig, IProgramEntryFormMetaData, IProgramEntryFormSection, KeywordLevelMap, KeywordLevelSelector, LevelSelector, LineListActionOption, Option, OrgUnitLevelKeyword, OrgUnitSemanticType, OrgUnitTypeKeywordRule, OrgUnitTypeMatch, OrganisationUnitSelectionUsageType, ProgramAttributesFilter, ProgramRuleActionType, ProgramStageDataElementFilter, RelativeLevelSelector, SelectionFilterColumnDefinition, SelectionFilterTableRow, SelectionFiltersProps, TableRow };
|