@iapps/ng-dhis2-ui 1.1.1 → 1.1.2

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.
Files changed (29) hide show
  1. package/fesm2022/iapps-ng-dhis2-ui.mjs +436 -232
  2. package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
  3. package/index.d.ts +2 -1
  4. package/lib/modules/button/button.component.d.ts +2 -2
  5. package/lib/modules/form/components/base-form-field.component.d.ts +2 -2
  6. package/lib/modules/form/containers/repeatable-form/repeatable-form.component.d.ts +11 -4
  7. package/lib/modules/form/containers/section-form/section-form.component.d.ts +10 -9
  8. package/lib/modules/form/form.module.d.ts +3 -2
  9. package/lib/modules/form/interfaces/form-field-group.interface.d.ts +2 -1
  10. package/lib/modules/form/models/form-field-group.model.d.ts +1 -1
  11. package/lib/modules/form/models/form-metadata.model.d.ts +2 -1
  12. package/lib/modules/form/models/form-value.model.d.ts +3 -1
  13. package/lib/modules/form/utils/index.d.ts +1 -0
  14. package/lib/modules/form/utils/translation.util.d.ts +3 -0
  15. package/lib/modules/header-bar/header-bar.component.d.ts +2 -2
  16. package/lib/modules/line-list/containers/line-list.component.d.ts +6 -5
  17. package/lib/modules/line-list/models/line-list.models.d.ts +43 -0
  18. package/lib/modules/line-list/services/line-list.service.d.ts +1 -1
  19. package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.d.ts +2 -2
  20. package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector-modal/organisation-unit-selector-modal.component-modal.d.ts +2 -2
  21. package/lib/modules/period-selector/containers/period-selector/period-selector.component.d.ts +2 -2
  22. package/lib/modules/period-selector/containers/period-selector-modal/period-selector-modal.component.d.ts +2 -2
  23. package/lib/modules/react-wrapper/react-wrapper.component.d.ts +3 -3
  24. package/lib/modules/tracker-form/index.d.ts +2 -0
  25. package/lib/modules/tracker-form/tracker-form.component.d.ts +15 -0
  26. package/lib/modules/tracker-form/tracker-form.module.d.ts +9 -0
  27. package/package.json +1 -1
  28. package/lib/modules/react-wrapper/index.d.ts +0 -2
  29. package/lib/modules/react-wrapper/react-wrapper.module.d.ts +0 -8
package/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './lib/modules/header-bar';
2
2
  export * from './lib/modules/button';
3
3
  export * from './lib/modules/period-selector';
4
4
  export * from './lib/modules/organisation-unit-selector';
5
- export * from './lib/modules/react-wrapper';
5
+ export * from './lib/modules/react-wrapper/react-wrapper.component';
6
6
  export * from './lib/modules/line-list';
7
7
  export * from './lib/modules/form';
8
+ export * from './lib/modules/tracker-form';
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { ReactWrapperComponent } from '../react-wrapper';
2
+ import { ReactWrapperModule } from '../react-wrapper/react-wrapper.component';
3
3
  import * as i0 from "@angular/core";
