@iapps/ng-dhis2-ui 1.0.5 → 1.0.7

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 (25) hide show
  1. package/README.md +60 -3
  2. package/esm2022/lib/modules/button/button.component.mjs +3 -3
  3. package/esm2022/lib/modules/button/button.module.mjs +4 -4
  4. package/esm2022/lib/modules/header-bar/header-bar.component.mjs +3 -3
  5. package/esm2022/lib/modules/header-bar/header-bar.module.mjs +4 -4
  6. package/esm2022/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.mjs +11 -8
  7. package/esm2022/lib/modules/organisation-unit-selector/containers/organisation-unit-selector-modal/organisation-unit-selector-modal.component-modal.mjs +3 -3
  8. package/esm2022/lib/modules/organisation-unit-selector/organisation-unit-selector.module.mjs +4 -4
  9. package/esm2022/lib/modules/period-selector/containers/period-selector/period-selector.component.mjs +11 -8
  10. package/esm2022/lib/modules/period-selector/containers/period-selector-modal/period-selector-modal.component.mjs +3 -3
  11. package/esm2022/lib/modules/period-selector/period-selector.module.mjs +4 -4
  12. package/esm2022/lib/modules/react-wrapper/react-wrapper.component.mjs +16 -16
  13. package/esm2022/lib/modules/react-wrapper/react-wrapper.module.mjs +4 -4
  14. package/esm2022/lib/shared/shared.module.mjs +4 -4
  15. package/esm2022/lib/shared/utils/dimensionIsEmpty.mjs +1 -1
  16. package/esm2022/lib/shared/utils/dimensionIsValid.mjs +3 -2
  17. package/fesm2022/iapps-ng-dhis2-ui.mjs +73 -66
  18. package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
  19. package/lib/modules/organisation-unit-selector/containers/organisation-unit-selector/organisation-unit-selector.component.d.ts +3 -2
  20. package/lib/modules/period-selector/containers/period-selector/period-selector.component.d.ts +3 -2
  21. package/lib/shared/utils/axis.d.ts +1 -1
  22. package/lib/shared/utils/dimension.d.ts +20 -10
  23. package/lib/shared/utils/dimensionIsEmpty.d.ts +3 -1
  24. package/lib/shared/utils/dimensionIsValid.d.ts +3 -1
  25. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter } from '@angular/core';
1
+ import { ElementRef, EventEmitter, NgZone } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
3
  import { ReactWrapperComponent } from '../../../react-wrapper';
4
4
  import { OrganisationUnitSelectionConfig, OrganisationUnitSelectionUsageType } from '../../models';
@@ -9,11 +9,12 @@ type OrganisationUnitSelectionEvent = {
9
9
  };
10
10
  export declare class OrganisationUnitSelectorComponent extends ReactWrapperComponent {
11
11
  private httpClient;
12
+ private ngZone;
12
13
  selectedOrgUnits: any[];
13
14
  orgUnitSelectionConfig: OrganisationUnitSelectionConfig;
14
15
  selectOrgUnits: EventEmitter<any>;
15
16
  props: Record<string, unknown>;
16
- constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService);
17
+ constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService, ngZone: NgZone);
17
18
  ngAfterViewInit(): Promise<void>;
18
19
  private getAppConfig;
19
20
  getOrgUnitAttributeByUsage(usageType: OrganisationUnitSelectionUsageType): "organisationUnits" | "dataViewOrganisationUnits";
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter } from '@angular/core';
1
+ import { ElementRef, EventEmitter, NgZone } from '@angular/core';
2
2
  import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
3
  import { ReactWrapperComponent } from '../../../react-wrapper/react-wrapper.component';
4
4
  import * as i0 from "@angular/core";
@@ -8,10 +8,11 @@ type PeriodSelectionEvent = {
8
8
  };
