@iapps/ng-dhis2-ui 1.1.2 → 1.1.3
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/fesm2022/iapps-ng-dhis2-ui.mjs +366 -16
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/modules/data-table-ui/components/dropdown-menu/dropdown-menu.d.ts +19 -0
- package/lib/modules/data-table-ui/components/dropdown-menu/dropdown-menu.styles.d.ts +5 -0
- package/lib/modules/data-table-ui/components/dropdown-menu/index.d.ts +1 -0
- package/lib/modules/data-table-ui/containers/data-table-ui/data-table-ui.component.d.ts +19 -0
- package/lib/modules/data-table-ui/data-table-ui.module.d.ts +10 -0
- package/lib/modules/data-table-ui/hooks/index.d.ts +1 -0
- package/lib/modules/data-table-ui/hooks/use-dynamic-styles.hook.d.ts +1 -0
- package/lib/modules/data-table-ui/index.d.ts +3 -0
- package/lib/modules/data-table-ui/models/data-table.models.d.ts +10 -0
- package/lib/modules/form/utils/field-type.util.d.ts +1 -1
- package/lib/modules/form/utils/field.util.d.ts +1 -1
- package/lib/modules/selection-filters-ui/containers/selection-filters-ui/selection-filters-ui.component.d.ts +20 -0
- package/lib/modules/selection-filters-ui/index.d.ts +2 -0
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.model.d.ts +36 -0
- package/lib/modules/selection-filters-ui/selection-filters-ui.module.d.ts +10 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,5 +4,7 @@ export * from './lib/modules/period-selector';
|
|
|
4
4
|
export * from './lib/modules/organisation-unit-selector';
|
|
5
5
|
export * from './lib/modules/react-wrapper/react-wrapper.component';
|
|
6
6
|
export * from './lib/modules/line-list';
|
|
7
|
+
export * from './lib/modules/data-table-ui';
|
|
7
8
|
export * from './lib/modules/form';
|
|
9
|
+
export * from './lib/modules/selection-filters-ui';
|
|
8
10
|
export * from './lib/modules/tracker-form';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DropdownMenuOption {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: any;
|
|
7
|
+
destructive?: boolean;
|
|
8
|
+
onClick?: Function;
|
|
9
|
+
}
|
|
10
|
+
export declare const ContextMenu: (params: {
|
|
11
|
+
dropDownOptions: DropdownMenuOption[];
|
|
12
|
+
anchorRef: any;
|
|
13
|
+
onClose: Function;
|
|
14
|
+
onMenuClick: (dropdownOption: DropdownMenuOption) => void;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export declare const DropdownMenu: (props: {
|
|
17
|
+
dropdownOptions: DropdownMenuOption[];
|
|
18
|
+
onClick: (dropdownOption: DropdownMenuOption) => void;
|
|
19
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dropdown-menu';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
|
+
import { ColumnDefinition, TableRow } from '../../models/data-table.models';
|
|
5
|
+
import { DropdownMenuOption } from '../../components/dropdown-menu';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DataTableUIComponent extends ReactWrapperModule implements AfterViewInit {
|
|
8
|
+
data: TableRow[];
|
|
9
|
+
columnDefinitions: ColumnDefinition[];
|
|
10
|
+
actionOptions?: DropdownMenuOption[];
|
|
11
|
+
actionSelected: EventEmitter<{
|
|
12
|
+
action: string;
|
|
13
|
+
row: TableRow;
|
|
14
|
+
}>;
|
|
15
|
+
DataTableUI: () => React.JSX.Element;
|
|
16
|
+
ngAfterViewInit(): Promise<void>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableUIComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableUIComponent, "app-data-table-ui", never, { "data": { "alias": "data"; "required": false; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./containers/data-table-ui/data-table-ui.component.tsx";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../../shared/shared.module";
|
|
5
|
+
import * as i4 from "../react-wrapper/react-wrapper.component.tsx";
|
|
6
|
+
export declare class DataTableUIModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableUIModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DataTableUIModule, [typeof i1.DataTableUIComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule, typeof i4.ReactWrapperModule], [typeof i1.DataTableUIComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DataTableUIModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-dynamic-styles.hook';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDynamicStyles: <T extends Record<string, React.CSSProperties | any>>(stylesObj: T) => { [K in keyof T]: string; };
|
|
@@ -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): "
|
|
6
|
+
static getFieldType(valueType: string): "date" | "org-unit" | "file" | "tel" | "number" | "text";
|
|
7
7
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
8
8
|
static getOptionEntities?(options: any[]): any;
|
|
9
9
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactWrapperModule } from '../../../react-wrapper/react-wrapper.component';
|
|
4
|
+
import { AttributeFilter, DataElementFilter, SelectionFiltersProps } from '../../models/selection-filters-ui.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SelectionFiltersComponent extends ReactWrapperModule implements AfterViewInit {
|
|
7
|
+
actionOptions: {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: (row: any) => void;
|
|
10
|
+
}[];
|
|
11
|
+
attributeFilters: AttributeFilter[];
|
|
12
|
+
dataElementFilters: DataElementFilter[];
|
|
13
|
+
startDate?: string;
|
|
14
|
+
endDate?: string;
|
|
15
|
+
actionSelected: EventEmitter<SelectionFiltersProps>;
|
|
16
|
+
SelectionFiltersUI: () => React.JSX.Element;
|
|
17
|
+
ngAfterViewInit(): Promise<void>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFiltersComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionFiltersComponent, "app-selection-filters-ui", never, { "actionOptions": { "alias": "actionOptions"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "dataElementFilters": { "alias": "dataElementFilters"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface SelectionFiltersProps {
|
|
2
|
+
actionOptions: ActionOption[];
|
|
3
|
+
attributeFilters: AttributeFilter[];
|
|
4
|
+
dataElementFilters: DataElementFilter[];
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ActionOption {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface DataElementFilter {
|
|
13
|
+
programStage: string;
|
|
14
|
+
dataElement: string;
|
|
15
|
+
name: string;
|
|
16
|
+
valueType: string;
|
|
17
|
+
hasOptions: boolean;
|
|
18
|
+
operator: string;
|
|
19
|
+
value: string;
|
|
20
|
+
options: Option[];
|
|
21
|
+
}
|
|
22
|
+
export interface Option {
|
|
23
|
+
id: string;
|
|
24
|
+
code: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AttributeFilter {
|
|
28
|
+
attribute: string;
|
|
29
|
+
operator: string;
|
|
30
|
+
name: string;
|
|
31
|
+
valueType: string;
|
|
32
|
+
hasOptions: boolean;
|
|
33
|
+
code: string;
|
|
34
|
+
value: string;
|
|
35
|
+
options: Option[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./containers/selection-filters-ui/selection-filters-ui.component.tsx";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../../shared/shared.module";
|
|
5
|
+
import * as i4 from "../react-wrapper/react-wrapper.component.tsx";
|
|
6
|
+
export declare class SelectionFiltersUiModule {
|
|
7
|
+
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 ɵinj: i0.ɵɵInjectorDeclaration<SelectionFiltersUiModule>;
|
|
10
|
+
}
|