4
- export declare class ButtonComponent extends ReactWrapperComponent {
4
+ export declare class ButtonComponent extends ReactWrapperModule {
5
5
  label: string;
6
6
  primary?: boolean;
7
7
  secondary?: boolean;
@@ -1,13 +1,13 @@
1
1
  import { EventEmitter, NgZone, OnChanges, Signal, SimpleChanges } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import React from 'react';
4
- import { ReactWrapperComponent } from '../../react-wrapper/react-wrapper.component';
4
+ import { ReactWrapperModule } from '../../react-wrapper/react-wrapper.component';
5
5
  import { FieldConfig, FormField } from '../models';
6
6
  import { OrganisationUnitSelectionConfig } from '../../organisation-unit-selector';
7
7
  import { Observable } from 'rxjs';
8
8
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
9
9
  import * as i0 from "@angular/core";
10
- export declare class BaseFormFieldComponent extends ReactWrapperComponent implements OnChanges {
10
+ export declare class BaseFormFieldComponent extends ReactWrapperModule implements OnChanges {
11
11
  #private;
12
12
  ngZone: NgZone;
13
13
  httpClient: NgxDhis2HttpClientService;
@@ -1,16 +1,18 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter, NgZone, OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { IFormFieldGroup } from '../../interfaces';
4
4
  import { FormValue } from '../../models';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class RepeatableFormComponent implements OnInit {
7
+ #private;
8
+ ngZone: NgZone;
7
9
  formObject: any;
8
10
  formData: any;
9
11
  fieldGroup: import("@angular/core").InputSignal<IFormFieldGroup>;
10
12
  form: FormGroup;
11
13
  numberOfRows: number | string;
12
14
  programRuleActions: any[];
13
- events?: any[] | unknown;
15
+ events: import("@angular/core").ModelSignal<unknown>;
14
16
  program: string;
15
17
  programStage: string;
16
18
  repeatDependentField: string;
@@ -23,9 +25,14 @@ export declare class RepeatableFormComponent implements OnInit {
23
25
  repeatableFormEntities: {
24
26
  [event: string]: FormGroup;
25
27
  };
28
+ eventForm: FormGroup;
29
+ eventFormValue: import("@angular/core").WritableSignal<FormValue>;
30
+ showForm: import("@angular/core").WritableSignal<boolean>;
31
+ eventIndex: import("@angular/core").WritableSignal<number>;
32
+ constructor();
26
33
  get isValid(): boolean;
27
34
  ngOnInit(): void;
28
- onFormUpdate(formValue: FormValue, eventIndex: number): void;
35
+ onFormUpdate(formValue: FormValue): void;
29
36
  static ɵfac: i0.ɵɵFactoryDeclaration<RepeatableFormComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<RepeatableFormComponent, "ng-dhis2-ui-repeatable-form", never, { "formObject": { "alias": "formObject"; "required": false; }; "formData": { "alias": "formData"; "required": false; }; "fieldGroup": { "alias": "fieldGroup"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; }; "numberOfRows": { "alias": "numberOfRows"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; }; "events": { "alias": "events"; "required": false; }; "program": { "alias": "program"; "required": false; }; "programStage": { "alias": "programStage"; "required": false; }; "repeatDependentField": { "alias": "repeatDependentField"; "required": false; }; "dataEntities": { "alias": "dataEntities"; "required": true; "isSignal": true; }; }, { "repeatableStageUpdate": "repeatableStageUpdate"; }, never, never, false, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<RepeatableFormComponent, "ng-dhis2-ui-repeatable-form", never, { "formObject": { "alias": "formObject"; "required": false; }; "formData": { "alias": "formData"; "required": false; }; "fieldGroup": { "alias": "fieldGroup"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": false; }; "numberOfRows": { "alias": "numberOfRows"; "required": false; }; "programRuleActions": { "alias": "programRuleActions"; "required": false; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "program": { "alias": "program"; "required": false; }; "programStage": { "alias": "programStage"; "required": false; }; "repeatDependentField": { "alias": "repeatDependentField"; "required": false; }; "dataEntities": { "alias": "dataEntities"; "required": true; "isSignal": true; }; }, { "events": "eventsChange"; "repeatableStageUpdate": "repeatableStageUpdate"; }, never, never, false, never>;
31
38
  }
@@ -1,16 +1,14 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter, NgZone, OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
+ import { Observable } from 'rxjs';
3
4
  import { IFormFieldGroup, IFormMetadata } from '../../interfaces';
4
5
  import { FormValue } from '../../models';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class SectionFormComponent implements OnInit {
7
8
  #private;
9
+ ngZone: NgZone;
8
10
  loading: import("@angular/core").InputSignal<boolean>;
9
- isLab?: boolean;
10
- isLabResulst: boolean;
11
- clientId?: string;
12
11
  isloading: boolean;
13
- labNumber?: any;
14
12
  formMetaData: import("@angular/core").InputSignal<IFormMetadata>;
15
13
  dataValueEntities: import("@angular/core").InputSignal<Record<string, unknown>>;
16
14
  formGroups: Record<string, FormGroup>;
@@ -20,12 +18,15 @@ export declare class SectionFormComponent implements OnInit {
20
18
  save: EventEmitter<Record<string, unknown>>;
21
19
  formUpdate: EventEmitter<Record<string, unknown>>;
22
20
  cancel: EventEmitter<any>;
23
- get inValid(): boolean;
21
+ inValid: import("@angular/core").WritableSignal<boolean>;
22
+ inValid$: Observable<boolean>;
23
+ constructor();
24
24
  ngOnInit(): void;
25
25
  onUpdateRepeatableStage(repeatableData: Record<number, FormValue>, fieldGroup: IFormFieldGroup): void;
26
26
  onFormUpdate(formValue: FormValue, fieldGroupId: string): void;
27
- onSubmit(event: MouseEvent): void;
28
- onCancel(event: MouseEvent): void;
27
+ onSubmit(): void;
28
+ onCancel(event?: MouseEvent): void;
29
+ checkIfInValid(): boolean;
29
30
  static ɵfac: i0.ɵɵFactoryDeclaration<SectionFormComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<SectionFormComponent, "ng-dhis2-ui-section-form", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "isLab": { "alias": "isLab"; "required": false; }; "isLabResulst": { "alias": "isLabResulst"; "required": false; }; "clientId": { "alias": "clientId"; "required": false; }; "labNumber": { "alias": "labNumber"; "required": false; }; "formMetaData": { "alias": "formMetaData"; "required": true; "isSignal": true; }; "dataValueEntities": { "alias": "dataValueEntities"; "required": true; "isSignal": true; }; }, { "save": "save"; "formUpdate": "formUpdate"; "cancel": "cancel"; }, never, never, false, never>;
31
+ static ɵcmp: i0.ɵɵ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"; }, never, never, false, never>;
31
32
  }
@@ -6,9 +6,10 @@ import * as i4 from "./containers/section-form/section-form.component";
6
6
  import * as i5 from "./components/form-field-item.component";
7
7
  import * as i6 from "@angular/common";
8
8
  import * as i7 from "@angular/forms";
9
- import * as i8 from "../organisation-unit-selector/organisation-unit-selector.module";
9
+ import * as i8 from "../react-wrapper/react-wrapper.component.tsx";
10
+ import * as i9 from "../organisation-unit-selector/organisation-unit-selector.module";
10
11
  export declare class D2FormModule {
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<D2FormModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<D2FormModule, [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent, typeof i5.FormFieldItemComponent], [typeof i6.CommonModule, typeof i7.ReactiveFormsModule, typeof i8.OrganisationUnitSelectorModule], [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<D2FormModule, [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent, typeof i5.FormFieldItemComponent], [typeof i6.CommonModule, typeof i7.ReactiveFormsModule, typeof i8.ReactWrapperModule, typeof i9.OrganisationUnitSelectorModule], [typeof i1.FormFieldComponent, typeof i2.FormComponent, typeof i3.RepeatableFormComponent, typeof i4.SectionFormComponent]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<D2FormModule>;
14
15
  }
@@ -2,7 +2,8 @@ import { IFormField } from './form-field.interface';
2
2
  export interface IFormFieldGroup {
3
3
  dataKey?: string;
4
4
  id: string;
5
- name: string;
5
+ name?: string;
6
+ sortOrder?: number;
6
7
  translations?: any;
7
8
  isFormHorizontal?: boolean;
8
9
  attributes?: string[] | object[];
@@ -1,5 +1,5 @@
1
1
  import { IFormField, IFormFieldGroup } from '../interfaces';
2
- export declare class FormFieldGroup {
2
+ export declare class FormFieldGroup implements IFormFieldGroup {
3
3
  private params;
4
4
  id: string;
5
5
  name: string;
@@ -3,15 +3,16 @@ import { FormField } from './form-field.model';
3
3
  import { Program } from '@iapps/d2-web-sdk';
4
4
  import { IFormMetadata, IFormMetadataSection } from '../interfaces';
5
5
  export declare class FormMetaData implements IFormMetadata {
6
+ #private;
6
7
  private params;
7
8
  id: string;
8
9
  name: string;
9
10
  description?: string | undefined;
10
11
  downloadSqlView?: string | undefined;
11
12
  constructor(params: {
12
- formMetaData: Partial<FormMetaData>;
13
13
  programs: Program[];
14
14
  locale?: string;
15
+ customFormMetaData?: Partial<FormMetaData>;
15
16
  });
16
17
  get sections(): IFormMetadataSection[];
17
18
  get fields(): FormField<string>[];
@@ -7,7 +7,9 @@ export declare class FormValue {
7
7
  constructor(form: FormGroup, fields: FormField<string>[], changedField?: FormField<string>);
8
8
  get isValid(): boolean;
9
9
  clear(): void;
10
- getValues(): {
10
+ getValues(options?: {
11
+ valueOnly?: boolean;
12
+ }): {
11
13
  [id: string]: {
12
14
  id: string;
13
15
  value: string;
@@ -3,3 +3,4 @@ export * from './field-control-type.util';
3
3
  export * from './field-type.util';
4
4
  export * from './form.util';
5
5
  export * from './form-value.util';
6
+ export * from './translation.util';
@@ -0,0 +1,3 @@
1
+ export declare class TranslationUtil {
2
+ static getTranslatedFormName(field: Record<string, unknown>, locale?: string): string;
3
+ }
@@ -1,8 +1,8 @@
1
1
  import { ElementRef } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
- import { ReactWrapperComponent } from '../react-wrapper';
3
+ import { ReactWrapperModule } from '../react-wrapper/react-wrapper.component';
4
4
  import * as i0 from "@angular/core";
5
- export declare class HeaderBarComponent extends ReactWrapperComponent {
5
+ export declare class HeaderBarComponent extends ReactWrapperModule {
6
6
  private httpClient;
7
7
  constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService);
8
8
  ngAfterViewInit(): Promise<void>;
@@ -1,13 +1,13 @@
1
1
  import { EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import React from 'react';
3
- import { LineListService } from '../services/line-list.service';
3
+ import { ReactWrapperModule } from '../../react-wrapper/react-wrapper.component';
4
4
  import { DropdownMenuOption } from '../components/dropdown-menu';
5
- import { TableRow } from '../models/line-list.models';
6
5
  import { AttributeFilter } from '../models/attribute-filter.model';
7
- import { ReactWrapperComponent } from '../../react-wrapper';
8
6
  import { FilterConfig } from '../models/filter-config.model';
7
+ import { TableRow } from '../models/line-list.models';
8
+ import { LineListService } from '../services/line-list.service';
9
9
  import * as i0 from "@angular/core";
10
- export declare class LineListTableComponent extends ReactWrapperComponent {
10
+ export declare class LineListTableComponent extends ReactWrapperModule {
11
11
  programId: string;
12
12
  orgUnit: string;
13
13
  programStageId?: string;
@@ -16,6 +16,7 @@ export declare class LineListTableComponent extends ReactWrapperComponent {
16
16
  startDate?: string;
17
17
  endDate?: string;
18
18
  filters?: FilterConfig[];
19
+ ouMode?: string;
19
20
  actionSelected: EventEmitter<{
20
21
  action: string;
21
22
  row: TableRow;
@@ -27,5 +28,5 @@ export declare class LineListTableComponent extends ReactWrapperComponent {
27
28
  LineList: () => React.JSX.Element;
28
29
  ngAfterViewInit(): Promise<void>;
29
30
  static ɵfac: i0.ɵɵFactoryDeclaration<LineListTableComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "app-line-list", never, { "programId": { "alias": "programId"; "required": false; }; "orgUnit": { "alias": "orgUnit"; "required": false; }; "programStageId": { "alias": "programStageId"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "app-line-list", never, { "programId": { "alias": "programId"; "required": false; }; "orgUnit": { "alias": "orgUnit"; "required": false; }; "programStageId": { "alias": "programStageId"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "ouMode": { "alias": "ouMode"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
31
32
  }
@@ -102,6 +102,7 @@ export interface ProgramMetadata {
102
102
  id: string;
103
103
  name: string;
104
104
  }[];
105
+ programTrackedEntityAttributes: ProgramTrackedEntityAttribute[];
105
106
  }
106
107
  export interface LineListResponse {
107
108
  metadata: ProgramMetadata;
@@ -127,3 +128,45 @@ export interface CreatedByUserInfo {
127
128
  surname: string;
128
129
  username: string;
129
130
  }
131
+ export interface ProgramTrackedEntityAttribute {
132
+ access: {
133
+ read: boolean;
134
+ update: boolean;
135
+ externalize: boolean;
136
+ delete: boolean;
137
+ write: boolean;
138
+ };
139
+ attributeValues: any[];
140
+ created: string;
141
+ displayInList: boolean;
142
+ displayName: string;
143
+ displayShortName: string;
144
+ externalAccess: boolean;
145
+ favorite: boolean;
146
+ favorites: any[];
147
+ id: string;
148
+ lastUpdated: string;
149
+ mandatory: boolean;
150
+ name: string;
151
+ program: {
152
+ id: string;
153
+ };
154
+ programTrackedEntityAttributeGroups: any[];
155
+ renderOptionsAsRadio: boolean;
156
+ searchable: boolean;
157
+ sharing: {
158
+ userGroups: any;
159
+ external: boolean;
160
+ users: any;
161
+ };
162
+ sortOrder: number;
163
+ trackedEntityAttribute: {
164
+ id: string;
165
+ name: string;
166
+ valueType: string;
167
+ };
168
+ translations: any[];
169
+ userAccesses: any[];
170
+ userGroupAccesses: any[];
171
+ valueType: string;
172
+ }
@@ -10,7 +10,7 @@ export declare class LineListService {
10
10
  private getTrackedEntityInstances;
11
11
  private getEvents;
12
12
  private getEventsByProgramStage;
13
- getLineListData(programId: string, orgUnit?: string, programStageId?: string, page?: number, pageSize?: number, filters?: AttributeFilter[], startDate?: string, endDate?: string): Observable<LineListResponse>;
13
+ getLineListData(programId: string, orgUnit?: string, programStageId?: string, page?: number, pageSize?: number, filters?: AttributeFilter[], startDate?: string, endDate?: string, ouMode?: string): Observable<LineListResponse>;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<LineListService, never>;
15
15
  static ɵprov: i0.ɵɵInjectableDeclaration<LineListService>;
16
16
  }
@@ -1,13 +1,13 @@
1
1
  import { ElementRef, EventEmitter, NgZone } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
- import { ReactWrapperComponent } from '../../../react-wrapper';
3
+ import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
4
4
  import { OrganisationUnitSelectionConfig, OrganisationUnitSelectionUsageType } from '../../models';
5
5
  import * as i0 from "@angular/core";
6
6
  type OrganisationUnitSelectionEvent = {
7
7
  dimensionId: string;
8
8
  items: Record<string, unknown>[];
9
9
  };
10
- export declare class OrganisationUnitSelectorComponent extends ReactWrapperComponent {
10
+ export declare class OrganisationUnitSelectorComponent extends ReactWrapperModule {
11
11
  private httpClient;
12
12
  private ngZone;
13
13
  selectedOrgUnits: any[];
@@ -1,13 +1,13 @@
1
1
  import { ElementRef, EventEmitter } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
- import { ReactWrapperComponent } from '../../../react-wrapper';
3
+ import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
4
4
  import { OrganisationUnitSelectionConfig, OrganisationUnitSelectionUsageType } from '../../models';
5
5
  import * as i0 from "@angular/core";
6
6
  type OrganisationUnitSelectionEvent = {
7
7
  dimensionId: string;
8
8
  items: Record<string, unknown>[];
9
9
  };
10
- export declare class OrganisationUnitSelectorModalComponent extends ReactWrapperComponent {
10
+ export declare class OrganisationUnitSelectorModalComponent extends ReactWrapperModule {
11
11
  private httpClient;
12
12
  selectedOrgUnits: any[];
13
13
  orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
@@ -1,12 +1,12 @@
1
1
  import { ElementRef, EventEmitter, NgZone } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
- import { ReactWrapperComponent } from '../../../react-wrapper/react-wrapper.component';
3
+ import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
4
4
  import * as i0 from "@angular/core";
5
5
  type PeriodSelectionEvent = {
6
6
  dimensionId: string;
7
7
  items: Record<string, unknown>[];
8
8
  };
9
- export declare class PeriodSelectorComponent extends ReactWrapperComponent {
9
+ export declare class PeriodSelectorComponent extends ReactWrapperModule {
10
10
  private httpClient;
11
11
  private ngZone;
12
12
  selectedPeriods: any[];
@@ -1,8 +1,8 @@
1
1
  import { ElementRef, EventEmitter } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
- import { ReactWrapperComponent } from '../../../react-wrapper/react-wrapper.component';
3
+ import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
4
4
  import * as i0 from "@angular/core";
5
- export declare class PeriodSelectorModalComponent extends ReactWrapperComponent {
5
+ export declare class PeriodSelectorModalComponent extends ReactWrapperModule {
6
6
  private httpClient;
7
7
  selectedPeriods: any[];
8
8
  cancel: EventEmitter<any>;
@@ -2,7 +2,7 @@ import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
2
2
  import { ComponentProps } from 'react';
3
3
  import * as ReactDOM from 'react-dom/client';
4
4
  import * as i0 from "@angular/core";
5
- export declare class ReactWrapperComponent implements OnDestroy, AfterViewInit {
5
+ export declare class ReactWrapperModule implements OnDestroy, AfterViewInit {
6
6
  protected elementRef: ElementRef<HTMLElement>;
7
7
  props?: ComponentProps<any>;
8
8
  component: any;
@@ -12,6 +12,6 @@ export declare class ReactWrapperComponent implements OnDestroy, AfterViewInit {
12
12
  ngAfterViewInit(): void;
13
13
  ngOnDestroy(): void;
14
14
  protected render(): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<ReactWrapperComponent, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<ReactWrapperComponent, "ng-dhis2-ui-wrapper", never, { "props": { "alias": "props"; "required": false; }; "component": { "alias": "component"; "required": false; }; }, {}, ["content"], never, false, never>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReactWrapperModule, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ReactWrapperModule, "ng-dhis2-ui-wrapper", never, { "props": { "alias": "props"; "required": false; }; "component": { "alias": "component"; "required": false; }; }, {}, ["content"], never, true, never>;
17
17
  }
@@ -0,0 +1,2 @@
1
+ export * from './tracker-form.module';
2
+ export * from './tracker-form.component';
@@ -0,0 +1,15 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseTrackerQuery, TrackedEntityInstance } from '@iapps/d2-web-sdk';
3
+ import { IFormMetadata } from '../form';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TrackerFormComponent implements OnInit {
6
+ program: import("@angular/core").InputSignal<string>;
7
+ d2: import("@iapps/d2-web-sdk").D2Web;
8
+ trackerQuery: BaseTrackerQuery<TrackedEntityInstance>;
9
+ formMetaData: IFormMetadata;
10
+ ngOnInit(): Promise<void>;
11
+ onSave(event: any): void;
12
+ onCancel(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TrackerFormComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<TrackerFormComponent, "ng-dhis2-ui-tracker-form", never, { "program": { "alias": "program"; "required": true; "isSignal": true; }; }, {}, never, never, false, never>;
15
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tracker-form.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../form/form.module";
5
+ export declare class TrackerFormModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TrackerFormModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TrackerFormModule, [typeof i1.TrackerFormComponent], [typeof i2.CommonModule, typeof i3.D2FormModule], [typeof i1.TrackerFormComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<TrackerFormModule>;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iapps/ng-dhis2-ui",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0",
@@ -1,2 +0,0 @@
1
- export * from './react-wrapper.module';
2
- export * from './react-wrapper.component';
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./react-wrapper.component.tsx";
3
- import * as i2 from "@angular/common";
4
- export declare class ReactWrapperModule {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<ReactWrapperModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<ReactWrapperModule, [typeof i1.ReactWrapperComponent], [typeof i2.CommonModule], [typeof i1.ReactWrapperComponent]>;
7
- static ɵinj: i0.ɵɵInjectorDeclaration<ReactWrapperModule>;
8
- }