@iapps/ng-dhis2-ui 1.1.9 → 1.1.11
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 +15 -9
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +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 +4 -3
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.model.d.ts +12 -0
- package/package.json +1 -1
- package/lib/modules/selection-filters-ui/models/selection-filters-ui.models.d.ts +0 -10
|
@@ -5448,9 +5448,10 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
5448
5448
|
const [filters, setFilters] = useState({
|
|
5449
5449
|
programAttributesFilters: this.programAttributesFilters || [],
|
|
5450
5450
|
programStageDataElementFilters: this.programStageDataElementFilters || [],
|
|
5451
|
-
organizationUnitId: '',
|
|
5452
5451
|
startDate: this.startDate || '',
|
|
5453
5452
|
endDate: this.endDate || '',
|
|
5453
|
+
program: this.program || '',
|
|
5454
|
+
organisationUnit: this.organisationUnit || '',
|
|
5454
5455
|
});
|
|
5455
5456
|
const [displayValue, setDisplayValue] = useState(null);
|
|
5456
5457
|
const [selected, setSelected] = useState();
|
|
@@ -5462,9 +5463,10 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
5462
5463
|
setFilters({
|
|
5463
5464
|
programAttributesFilters: this.programAttributesFilters,
|
|
5464
5465
|
programStageDataElementFilters: this.programStageDataElementFilters,
|
|
5465
|
-
organizationUnitId: '',
|
|
5466
5466
|
startDate: this.startDate || '',
|
|
5467
5467
|
endDate: this.endDate || '',
|
|
5468
|
+
program: this.program || '',
|
|
5469
|
+
organisationUnit: this.organisationUnit || filters.organisationUnit,
|
|
5468
5470
|
});
|
|
5469
5471
|
}, [
|
|
5470
5472
|
this.programAttributesFilters,
|
|
@@ -5498,10 +5500,10 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
5498
5500
|
const handleSearch = () => {
|
|
5499
5501
|
this.actionSelected.emit({
|
|
5500
5502
|
...filters,
|
|
5501
|
-
|
|
5502
|
-
organizationUnitId: selectedOrganisationUnit,
|
|
5503
|
+
organisationUnit: selectedOrganisationUnit || this.organisationUnit || filters.organisationUnit,
|
|
5503
5504
|
startDate: filters.startDate,
|
|
5504
5505
|
endDate: filters.endDate,
|
|
5506
|
+
program: this.program,
|
|
5505
5507
|
});
|
|
5506
5508
|
};
|
|
5507
5509
|
const getAttributeColumnSpan = (index) => {
|
|
@@ -5608,18 +5610,18 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
5608
5610
|
// });
|
|
5609
5611
|
}
|
|
5610
5612
|
} }))),
|
|
5611
|
-
React__default.createElement(InputField$1, { className: "input-field", label: "Start Date", type: "
|
|
5612
|
-
React__default.createElement(InputField$1, { className: "input-field", label: "End Date", type: "
|
|
5613
|
+
React__default.createElement(InputField$1, { className: "input-field", label: "Start Date", type: "DATE", value: filters.startDate, onChange: (event) => setFilters({ ...filters, startDate: event.value }) }),
|
|
5614
|
+
React__default.createElement(InputField$1, { className: "input-field", label: "End Date", type: "DATE", value: filters.endDate, onChange: (event) => setFilters({ ...filters, endDate: event.value }) })),
|
|
5613
5615
|
React__default.createElement("div", { style: {
|
|
5614
5616
|
display: 'grid',
|
|
5615
5617
|
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
5616
5618
|
gap: '16px',
|
|
5617
|
-
} }, filters.programAttributesFilters.map((filter, index) => (React__default.createElement("div", { key: index, style: { gridColumn: getAttributeColumnSpan(index) } }, filter.hasOptions && filter.options.length > 0 ? (React__default.createElement(SingleSelectField, { className: "single-select", label: filter.name || 'Select Option', selected: filter.value, onChange: (event) => handleAttributeChange(index, event.selected) }, filter.options.map((option, i) => (React__default.createElement(SingleSelectOption, { key: i, label: option.name, value: option.
|
|
5619
|
+
} }, filters.programAttributesFilters.map((filter, index) => (React__default.createElement("div", { key: index, style: { gridColumn: getAttributeColumnSpan(index) } }, filter.hasOptions && filter.options.length > 0 ? (React__default.createElement(SingleSelectField, { className: "single-select", label: filter.name || 'Select Option', type: filter.valueType, selected: filter.value, onChange: (event) => handleAttributeChange(index, event.selected) }, filter.options.map((option, i) => (React__default.createElement(SingleSelectOption, { key: i, label: option.name, value: option.code }))))) : (React__default.createElement(InputField$1, { className: "input-field", label: filter.name || 'Program name', type: filter.valueType, value: filter.value, onChange: (event) => handleAttributeChange(index, event.value) })))))),
|
|
5618
5620
|
React__default.createElement("div", { style: {
|
|
5619
5621
|
display: 'grid',
|
|
5620
5622
|
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
5621
5623
|
gap: '16px',
|
|
5622
|
-
} }, filters.programStageDataElementFilters.map((filter, index) => (React__default.createElement("div", { key: index, style: { gridColumn: getDataElementColumnSpan(index) } }, filter.hasOptions && filter.options.length > 0 ? (React__default.createElement(SingleSelectField, { className: "single-select", label: filter.name || 'Aggregation type', selected: filter.value, onChange: (event) => handleDataElementChange(index, event.selected) }, filter.options.map((option, i) => (React__default.createElement(SingleSelectOption, { key: i, label: option.name, value: option.
|
|
5624
|
+
} }, filters.programStageDataElementFilters.map((filter, index) => (React__default.createElement("div", { key: index, style: { gridColumn: getDataElementColumnSpan(index) } }, filter.hasOptions && filter.options.length > 0 ? (React__default.createElement(SingleSelectField, { className: "single-select", label: filter.name || 'Aggregation type', type: filter.valueType, selected: filter.value, onChange: (event) => handleDataElementChange(index, event.selected) }, filter.options.map((option, i) => (React__default.createElement(SingleSelectOption, { key: i, label: option.name, value: option.code }))))) : (React__default.createElement(InputField$1, { className: "input-field", type: filter.valueType, label: filter.name || 'Program name', value: filter.value, onChange: (event) => handleDataElementChange(index, event.value) })))))),
|
|
5623
5625
|
React__default.createElement("div", { style: { textAlign: 'right', marginTop: '16px' } },
|
|
5624
5626
|
React__default.createElement(Button$1, { onClick: handleSearch }, "Search"))));
|
|
5625
5627
|
};
|
|
@@ -5675,7 +5677,7 @@ class SelectionFiltersComponent extends ReactWrapperModule {
|
|
|
5675
5677
|
this.render();
|
|
5676
5678
|
}
|
|
5677
5679
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SelectionFiltersComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5678
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: SelectionFiltersComponent, isStandalone: false, selector: "app-selection-filters-ui", inputs: { actionOptions: "actionOptions", programAttributesFilters: "programAttributesFilters", programStageDataElementFilters: "programStageDataElementFilters", startDate: "startDate", endDate: "endDate" }, outputs: { actionSelected: "actionSelected" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".react-filters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:20px}.input-field,.single-select{width:100%}\n"] }); }
|
|
5680
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: SelectionFiltersComponent, isStandalone: false, selector: "app-selection-filters-ui", inputs: { actionOptions: "actionOptions", programAttributesFilters: "programAttributesFilters", programStageDataElementFilters: "programStageDataElementFilters", startDate: "startDate", endDate: "endDate", program: "program", organisationUnit: "organisationUnit" }, outputs: { actionSelected: "actionSelected" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".react-filters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:20px}.input-field,.single-select{width:100%}\n"] }); }
|
|
5679
5681
|
}
|
|
5680
5682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SelectionFiltersComponent, decorators: [{
|
|
5681
5683
|
type: Component,
|
|
@@ -5690,6 +5692,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
5690
5692
|
type: Input
|
|
5691
5693
|
}], endDate: [{
|
|
5692
5694
|
type: Input
|
|
5695
|
+
}], program: [{
|
|
5696
|
+
type: Input
|
|
5697
|
+
}], organisationUnit: [{
|
|
5698
|
+
type: Input
|
|
5693
5699
|
}], actionSelected: [{
|
|
5694
5700
|
type: Output
|
|
5695
5701
|
}] } });
|