@iapps/ng-dhis2-ui 1.2.105 → 1.2.111

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
@@ -5,13 +5,13 @@ import React, { ComponentProps } from 'react';
5
5
  import * as ReactDOM from 'react-dom/client';
6
6
  import * as i2 from '@angular/common';
7
7
  import * as _iapps_d2_web_sdk from '@iapps/d2-web-sdk';
8
- import { TrackedEntityInstance, DHIS2Event, DataQueryFilter, EnrollmentStatus, EventStatus, Option as Option$1, ProgramRuleAction, ProgramRuleVariable, ProgramRule, Program, BaseTrackerQuery, BaseEventQuery, D2EventResponse, D2TrackerResponse } from '@iapps/d2-web-sdk';
8
+ import { TrackedEntityInstance, DHIS2Event, DataQueryFilter, EnrollmentStatus, EventStatus, Option as Option$1, ProgramRuleAction, ProgramRuleVariable, ProgramRule, Program, BaseTrackerQuery, BaseEventQuery, D2TrackerResponse, D2EventResponse } from '@iapps/d2-web-sdk';
9
9
  import * as rxjs from 'rxjs';
10
10
  import { Observable, Subject } from 'rxjs';
11
11
  import * as i8 from '@angular/forms';
12
12
  import { FormGroup, FormControl, UntypedFormGroup } from '@angular/forms';
13
- import * as _dhis2_app_service_config from '@dhis2/app-service-config';
14
13
  import * as _dhis2_ui_loader from '@dhis2-ui/loader';
14
+ import * as _dhis2_app_service_config from '@dhis2/app-service-config';
15
15
 