9
9
  export declare class PeriodSelectorComponent extends ReactWrapperComponent {
10
10
  private httpClient;
11
+ private ngZone;
11
12
  selectedPeriods: any[];
12
13
  selectPeriods: EventEmitter<any>;
13
14
  props: Record<string, unknown>;
14
- constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService);
15
+ constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService, ngZone: NgZone);
15
16
  ngAfterViewInit(): Promise<void>;
16
17
  onSelectItems(selectionEvent: PeriodSelectionEvent): void;
17
18
  getExcludedPeriodTypes: (systemSettings?: any) => any[];
@@ -1,6 +1,6 @@
1
1
  export declare const AXIS: {
2
2
  defaultValue: any[];
3
- isValid: (axis: any) => boolean;
3
+ isValid: (axis: any) => axis is any[];
4
4
  };
5
5
  export declare const AXIS_ID_COLUMNS = "columns";
6
6
  export declare const AXIS_ID_ROWS = "rows";
@@ -1,45 +1,55 @@
1
1
  export declare const DIMENSION: {
2
- isValid: (dimension: any) => boolean;
2
+ isValid: (dimension: any) => dimension is object;
3
3
  };
4
4
  export declare const DIMENSION_PROP_ID: {
5
5
  name: string;
6
6
  defaultValue: string;
7
7
  required: boolean;
8
- isValid: (prop: any) => boolean;
8
+ isValid: (prop: any) => prop is string;
9
9
  };
10
10
  export declare const DIMENSION_PROP_ITEMS: {
11
11
  name: string;
12
12
  defaultValue: any[];
13
13
  required: boolean;
14
- isValid: (prop: any) => boolean;
14
+ isValid: (prop: any) => prop is any[];
15
15
  };
16
16
  export declare const DIMENSION_PROP_FILTER: {
17
17
  name: string;
18
18
  defaultValue: any[];
19
19
  required: boolean;
20
- isValid: (prop: any) => boolean;
20
+ isValid: (prop: any) => prop is string;
21
21
  };
22
22
  export declare const DIMENSION_PROP_LEGEND_SET: {
23
23
  name: string;
24
24
  defaultValue: any[];
25
25
  required: boolean;
26
- isValid: (prop: any) => boolean;
26
+ isValid: (prop: any) => prop is string;
27
27
  };
28
28
  export declare const DIMENSION_PROP_PROGRAM_STAGE: {
29
29
  name: string;
30
30
  defaultValue: {};
31
31
  required: boolean;
32
- isValid: (prop: any) => boolean;
32
+ isValid: (prop: any) => prop is object;
33
33
  };
34
34
  export declare const DIMENSION_PROP_REPETITION: {
35
35
  name: string;
36
36
  defaultValue: any[];
37
37
  required: boolean;
38
- isValid: (prop: any) => boolean;
38
+ isValid: (prop: any) => prop is any[];
39
39
  };
40
- export declare const DIMENSION_PROPS: {
40
+ export declare const DIMENSION_PROPS: ({
41
+ name: string;
42
+ defaultValue: string;
43
+ required: boolean;
44
+ isValid: (prop: any) => prop is string;
45
+ } | {
46
+ name: string;
47
+ defaultValue: any[];
48
+ required: boolean;
49
+ isValid: (prop: any) => prop is string;
50
+ } | {
41
51
  name: string;
42
52
  defaultValue: {};
43
53
  required: boolean;
44
- isValid: (prop: any) => boolean;
45
- }[];
54
+ isValid: (prop: any) => prop is object;
55
+ })[];
@@ -1 +1,3 @@
1
- export declare const dimensionIsEmpty: (dimension: any) => boolean;
1
+ export declare const dimensionIsEmpty: (dimension: {
2
+ [x: string]: any[];
3
+ }) => boolean;
@@ -1 +1,3 @@
1
- export declare const dimensionIsValid: (dimension: any, { requireItems }?: any) => boolean;
1
+ export declare const dimensionIsValid: (dimension: {
2
+ [x: string]: unknown;
3
+ }, { requireItems }?: any) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iapps/ng-dhis2-ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.0",
6
6
  "@angular/core": "^16.2.0",