@iapps/ng-dhis2-ui 1.2.1 → 1.2.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 +707 -516
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/lib/modules/form/containers/form-field/form-field.component.d.ts +1 -1
- 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/line-list/components/data-table-actions/data-table-actions.d.ts +2 -0
- package/lib/modules/line-list/components/table/lineListTable.d.ts +1 -1
- package/lib/modules/line-list/components/table/{TableBody.d.ts → tableBody.d.ts} +1 -1
- package/lib/modules/line-list/components/table/tableHeader.d.ts +4 -1
- package/lib/modules/line-list/components/table/tableRow.d.ts +1 -1
- package/lib/modules/line-list/containers/line-list.component.d.ts +5 -7
- package/lib/modules/line-list/models/line-list-action-option.model.d.ts +3 -2
- package/package.json +1 -1
- package/lib/modules/line-list/models/filter-config.model.d.ts +0 -6
- package/lib/modules/line-list/utils/event-table-table-util.d.ts +0 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EffectRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
|
-
import { FieldConfig, IMetadataRuleAction } from '../../models';
|
|
5
4
|
import { IFormField } from '../../interfaces';
|
|
5
|
+
import { FieldConfig, IMetadataRuleAction } from '../../models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
|
|
8
8
|
#private;
|
|
@@ -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): "email" | "number" | "text" | "tel" | "date" | "org-unit" | "file";
|
|
7
7
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
8
8
|
static getOptionEntities?(options: any[]): any;
|
|
9
9
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ActionOptionOrientation, LineListActionOption } from '../../models';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { TableRow } from '../../models/line-list.models';
|
|
3
4
|
export declare const DataTableActions: (props: {
|
|
5
|
+
data: TableRow;
|
|
4
6
|
actionOptions: LineListActionOption[];
|
|
5
7
|
actionOptionOrientation: ActionOptionOrientation;
|
|
6
8
|
onClick: (dropdownOption: LineListActionOption) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const LineListTable: ({ columns, data, pager, setPager, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, }: any) => React.JSX.Element;
|
|
2
|
+
export declare const LineListTable: ({ columns, data, pager, setPager, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectable, rowsSelected, }: any) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const TableBody: ({ data, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, }: any) => React.JSX.Element;
|
|
2
|
+
export declare const TableBody: ({ data, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectedRows, onRowToggle, selectable, }: any) => React.JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const TableHeader: ({ columns }: {
|
|
2
|
+
export declare const TableHeader: ({ columns, allSelected, onSelectAll, selectable, }: {
|
|
3
3
|
columns: any[];
|
|
4
|
+
allSelected: boolean;
|
|
5
|
+
onSelectAll: (checked: boolean) => void;
|
|
6
|
+
selectable: boolean;
|
|
4
7
|
}) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const TableRow: ({ row, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, }: any) => React.JSX.Element;
|
|
2
|
+
export declare const TableRow: ({ row, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, isChecked, onToggle, selectable, }: any) => React.JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DataQueryFilter, DHIS2Event, TrackedEntityInstance } from '@iapps/d2-web-sdk';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { ReactWrapperModule } from '../../react-wrapper/react-wrapper.component';
|
|
5
|
+
import { ActionOptionOrientation, LineListActionOption } from '../models';
|
|
4
6
|
import { AttributeFilter } from '../models/attribute-filter.model';
|
|
5
7
|
import { LineListService } from '../services/line-list.service';
|
|
6
|
-
import { ActionOptionOrientation, LineListActionOption } from '../models';
|
|
7
|
-
import { DataQueryFilter, DHIS2Event, TrackedEntityInstance } from '@iapps/d2-web-sdk';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class LineListTableComponent extends ReactWrapperModule {
|
|
10
10
|
programId: string;
|
|
@@ -23,14 +23,12 @@ export declare class LineListTableComponent extends ReactWrapperModule {
|
|
|
23
23
|
filterRootOrgUnit: boolean;
|
|
24
24
|
showFilters: boolean;
|
|
25
25
|
isOptionSetNameVisible: boolean;
|
|
26
|
+
allowRowsSelection: boolean;
|
|
26
27
|
actionSelected: EventEmitter<{
|
|
27
28
|
action: string;
|
|
28
29
|
data: TrackedEntityInstance | DHIS2Event;
|
|
29
30
|
}>;
|
|
30
|
-
|
|
31
|
-
teiId: string;
|
|
32
|
-
enrollmentId: string;
|
|
33
|
-
}[]>;
|
|
31
|
+
rowsSelected: EventEmitter<TrackedEntityInstance[] | DHIS2Event[]>;
|
|
34
32
|
private reactStateUpdaters;
|
|
35
33
|
setReactStateUpdaters: (updaters: any) => void;
|
|
36
34
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -38,5 +36,5 @@ export declare class LineListTableComponent extends ReactWrapperModule {
|
|
|
38
36
|
LineList: () => React.JSX.Element;
|
|
39
37
|
ngAfterViewInit(): Promise<void>;
|
|
40
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<LineListTableComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "ng-dhis2-ui-line-list", never, { "programId": { "alias": "programId"; "required": false; }; "orgUnit": { "alias": "orgUnit"; "required": false; }; "programStageId": { "alias": "programStageId"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; "actionOptionOrientation": { "alias": "actionOptionOrientation"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "useOuModeWithOlderDHIS2Instance": { "alias": "useOuModeWithOlderDHIS2Instance"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "dataQueryFilters": { "alias": "dataQueryFilters"; "required": false; }; "ouMode": { "alias": "ouMode"; "required": false; }; "isButtonLoading": { "alias": "isButtonLoading"; "required": false; }; "buttonFilter": { "alias": "buttonFilter"; "required": false; }; "filterRootOrgUnit": { "alias": "filterRootOrgUnit"; "required": false; }; "showFilters": { "alias": "showFilters"; "required": false; }; "isOptionSetNameVisible": { "alias": "isOptionSetNameVisible"; "required": false; }; }, { "actionSelected": "actionSelected"; "
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LineListTableComponent, "ng-dhis2-ui-line-list", never, { "programId": { "alias": "programId"; "required": false; }; "orgUnit": { "alias": "orgUnit"; "required": false; }; "programStageId": { "alias": "programStageId"; "required": false; }; "actionOptions": { "alias": "actionOptions"; "required": false; }; "actionOptionOrientation": { "alias": "actionOptionOrientation"; "required": false; }; "attributeFilters": { "alias": "attributeFilters"; "required": false; }; "useOuModeWithOlderDHIS2Instance": { "alias": "useOuModeWithOlderDHIS2Instance"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "dataQueryFilters": { "alias": "dataQueryFilters"; "required": false; }; "ouMode": { "alias": "ouMode"; "required": false; }; "isButtonLoading": { "alias": "isButtonLoading"; "required": false; }; "buttonFilter": { "alias": "buttonFilter"; "required": false; }; "filterRootOrgUnit": { "alias": "filterRootOrgUnit"; "required": false; }; "showFilters": { "alias": "showFilters"; "required": false; }; "isOptionSetNameVisible": { "alias": "isOptionSetNameVisible"; "required": false; }; "allowRowsSelection": { "alias": "allowRowsSelection"; "required": false; }; }, { "actionSelected": "actionSelected"; "rowsSelected": "rowsSelected"; }, never, ["*"], false, never>;
|
|
42
40
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DHIS2Event, TrackedEntityInstance } from '@iapps/d2-web-sdk';
|
|
2
2
|
import { DropdownMenuOption } from './dropdown-menu.model';
|
|
3
3
|
export interface LineListActionOption extends DropdownMenuOption {
|
|
4
|
-
|
|
4
|
+
condition?: string;
|
|
5
|
+
onClick?: (tableRow: TrackedEntityInstance | DHIS2Event) => void;
|
|
5
6
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Program } from '@iapps/d2-web-sdk';
|
|
2
|
-
import { LineListResponse, ColumnDefinition, TableRow } from '../models/line-list.models';
|
|
3
|
-
export declare const getEventData: (response: LineListResponse, pager: any, metaData: Program, isOptionSetNameVisible: boolean) => {
|
|
4
|
-
columns: ColumnDefinition[];
|
|
5
|
-
data: TableRow[];
|
|
6
|
-
};
|
|
7
|
-
export declare const getProgramStageData: (response: LineListResponse, programStageId: string, pager: any, metaData: Program, isOptionSetNameVisible: boolean) => {
|
|
8
|
-
columns: ColumnDefinition[];
|
|
9
|
-
data: TableRow[];
|
|
10
|
-
};
|