@iapps/ng-dhis2-ui 1.2.70 → 1.2.72
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 +29 -171
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/lib/modules/form/components/file-upload-field.component.d.ts +2 -0
- package/lib/modules/form/interfaces/form-field-extension.interface.d.ts +5 -0
- package/lib/modules/form/interfaces/form-field.interface.d.ts +2 -0
- package/lib/modules/form/interfaces/index.d.ts +1 -0
- package/lib/modules/form/models/form-field-group.model.d.ts +2 -0
- package/lib/modules/form/models/form-field.model.d.ts +2 -1
- package/lib/modules/form/models/form-metadata-section.model.d.ts +2 -1
- package/lib/modules/form/models/form-metadata.model.d.ts +2 -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/containers/line-list.component.d.ts +1 -1
- package/lib/modules/program-entry-form/models/program-entry-form.config.d.ts +3 -0
- package/lib/modules/program-entry-form/program-entry-form.component.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FormFieldExtension } from '../interfaces';
|
|
2
3
|
export declare const FileUploadField: (props: {
|
|
3
4
|
label?: string;
|
|
4
5
|
id: string;
|
|
@@ -10,4 +11,5 @@ export declare const FileUploadField: (props: {
|
|
|
10
11
|
validationText?: string;
|
|
11
12
|
onChange?: (files: any[]) => void;
|
|
12
13
|
onUploadSuccess?: (fileId: string) => void;
|
|
14
|
+
extension?: FormFieldExtension;
|
|
13
15
|
}) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IFieldDropdown } from './field-dropdown.interface';
|
|
2
2
|
import { FieldControlType } from './field-control-type.interface';
|
|
3
3
|
import { FormFieldMetaType } from './form-field-meta-type.interface';
|
|
4
|
+
import { FormFieldExtension } from './form-field-extension.interface';
|
|
4
5
|
export interface IFormField<T> {
|
|
5
6
|
value?: T | '';
|
|
6
7
|
id: string;
|
|
@@ -42,4 +43,5 @@ export interface IFormField<T> {
|
|
|
42
43
|
availableOptionsLabel?: string;
|
|
43
44
|
selectedOptionsLabel?: string;
|
|
44
45
|
allowFutureDate?: boolean;
|
|
46
|
+
extension?: FormFieldExtension;
|
|
45
47
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IFormField, IFormFieldGroup } from '../interfaces';
|
|
2
|
+
import { FormFieldExtension } from '../interfaces/form-field-extension.interface';
|
|
2
3
|
export declare class FormFieldGroup implements IFormFieldGroup {
|
|
3
4
|
private params;
|
|
4
5
|
id: string;
|
|
@@ -15,6 +16,7 @@ export declare class FormFieldGroup implements IFormFieldGroup {
|
|
|
15
16
|
formFieldGroup: Partial<FormFieldGroup>;
|
|
16
17
|
fieldMetaData: Record<string, unknown>[];
|
|
17
18
|
locale?: string;
|
|
19
|
+
formFieldExtensions?: FormFieldExtension[];
|
|
18
20
|
});
|
|
19
21
|
get fields(): IFormField<string>[];
|
|
20
22
|
toJson(): IFormFieldGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldControlType, FormFieldMetaType, IFormField, IFieldDropdown } from '../interfaces';
|
|
1
|
+
import { FieldControlType, FormFieldMetaType, IFormField, IFieldDropdown, FormFieldExtension } from '../interfaces';
|
|
2
2
|
interface FormFieldFunction<T> {
|
|
3
3
|
setMax: (field: Partial<IFormField<T>>) => string | number | Date | undefined;
|
|
4
4
|
}
|
|
@@ -43,6 +43,7 @@ export declare class FormField<T> implements IFormField<T>, FormFieldFunction<T>
|
|
|
43
43
|
availableOptionsLabel?: string;
|
|
44
44
|
selectedOptionsLabel?: string;
|
|
45
45
|
allowFutureDate?: boolean;
|
|
46
|
+
extension?: FormFieldExtension;
|
|
46
47
|
constructor(options?: Partial<FormField<T>>);
|
|
47
48
|
setMax(field: Partial<FormField<T>>): string | number | Date | undefined;
|
|
48
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFormMetadataSection, IFormFieldGroup } from '../interfaces';
|
|
1
|
+
import { IFormMetadataSection, IFormFieldGroup, FormFieldExtension } from '../interfaces';
|
|
2
2
|
export declare class FormMetadataSection implements IFormMetadataSection {
|
|
3
3
|
private params;
|
|
4
4
|
id: string;
|
|
@@ -13,6 +13,7 @@ export declare class FormMetadataSection implements IFormMetadataSection {
|
|
|
13
13
|
program: Record<string, unknown>;
|
|
14
14
|
locale?: string;
|
|
15
15
|
excludeInheritedAttributes?: boolean;
|
|
16
|
+
formFieldExtensions?: FormFieldExtension[];
|
|
16
17
|
});
|
|
17
18
|
get attributes(): {
|
|
18
19
|
sortOrder: unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IMetadataRule } from './form-metadata-rule.model';
|
|
2
2
|
import { Program } from '@iapps/d2-web-sdk';
|
|
3
|
-
import { IFormField, IFormMetadata, IFormMetadataSection } from '../interfaces';
|
|
3
|
+
import { IFormField, IFormMetadata, IFormMetadataSection, FormFieldExtension } from '../interfaces';
|
|
4
4
|
export declare class FormMetaData implements IFormMetadata {
|
|
5
5
|
#private;
|
|
6
6
|
private params;
|
|
@@ -17,6 +17,7 @@ export declare class FormMetaData implements IFormMetadata {
|
|
|
17
17
|
excludeInheritedAttributes?: boolean;
|
|
18
18
|
programStage?: string;
|
|
19
19
|
customFormMetaData?: Partial<FormMetaData>;
|
|
20
|
+
formFieldExtensions?: FormFieldExtension[];
|
|
20
21
|
});
|
|
21
22
|
get sections(): IFormMetadataSection[];
|
|
22
23
|
get fields(): IFormField<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): "number" | "org-unit" | "file" | "text" | "tel" | "email" | "date";
|
|
7
7
|
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
8
8
|
static getOptionEntities?(options: any[]): any;
|
|
9
9
|
}
|
|
@@ -34,7 +34,7 @@ export declare class LineListTableComponent extends ReactWrapperModule {
|
|
|
34
34
|
action: string;
|
|
35
35
|
data: TrackedEntityInstance | DHIS2Event;
|
|
36
36
|
}>;
|
|
37
|
-
rowsSelected: EventEmitter<
|
|
37
|
+
rowsSelected: EventEmitter<TrackedEntityInstance[] | DHIS2Event[]>;
|
|
38
38
|
showActionButtons: boolean;
|
|
39
39
|
showEnrollmentDates: boolean;
|
|
40
40
|
private reactStateUpdaters;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormFieldExtension } from 'packages/ng-dhis2-ui/src/lib/modules/form';
|
|
1
2
|
export type AutoAssignedValues = {
|
|
2
3
|
field: string;
|
|
3
4
|
value: string;
|
|
@@ -24,6 +25,7 @@ export interface IProgramEntryFormConfig {
|
|
|
24
25
|
ignoreRepeatability?: boolean;
|
|
25
26
|
autoAssignedValues?: AutoAssignedValues[];
|
|
26
27
|
autoComplete?: boolean;
|
|
28
|
+
formFieldExtensions?: FormFieldExtension[];
|
|
27
29
|
}
|
|
28
30
|
export declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
|
|
29
31
|
program: string;
|
|
@@ -47,5 +49,6 @@ export declare class ProgramEntryFormConfig implements IProgramEntryFormConfig {
|
|
|
47
49
|
ignoreRepeatability?: boolean;
|
|
48
50
|
autoAssignedValues?: AutoAssignedValues[];
|
|
49
51
|
autoComplete?: boolean;
|
|
52
|
+
formFieldExtensions?: FormFieldExtension[];
|
|
50
53
|
constructor(config: IProgramEntryFormConfig);
|
|
51
54
|
}
|
|
@@ -17,11 +17,11 @@ export declare class ProgramEntryFormModule {
|
|
|
17
17
|
metaData: import("@angular/core").WritableSignal<IProgramEntryFormMetaData>;
|
|
18
18
|
isFormValid: import("@angular/core").WritableSignal<boolean>;
|
|
19
19
|
isFormValid$: Observable<boolean>;
|
|
20
|
-
instance: import("@angular/core").WritableSignal<
|
|
20
|
+
instance: import("@angular/core").WritableSignal<TrackedEntityInstance | DHIS2Event>;
|
|
21
21
|
instanceQuery: BaseTrackerQuery<TrackedEntityInstance> | BaseEventQuery<DHIS2Event>;
|
|
22
|
-
instanceSave: EventEmitter<
|
|
23
|
-
instanceSaveCompleted: EventEmitter<
|
|
24
|
-
instanceUpdate: EventEmitter<
|
|
22
|
+
instanceSave: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
23
|
+
instanceSaveCompleted: EventEmitter<D2TrackerResponse<TrackedEntityInstance> | D2EventResponse<DHIS2Event>>;
|
|
24
|
+
instanceUpdate: EventEmitter<TrackedEntityInstance | DHIS2Event>;
|
|
25
25
|
formValidityUpdate: EventEmitter<boolean>;
|
|
26
26
|
formCancel: EventEmitter<any>;
|
|
27
27
|
FormLoader: () => React.JSX.Element;
|