@iapps/ng-dhis2-ui 1.1.0 → 1.1.1
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 +1770 -245
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/modules/form/components/base-form-field.component.d.ts +53 -0
- package/lib/modules/form/components/form-field-item.component.d.ts +6 -0
- package/lib/modules/form/containers/form/form.component.d.ts +32 -0
- package/lib/modules/form/containers/form-field/form-field.component.d.ts +50 -0
- package/lib/modules/form/containers/repeatable-form/repeatable-form.component.d.ts +31 -0
- package/lib/modules/form/containers/section-form/section-form.component.d.ts +31 -0
- package/lib/modules/form/form.module.d.ts +14 -0
- package/lib/modules/form/index.d.ts +8 -0
- package/lib/modules/form/interfaces/field-control-type.interface.d.ts +1 -0
- package/lib/modules/form/interfaces/field-dropdown.interface.d.ts +7 -0
- package/lib/modules/form/interfaces/field-type.interface.d.ts +15 -0
- package/lib/modules/form/interfaces/form-configuration.model.d.ts +63 -0
- package/lib/modules/form/interfaces/form-field-group.interface.d.ts +14 -0
- package/lib/modules/form/interfaces/form-field-meta-type.interface.d.ts +1 -0
- package/lib/modules/form/interfaces/form-field.interface.d.ts +40 -0
- package/lib/modules/form/interfaces/form-metadata-section.interface.d.ts +10 -0
- package/lib/modules/form/interfaces/form-metadata.interface.d.ts +11 -0
- package/lib/modules/form/interfaces/index.d.ts +9 -0
- package/lib/modules/form/models/boolean.model.d.ts +5 -0
- package/lib/modules/form/models/check-box.model.d.ts +5 -0
- package/lib/modules/form/models/date-field.model.d.ts +7 -0
- package/lib/modules/form/models/date-range-value.model.d.ts +4 -0
- package/lib/modules/form/models/dropdown-option.model.d.ts +6 -0
- package/lib/modules/form/models/dropdown.model.d.ts +5 -0
- package/lib/modules/form/models/field-config.model.d.ts +5 -0
- package/lib/modules/form/models/field-dropdown.model.d.ts +10 -0
- package/lib/modules/form/models/fields-data.model.d.ts +8 -0
- package/lib/modules/form/models/form-config.model.d.ts +10 -0
- package/lib/modules/form/models/form-field-group.model.d.ts +21 -0
- package/lib/modules/form/models/form-field.model.d.ts +41 -0
- package/lib/modules/form/models/form-metadata-rule.model.d.ts +28 -0
- package/lib/modules/form/models/form-metadata-section.model.d.ts +28 -0
- package/lib/modules/form/models/form-metadata.model.d.ts +20 -0
- package/lib/modules/form/models/form-value.model.d.ts +17 -0
- package/lib/modules/form/models/form.model.d.ts +14 -0
- package/lib/modules/form/models/index.d.ts +17 -0
- package/lib/modules/form/utils/field-control-type.util.d.ts +4 -0
- package/lib/modules/form/utils/field-type.util.d.ts +3 -0
- package/lib/modules/form/utils/field.util.d.ts +9 -0
- package/lib/modules/form/utils/form-value.util.d.ts +4 -0
- package/lib/modules/form/utils/form.util.d.ts +8 -0
- package/lib/modules/form/utils/index.d.ts +5 -0
- package/lib/shared/components/index.d.ts +1 -2
- package/lib/shared/utils/predefinedDimensions.d.ts +6 -6
- package/package.json +1 -1
- /package/lib/shared/components/{TransferOption.d.ts → transfer-option.component.d.ts} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IMetadataRule } from './form-metadata-rule.model';
|
|
2
|
+
import { FormField } from './form-field.model';
|
|
3
|
+
import { Program } from '@iapps/d2-web-sdk';
|
|
4
|
+
import { IFormMetadata, IFormMetadataSection } from '../interfaces';
|
|
5
|
+
export declare class FormMetaData implements IFormMetadata {
|
|
6
|
+
private params;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
downloadSqlView?: string | undefined;
|
|
11
|
+
constructor(params: {
|
|
12
|
+
formMetaData: Partial<FormMetaData>;
|
|
13
|
+
programs: Program[];
|
|
14
|
+
locale?: string;
|
|
15
|
+
});
|
|
16
|
+
get sections(): IFormMetadataSection[];
|
|
17
|
+
get fields(): FormField<string>[];
|
|
18
|
+
get rules(): IMetadataRule[];
|
|
19
|
+
toJson(): IFormMetadata;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import { FormField } from './form-field.model';
|
|
3
|
+
export declare class FormValue {
|
|
4
|
+
form: FormGroup;
|
|
5
|
+
fields: FormField<string>[];
|
|
6
|
+
changedField?: FormField<string>;
|
|
7
|
+
constructor(form: FormGroup, fields: FormField<string>[], changedField?: FormField<string>);
|
|
8
|
+
get isValid(): boolean;
|
|
9
|
+
clear(): void;
|
|
10
|
+
getValues(): {
|
|
11
|
+
[id: string]: {
|
|
12
|
+
id: string;
|
|
13
|
+
value: string;
|
|
14
|
+
options: any[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DropdownOption } from './dropdown-option.model';
|
|
2
|
+
import { FormField } from './form-field.model';
|
|
3
|
+
export interface EocForm {
|
|
4
|
+
id: string;
|
|
5
|
+
uuid: string;
|
|
6
|
+
name: string;
|
|
7
|
+
setMembers: EocForm[];
|
|
8
|
+
options?: DropdownOption[];
|
|
9
|
+
dataType?: string;
|
|
10
|
+
formClass: string;
|
|
11
|
+
formField?: FormField<string>;
|
|
12
|
+
formFields: FormField<string>[];
|
|
13
|
+
concept?: any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './boolean.model';
|
|
2
|
+
export * from './check-box.model';
|
|
3
|
+
export * from './date-field.model';
|
|
4
|
+
export * from './dropdown-option.model';
|
|
5
|
+
export * from './dropdown.model';
|
|
6
|
+
export * from './form-field.model';
|
|
7
|
+
export * from './fields-data.model';
|
|
8
|
+
export * from './field-config.model';
|
|
9
|
+
export * from './date-range-value.model';
|
|
10
|
+
export * from './field-dropdown.model';
|
|
11
|
+
export * from './form-config.model';
|
|
12
|
+
export * from './form-field-group.model';
|
|
13
|
+
export * from './form-metadata-rule.model';
|
|
14
|
+
export * from './form-metadata-section.model';
|
|
15
|
+
export * from './form-metadata.model';
|
|
16
|
+
export * from './form-value.model';
|
|
17
|
+
export * from './form.model';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldControlType } from '../interfaces';
|
|
2
|
+
import { DropdownOption } from '../models';
|
|
3
|
+
export declare class FieldUtil {
|
|
4
|
+
static getFieldDropdownOptions(field: any): DropdownOption[];
|
|
5
|
+
static sanitizeOptions(options: any[]): any;
|
|
6
|
+
static getFieldType(valueType: string): "number" | "date" | "org-unit" | "file" | "tel" | "text";
|
|
7
|
+
static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
|
|
8
|
+
static getOptionEntities?(options: any[]): any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
2
|
+
import { FormField } from '../models';
|
|
3
|
+
export declare class FormUtil {
|
|
4
|
+
static getFormGroup(fields: FormField<string>[], dataEntities: any): UntypedFormGroup;
|
|
5
|
+
static getFieldValue(field: FormField<string>, dataEntities: Record<string, any>): any;
|
|
6
|
+
static getFormFields(fields: any[]): FormField<string>[];
|
|
7
|
+
static createField(id: string, label: string, required: boolean, controlType: 'textbox' | 'dropdown' | 'textarea' | 'transfer' | 'search' | 'file', disabled?: boolean, placeholder?: string, options?: Array<any>): FormField<string>;
|
|
8
|
+
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './TransferOption';
|
|
1
|
+
export * from './transfer-option.component';
|
|
@@ -11,19 +11,19 @@ export declare const getFixedDimensions: () => {
|
|
|
11
11
|
id: string;
|
|
12
12
|
name: any;
|
|
13
13
|
iconName: string;
|
|
14
|
-
icon:
|
|
14
|
+
icon: any;
|
|
15
15
|
};
|
|
16
16
|
pe: {
|
|
17
17
|
id: string;
|
|
18
18
|
name: any;
|
|
19
19
|
iconName: string;
|
|
20
|
-
icon:
|
|
20
|
+
icon: any;
|
|
21
21
|
};
|
|
22
22
|
ou: {
|
|
23
23
|
id: string;
|
|
24
24
|
name: any;
|
|
25
25
|
iconName: string;
|
|
26
|
-
icon:
|
|
26
|
+
icon: any;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
export declare const getDynamicDimensions: () => {
|
|
@@ -47,19 +47,19 @@ export declare const getPredefinedDimensions: () => {
|
|
|
47
47
|
id: string;
|
|
48
48
|
name: any;
|
|
49
49
|
iconName: string;
|
|
50
|
-
icon:
|
|
50
|
+
icon: any;
|
|
51
51
|
};
|
|
52
52
|
pe: {
|
|
53
53
|
id: string;
|
|
54
54
|
name: any;
|
|
55
55
|
iconName: string;
|
|
56
|
-
icon:
|
|
56
|
+
icon: any;
|
|
57
57
|
};
|
|
58
58
|
ou: {
|
|
59
59
|
id: string;
|
|
60
60
|
name: any;
|
|
61
61
|
iconName: string;
|
|
62
|
-
icon:
|
|
62
|
+
icon: any;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
export declare const filterOutPredefinedDimensions: (dimensionIds: string[]) => string[];
|
package/package.json
CHANGED
|
File without changes
|