@iapps/ng-dhis2-ui 1.1.7 → 1.1.8

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.
@@ -1,3 +1,3 @@
1
1
  export declare class FormFieldTypeUtil {
2
- static getFieldType(valueType: string): "number" | "image" | "org-unit" | "file" | "text";
2
+ static getFieldType(valueType: string): "image" | "org-unit" | "file" | "number" | "text";
3
3
  }
@@ -3,7 +3,7 @@ import { DropdownOption } from '../models';
3
3
  export declare class FieldUtil {
4
4
  static getFieldDropdownOptions(field: any): DropdownOption[];
5
5
  static sanitizeOptions(options: any[]): any;
6
- static getFieldType(valueType: string): "number" | "date" | "org-unit" | "file" | "tel" | "text";
6
+ static getFieldType(valueType: string): "date" | "org-unit" | "file" | "number" | "tel" | "text";
7
7
  static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
8
8
  static getOptionEntities?(options: any[]): any;
9
9
  }
@@ -1,18 +1,38 @@
1
- import { AfterViewInit, EventEmitter } from '@angular/core';
1
+ import { AfterViewInit, EventEmitter, NgZone } from '@angular/core';
2
2
  import React from 'react';
3
3
  import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
4
4
  import { AttributeFilter, DataElementFilter, SelectionFiltersProps } from '../../models/selection-filters-ui.model';
5
+ import { TableRow } from '../../models/selection-filters-ui.models';
6
+ import { Observable } from 'rxjs';
7
+ import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
8
+ import { OrganisationUnitSelectionConfig } from '../../../organisation-unit-selector';
5
9
  import * as i0 from "@angular/core";
6
10
  export declare class SelectionFiltersComponent extends ReactWrapperModule implements AfterViewInit {
7
11
  actionOptions: {
8
12
  label: string;
9
- onClick: (row: any) => void;
13
+ onClick: (row: TableRow) => void;
10
14
  }[];
11
15
  attributeFilters: AttributeFilter[];
12
16
  dataElementFilters: DataElementFilter[];
13
17
  startDate?: string;
14
18
  endDate?: string;
15
19
  actionSelected: EventEmitter<SelectionFiltersProps>;
20
+ httpClient: NgxDhis2HttpClientService;
21
+ ngZone: NgZone;
22
+ private getAppConfig;
23
+ getRootOrgUnits(): Observable<string[]>;
24
+ getOrgUnitLevels(): Promise<any>;
25
+ onSelectOrgUnit(selectedOrgUnits: Record<string, string>[]): void;
26
+ getOrgUnitGroups(): Promise<any>;
27
+ getOrgUnitAttributeByUsage(usageType: string): "organisationUnits" | "dataViewOrganisationUnits";
28
+ FieldOrgUnitSelector: (props: {
29
+ onSelectOrgUnit: (selectedOrgUnits: any) => void;
30
+ onCancelOrgUnit: () => void;
31
+ }) => React.JSX.Element;
32
+ showOrgUnitTree: import("@angular/core").WritableSignal<boolean>;
33
+ orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
34
+ selectedOrgUnit: import("@angular/core").WritableSignal<any>;
35
+ selectedOrgUnit$: Observable<any>;
16
36
  SelectionFiltersUI: () => React.JSX.Element;
17
37
  ngAfterViewInit(): Promise<void>;
18
38
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFiltersComponent, never>;
@@ -0,0 +1,10 @@
1
+ export interface TableRow {
2
+ [key: string]: string | number;
3
+ index: number;
4
+ }
5
+ export interface ColumnDefinition {
6
+ column: string;
7
+ display: string;
8
+ index?: string;
9
+ visible?: boolean;
10
+ }
@@ -3,8 +3,9 @@ import * as i1 from "./containers/selection-filters-ui/selection-filters-ui.comp
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "../../shared/shared.module";
5
5
  import * as i4 from "../react-wrapper/react-wrapper.component.tsx";
6
+ import * as i5 from "../organisation-unit-selector/organisation-unit-selector.module";
6
7
  export declare class SelectionFiltersUiModule {
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFiltersUiModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<SelectionFiltersUiModule, [typeof i1.SelectionFiltersComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule, typeof i4.ReactWrapperModule], [typeof i1.SelectionFiltersComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SelectionFiltersUiModule, [typeof i1.SelectionFiltersComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule, typeof i4.ReactWrapperModule, typeof i5.OrganisationUnitSelectorModule], [typeof i1.SelectionFiltersComponent]>;
9
10
  static ɵinj: i0.ɵɵInjectorDeclaration<SelectionFiltersUiModule>;
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iapps/ng-dhis2-ui",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0",