16
16
  declare class ReactWrapperModule implements OnDestroy, AfterViewInit {
17
17
  protected elementRef: ElementRef<HTMLElement>;
@@ -223,6 +223,11 @@ interface AttributeFilter {
223
223
  }
224
224
 
225
225
  declare class LineListService {
226
+ private httpClient;
227
+ constructor(httpClient: NgxDhis2HttpClientService);
228
+ /**
229
+ * Fetch orgUnit names for given orgUnit IDs
230
+ */
226
231
  fetchOrgUnits(orgUnitIds: string[]): Observable<Map<string, string>>;
227
232
  static ɵfac: i0.ɵɵFactoryDeclaration<LineListService, never>;
228
233
  static ɵprov: i0.ɵɵInjectableDeclaration<LineListService>;
@@ -279,7 +284,7 @@ declare class LineListModule {
279
284
  static ɵinj: i0.ɵɵInjectorDeclaration<LineListModule>;
280
285
  }
281
286
 
282
- interface TableRow$1 {
287
+ interface TableRow {
283
288
  [key: string]: string | number;
284
289
  index: number;
285
290
  }
@@ -300,12 +305,12 @@ interface DropdownMenuOption {
300
305
  }
301
306
 
302
307
  declare class DataTableUIComponent extends ReactWrapperModule implements AfterViewInit, OnChanges {
303
- data: TableRow$1[];
308
+ data: TableRow[];
304
309
  columnDefinitions: ColumnDefinition[];
305
310
  actionOptions?: DropdownMenuOption[];
306
311
  actionSelected: EventEmitter<{
307
312
  action: string;
308
- row: TableRow$1;
313
+ row: TableRow;
309
314
  }>;
310
315
  DataTableUI: () => React.DetailedReactHTMLElement<null, HTMLElement>;
311
316
  ngAfterViewInit(): Promise<void>;
@@ -756,10 +761,21 @@ interface EocForm {
756
761
  concept?: any;
757
762
  }
758
763
 
759
- type CustomOrgUnitConfig = {
764
+ declare enum OrgUnitLevel {
765
+ FACILITY = "FACILITY",
766
+ HAMLET = "HAMLET",
767
+ STREET = "STREET",
768
+ WARD = "WARD",
769
+ COUNCIL = "COUNCIL",
770
+ REGION = "REGION",
771
+ NATIONAL = "NATIONAL"
772
+ }
773
+ interface CustomOrgUnitConfig {
760
774
  field: string;
761
775
  orgUnit: string;
762
- };
776
+ level: OrgUnitLevel;
777
+ confidence: number;
778
+ }
763
779
 
764
780
  declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
765
781
  #private;
@@ -992,7 +1008,7 @@ declare class D2FormModule {
992
1008
  declare class FieldUtil {
993
1009
  static getFieldDropdownOptions(field: any): DropdownOption[];
994
1010
  static sanitizeOptions(options: any[]): any;
995
- static getFieldType(valueType: string): "email" | "number" | "text" | "tel" | "date" | "org-unit" | "file";
1011
+ static getFieldType(valueType: string): "date" | "org-unit" | "file" | "email" | "tel" | "text" | "number";
996
1012
  static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
997
1013
  static getOptionEntities?(options: any[]): any;
998
1014
  }
@@ -1002,7 +1018,7 @@ declare class FieldControlTypeUtil {
1002
1018
  }
1003
1019
 
1004
1020
  declare class FormFieldTypeUtil {
1005
- static getFieldType(valueType: string): "number" | "text" | "image" | "org-unit" | "file";
1021
+ static getFieldType(valueType: string): "image" | "org-unit" | "file" | "text" | "number";
1006
1022
  }
1007
1023
 
1008
1024
  declare class FormUtil {
@@ -1064,16 +1080,22 @@ interface ProgramStageDataElementFilter {
1064
1080
  value: string;
1065
1081
  options: Option[];
1066
1082
  }
1067
- interface TableRow {
1083
+ interface SelectionFilterTableRow {
1068
1084
  [key: string]: string | number;
1069
1085
  index: number;
1070
1086
  }
1087
+ interface SelectionFilterColumnDefinition {
1088
+ column: string;
1089
+ display: string;
1090
+ index?: string;
1091
+ visible?: boolean;
1092
+ }
1071
1093
 
1072
1094
  declare class SelectionFiltersComponent extends ReactWrapperModule implements AfterViewInit {
1073
1095
  d2: _iapps_d2_web_sdk.D2Web;
1074
1096
  actionOptions: {
1075
1097
  label: string;
1076
- onClick: (row: TableRow) => void;
1098
+ onClick: (row: SelectionFilterTableRow) => void;
1077
1099
  }[];
1078
1100
  programAttributesFilters: ProgramAttributesFilter[];
1079
1101
  programStageDataElementFilters: ProgramStageDataElementFilter[];
@@ -1092,14 +1114,14 @@ declare class SelectionFiltersComponent extends ReactWrapperModule implements Af
1092
1114
  FieldOrgUnitSelector: (props: {
1093
1115
  onSelectOrgUnit: (selectedOrgUnits: any) => void;
1094
1116
  onCancelOrgUnit: () => void;
1095
- }) => React.FunctionComponentElement<_dhis2_ui_loader.CircularLoaderProps> | React.FunctionComponentElement<{
1117
+ }) => React.FunctionComponentElement<{
1096
1118
  config: _dhis2_app_service_config.Config;
1097
1119
  children: React.ReactNode;
1098
1120
  offlineInterface?: any;
1099
1121
  plugin: boolean;
1100
1122
  parentAlertsAdd: any;
1101
1123
  showAlertsInPlugin: boolean;
1102
- }>;
1124
+ }> | React.FunctionComponentElement<_dhis2_ui_loader.CircularLoaderProps>;
1103
1125
  showOrgUnitTree: i0.WritableSignal<boolean>;
1104
1126
  orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
1105
1127
  selectedOrgUnit: i0.WritableSignal<any>;
@@ -1287,7 +1309,7 @@ declare class ProgramEntryFormModule {
1287
1309
  instance: i0.WritableSignal<TrackedEntityInstance | DHIS2Event>;
1288
1310
  instanceQuery: BaseTrackerQuery<TrackedEntityInstance> | BaseEventQuery<DHIS2Event>;
1289
1311
  instanceSave: EventEmitter<TrackedEntityInstance | DHIS2Event>;
1290
- instanceSaveCompleted: EventEmitter<D2EventResponse<DHIS2Event> | D2TrackerResponse<TrackedEntityInstance>>;
1312
+ instanceSaveCompleted: EventEmitter<D2TrackerResponse<TrackedEntityInstance> | D2EventResponse<DHIS2Event>>;
1291
1313
  instanceUpdate: EventEmitter<TrackedEntityInstance | DHIS2Event>;
1292
1314
  formValidityUpdate: EventEmitter<boolean>;
1293
1315
  formCancel: EventEmitter<any>;
@@ -1302,5 +1324,5 @@ declare class ProgramEntryFormModule {
1302
1324
  static ɵcmp: i0.ɵɵ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; }; }, { "instanceSave": "instanceSave"; "instanceSaveCompleted": "instanceSaveCompleted"; "instanceUpdate": "instanceUpdate"; "formValidityUpdate": "formValidityUpdate"; "formCancel": "formCancel"; }, never, never, true, never>;
1303
1325
  }
1304
1326
 
1305
- 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, OrganisationUnitSelectionConfig, OrganisationUnitSelectorComponent, OrganisationUnitSelectorModalComponent, OrganisationUnitSelectorModule, PeriodSelectorComponent, PeriodSelectorModalComponent, PeriodSelectorModule, ProgramEntryFormConfig, ProgramEntryFormMetaData, ProgramEntryFormModule, ProgramEntryFormSection, ReactWrapperModule, RepeatableFormComponent, SectionFormComponent, SelectionFiltersComponent, SelectionFiltersUiModule, TrackerFormComponent, TrackerFormModule, TranslationUtil };
1306
- export type { ActionOptionOrientation, AddtionalAttributeFilter, AutoAssignedValues, BreadcrumbItem, ColumnDefinition, 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, OrganisationUnitSelectionUsageType, TableRow$1 as TableRow };
1327
+ 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 };
1328
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iapps/ng-dhis2-ui",
3
- "version": "1.2.105",
3
+ "version": "1.2.111",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0",