@iapps/ng-dhis2-ui 1.2.166 → 1.2.168
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 +126 -50
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/index.d.ts +12 -5
- package/package.json +1 -1
|
@@ -4300,10 +4300,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
4300
4300
|
type: Injectable
|
|
4301
4301
|
}] });
|
|
4302
4302
|
|
|
4303
|
-
|
|
4303
|
+
var LineListColumnMetadataDisplayMode;
|
|
4304
|
+
(function (LineListColumnMetadataDisplayMode) {
|
|
4305
|
+
LineListColumnMetadataDisplayMode["ALL_ATTRIBUTES"] = "ALL_ATTRIBUTES";
|
|
4306
|
+
LineListColumnMetadataDisplayMode["ALL_ATTRIBUTES_AND_DATA_ELEMENTS"] = "ALL_ATTRIBUTES_AND_DATA_ELEMENTS";
|
|
4307
|
+
})(LineListColumnMetadataDisplayMode || (LineListColumnMetadataDisplayMode = {}));
|
|
4308
|
+
|
|
4309
|
+
const getOptionCode = (option) => option.code ?? option.value ?? option.id;
|
|
4310
|
+
const getMultiOptionCodes = (value) => {
|
|
4311
|
+
if (Array.isArray(value)) {
|
|
4312
|
+
return value
|
|
4313
|
+
.map((item) => String(item).trim())
|
|
4314
|
+
.filter((item) => item.length > 0);
|
|
4315
|
+
}
|
|
4316
|
+
if (typeof value !== 'string') {
|
|
4317
|
+
return value == null ? [] : [String(value)];
|
|
4318
|
+
}
|
|
4319
|
+
return value
|
|
4320
|
+
.split(/[;,]/)
|
|
4321
|
+
.map((item) => item.trim())
|
|
4322
|
+
.filter((item) => item.length > 0);
|
|
4323
|
+
};
|
|
4324
|
+
const formatMultiTextOptionValue = (value, options = []) => {
|
|
4325
|
+
const optionByCode = new Map(options
|
|
4326
|
+
.map((option) => [getOptionCode(option), option])
|
|
4327
|
+
.filter(([code]) => !!code));
|
|
4328
|
+
const codes = getMultiOptionCodes(value);
|
|
4329
|
+
return codes.map((code) => optionByCode.get(code)?.name || code).join(', ');
|
|
4330
|
+
};
|
|
4331
|
+
|
|
4332
|
+
const getTrackedEntityTableData = (response, programId, pager, metaData, searcheableDataElements, customDisplayInReportsIds, columnNameSource = 'NAME', columnMetadataDisplayMode) => {
|
|
4304
4333
|
const getColumnLabel = (item) => columnNameSource === 'FORM_NAME'
|
|
4305
4334
|
? item?.formName || item?.name || 'Default'
|
|
4306
4335
|
: item?.name || item?.formName || 'Default';
|
|
4336
|
+
const shouldShowAllAttributes = columnMetadataDisplayMode ===
|
|
4337
|
+
LineListColumnMetadataDisplayMode.ALL_ATTRIBUTES ||
|
|
4338
|
+
columnMetadataDisplayMode ===
|
|
4339
|
+
LineListColumnMetadataDisplayMode.ALL_ATTRIBUTES_AND_DATA_ELEMENTS;
|
|
4340
|
+
const shouldShowAllDataElements = columnMetadataDisplayMode ===
|
|
4341
|
+
LineListColumnMetadataDisplayMode.ALL_ATTRIBUTES_AND_DATA_ELEMENTS;
|
|
4307
4342
|
const teisRaw = response.data
|
|
4308
4343
|
.trackedEntityInstances;
|
|
4309
4344
|
const teis = Array.isArray(teisRaw)
|
|
@@ -4313,15 +4348,22 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
4313
4348
|
const incidentDateLabel = metaData.incidentDateLabel;
|
|
4314
4349
|
const orgUnitMap = response.data
|
|
4315
4350
|
.orgUnitsMap;
|
|
4316
|
-
const attributeColumns =
|
|
4351
|
+
const attributeColumns = (shouldShowAllAttributes
|
|
4352
|
+
? metaData.trackedEntityAttributes
|
|
4353
|
+
: metaData.displayInListTrackedEntityAttributes)
|
|
4317
4354
|
.sort((a, b) => a.sortOrder - b.sortOrder)
|
|
4318
4355
|
.map((trackedEntityAttribute) => ({
|
|
4319
4356
|
label: getColumnLabel(trackedEntityAttribute),
|
|
4320
4357
|
key: trackedEntityAttribute.id,
|
|
4321
4358
|
}));
|
|
4322
|
-
const shouldIncludeDataElement = (psde) =>
|
|
4323
|
-
|
|
4324
|
-
|
|
4359
|
+
const shouldIncludeDataElement = (psde) => {
|
|
4360
|
+
if (shouldShowAllDataElements) {
|
|
4361
|
+
return true;
|
|
4362
|
+
}
|
|
4363
|
+
return customDisplayInReportsIds !== undefined
|
|
4364
|
+
? customDisplayInReportsIds.includes(psde.dataElement?.id)
|
|
4365
|
+
: psde.displayInReports === true;
|
|
4366
|
+
};
|
|
4325
4367
|
const tableSearcheableDataElements = metaData
|
|
4326
4368
|
.programStages.sort((a, b) => a.sortOrder - b.sortOrder)
|
|
4327
4369
|
.flatMap((stage) => stage
|
|
@@ -4359,6 +4401,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
4359
4401
|
.filter((psde) => psde.dataElement && shouldIncludeDataElement(psde))
|
|
4360
4402
|
.map(({ dataElement }) => ({
|
|
4361
4403
|
id: dataElement.id,
|
|
4404
|
+
valueType: dataElement.valueType,
|
|
4362
4405
|
options: dataElement.optionSet?.options?.map((option) => ({
|
|
4363
4406
|
name: option.name,
|
|
4364
4407
|
code: option.code,
|
|
@@ -4446,13 +4489,20 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
4446
4489
|
}
|
|
4447
4490
|
else if (attributeMeta?.optionSetValue &&
|
|
4448
4491
|
attributeMeta?.optionSet?.options) {
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4492
|
+
if (valueType === 'MULTI_TEXT') {
|
|
4493
|
+
row[attributeId] = {
|
|
4494
|
+
value: formatMultiTextOptionValue(value, attributeMeta.optionSet.options),
|
|
4495
|
+
};
|
|
4496
|
+
}
|
|
4497
|
+
else {
|
|
4498
|
+
const matchedOption = attributeMeta.optionSet.options.find((opt) => opt.code === value);
|
|
4499
|
+
row[attributeId] = {
|
|
4500
|
+
value: matchedOption?.name || value,
|
|
4501
|
+
...(getOptionColor(matchedOption) && {
|
|
4502
|
+
style: getOptionColor(matchedOption),
|
|
4503
|
+
}),
|
|
4504
|
+
};
|
|
4505
|
+
}
|
|
4456
4506
|
}
|
|
4457
4507
|
else {
|
|
4458
4508
|
row[attributeId] = { value };
|
|
@@ -4465,13 +4515,20 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
|
|
|
4465
4515
|
if (!dataElementId || value == null)
|
|
4466
4516
|
return;
|
|
4467
4517
|
const dataElementOption = dataElementOptionMap.get(dataElementId);
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4518
|
+
if (dataElementOption?.valueType === 'MULTI_TEXT') {
|
|
4519
|
+
row[dataElementId] = {
|
|
4520
|
+
value: formatMultiTextOptionValue(value, dataElementOption.options),
|
|
4521
|
+
};
|
|
4522
|
+
}
|
|
4523
|
+
else {
|
|
4524
|
+
const matchedOption = dataElementOption?.options?.find((opt) => opt.code === value);
|
|
4525
|
+
row[dataElementId] = {
|
|
4526
|
+
value: matchedOption?.name || value,
|
|
4527
|
+
...(getOptionColor(matchedOption) && {
|
|
4528
|
+
style: getOptionColor(matchedOption),
|
|
4529
|
+
}),
|
|
4530
|
+
};
|
|
4531
|
+
}
|
|
4475
4532
|
});
|
|
4476
4533
|
const orgUnitId = enrollment.orgUnit;
|
|
4477
4534
|
const orgUnitName = orgUnitMap?.get(orgUnitId) || '-';
|
|
@@ -4610,16 +4667,14 @@ const addActionsColumn = (columns, actionOptions) => {
|
|
|
4610
4667
|
];
|
|
4611
4668
|
};
|
|
4612
4669
|
|
|
4613
|
-
const getEvents = (response, programStageId, pager, metaData, columnNameSource = 'NAME') => {
|
|
4670
|
+
const getEvents = (response, programStageId, pager, metaData, columnNameSource = 'NAME', columnMetadataDisplayMode) => {
|
|
4614
4671
|
const getColumnLabel = (item) => columnNameSource === 'FORM_NAME'
|
|
4615
4672
|
? item?.formName || item?.name || 'Default'
|
|
4616
4673
|
: item?.name || item?.formName || 'Default';
|
|
4617
|
-
const
|
|
4618
|
-
const
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
event.dataValues.forEach((dv) => allDataElements.add(dv.dataElement));
|
|
4622
|
-
});
|
|
4674
|
+
const eventsRaw = response.data.events;
|
|
4675
|
+
const events = Array.isArray(eventsRaw)
|
|
4676
|
+
? eventsRaw
|
|
4677
|
+
: [eventsRaw].filter(Boolean);
|
|
4623
4678
|
let stageFromMetaData;
|
|
4624
4679
|
if (programStageId) {
|
|
4625
4680
|
stageFromMetaData = metaData.programStages.find((stage) => stage.id === programStageId);
|
|
@@ -4630,15 +4685,16 @@ const getEvents = (response, programStageId, pager, metaData, columnNameSource =
|
|
|
4630
4685
|
if (!stageFromMetaData) {
|
|
4631
4686
|
throw new Error(`Program stage with ID ${programStageId} not found`);
|
|
4632
4687
|
}
|
|
4633
|
-
const
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4688
|
+
const shouldShowAllDataElements = columnMetadataDisplayMode ===
|
|
4689
|
+
LineListColumnMetadataDisplayMode.ALL_ATTRIBUTES_AND_DATA_ELEMENTS;
|
|
4690
|
+
const dataElementMetaList = stageFromMetaData
|
|
4691
|
+
.programStageDataElements.filter((psde) => shouldShowAllDataElements ? true : psde.displayInReports === true)
|
|
4692
|
+
.sort((a, b) => a.sortOrder - b.sortOrder);
|
|
4693
|
+
const displayedDataElementIds = new Set(dataElementMetaList.map((psde) => psde.dataElement.id));
|
|
4694
|
+
const entityColumns = dataElementMetaList.map((psde) => ({
|
|
4695
|
+
label: getColumnLabel(psde.dataElement),
|
|
4696
|
+
key: psde.dataElement.id,
|
|
4697
|
+
}));
|
|
4642
4698
|
const dataElementsData = events.map((event, idx) => {
|
|
4643
4699
|
const row = {
|
|
4644
4700
|
event: { value: event.event },
|
|
@@ -4649,17 +4705,27 @@ const getEvents = (response, programStageId, pager, metaData, columnNameSource =
|
|
|
4649
4705
|
value: (pager.page - 1) * pager.pageSize + idx + 1,
|
|
4650
4706
|
},
|
|
4651
4707
|
};
|
|
4652
|
-
|
|
4708
|
+
displayedDataElementIds.forEach((dataElementId) => {
|
|
4653
4709
|
row[dataElementId] = { value: '' };
|
|
4654
4710
|
});
|
|
4655
|
-
event.dataValues.forEach((dv) => {
|
|
4711
|
+
(event.dataValues || []).forEach((dv) => {
|
|
4712
|
+
if (!displayedDataElementIds.has(dv.dataElement)) {
|
|
4713
|
+
return;
|
|
4714
|
+
}
|
|
4656
4715
|
const dataElementMeta = stageFromMetaData.programStageDataElements.find((psde) => psde.dataElement.id === dv.dataElement);
|
|
4657
4716
|
if (dataElementMeta?.dataElement.optionSet) {
|
|
4658
4717
|
const optionSet = dataElementMeta.dataElement.optionSet;
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4718
|
+
if (dataElementMeta.dataElement.valueType === 'MULTI_TEXT') {
|
|
4719
|
+
row[dv.dataElement] = {
|
|
4720
|
+
value: formatMultiTextOptionValue(dv.value, optionSet.options),
|
|
4721
|
+
};
|
|
4722
|
+
}
|
|
4723
|
+
else {
|
|
4724
|
+
const matchingOption = optionSet.options.find((option) => option.code === dv.value);
|
|
4725
|
+
row[dv.dataElement] = matchingOption
|
|
4726
|
+
? { value: matchingOption.name }
|
|
4727
|
+
: { value: dv.value };
|
|
4728
|
+
}
|
|
4663
4729
|
}
|
|
4664
4730
|
else {
|
|
4665
4731
|
row[dv.dataElement] = { value: dv.value };
|
|
@@ -4714,7 +4780,7 @@ const applyDownloadColumnFilter = (columns, filterableColumnIds) => {
|
|
|
4714
4780
|
const filterableColumnIdsSet = new Set(filterableColumnIds);
|
|
4715
4781
|
return columns.filter((column) => filterableColumnIdsSet.has(column.key));
|
|
4716
4782
|
};
|
|
4717
|
-
const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStageId, orgUnit, ouMode, startDate, endDate, dataQueryFilters, enrollmentStatus, eventStatus, filterableColumnIds, searcheableDataElements, customDisplayInReportsIds, columnNameSource, fetchOrgUnits, }) => {
|
|
4783
|
+
const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStageId, orgUnit, ouMode, startDate, endDate, dataQueryFilters, enrollmentStatus, eventStatus, filterableColumnIds, searcheableDataElements, customDisplayInReportsIds, columnNameSource, columnMetadataDisplayMode, fetchOrgUnits, }) => {
|
|
4718
4784
|
if (!metaData) {
|
|
4719
4785
|
return { columns: [], data: [] };
|
|
4720
4786
|
}
|
|
@@ -4725,11 +4791,13 @@ const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStage
|
|
|
4725
4791
|
if (programStageId || isEvent) {
|
|
4726
4792
|
const eventQuery = d2.eventModule.event
|
|
4727
4793
|
.setEndDate(resolvedEndDate)
|
|
4728
|
-
.setStartDate(startDate)
|
|
4729
4794
|
.setProgram(programId)
|
|
4730
4795
|
.setOrgUnit(orgUnit)
|
|
4731
4796
|
.setOuMode(ouMode)
|
|
4732
4797
|
.setPagination(downloadPager);
|
|
4798
|
+
if (startDate) {
|
|
4799
|
+
eventQuery.setStartDate(startDate);
|
|
4800
|
+
}
|
|
4733
4801
|
if (programStageId) {
|
|
4734
4802
|
eventQuery.setProgramStage(programStageId);
|
|
4735
4803
|
}
|
|
@@ -4746,7 +4814,7 @@ const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStage
|
|
|
4746
4814
|
pageSize: events.length || 1,
|
|
4747
4815
|
}),
|
|
4748
4816
|
};
|
|
4749
|
-
const downloadRows = getEvents({ data: eventsResponse }, programStageId || '', eventsResponse.pager, metaData, columnNameSource);
|
|
4817
|
+
const downloadRows = getEvents({ data: eventsResponse }, programStageId || '', eventsResponse.pager, metaData, columnNameSource, columnMetadataDisplayMode);
|
|
4750
4818
|
return {
|
|
4751
4819
|
columns: applyDownloadColumnFilter(downloadRows.columns, filterableColumnIds),
|
|
4752
4820
|
data: downloadRows.data,
|
|
@@ -4755,7 +4823,6 @@ const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStage
|
|
|
4755
4823
|
if (isTracker) {
|
|
4756
4824
|
const trackerQuery = d2.trackerModule.trackedEntity
|
|
4757
4825
|
.setEndDate(resolvedEndDate)
|
|
4758
|
-
.setStartDate(startDate)
|
|
4759
4826
|
.setProgram(programId)
|
|
4760
4827
|
.setOrgUnit(orgUnit)
|
|
4761
4828
|
.setOuMode(ouMode)
|
|
@@ -4765,6 +4832,9 @@ const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStage
|
|
|
4765
4832
|
.setOrderCriterias([
|
|
4766
4833
|
new DataOrderCriteria().setField('createdAt').setOrder('desc'),
|
|
4767
4834
|
]);
|
|
4835
|
+
if (startDate) {
|
|
4836
|
+
trackerQuery.setStartDate(startDate);
|
|
4837
|
+
}
|
|
4768
4838
|
if (eventStatus?.status && eventStatus?.programStage) {
|
|
4769
4839
|
trackerQuery.setEventStatus(eventStatus.status, eventStatus.programStage);
|
|
4770
4840
|
}
|
|
@@ -4796,7 +4866,7 @@ const fetchLineListDownloadRows = async ({ d2, metaData, programId, programStage
|
|
|
4796
4866
|
}),
|
|
4797
4867
|
orgUnitsMap: fetchedOrgUnits,
|
|
4798
4868
|
};
|
|
4799
|
-
const downloadRows = getTrackedEntityTableData({ data: trackedEntityResponse }, programId, trackedEntityResponse.pager, metaData, searcheableDataElements, customDisplayInReportsIds, columnNameSource);
|
|
4869
|
+
const downloadRows = getTrackedEntityTableData({ data: trackedEntityResponse }, programId, trackedEntityResponse.pager, metaData, searcheableDataElements, customDisplayInReportsIds, columnNameSource, columnMetadataDisplayMode);
|
|
4800
4870
|
return {
|
|
4801
4871
|
columns: applyDownloadColumnFilter(downloadRows.columns, filterableColumnIds),
|
|
4802
4872
|
data: downloadRows.data,
|
|
@@ -4950,7 +5020,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4950
5020
|
pager: pager,
|
|
4951
5021
|
// orgUnitsMap: fetchedOrgUnits,
|
|
4952
5022
|
};
|
|
4953
|
-
const { columns, data } = getEvents({ data: eventsResponse }, this.programStageId, pager, metaData, this.columnNameSource);
|
|
5023
|
+
const { columns, data } = getEvents({ data: eventsResponse }, this.programStageId, pager, metaData, this.columnNameSource, this.columnMetadataDisplayMode);
|
|
4954
5024
|
// const filterableColumnIdsSet = new Set(
|
|
4955
5025
|
// this.filterableColumnIds
|
|
4956
5026
|
// );
|
|
@@ -5030,7 +5100,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
5030
5100
|
pager: pager,
|
|
5031
5101
|
orgUnitsMap: fetchedOrgUnits,
|
|
5032
5102
|
};
|
|
5033
|
-
const { columns, data, filteredEntityColumns, orgUnitLabel } = getTrackedEntityTableData({ data: trackedEntityResponse }, this.programId, pager, metaData, this.searcheableDataElements, this.customDisplayInReportsIds, this.columnNameSource);
|
|
5103
|
+
const { columns, data, filteredEntityColumns, orgUnitLabel } = getTrackedEntityTableData({ data: trackedEntityResponse }, this.programId, pager, metaData, this.searcheableDataElements, this.customDisplayInReportsIds, this.columnNameSource, this.columnMetadataDisplayMode);
|
|
5034
5104
|
setFilteredColumns((prev) => filteredEntityColumns.length > 0 ? filteredEntityColumns : prev);
|
|
5035
5105
|
let updatedFilterableColumnIds;
|
|
5036
5106
|
if (Array.isArray(this.filterableColumnIds) &&
|
|
@@ -5097,6 +5167,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
5097
5167
|
searcheableDataElements: this.searcheableDataElements,
|
|
5098
5168
|
customDisplayInReportsIds: this.customDisplayInReportsIds,
|
|
5099
5169
|
columnNameSource: this.columnNameSource,
|
|
5170
|
+
columnMetadataDisplayMode: this.columnMetadataDisplayMode,
|
|
5100
5171
|
fetchOrgUnits: (orgUnitIds) => this.lineListService.fetchOrgUnits(orgUnitIds),
|
|
5101
5172
|
});
|
|
5102
5173
|
if (format === 'CSV') {
|
|
@@ -5397,7 +5468,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
5397
5468
|
this.render();
|
|
5398
5469
|
}
|
|
5399
5470
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LineListTableComponent, isStandalone: false, selector: "ng-dhis2-ui-line-list", inputs: { triggerToken: "triggerToken", programId: "programId", orgUnit: "orgUnit", programStageId: "programStageId", actionOptions: "actionOptions", actionOptionOrientation: "actionOptionOrientation", attributeFilters: "attributeFilters", useOuModeWithOlderDHIS2Instance: "useOuModeWithOlderDHIS2Instance", startDate: "startDate", endDate: "endDate", dataQueryFilters: "dataQueryFilters", lineListRowActionFilterConfig: "lineListRowActionFilterConfig", hydrateForActionFiltering: "hydrateForActionFiltering", ouMode: "ouMode", isButtonLoading: "isButtonLoading", buttonFilter: "buttonFilter", filterRootOrgUnit: "filterRootOrgUnit", showFilters: "showFilters", isOptionSetNameVisible: "isOptionSetNameVisible", allowRowsSelection: "allowRowsSelection", enrollmentStatus: "enrollmentStatus", filterableColumnIds: "filterableColumnIds", triggerRefetch: "triggerRefetch", eventStatus: "eventStatus", showActionButtons: "showActionButtons", showEnrollmentDates: "showEnrollmentDates", showDownloadButton: "showDownloadButton", searcheableDataElements: "searcheableDataElements", columnNameSource: "columnNameSource", customDisplayInReportsIds: "customDisplayInReportsIds" }, outputs: { actionSelected: "actionSelected", rowsSelected: "rowsSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";::ng-deep .line-list-root{width:100%;max-width:100%;min-width:0}::ng-deep .line-list-download-toolbar{position:sticky;left:0;z-index:2;display:flex;justify-content:flex-end;width:100%;max-width:100%;box-sizing:border-box;background:#fff}::ng-deep .line-list-table-scroll{width:100%;max-width:100%;overflow-x:auto}::ng-deep .custom-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-input div{margin:0!important}::ng-deep .custom-input label{font-size:12px;padding-right:0}::ng-deep .custom-input input{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-input input:focus{border:none!important;box-shadow:none!important}::ng-deep .custom-input [data-test=calendar-clear-button]{background-color:#f2f2f2!important;color:#870808!important;border-radius:6px!important;padding:4px 10px!important;font-size:0!important}::ng-deep .custom-input [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:14px;color:#870808}::ng-deep .custom-input [data-test=calendar-clear-button]:hover{background-color:#ddd}::ng-deep .calendar-input-wrapper{position:relative}::ng-deep .calendar-input-wrapper .custom-input{position:relative;width:100%;display:flex;align-items:center}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]{right:8px;bottom:14px;margin:auto;display:flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:0!important;background-color:#a0adba!important;border-radius:50%;padding:2px;cursor:pointer}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:10px;color:#f0f0f0}::ng-deep .calendar-input-wrapper input{padding-right:40px!important;height:40px;line-height:40px;box-sizing:border-box}::ng-deep .custom-input label{color:gray!important;opacity:1}::ng-deep .table-top-toolbar{background-color:var(--colors-grey100)!important;color:var(--colors-grey900)!important}::ng-deep .custom-select-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-select-input div{margin:0!important}::ng-deep .custom-select-input [data-test=dhis2-uiwidgets-singleselectfield-label]{font-size:12px;color:gray!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]:focus-within{box-shadow:none!important}::ng-deep .custom-select-input input:focus{border:none!important;box-shadow:none!important}\n"] }); }
|
|
5471
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LineListTableComponent, isStandalone: false, selector: "ng-dhis2-ui-line-list", inputs: { triggerToken: "triggerToken", programId: "programId", orgUnit: "orgUnit", programStageId: "programStageId", actionOptions: "actionOptions", actionOptionOrientation: "actionOptionOrientation", attributeFilters: "attributeFilters", useOuModeWithOlderDHIS2Instance: "useOuModeWithOlderDHIS2Instance", startDate: "startDate", endDate: "endDate", dataQueryFilters: "dataQueryFilters", lineListRowActionFilterConfig: "lineListRowActionFilterConfig", hydrateForActionFiltering: "hydrateForActionFiltering", ouMode: "ouMode", isButtonLoading: "isButtonLoading", buttonFilter: "buttonFilter", filterRootOrgUnit: "filterRootOrgUnit", showFilters: "showFilters", isOptionSetNameVisible: "isOptionSetNameVisible", allowRowsSelection: "allowRowsSelection", enrollmentStatus: "enrollmentStatus", filterableColumnIds: "filterableColumnIds", triggerRefetch: "triggerRefetch", eventStatus: "eventStatus", showActionButtons: "showActionButtons", showEnrollmentDates: "showEnrollmentDates", showDownloadButton: "showDownloadButton", searcheableDataElements: "searcheableDataElements", columnNameSource: "columnNameSource", customDisplayInReportsIds: "customDisplayInReportsIds", columnMetadataDisplayMode: "columnMetadataDisplayMode" }, outputs: { actionSelected: "actionSelected", rowsSelected: "rowsSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";::ng-deep .line-list-root{width:100%;max-width:100%;min-width:0}::ng-deep .line-list-download-toolbar{position:sticky;left:0;z-index:2;display:flex;justify-content:flex-end;width:100%;max-width:100%;box-sizing:border-box;background:#fff}::ng-deep .line-list-table-scroll{width:100%;max-width:100%;overflow-x:auto}::ng-deep .custom-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-input div{margin:0!important}::ng-deep .custom-input label{font-size:12px;padding-right:0}::ng-deep .custom-input input{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-input input:focus{border:none!important;box-shadow:none!important}::ng-deep .custom-input [data-test=calendar-clear-button]{background-color:#f2f2f2!important;color:#870808!important;border-radius:6px!important;padding:4px 10px!important;font-size:0!important}::ng-deep .custom-input [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:14px;color:#870808}::ng-deep .custom-input [data-test=calendar-clear-button]:hover{background-color:#ddd}::ng-deep .calendar-input-wrapper{position:relative}::ng-deep .calendar-input-wrapper .custom-input{position:relative;width:100%;display:flex;align-items:center}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]{right:8px;bottom:14px;margin:auto;display:flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:0!important;background-color:#a0adba!important;border-radius:50%;padding:2px;cursor:pointer}::ng-deep .calendar-input-wrapper [data-test=calendar-clear-button]:before{content:\"\\2715\";font-size:10px;color:#f0f0f0}::ng-deep .calendar-input-wrapper input{padding-right:40px!important;height:40px;line-height:40px;box-sizing:border-box}::ng-deep .custom-input label{color:gray!important;opacity:1}::ng-deep .table-top-toolbar{background-color:var(--colors-grey100)!important;color:var(--colors-grey900)!important}::ng-deep .custom-select-input{display:flex!important;gap:4px!important;align-items:center!important;border:1px solid #9fadba!important;border-radius:4px!important;margin:0;padding:0 0 0 8px;background-color:#fff!important}::ng-deep .custom-select-input div{margin:0!important}::ng-deep .custom-select-input [data-test=dhis2-uiwidgets-singleselectfield-label]{font-size:12px;color:gray!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]{border:none!important;font-size:12px!important;display:flex;align-items:center;padding-left:4px;height:40px;outline:none!important;box-shadow:none!important}::ng-deep .custom-select-input [data-test=dhis2-uicore-select-input]:focus-within{box-shadow:none!important}::ng-deep .custom-select-input input:focus{border:none!important;box-shadow:none!important}\n"] }); }
|
|
5401
5472
|
}
|
|
5402
5473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LineListTableComponent, decorators: [{
|
|
5403
5474
|
type: Component,
|
|
@@ -5466,6 +5537,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
5466
5537
|
type: Input
|
|
5467
5538
|
}], customDisplayInReportsIds: [{
|
|
5468
5539
|
type: Input
|
|
5540
|
+
}], columnMetadataDisplayMode: [{
|
|
5541
|
+
type: Input
|
|
5469
5542
|
}] } });
|
|
5470
5543
|
|
|
5471
5544
|
class LineListModule {
|
|
@@ -10381,6 +10454,9 @@ class FieldUtil {
|
|
|
10381
10454
|
}
|
|
10382
10455
|
static getFieldControlType(valueType, hasOptions) {
|
|
10383
10456
|
if (hasOptions) {
|
|
10457
|
+
if (valueType === FieldType.MULTI_TEXT) {
|
|
10458
|
+
return 'multi-dropdown';
|
|
10459
|
+
}
|
|
10384
10460
|
return 'dropdown';
|
|
10385
10461
|
}
|
|
10386
10462
|
switch (valueType) {
|
|
@@ -13532,5 +13608,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
13532
13608
|
* Generated bundle index. Do not edit.
|
|
13533
13609
|
*/
|
|
13534
13610
|
|
|
13535
|
-
export { Boolean$1 as Boolean, BreadcrumbComponent, BreadcrumbModule, ButtonComponent, ButtonModule, CascadeKind, CheckBox, D2FormModule, DEFAULT_KEYWORD_TO_LEVEL, DEFAULT_OPTIONS_PATH_CASCADE, DataTableUIComponent, DataTableUIModule, DateField, DateRangeValue, Dropdown, EventFormComponent, EventFormModule, FACILITY_KEYWORDS, FieldConfig, FieldControlTypeUtil, FieldDropdown, FieldType, FieldUtil, FlatFormComponent, FormComponent, FormConfig, FormField, FormFieldComponent, FormFieldGroup, FormFieldTypeUtil, FormMetaData, FormMetadataSection, FormUtil, FormValue, FormValueUtil, GLOBAL_TYPE_RULES, HeaderBarComponent, HeaderBarModule, LOWERCASE_FACILITY_KEYWORDS, LevelMatchMode, LevelSelectorMode, LineListModule, LineListTableComponent, MetadataRule, MetadataRuleAction, ORG_UNIT_LEVEL_TO_KEYWORD, OptionPathField, OrgUnitLevel, OrganisationUnitSelectionConfig, OrganisationUnitSelectorComponent, OrganisationUnitSelectorModalComponent, OrganisationUnitSelectorModule, ParentMatchMode, ParentValueType, PeriodSelectorComponent, PeriodSelectorModalComponent, PeriodSelectorModule, ProgramEntryFormConfig, ProgramEntryFormMetaData, ProgramEntryFormModule, ProgramEntryFormSection, ReactWrapperModule, RepeatableFormComponent, SectionFormComponent, SelectionFiltersComponent, SelectionFiltersUiModule, TrackerFormComponent, TrackerFormModule, TranslationUtil };
|
|
13611
|
+
export { Boolean$1 as Boolean, BreadcrumbComponent, BreadcrumbModule, ButtonComponent, ButtonModule, CascadeKind, CheckBox, D2FormModule, DEFAULT_KEYWORD_TO_LEVEL, DEFAULT_OPTIONS_PATH_CASCADE, DataTableUIComponent, DataTableUIModule, DateField, DateRangeValue, Dropdown, EventFormComponent, EventFormModule, FACILITY_KEYWORDS, FieldConfig, FieldControlTypeUtil, FieldDropdown, FieldType, FieldUtil, FlatFormComponent, FormComponent, FormConfig, FormField, FormFieldComponent, FormFieldGroup, FormFieldTypeUtil, FormMetaData, FormMetadataSection, FormUtil, FormValue, FormValueUtil, GLOBAL_TYPE_RULES, HeaderBarComponent, HeaderBarModule, LOWERCASE_FACILITY_KEYWORDS, LevelMatchMode, LevelSelectorMode, LineListColumnMetadataDisplayMode, LineListModule, LineListTableComponent, MetadataRule, MetadataRuleAction, ORG_UNIT_LEVEL_TO_KEYWORD, OptionPathField, OrgUnitLevel, OrganisationUnitSelectionConfig, OrganisationUnitSelectorComponent, OrganisationUnitSelectorModalComponent, OrganisationUnitSelectorModule, ParentMatchMode, ParentValueType, PeriodSelectorComponent, PeriodSelectorModalComponent, PeriodSelectorModule, ProgramEntryFormConfig, ProgramEntryFormMetaData, ProgramEntryFormModule, ProgramEntryFormSection, ReactWrapperModule, RepeatableFormComponent, SectionFormComponent, SelectionFiltersComponent, SelectionFiltersUiModule, TrackerFormComponent, TrackerFormModule, TranslationUtil };
|
|
13536
13612
|
//# sourceMappingURL=iapps-ng-dhis2-ui.mjs.map
|