@iapps/ng-dhis2-ui 1.2.122 → 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/index.d.ts CHANGED
@@ -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 {
@@ -495,6 +496,7 @@ interface IFormMetadata {
495
496
  description?: string;
496
497
  fields: IFormField<string>[];
497
498
  sections: IFormMetadataSection[];
499
+ programStageSections: IFormMetadataSection[];
498
500
  rules: any[];
499
501
  downloadSqlView?: string;
500
502
  }
@@ -709,6 +711,7 @@ declare class FormMetaData implements IFormMetadata {
709
711
  name: string;
710
712
  description?: string | undefined;
711
713
  downloadSqlView?: string | undefined;
714
+ programStageSections: IFormMetadataSection[];
712
715
  constructor(params: {
713
716
  programs: Program[];
714
717
  locale?: string;
@@ -758,20 +761,76 @@ interface EocForm {
758
761
  }
759
762
 
760
763
  declare enum OrgUnitLevel {
764
+ SHEHIA = "SHEHIA",
761
765
  FACILITY = "FACILITY",
762
766
  HAMLET = "HAMLET",
763
767
  STREET = "STREET",
764
768
  WARD = "WARD",
765
769
  COUNCIL = "COUNCIL",
766
770
  REGION = "REGION",
767
- NATIONAL = "NATIONAL"
771
+ NATIONAL = "NATIONAL",
772
+ VILLAGE = "VILLAGE"
773
+ }
774
+ type OrgUnitLevelKeyword = 'COUNTRY' | 'REGION' | 'COUNCIL' | 'DISTRICT' | 'WARD' | 'SHEHIA' | 'VILLAGE' | 'HAMLET' | 'FACILITY' | 'HOSPITAL' | 'HEALTH_CENTRE' | 'DISPENSARY' | 'CLINIC' | 'UNKNOWN';
775
+ type OrgUnitSemanticType = 'COUNTRY' | 'REGION' | 'COUNCIL' | 'DISTRICT' | 'WARD' | 'SHEHIA' | 'VILLAGE' | 'HAMLET' | 'FACILITY' | 'HOSPITAL' | 'HEALTH_CENTRE' | 'DISPENSARY' | 'CLINIC' | 'UNKNOWN' | string;
776
+ declare enum LevelSelectorMode {
777
+ RELATIVE = "relative",
778
+ ABSOLUTE = "absolute",
779
+ KEYWORD = "keyword"
780
+ }
781
+ declare enum LevelMatchMode {
782
+ STRICT = "strict",
783
+ SOFT = "soft"
784
+ }
785
+ interface RelativeLevelSelector {
786
+ mode: LevelSelectorMode.RELATIVE;
787
+ offset: number;
788
+ maxOffset?: number;
789
+ }
790
+ interface AbsoluteLevelSelector {
791
+ mode: LevelSelectorMode.ABSOLUTE;
792
+ level: number;
793
+ }
794
+ interface KeywordLevelSelector {
795
+ mode: LevelSelectorMode.KEYWORD;
796
+ keyword: string;
797
+ }
798
+ type LevelSelector = RelativeLevelSelector | AbsoluteLevelSelector | KeywordLevelSelector;
799
+ interface OrgUnitTypeKeywordRule {
800
+ type: OrgUnitSemanticType;
801
+ keywords: string[];
802
+ baseConfidence?: number;
768
803
  }
769
804
  interface CustomOrgUnitConfig {
770
805
  field: string;
771
806
  orgUnit: string;
772
- level: OrgUnitLevel;
807
+ levelSelector?: LevelSelector;
808
+ level?: OrgUnitLevel;
809
+ confidence?: number;
810
+ typeRules?: OrgUnitTypeKeywordRule[];
811
+ levelMatchMode?: LevelMatchMode;
812
+ }
813
+ interface CustomOrgUnitRootConfig {
814
+ field: string;
815
+ orgUnit: string;
816
+ levelSelector?: LevelSelector;
817
+ level?: OrgUnitLevel;
818
+ confidence?: number;
819
+ typeRules?: OrgUnitTypeKeywordRule[];
820
+ levelMatchMode?: LevelMatchMode;
821
+ }
822
+ interface KeywordLevelMap {
823
+ [keyword: string]: number;
824
+ }
825
+ declare const ORG_UNIT_LEVEL_TO_KEYWORD: Record<OrgUnitLevel, OrgUnitLevelKeyword>;
826
+ interface OrgUnitTypeMatch {
827
+ type: OrgUnitSemanticType;
773
828
  confidence: number;
774
829
  }
830
+ declare const DEFAULT_KEYWORD_TO_LEVEL: KeywordLevelMap;
831
+ declare const FACILITY_KEYWORDS: string[];
832
+ declare const GLOBAL_TYPE_RULES: OrgUnitTypeKeywordRule[];
833
+ declare const LOWERCASE_FACILITY_KEYWORDS: string[];
775
834
 
776
835
  declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
777
836
  #private;
@@ -829,12 +888,15 @@ declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
829
888
 
830
889
  declare class FormComponent implements OnChanges, OnDestroy, OnInit {
831
890
  #private;
891
+ programEntryFormConfig: _angular_core.InputSignal<any>;
832
892
  formConfig: _angular_core.InputSignal<FormConfig>;
833
893
  fields: _angular_core.InputSignal<IFormField<string>[]>;
834
894
  form: _angular_core.InputSignal<FormGroup<any>>;
835
895
  isFormHorizontal: _angular_core.InputSignal<boolean>;
836
896
  showSaveButton: _angular_core.InputSignal<boolean>;
837
897
  fieldsData: _angular_core.InputSignal<FieldsData>;
898
+ formMetaData: _angular_core.InputSignal<any>;
899
+ programEntryFormMetaData: _angular_core.InputSignal<any>;
838
900
  fieldClass: _angular_core.InputSignal<string>;
839
901
  shouldRenderAsCheckBoxesButton: _angular_core.InputSignal<boolean>;
840
902
  programRuleActions: _angular_core.InputSignal<IMetadataRuleAction[]>;
@@ -842,15 +904,24 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
842
904
  dataId: _angular_core.InputSignal<string>;
843
905
  customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
844
906
  program: _angular_core.InputSignal<string>;
907
+ collapsibleSections: _angular_core.InputSignal<boolean>;
908
+ private openSectionId;
845
909
  configuration: _angular_core.Signal<FormConfig>;
846
910
  formUpdate: EventEmitter<any>;
847
911
  formValidityUpdate: EventEmitter<boolean>;
848
912
  fieldComponents: FormFieldComponent[];
849
913
  values: any;
850
- get sanitizedFields(): IFormField<string>[];
851
914
  get layoutCssClass(): string;
852
915
  ruleProcessor: EffectRef;
853
916
  constructor();
917
+ resolveSections(meta: any): any;
918
+ private getSections;
919
+ openSection(section: {
920
+ id?: string | number;
921
+ }, index: number): void;
922
+ isSectionOpen(section: {
923
+ id?: string | number;
924
+ }, index: number): boolean;
854
925
  ngOnInit(): void;
855
926
  ngOnChanges(changes: SimpleChanges): void;
856
927
  onSubmit(): void;
@@ -859,8 +930,12 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
859
930
  isFormInValid(): boolean;
860
931
  onRunTimeOptionUpdate(result: any): void;
861
932
  ngOnDestroy(): void;
933
+ private readonly hiddenFieldIds;
934
+ get sanitizedFields(): IFormField<string>[];
935
+ getVisibleSectionFields(section: any): IFormField<string>[];
936
+ private isFieldHiddenByRules;
862
937
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormComponent, never>;
863
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormComponent, "ng-dhis2-ui-form", never, { "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; }; "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; }; }, { "formUpdate": "formUpdate"; "formValidityUpdate": "formValidityUpdate"; }, never, never, false, never>;
938
+ 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>;
864
939
  }
865
940
 
866
941
  declare class RepeatableFormComponent implements OnInit {
@@ -925,6 +1000,108 @@ declare class SectionFormComponent implements OnInit {
925
1000
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SectionFormComponent, "ng-dhis2-ui-section-form", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": true; "isSignal": true; }; "dataValueEntities": { "alias": "dataValueEntities"; "required": true; "isSignal": true; }; }, { "save": "save"; "formUpdate": "formUpdate"; "cancel": "cancel"; "formValidityUpdate": "formValidityUpdate"; }, never, never, false, never>;
926
1001
  }
927
1002
 
1003
+ type AutoAssignedValues = {
1004
+ field: string;
1005
+ value: string;
1006
+ };
1007
+ interface IProgramEntryFormConfig {
1008
+ program: string;
1009
+ programStage?: string;
1010
+ displayType: 'FLAT' | 'SECTION' | 'CUSTOM';
1011
+ formType: 'TRACKER' | 'EVENT';
1012
+ hideRegistrationUnit?: boolean;
1013
+ hideEnrollmentDate?: boolean;
1014
+ hideTrackedEntityTypeAttributes?: boolean;
1015
+ disableRegistrationUnit?: boolean;
1016
+ disableEnrollmentDate?: boolean;
1017
+ disabledIncidentDate?: boolean;
1018
+ excludeProgramStages?: boolean;
1019
+ excludeInheritedAttributes?: boolean;
1020
+ includedProgramStages?: string[];
1021
+ submitButtonLabel?: string;
1022
+ cancelButtonLabel?: string;
1023
+ hideActionButtons?: boolean;
1024
+ hideSubmitButton?: boolean;
1025
+ hideCancelButton?: boolean;
1026
+ ignoreRepeatability?: boolean;
1027
+ autoAssignedValues?: AutoAssignedValues[];
1028
+ hideCustomAssignedFields?: boolean;
1029
+ autoComplete?: boolean;
1030
+ formFieldExtensions?: FormFieldExtension[];
1031
+ updateTeiOrgUnit?: boolean;
1032
+ }
1033
+ declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
1034
+ program: string;
1035
+ programStage?: string;
1036
+ displayType: 'FLAT' | 'SECTION' | 'CUSTOM';
1037
+ formType: 'TRACKER' | 'EVENT';
1038
+ hideRegistrationUnit?: boolean;
1039
+ hideEnrollmentDate?: boolean;
1040
+ hideTrackedEntityTypeAttributes?: boolean;
1041
+ disableRegistrationUnit?: boolean;
1042
+ disableEnrollmentDate?: boolean;
1043
+ disabledIncidentDate?: boolean;
1044
+ excludeProgramStages?: boolean;
1045
+ excludeInheritedAttributes?: boolean;
1046
+ includedProgramStages?: string[];
1047
+ submitButtonLabel: string;
1048
+ cancelButtonLabel: string;
1049
+ hideActionButtons?: boolean;
1050
+ hideSubmitButton?: boolean;
1051
+ hideCancelButton?: boolean;
1052
+ ignoreRepeatability?: boolean;
1053
+ autoAssignedValues?: AutoAssignedValues[];
1054
+ hideCustomAssignedFields?: boolean;
1055
+ autoComplete?: boolean;
1056
+ formFieldExtensions?: FormFieldExtension[];
1057
+ updateTeiOrgUnit: boolean;
1058
+ constructor(config: IProgramEntryFormConfig);
1059
+ }
1060
+
1061
+ interface IProgramEntryFormSection {
1062
+ id: string;
1063
+ name: string;
1064
+ description?: string;
1065
+ formFields: IFormField<string>[];
1066
+ orientation: 'HORIZONTAL' | 'VERTICAL';
1067
+ }
1068
+ declare class ProgramEntryFormSection implements IProgramEntryFormSection {
1069
+ id: string;
1070
+ name: string;
1071
+ description?: string;
1072
+ formFields: IFormField<string>[];
1073
+ orientation: 'HORIZONTAL' | 'VERTICAL';
1074
+ constructor(props: IProgramEntryFormSection);
1075
+ }
1076
+
1077
+ interface IProgramEntryFormMetaData {
1078
+ id: string;
1079
+ name: string;
1080
+ description?: string;
1081
+ program: Program;
1082
+ formFields: IFormField<string>[];
1083
+ sections: IProgramEntryFormSection[];
1084
+ programStageSections: IProgramEntryFormSection[];
1085
+ rules: IMetadataRule[];
1086
+ }
1087
+ declare class ProgramEntryFormMetaData implements IProgramEntryFormMetaData {
1088
+ #private;
1089
+ id: string;
1090
+ name: string;
1091
+ description?: string;
1092
+ d2: _iapps_d2_web_sdk.D2Web;
1093
+ config: ProgramEntryFormConfig;
1094
+ program: Program;
1095
+ setConfig(config: ProgramEntryFormConfig): ProgramEntryFormMetaData;
1096
+ getProgramPromise(): Promise<_iapps_d2_web_sdk.D2Response<Program>>;
1097
+ get formFields(): IFormField<string>[];
1098
+ get sections(): IProgramEntryFormSection[];
1099
+ get programStageSections(): IProgramEntryFormSection[];
1100
+ get rules(): IMetadataRule[];
1101
+ toJson(): IProgramEntryFormMetaData;
1102
+ get(): Promise<IProgramEntryFormMetaData>;
1103
+ }
1104
+
928
1105
  declare class BaseFormWrapperComponent implements OnDestroy {
929
1106
  #private;
930
1107
  ngZone: NgZone;
@@ -934,6 +1111,9 @@ declare class BaseFormWrapperComponent implements OnDestroy {
934
1111
  dataValues: _angular_core.InputSignal<Record<string, unknown>>;
935
1112
  dataId: _angular_core.InputSignal<string>;
936
1113
  customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
1114
+ formMetaData: _angular_core.InputSignal<IFormMetadata>;
1115
+ programEntryFormMetaData: _angular_core.InputSignal<IProgramEntryFormMetaData>;
1116
+ programStage: _angular_core.InputSignal<string>;
937
1117
  program: _angular_core.InputSignal<string>;
938
1118
  ruleActions: _angular_core.WritableSignal<IMetadataRuleAction[]>;
939
1119
  isFormValid: _angular_core.WritableSignal<boolean>;
@@ -948,15 +1128,17 @@ declare class BaseFormWrapperComponent implements OnDestroy {
948
1128
  protected executeRules(): void;
949
1129
  ngOnDestroy(): void;
950
1130
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormWrapperComponent, never>;
951
- 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; }; "program": { "alias": "program"; "required": false; "isSignal": true; }; }, { "formSave": "formSave"; "formUpdate": "formUpdate"; "formCancel": "formCancel"; "formValidityUpdate": "formValidityUpdate"; }, never, never, true, never>;
1131
+ 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>;
952
1132
  }
953
1133
 
954
1134
  declare class FlatFormComponent extends BaseFormWrapperComponent implements OnInit {
955
1135
  formGroup: FormGroup;
1136
+ collapsibleSections: _angular_core.InputSignal<boolean>;
1137
+ programEntryFormConfig: _angular_core.InputSignal<any>;
956
1138
  ngOnInit(): void;
957
1139
  onFormUpdate(): void;
958
1140
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlatFormComponent, never>;
959
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlatFormComponent, "ng-dhis2-ui-flat-form", never, {}, {}, never, never, false, never>;
1141
+ 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>;
960
1142
  }
961
1143
 
962
1144
  declare class BaseFormFieldComponent extends ReactWrapperModule {
@@ -989,6 +1171,24 @@ declare class BaseFormFieldComponent extends ReactWrapperModule {
989
1171
  }>;
990
1172
  ngAfterViewInit(): Promise<void>;
991
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;
992
1192
  searchForDuplicates(value: string): Promise<boolean>;
993
1193
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseFormFieldComponent, never>;
994
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>;
@@ -1008,7 +1208,7 @@ declare class D2FormModule {
1008
1208
  declare class FieldUtil {
1009
1209
  static getFieldDropdownOptions(field: any): DropdownOption[];
1010
1210
  static sanitizeOptions(options: any[]): any;
1011
- static getFieldType(valueType: string): "date" | "email" | "number" | "text" | "tel" | "org-unit" | "file";
1211
+ static getFieldType(valueType: string): "date" | "date-time" | "org-unit" | "file" | "coordinate" | "text" | "number" | "email" | "tel";
1012
1212
  static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
1013
1213
  static getOptionEntities?(options: any[]): any;
1014
1214
  }
@@ -1018,14 +1218,14 @@ declare class FieldControlTypeUtil {
1018
1218
  }
1019
1219
 
1020
1220
  declare class FormFieldTypeUtil {
1021
- static getFieldType(valueType: string): "number" | "text" | "image" | "org-unit" | "file";
1221
+ static getFieldType(valueType: string): "date-time" | "image" | "org-unit" | "file" | "coordinate" | "text" | "number";
1022
1222
  }
1023
1223
 
1024
1224
  declare class FormUtil {
1025
1225
  static getFormGroup(fields: IFormField<string>[], dataEntities: any): UntypedFormGroup;
1026
1226
  static getFieldValue(field: IFormField<string>, dataEntities: Record<string, any>): any;
1027
1227
  static getFormFields(fields: any[]): FormField<string>[];
1028
- 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>;
1029
1229
  }
1030
1230
 
1031
1231
  declare class FormValueUtil {
@@ -1103,6 +1303,8 @@ declare class SelectionFiltersComponent extends ReactWrapperModule implements Af
1103
1303
  endDate?: string;
1104
1304
  program?: string;
1105
1305
  organisationUnit?: string;
1306
+ selectedOrgUnit?: any;
1307
+ orgUnitFieldTitle?: string;
1106
1308
  actionSelected: EventEmitter<SelectionFiltersProps>;
1107
1309
  ngZone: NgZone;
1108
1310
  private getAppConfig;
@@ -1124,7 +1326,7 @@ declare class SelectionFiltersComponent extends ReactWrapperModule implements Af
1124
1326
  }> | React.FunctionComponentElement<_dhis2_ui_loader.CircularLoaderProps>;
1125
1327
  showOrgUnitTree: _angular_core.WritableSignal<boolean>;
1126
1328
  orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
1127
- selectedOrgUnit: _angular_core.WritableSignal<any>;
1329
+ selectedOrgUnitSignal: _angular_core.WritableSignal<any>;
1128
1330
  selectedOrgUnit$: rxjs.Observable<any>;
1129
1331
  SelectionFiltersUI: () => React.DetailedReactHTMLElement<{
1130
1332
  style: {
@@ -1137,7 +1339,7 @@ declare class SelectionFiltersComponent extends ReactWrapperModule implements Af
1137
1339
  }, HTMLElement>;
1138
1340
  ngAfterViewInit(): Promise<void>;
1139
1341
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectionFiltersComponent, never>;
1140
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectionFiltersComponent, "app-selection-filters-ui", never, { "actionOptions": { "alias": "actionOptions"; "required": false; }; "programAttributesFilters": { "alias": "programAttributesFilters"; "required": false; }; "programStageDataElementFilters": { "alias": "programStageDataElementFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "program": { "alias": "program"; "required": false; }; "organisationUnit": { "alias": "organisationUnit"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
1342
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectionFiltersComponent, "app-selection-filters-ui", never, { "actionOptions": { "alias": "actionOptions"; "required": false; }; "programAttributesFilters": { "alias": "programAttributesFilters"; "required": false; }; "programStageDataElementFilters": { "alias": "programStageDataElementFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "program": { "alias": "program"; "required": false; }; "organisationUnit": { "alias": "organisationUnit"; "required": false; }; "selectedOrgUnit": { "alias": "selectedOrgUnit"; "required": false; }; "orgUnitFieldTitle": { "alias": "orgUnitFieldTitle"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
1141
1343
  }
1142
1344
 
1143
1345
  declare class SelectionFiltersUiModule {
@@ -1192,106 +1394,6 @@ declare class EventFormModule {
1192
1394
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<EventFormModule>;
1193
1395
  }
1194
1396
 
1195
- type AutoAssignedValues = {
1196
- field: string;
1197
- value: string;
1198
- };
1199
- interface IProgramEntryFormConfig {
1200
- program: string;
1201
- programStage?: string;
1202
- displayType: 'FLAT' | 'SECTION' | 'CUSTOM';
1203
- formType: 'TRACKER' | 'EVENT';
1204
- hideRegistrationUnit?: boolean;
1205
- hideEnrollmentDate?: boolean;
1206
- hideTrackedEntityTypeAttributes?: boolean;
1207
- disableRegistrationUnit?: boolean;
1208
- disableEnrollmentDate?: boolean;
1209
- disabledIncidentDate?: boolean;
1210
- excludeProgramStages?: boolean;
1211
- excludeInheritedAttributes?: boolean;
1212
- includedProgramStages?: string[];
1213
- submitButtonLabel?: string;
1214
- cancelButtonLabel?: string;
1215
- hideActionButtons?: boolean;
1216
- hideSubmitButton?: boolean;
1217
- hideCancelButton?: boolean;
1218
- ignoreRepeatability?: boolean;
1219
- autoAssignedValues?: AutoAssignedValues[];
1220
- hideCustomAssignedFields?: boolean;
1221
- autoComplete?: boolean;
1222
- formFieldExtensions?: FormFieldExtension[];
1223
- updateTeiOrgUnit?: boolean;
1224
- }
1225
- declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
1226
- program: string;
1227
- programStage?: string;
1228
- displayType: 'FLAT' | 'SECTION' | 'CUSTOM';
1229
- formType: 'TRACKER' | 'EVENT';
1230
- hideRegistrationUnit?: boolean;
1231
- hideEnrollmentDate?: boolean;
1232
- hideTrackedEntityTypeAttributes?: boolean;
1233
- disableRegistrationUnit?: boolean;
1234
- disableEnrollmentDate?: boolean;
1235
- disabledIncidentDate?: boolean;
1236
- excludeProgramStages?: boolean;
1237
- excludeInheritedAttributes?: boolean;
1238
- includedProgramStages?: string[];
1239
- submitButtonLabel: string;
1240
- cancelButtonLabel: string;
1241
- hideActionButtons?: boolean;
1242
- hideSubmitButton?: boolean;
1243
- hideCancelButton?: boolean;
1244
- ignoreRepeatability?: boolean;
1245
- autoAssignedValues?: AutoAssignedValues[];
1246
- hideCustomAssignedFields?: boolean;
1247
- autoComplete?: boolean;
1248
- formFieldExtensions?: FormFieldExtension[];
1249
- updateTeiOrgUnit: boolean;
1250
- constructor(config: IProgramEntryFormConfig);
1251
- }
1252
-
1253
- interface IProgramEntryFormSection {
1254
- id: string;
1255
- name: string;
1256
- description?: string;
1257
- formFields: IFormField<string>[];
1258
- orientation: 'HORIZONTAL' | 'VERTICAL';
1259
- }
1260
- declare class ProgramEntryFormSection implements IProgramEntryFormSection {
1261
- id: string;
1262
- name: string;
1263
- description?: string;
1264
- formFields: IFormField<string>[];
1265
- orientation: 'HORIZONTAL' | 'VERTICAL';
1266
- constructor(props: IProgramEntryFormSection);
1267
- }
1268
-
1269
- interface IProgramEntryFormMetaData {
1270
- id: string;
1271
- name: string;
1272
- description?: string;
1273
- program: Program;
1274
- formFields: IFormField<string>[];
1275
- sections: IProgramEntryFormSection[];
1276
- rules: IMetadataRule[];
1277
- }
1278
- declare class ProgramEntryFormMetaData implements IProgramEntryFormMetaData {
1279
- #private;
1280
- id: string;
1281
- name: string;
1282
- description?: string;
1283
- d2: _iapps_d2_web_sdk.D2Web;
1284
- config: ProgramEntryFormConfig;
1285
- program: Program;
1286
- setConfig(config: ProgramEntryFormConfig): ProgramEntryFormMetaData;
1287
- getProgramPromise(): Promise<_iapps_d2_web_sdk.D2Response<Program>>;
1288
- get formFields(): IFormField<string>[];
1289
- get sections(): IProgramEntryFormSection[];
1290
- get rules(): IMetadataRule[];
1291
- toJson(): IProgramEntryFormMetaData;
1292
- get(): Promise<IProgramEntryFormMetaData>;
1293
- }
1294
-
1295
1397
  declare class ProgramEntryFormModule {
1296
1398
  #private;
1297
1399
  config: _angular_core.InputSignal<ProgramEntryFormConfig>;
@@ -1300,6 +1402,8 @@ declare class ProgramEntryFormModule {
1300
1402
  enrollment: _angular_core.InputSignal<string>;
1301
1403
  orgUnit: _angular_core.InputSignal<string>;
1302
1404
  customOrgUnitRoots: _angular_core.InputSignal<CustomOrgUnitConfig[]>;
1405
+ formMetaData: _angular_core.InputSignal<IFormMetadata>;
1406
+ collapsibleSections: _angular_core.InputSignal<boolean>;
1303
1407
  ngZone: NgZone;
1304
1408
  d2: _iapps_d2_web_sdk.D2Web;
1305
1409
  loading: _angular_core.WritableSignal<boolean>;
@@ -1324,8 +1428,8 @@ declare class ProgramEntryFormModule {
1324
1428
  onValidityUpdate(isFormValid: boolean): void;
1325
1429
  onCancel(): void;
1326
1430
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProgramEntryFormModule, never>;
1327
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProgramEntryFormModule, "ng-dhis2-ui-program-entry-form", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "trackedEntity": { "alias": "trackedEntity"; "required": false; "isSignal": true; }; "event": { "alias": "event"; "required": false; "isSignal": true; }; "enrollment": { "alias": "enrollment"; "required": false; "isSignal": true; }; "orgUnit": { "alias": "orgUnit"; "required": false; "isSignal": true; }; "customOrgUnitRoots": { "alias": "customOrgUnitRoots"; "required": false; "isSignal": true; }; "preprocess": { "alias": "preprocess"; "required": false; "isSignal": true; }; }, { "instanceSave": "instanceSave"; "instanceSaveCompleted": "instanceSaveCompleted"; "instanceUpdate": "instanceUpdate"; "formValidityUpdate": "formValidityUpdate"; "formCancel": "formCancel"; }, never, never, true, never>;
1431
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProgramEntryFormModule, "ng-dhis2-ui-program-entry-form", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "trackedEntity": { "alias": "trackedEntity"; "required": false; "isSignal": true; }; "event": { "alias": "event"; "required": false; "isSignal": true; }; "enrollment": { "alias": "enrollment"; "required": false; "isSignal": true; }; "orgUnit": { "alias": "orgUnit"; "required": false; "isSignal": true; }; "customOrgUnitRoots": { "alias": "customOrgUnitRoots"; "required": false; "isSignal": true; }; "formMetaData": { "alias": "formMetaData"; "required": false; "isSignal": true; }; "collapsibleSections": { "alias": "collapsibleSections"; "required": false; "isSignal": true; }; "preprocess": { "alias": "preprocess"; "required": false; "isSignal": true; }; }, { "instanceSave": "instanceSave"; "instanceSaveCompleted": "instanceSaveCompleted"; "instanceUpdate": "instanceUpdate"; "formValidityUpdate": "formValidityUpdate"; "formCancel": "formCancel"; }, never, never, true, never>;
1328
1432
  }
1329
1433
 
1330
- export { Boolean, BreadcrumbComponent, BreadcrumbModule, ButtonComponent, ButtonModule, CheckBox, D2FormModule, DataTableUIComponent, DataTableUIModule, DateField, DateRangeValue, Dropdown, EventFormComponent, EventFormModule, FieldConfig, FieldControlTypeUtil, FieldDropdown, FieldType, FieldUtil, FlatFormComponent, FormComponent, FormConfig, FormField, FormFieldComponent, FormFieldGroup, FormFieldTypeUtil, FormMetaData, FormMetadataSection, FormUtil, FormValue, FormValueUtil, HeaderBarComponent, HeaderBarModule, LineListModule, LineListTableComponent, MetadataRule, MetadataRuleAction, OrgUnitLevel, OrganisationUnitSelectionConfig, OrganisationUnitSelectorComponent, OrganisationUnitSelectorModalComponent, OrganisationUnitSelectorModule, PeriodSelectorComponent, PeriodSelectorModalComponent, PeriodSelectorModule, ProgramEntryFormConfig, ProgramEntryFormMetaData, ProgramEntryFormModule, ProgramEntryFormSection, ReactWrapperModule, RepeatableFormComponent, SectionFormComponent, SelectionFiltersComponent, SelectionFiltersUiModule, TrackerFormComponent, TrackerFormModule, TranslationUtil };
1331
- export type { ActionOption, ActionOptionOrientation, AddtionalAttributeFilter, AutoAssignedValues, BreadcrumbItem, ColumnDefinition, CustomOrgUnitConfig, 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, LineListActionOption, Option, OrganisationUnitSelectionUsageType, ProgramAttributesFilter, ProgramStageDataElementFilter, SelectionFilterColumnDefinition, SelectionFilterTableRow, SelectionFiltersProps, TableRow };
1434
+ 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 };
1435
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iapps/ng-dhis2-ui",
3
- "version": "1.2.122",
3
+ "version": "1.2.132",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0",