@iapps/ng-dhis2-ui 1.2.62 → 1.2.66
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 +285 -52
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/lib/modules/form/utils/field.util.d.ts +1 -1
- package/lib/modules/line-list/components/orgUnitSelector.d.ts +1 -1
- package/lib/modules/line-list/components/table/filterToolbar.d.ts +1 -1
- package/lib/modules/line-list/components/table/lineListTable.d.ts +1 -1
- package/lib/modules/line-list/components/table/tableBody.d.ts +1 -1
- package/lib/modules/line-list/components/table/tableHeader.d.ts +2 -1
- package/lib/modules/line-list/components/table/tableRow.d.ts +1 -1
- package/lib/modules/line-list/containers/line-list.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -3290,43 +3290,70 @@ const OrgUnitFormField$1 = (props) => {
|
|
|
3290
3290
|
React__default.createElement(CircularLoader$1, { small: true }))) : (React__default.createElement("div", { className: classes.orgUnitTreeContainer, style: { maxHeight: '200px', overflowY: 'auto' } }, renderOrgUnitTree()))))))));
|
|
3291
3291
|
};
|
|
3292
3292
|
|
|
3293
|
-
const OrgUnitSelector = ({ hide, setHide, selectedOrgUnit, setSelectedOrgUnit, setOrgUnitState, }) => (React__default.createElement(Modal$1, { hide: hide, position: "middle" },
|
|
3293
|
+
const OrgUnitSelector = ({ hide, setHide, selectedOrgUnit, setSelectedOrgUnit, setOrgUnitState, setTempOrgUnitState, tempOrgUnitState }) => (React__default.createElement(Modal$1, { hide: hide, position: "middle" },
|
|
3294
3294
|
React__default.createElement(ModalTitle$1, null, "Select organization unit"),
|
|
3295
3295
|
React__default.createElement(ModalContent$1, null,
|
|
3296
3296
|
React__default.createElement(OrgUnitFormField$1, { key: selectedOrgUnit, onSelectOrgUnit: (selectedOrgUnit) => {
|
|
3297
3297
|
setSelectedOrgUnit(selectedOrgUnit.displayName);
|
|
3298
|
-
|
|
3298
|
+
setTempOrgUnitState(selectedOrgUnit.id);
|
|
3299
3299
|
setHide(true);
|
|
3300
3300
|
} })),
|
|
3301
3301
|
React__default.createElement(ModalActions$1, null,
|
|
3302
3302
|
React__default.createElement(ButtonStrip$1, { end: true },
|
|
3303
3303
|
React__default.createElement(Button$1, { onClick: () => setHide(true), secondary: true }, "Close")))));
|
|
3304
3304
|
|
|
3305
|
-
const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setOrgUnitState, defaultOrgUnit, setHide, startDateState, setStartDateState, endDateState, setEndDateState, visibleFilters, dateStates, inputValues, setInputValues, handleInputChange, handleInputChangeForSelectField, handleDateSelect, prevValue, setPrevValue, showAllFilters, setShowAllFilters, }) => (React__default.createElement(DataTableToolbar, { className: "table-top-toolbar" },
|
|
3305
|
+
const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setOrgUnitState, defaultOrgUnit, setHide, startDateState, setStartDateState, endDateState, setEndDateState, visibleFilters, dateStates, inputValues, setInputValues, handleInputChange, handleInputChangeForSelectField, handleDateSelect, prevValue, setPrevValue, showAllFilters, setShowAllFilters, handleSearch, setTempStartDateState, setTempEndDateState, setTempOrgUnitState, tempStartDateState, tempEndDateState, tempOrgUnitState, dataQueryFiltersState, setDataQueryFiltersState, SetOrgUnitModalVisible, }) => (React__default.createElement(DataTableToolbar, { className: "table-top-toolbar" },
|
|
3306
3306
|
React__default.createElement("div", { style: {
|
|
3307
3307
|
display: 'flex',
|
|
3308
|
-
|
|
3308
|
+
flexDirection: 'column', // Ensures rows
|
|
3309
3309
|
gap: '10px',
|
|
3310
3310
|
flexWrap: 'wrap',
|
|
3311
3311
|
} },
|
|
3312
|
-
React__default.createElement(
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3312
|
+
React__default.createElement("div", { style: {
|
|
3313
|
+
display: 'flex',
|
|
3314
|
+
alignItems: 'center',
|
|
3315
|
+
gap: '10px',
|
|
3316
|
+
flexWrap: 'wrap',
|
|
3317
|
+
} },
|
|
3318
|
+
React__default.createElement(InputField$1, { key: "location", label: orgUnitLabel ? orgUnitLabel : 'registering unit:', value: selectedOrgUnit, onFocus: () => {
|
|
3319
|
+
SetOrgUnitModalVisible(true);
|
|
3320
|
+
setHide(false);
|
|
3321
|
+
}, className: "custom-input", clearable: true, onChange: (event) => {
|
|
3322
|
+
setSelectedOrgUnit(event.value);
|
|
3323
|
+
setOrgUnitState(defaultOrgUnit);
|
|
3324
|
+
} }),
|
|
3325
|
+
React__default.createElement(CalendarInput, { label: "Start date:", calendar: "gregory", locale: "en-GB", timeZone: "Africa/Dar_es_Salaam", className: "custom-input",
|
|
3326
|
+
//clearable={!!tempStartDateState}
|
|
3327
|
+
//date={tempStartDateState || undefined}
|
|
3328
|
+
//date={tempStartDateState || "yyyy-mm-dd"}
|
|
3329
|
+
clearable: !!tempStartDateState && tempStartDateState !== 'yyyy-mm-dd', date: tempStartDateState || 'yyyy-mm-dd', onDateSelect: (selectedDate) => {
|
|
3330
|
+
setTempStartDateState(selectedDate.calendarDateString);
|
|
3331
|
+
console.log('selectedDate', selectedDate);
|
|
3332
|
+
if (selectedDate.calendarDateString === null) {
|
|
3333
|
+
setStartDateState(selectedDate.calendarDateString);
|
|
3334
|
+
}
|
|
3335
|
+
} }),
|
|
3336
|
+
React__default.createElement(CalendarInput, { label: "End date:", calendar: "gregory", locale: "en-GB", timeZone: "Africa/Dar_es_Salaam", className: "custom-input", clearable: !!tempEndDateState && tempEndDateState !== 'yyyy-mm-dd', date: tempEndDateState || 'yyyy-mm-dd', onDateSelect: (selectedDate) => {
|
|
3337
|
+
setTempEndDateState(selectedDate.calendarDateString);
|
|
3338
|
+
if (selectedDate.calendarDateString === null) {
|
|
3339
|
+
setEndDateState(selectedDate.calendarDateString);
|
|
3340
|
+
}
|
|
3341
|
+
} }),
|
|
3342
|
+
React__default.createElement(Button$1, { onClick: handleSearch }, "Search"),
|
|
3343
|
+
React__default.createElement(Button$1, { onClick: () => setShowAllFilters(!showAllFilters) }, showAllFilters ? 'Less Filters' : 'More Filters')),
|
|
3344
|
+
visibleFilters?.length > 0 && (React__default.createElement("div", { style: {
|
|
3345
|
+
display: 'flex',
|
|
3346
|
+
alignItems: 'center',
|
|
3347
|
+
gap: '10px',
|
|
3348
|
+
flexWrap: 'wrap',
|
|
3349
|
+
} }, (visibleFilters ?? []).map(({ label, key, valueType, options }) => {
|
|
3327
3350
|
if (valueType === 'DATE') {
|
|
3328
3351
|
return (React__default.createElement(CalendarInput, { key: key, label: `${label}:`, calendar: "gregory", locale: "en-GB", timeZone: "Africa/Dar_es_Salaam", className: "custom-input", clearable: !!dateStates[key], date: dateStates[key], onDateSelect: (selectedDate) => {
|
|
3329
3352
|
handleDateSelect(key, selectedDate);
|
|
3353
|
+
const filteredFilters = dataQueryFiltersState.filter((f) => f.attribute !== key);
|
|
3354
|
+
if (selectedDate === null) {
|
|
3355
|
+
setDataQueryFiltersState(filteredFilters);
|
|
3356
|
+
}
|
|
3330
3357
|
} }));
|
|
3331
3358
|
}
|
|
3332
3359
|
if (options && options.options.length > 0) {
|
|
@@ -3336,6 +3363,10 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3336
3363
|
[key]: selected ?? '',
|
|
3337
3364
|
}));
|
|
3338
3365
|
handleInputChangeForSelectField(key, selected ?? '');
|
|
3366
|
+
const filteredFilters = dataQueryFiltersState.filter((f) => f.attribute !== key);
|
|
3367
|
+
if (selected === '') {
|
|
3368
|
+
setDataQueryFiltersState(filteredFilters);
|
|
3369
|
+
}
|
|
3339
3370
|
} }, (options.options ?? []).map((opt) => (React__default.createElement(SingleSelectOption, { key: opt.id, label: opt.name, value: opt.code })))));
|
|
3340
3371
|
}
|
|
3341
3372
|
return (React__default.createElement(InputField$1, { key: key, label: `${label}:`, className: "custom-input", value: inputValues[key] || '', clearable: true, onChange: (e) => {
|
|
@@ -3344,8 +3375,9 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3344
3375
|
...prevValues,
|
|
3345
3376
|
[key]: currentValue,
|
|
3346
3377
|
}));
|
|
3378
|
+
const filteredFilters = dataQueryFiltersState.filter((f) => f.attribute !== key);
|
|
3347
3379
|
if (currentValue === '') {
|
|
3348
|
-
|
|
3380
|
+
setDataQueryFiltersState(filteredFilters);
|
|
3349
3381
|
}
|
|
3350
3382
|
}, onBlur: (e) => {
|
|
3351
3383
|
const currentValue = 'target' in e ? e.target.value : e.value ?? '';
|
|
@@ -3354,8 +3386,164 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3354
3386
|
setPrevValue(currentValue);
|
|
3355
3387
|
}
|
|
3356
3388
|
} }));
|
|
3357
|
-
})
|
|
3358
|
-
|
|
3389
|
+
})))))
|
|
3390
|
+
// <DataTableToolbar className="table-top-toolbar">
|
|
3391
|
+
// <div
|
|
3392
|
+
// style={{
|
|
3393
|
+
// display: 'flex',
|
|
3394
|
+
// alignItems: 'center',
|
|
3395
|
+
// gap: '10px',
|
|
3396
|
+
// flexWrap: 'wrap',
|
|
3397
|
+
// }}
|
|
3398
|
+
// >
|
|
3399
|
+
// <InputField
|
|
3400
|
+
// key="location"
|
|
3401
|
+
// label={orgUnitLabel ? orgUnitLabel : 'registering unit:'}
|
|
3402
|
+
// value={selectedOrgUnit}
|
|
3403
|
+
// onFocus={() => setHide(false)}
|
|
3404
|
+
// className="custom-input"
|
|
3405
|
+
// clearable
|
|
3406
|
+
// onChange={(event: { value: string }) => {
|
|
3407
|
+
// setSelectedOrgUnit(event.value);
|
|
3408
|
+
// setOrgUnitState(defaultOrgUnit);
|
|
3409
|
+
// }}
|
|
3410
|
+
// />
|
|
3411
|
+
// <CalendarInput
|
|
3412
|
+
// label="Start date:"
|
|
3413
|
+
// calendar="gregory"
|
|
3414
|
+
// locale="en-GB"
|
|
3415
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3416
|
+
// className="custom-input"
|
|
3417
|
+
// clearable={!!tempStartDateState}
|
|
3418
|
+
// date={tempStartDateState}
|
|
3419
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3420
|
+
// // if (!(selectedDate.calendarDateString === null)) {
|
|
3421
|
+
// setTempStartDateState(selectedDate.calendarDateString);
|
|
3422
|
+
// //}
|
|
3423
|
+
// if (selectedDate.calendarDateString === null) {
|
|
3424
|
+
// setStartDateState(selectedDate.calendarDateString);
|
|
3425
|
+
// }
|
|
3426
|
+
// }}
|
|
3427
|
+
// />
|
|
3428
|
+
// <CalendarInput
|
|
3429
|
+
// label="End date:"
|
|
3430
|
+
// calendar="gregory"
|
|
3431
|
+
// locale="en-GB"
|
|
3432
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3433
|
+
// className="custom-input"
|
|
3434
|
+
// clearable={!!tempEndDateState}
|
|
3435
|
+
// date={tempEndDateState}
|
|
3436
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3437
|
+
// // if (!(selectedDate.calendarDateString === null)) {
|
|
3438
|
+
// setTempEndDateState(selectedDate.calendarDateString);
|
|
3439
|
+
// //}
|
|
3440
|
+
// if (selectedDate.calendarDateString === null) {
|
|
3441
|
+
// setEndDateState(selectedDate.calendarDateString);
|
|
3442
|
+
// }
|
|
3443
|
+
// }}
|
|
3444
|
+
// />
|
|
3445
|
+
// <Button onClick={() => handleSearch()}>Search</Button>
|
|
3446
|
+
// <Button onClick={() => setShowAllFilters(!showAllFilters)}>
|
|
3447
|
+
// {showAllFilters ? 'Less Filters' : 'More Filters'}
|
|
3448
|
+
// </Button>
|
|
3449
|
+
// {(visibleFilters ?? []).map(({ label, key, valueType, options }: any) => {
|
|
3450
|
+
// if (valueType === 'DATE') {
|
|
3451
|
+
// return (
|
|
3452
|
+
// <CalendarInput
|
|
3453
|
+
// key={key}
|
|
3454
|
+
// label={`${label}:`}
|
|
3455
|
+
// calendar="gregory"
|
|
3456
|
+
// locale="en-GB"
|
|
3457
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3458
|
+
// className="custom-input"
|
|
3459
|
+
// clearable={!!dateStates[key]}
|
|
3460
|
+
// date={dateStates[key]}
|
|
3461
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3462
|
+
// handleDateSelect(key, selectedDate);
|
|
3463
|
+
// const filteredFilters = dataQueryFiltersState.filter(
|
|
3464
|
+
// (f: { attribute: any }) => f.attribute !== key
|
|
3465
|
+
// );
|
|
3466
|
+
// if (selectedDate === null) {
|
|
3467
|
+
// setDataQueryFiltersState(filteredFilters);
|
|
3468
|
+
// }
|
|
3469
|
+
// }}
|
|
3470
|
+
// />
|
|
3471
|
+
// );
|
|
3472
|
+
// }
|
|
3473
|
+
// // const filteredFilters = prevFilters.filter((f) => f.attribute !== key);
|
|
3474
|
+
// if (options && options.options.length > 0) {
|
|
3475
|
+
// return (
|
|
3476
|
+
// <SingleSelectField
|
|
3477
|
+
// key={key}
|
|
3478
|
+
// label={`${label}:`}
|
|
3479
|
+
// selected={inputValues[key] || ''}
|
|
3480
|
+
// className="custom-select-input"
|
|
3481
|
+
// clearable
|
|
3482
|
+
// onChange={({ selected }: { selected: string }) => {
|
|
3483
|
+
// setInputValues((prevValues: any) => ({
|
|
3484
|
+
// ...prevValues,
|
|
3485
|
+
// [key]: selected ?? '',
|
|
3486
|
+
// }));
|
|
3487
|
+
// handleInputChangeForSelectField(key, selected ?? '');
|
|
3488
|
+
// const filteredFilters = dataQueryFiltersState.filter(
|
|
3489
|
+
// (f: { attribute: any }) => f.attribute !== key
|
|
3490
|
+
// );
|
|
3491
|
+
// if (selected === '') {
|
|
3492
|
+
// setDataQueryFiltersState(filteredFilters);
|
|
3493
|
+
// }
|
|
3494
|
+
// }}
|
|
3495
|
+
// >
|
|
3496
|
+
// {(options.options ?? []).map((opt: any) => (
|
|
3497
|
+
// <SingleSelectOption
|
|
3498
|
+
// key={opt.id}
|
|
3499
|
+
// label={opt.name}
|
|
3500
|
+
// value={opt.code}
|
|
3501
|
+
// />
|
|
3502
|
+
// ))}
|
|
3503
|
+
// </SingleSelectField>
|
|
3504
|
+
// );
|
|
3505
|
+
// }
|
|
3506
|
+
// return (
|
|
3507
|
+
// <InputField
|
|
3508
|
+
// key={key}
|
|
3509
|
+
// label={`${label}:`}
|
|
3510
|
+
// className="custom-input"
|
|
3511
|
+
// value={inputValues[key] || ''}
|
|
3512
|
+
// clearable
|
|
3513
|
+
// onChange={(e: any) => {
|
|
3514
|
+
// const currentValue =
|
|
3515
|
+
// 'target' in e ? e.target.value : e.value ?? '';
|
|
3516
|
+
// setInputValues((prevValues: any) => ({
|
|
3517
|
+
// ...prevValues,
|
|
3518
|
+
// [key]: currentValue,
|
|
3519
|
+
// }));
|
|
3520
|
+
// // if (currentValue === '') {
|
|
3521
|
+
// // handleInputChange(key, '');
|
|
3522
|
+
// // }
|
|
3523
|
+
// const filteredFilters = dataQueryFiltersState.filter(
|
|
3524
|
+
// (f: { attribute: any }) => f.attribute !== key
|
|
3525
|
+
// );
|
|
3526
|
+
// if (currentValue === '') {
|
|
3527
|
+
// setDataQueryFiltersState(filteredFilters);
|
|
3528
|
+
// }
|
|
3529
|
+
// }}
|
|
3530
|
+
// onBlur={(e: any) => {
|
|
3531
|
+
// const currentValue =
|
|
3532
|
+
// 'target' in e ? e.target.value : e.value ?? '';
|
|
3533
|
+
// if (currentValue !== '' && currentValue !== prevValue) {
|
|
3534
|
+
// handleInputChange(key, currentValue);
|
|
3535
|
+
// setPrevValue(currentValue);
|
|
3536
|
+
// }
|
|
3537
|
+
// }}
|
|
3538
|
+
// />
|
|
3539
|
+
// );
|
|
3540
|
+
// })}
|
|
3541
|
+
// <div>
|
|
3542
|
+
// {/* <p>hello</p> */}
|
|
3543
|
+
// </div>
|
|
3544
|
+
// </div>
|
|
3545
|
+
// </DataTableToolbar>
|
|
3546
|
+
);
|
|
3359
3547
|
|
|
3360
3548
|
// export const TableHeader = ({
|
|
3361
3549
|
// columns,
|
|
@@ -3386,7 +3574,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3386
3574
|
// </TableHead>
|
|
3387
3575
|
// );
|
|
3388
3576
|
// };
|
|
3389
|
-
const TableHeader = ({ columns, allSelected, onSelectAll, selectable, }) => {
|
|
3577
|
+
const TableHeader = ({ columns, allSelected, onSelectAll, selectable, showActionButtons }) => {
|
|
3390
3578
|
const handleCheckboxChange = () => {
|
|
3391
3579
|
onSelectAll(!allSelected);
|
|
3392
3580
|
};
|
|
@@ -3394,7 +3582,9 @@ const TableHeader = ({ columns, allSelected, onSelectAll, selectable, }) => {
|
|
|
3394
3582
|
React__default.createElement(DataTableRow, null,
|
|
3395
3583
|
selectable && (React__default.createElement(DataTableColumnHeader, { width: "48px" },
|
|
3396
3584
|
React__default.createElement(Checkbox, { checked: allSelected, onChange: handleCheckboxChange }))),
|
|
3397
|
-
columns
|
|
3585
|
+
columns
|
|
3586
|
+
.filter((col) => showActionButtons || col.key !== 'actions')
|
|
3587
|
+
.map((col) => (React__default.createElement(DataTableColumnHeader, { key: col.key }, col.label))))));
|
|
3398
3588
|
};
|
|
3399
3589
|
|
|
3400
3590
|
const dropdownStyles$1 = {
|
|
@@ -3610,7 +3800,7 @@ const TableCell = ({ cell, getTextColorFromBackGround, }) => {
|
|
|
3610
3800
|
// </DataTableRow>
|
|
3611
3801
|
// );
|
|
3612
3802
|
// };
|
|
3613
|
-
const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, isChecked, onToggle, selectable, }) => {
|
|
3803
|
+
const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, isChecked, onToggle, selectable, showActionButtons }) => {
|
|
3614
3804
|
const handleCheckBoxChange = () => {
|
|
3615
3805
|
onToggle(row);
|
|
3616
3806
|
};
|
|
@@ -3619,7 +3809,7 @@ const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, act
|
|
|
3619
3809
|
React__default.createElement(Checkbox, { onChange: handleCheckBoxChange, checked: isChecked }))),
|
|
3620
3810
|
columns.map((col) => {
|
|
3621
3811
|
if (col.key === 'actions') {
|
|
3622
|
-
return (React__default.createElement(DataTableCell, { key: col.key }, actionOptions && (React__default.createElement(DataTableActions, { actionOptions: actionOptions, data: row, actionOptionOrientation: actionOptionOrientation, onClick: (option) => {
|
|
3812
|
+
return (React__default.createElement(DataTableCell, { key: col.key }, actionOptions && showActionButtons && (React__default.createElement(DataTableActions, { actionOptions: actionOptions, data: row, actionOptionOrientation: actionOptionOrientation, onClick: (option) => {
|
|
3623
3813
|
const data = row['responseData']?.['value'];
|
|
3624
3814
|
if (option.onClick)
|
|
3625
3815
|
option.onClick(data);
|
|
@@ -3671,7 +3861,7 @@ const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, act
|
|
|
3671
3861
|
// )}
|
|
3672
3862
|
// </DHISTableBody>
|
|
3673
3863
|
// );
|
|
3674
|
-
const TableBody = ({ data, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectedRows, onRowToggle, selectable, }) => (React__default.createElement(TableBody$1, null, data.length > 0 ? (data.map((row) => (React__default.createElement(TableRow, { key: row.index.value, row: row, columns: columns, getTextColorFromBackGround: getTextColorFromBackGround, actionOptions: actionOptions, actionOptionOrientation: actionOptionOrientation, actionSelected: actionSelected, isChecked: selectedRows.some((r) => r.index?.value === row.index?.value), onToggle: onRowToggle, selectable: selectable })))) : (React__default.createElement(DataTableRow, null,
|
|
3864
|
+
const TableBody = ({ data, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectedRows, onRowToggle, selectable, showActionButtons }) => (React__default.createElement(TableBody$1, null, data.length > 0 ? (data.map((row) => (React__default.createElement(TableRow, { key: row.index.value, row: row, columns: columns, getTextColorFromBackGround: getTextColorFromBackGround, actionOptions: actionOptions, actionOptionOrientation: actionOptionOrientation, actionSelected: actionSelected, isChecked: selectedRows.some((r) => r.index?.value === row.index?.value), onToggle: onRowToggle, selectable: selectable, showActionButtons: showActionButtons })))) : (React__default.createElement(DataTableRow, null,
|
|
3675
3865
|
React__default.createElement(DataTableCell, { colSpan: columns.length.toString(), style: {
|
|
3676
3866
|
textAlign: 'center',
|
|
3677
3867
|
fontWeight: 'bold',
|
|
@@ -3728,7 +3918,7 @@ const TableFooter = ({ pager, setPager, columns }) => {
|
|
|
3728
3918
|
// </DataTable>
|
|
3729
3919
|
// );
|
|
3730
3920
|
// };
|
|
3731
|
-
const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectable, rowsSelected, }) => {
|
|
3921
|
+
const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectable, rowsSelected, showActionButtons }) => {
|
|
3732
3922
|
const [selectedRows, setSelectedRows] = useState([]);
|
|
3733
3923
|
const handleRowToggle = (row) => {
|
|
3734
3924
|
const exists = selectedRows.find((r) => r.index?.value === row.index?.value);
|
|
@@ -3744,8 +3934,8 @@ const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGro
|
|
|
3744
3934
|
rowsSelected.emit(updatedRows);
|
|
3745
3935
|
};
|
|
3746
3936
|
return (React__default.createElement(DataTable, null,
|
|
3747
|
-
React__default.createElement(TableHeader, { columns: columns, allSelected: selectedRows.length === data.length && data.length > 0, onSelectAll: handleSelectAll, selectable: selectable }),
|
|
3748
|
-
React__default.createElement(TableBody, { data: data, columns: columns, getTextColorFromBackGround: getTextColorFromBackGround, actionOptions: actionOptions, actionOptionOrientation: actionOptionOrientation, actionSelected: actionSelected, selectedRows: selectedRows, onRowToggle: handleRowToggle, selectable: selectable }),
|
|
3937
|
+
React__default.createElement(TableHeader, { columns: columns, allSelected: selectedRows.length === data.length && data.length > 0, onSelectAll: handleSelectAll, selectable: selectable, showActionButtons: showActionButtons }),
|
|
3938
|
+
React__default.createElement(TableBody, { data: data, columns: columns, getTextColorFromBackGround: getTextColorFromBackGround, actionOptions: actionOptions, actionOptionOrientation: actionOptionOrientation, actionSelected: actionSelected, selectedRows: selectedRows, onRowToggle: handleRowToggle, selectable: selectable, showActionButtons: showActionButtons }),
|
|
3749
3939
|
React__default.createElement(TableFooter, { columns: columns, pager: pager, setPager: setPager })));
|
|
3750
3940
|
};
|
|
3751
3941
|
|
|
@@ -3850,9 +4040,30 @@ const getTrackedEntityTableData = (response, programId, pager, metaData) => {
|
|
|
3850
4040
|
}
|
|
3851
4041
|
return attr;
|
|
3852
4042
|
});
|
|
4043
|
+
// attributesData.forEach((attr: any) => {
|
|
4044
|
+
// const attributeMeta = metaData.programTrackedEntityAttributes?.find(
|
|
4045
|
+
// (metadata) => metadata.trackedEntityAttribute.id === attr.attribute
|
|
4046
|
+
// );
|
|
4047
|
+
// if (attributeMeta?.trackedEntityAttribute.optionSetValue) {
|
|
4048
|
+
// const optionSet = attributeMeta?.trackedEntityAttribute?.optionSet;
|
|
4049
|
+
// const option = optionSet?.options?.find(
|
|
4050
|
+
// (option) => option.code === attr.value
|
|
4051
|
+
// );
|
|
4052
|
+
// row[attr.attribute] = option
|
|
4053
|
+
// ? { value: option?.name }
|
|
4054
|
+
// : { value: attr.value };
|
|
4055
|
+
// } else {
|
|
4056
|
+
// row[attr.attribute] = { value: attr.value };
|
|
4057
|
+
// }
|
|
4058
|
+
// });
|
|
3853
4059
|
attributesData.forEach((attr) => {
|
|
3854
4060
|
const attributeMeta = metaData.programTrackedEntityAttributes?.find((metadata) => metadata.trackedEntityAttribute.id === attr.attribute);
|
|
3855
|
-
|
|
4061
|
+
const valueType = attributeMeta?.trackedEntityAttribute?.valueType;
|
|
4062
|
+
if (valueType === 'ORGANISATION_UNIT') {
|
|
4063
|
+
const orgUnitName = orgUnitMap?.get(attr.value);
|
|
4064
|
+
row[attr.attribute] = { value: orgUnitName || attr.value };
|
|
4065
|
+
}
|
|
4066
|
+
else if (attributeMeta?.trackedEntityAttribute.optionSetValue) {
|
|
3856
4067
|
const optionSet = attributeMeta?.trackedEntityAttribute?.optionSet;
|
|
3857
4068
|
const option = optionSet?.options?.find((option) => option.code === attr.value);
|
|
3858
4069
|
row[attr.attribute] = option
|
|
@@ -3970,6 +4181,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3970
4181
|
this.triggerRefetch = false;
|
|
3971
4182
|
this.actionSelected = new EventEmitter();
|
|
3972
4183
|
this.rowsSelected = new EventEmitter();
|
|
4184
|
+
this.showActionButtons = true;
|
|
3973
4185
|
this.reactStateUpdaters = null;
|
|
3974
4186
|
this.setReactStateUpdaters = (updaters) => {
|
|
3975
4187
|
this.reactStateUpdaters = updaters;
|
|
@@ -3987,11 +4199,15 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3987
4199
|
const [programIdState, setProgramIdState] = useState(this.programId);
|
|
3988
4200
|
const [isOptionSetNameVisibleState, setOptionSetNameVisible] = useState(this.isOptionSetNameVisible);
|
|
3989
4201
|
const [orgUnitState, setOrgUnitState] = useState(this.orgUnit);
|
|
4202
|
+
const [tempOrgUnitState, setTempOrgUnitState] = useState(this.orgUnit);
|
|
3990
4203
|
const [programStageIdState, setProgramStageIdState] = useState(this.programStageId);
|
|
3991
4204
|
const [attributeFiltersState, setAttributeFiltersState] = useState(this.attributeFilters);
|
|
3992
4205
|
const [dataQueryFiltersState, setDataQueryFiltersState] = useState(this.dataQueryFilters);
|
|
4206
|
+
const [tempDataQueryFiltersState, setTempDataQueryFiltersState] = useState(this.dataQueryFilters);
|
|
3993
4207
|
const [startDateState, setStartDateState] = useState(this.startDate);
|
|
4208
|
+
const [tempStartDateState, setTempStartDateState] = useState(this.startDate);
|
|
3994
4209
|
const [endDateState, setEndDateState] = useState(this.endDate);
|
|
4210
|
+
const [tempEndDateState, setTempEndDateState] = useState(this.endDate);
|
|
3995
4211
|
const [loading, setLoading] = useState(false);
|
|
3996
4212
|
const [metaDataLoadng, setMetaDataLoading] = useState(false);
|
|
3997
4213
|
const [filteredColumns, setFilteredColumns] = useState();
|
|
@@ -4002,15 +4218,20 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4002
4218
|
const [showAllFilters, setShowAllFilters] = useState(false);
|
|
4003
4219
|
const visibleFilters = showAllFilters
|
|
4004
4220
|
? filteredColumns ?? []
|
|
4005
|
-
: (filteredColumns ?? []).slice(0,
|
|
4221
|
+
: (filteredColumns ?? []).slice(0, 0);
|
|
4222
|
+
// const visibleFilters = showAllFilters
|
|
4223
|
+
// ? filteredColumns ?? []
|
|
4224
|
+
// : filteredColumns ?? []).slice(0, 2);
|
|
4006
4225
|
const defaultOrgUnit = this.orgUnit;
|
|
4007
4226
|
const [prevValue, setPrevValue] = useState();
|
|
4008
4227
|
const [dateStates, setDateStates] = useState({});
|
|
4009
4228
|
const [metaData, setMetaData] = useState(null);
|
|
4010
4229
|
const [selectable, setSelectable] = useState(this.allowRowsSelection);
|
|
4011
4230
|
const [triggerRefetch, setTriggerRefetch] = useState(this.triggerRefetch);
|
|
4231
|
+
const [showActionButtons, setShowActionButtons] = useState(this.showActionButtons);
|
|
4232
|
+
const [orgUnitModalVisible, setOrgUnitModalVisible] = useState(false);
|
|
4012
4233
|
const d2 = window.d2Web;
|
|
4013
|
-
//
|
|
4234
|
+
// Stores updaters in refs for Angular to access
|
|
4014
4235
|
const updateRefs = useRef({
|
|
4015
4236
|
setProgramIdState,
|
|
4016
4237
|
setOrgUnitState,
|
|
@@ -4020,7 +4241,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4020
4241
|
setEndDateState,
|
|
4021
4242
|
setOptionSetNameVisible,
|
|
4022
4243
|
setSelectable,
|
|
4023
|
-
setTriggerRefetch
|
|
4244
|
+
setTriggerRefetch,
|
|
4024
4245
|
});
|
|
4025
4246
|
useEffect(() => {
|
|
4026
4247
|
this.setReactStateUpdaters?.(updateRefs.current);
|
|
@@ -4100,7 +4321,13 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4100
4321
|
? response.data
|
|
4101
4322
|
: [response.data];
|
|
4102
4323
|
const orgUnitIdsFromEnrollments = new Set(trackedEntityInstances.map((tei) => tei.latestEnrollment.orgUnit));
|
|
4103
|
-
const
|
|
4324
|
+
const orgUnitsFromAttributes = new Set(trackedEntityInstances.flatMap((tei) => tei.attributes
|
|
4325
|
+
?.filter((attr) => attr.valueType === 'ORGANISATION_UNIT')
|
|
4326
|
+
.map((attr) => attr.value) || []));
|
|
4327
|
+
const uniqueOrgUnitIds = [
|
|
4328
|
+
...orgUnitIdsFromEnrollments,
|
|
4329
|
+
...orgUnitsFromAttributes,
|
|
4330
|
+
];
|
|
4104
4331
|
this.lineListService.fetchOrgUnits(uniqueOrgUnitIds).subscribe({
|
|
4105
4332
|
next: (fetchedOrgUnits) => {
|
|
4106
4333
|
const trackedEntityResponse = {
|
|
@@ -4139,17 +4366,17 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4139
4366
|
pager.pageSize,
|
|
4140
4367
|
isOptionSetNameVisibleState,
|
|
4141
4368
|
dataQueryFiltersState,
|
|
4142
|
-
triggerRefetch
|
|
4369
|
+
triggerRefetch,
|
|
4143
4370
|
]);
|
|
4144
4371
|
const handleInputChange = (key, value) => {
|
|
4145
4372
|
setInputValues((prevValues) => ({
|
|
4146
4373
|
...prevValues,
|
|
4147
4374
|
[key]: value ?? '',
|
|
4148
4375
|
}));
|
|
4149
|
-
|
|
4150
|
-
//
|
|
4376
|
+
setTempDataQueryFiltersState((prevFilters) => {
|
|
4377
|
+
// Removes old filter for this key
|
|
4151
4378
|
const filteredFilters = prevFilters.filter((f) => f.attribute !== key);
|
|
4152
|
-
//
|
|
4379
|
+
// adds new filter only if value is not empty
|
|
4153
4380
|
const updatedFilters = value.trim()
|
|
4154
4381
|
? [
|
|
4155
4382
|
...filteredFilters,
|
|
@@ -4168,10 +4395,10 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4168
4395
|
...prevValues,
|
|
4169
4396
|
[key]: value ?? '',
|
|
4170
4397
|
}));
|
|
4171
|
-
|
|
4172
|
-
//
|
|
4398
|
+
setTempDataQueryFiltersState((prevFilters = []) => {
|
|
4399
|
+
// Removes existing filter for the same key (attribute)
|
|
4173
4400
|
const filteredFilters = prevFilters.filter((f) => f.attribute !== key);
|
|
4174
|
-
//
|
|
4401
|
+
// adds new filter only if value is not empty
|
|
4175
4402
|
const updatedFilters = value.trim()
|
|
4176
4403
|
? [
|
|
4177
4404
|
...filteredFilters,
|
|
@@ -4186,13 +4413,13 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4186
4413
|
};
|
|
4187
4414
|
const handleDateSelect = (key, selectedDate) => {
|
|
4188
4415
|
const selectedDateString = selectedDate?.calendarDateString ?? '';
|
|
4189
|
-
//
|
|
4416
|
+
// Updates dateStates
|
|
4190
4417
|
setDateStates((prevDateStates) => ({
|
|
4191
4418
|
...prevDateStates,
|
|
4192
4419
|
[key]: selectedDateString,
|
|
4193
4420
|
}));
|
|
4194
|
-
//
|
|
4195
|
-
|
|
4421
|
+
// Updates dataQueryFilters
|
|
4422
|
+
setTempDataQueryFiltersState((prevFilters) => {
|
|
4196
4423
|
const filteredFilters = (prevFilters || []).filter((f) => f.attribute !== key);
|
|
4197
4424
|
const updatedFilters = selectedDateString.trim()
|
|
4198
4425
|
? [
|
|
@@ -4206,16 +4433,20 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4206
4433
|
return updatedFilters;
|
|
4207
4434
|
});
|
|
4208
4435
|
};
|
|
4436
|
+
const handleSearch = () => (setDataQueryFiltersState(tempDataQueryFiltersState),
|
|
4437
|
+
setStartDateState(tempStartDateState),
|
|
4438
|
+
setEndDateState(tempEndDateState),
|
|
4439
|
+
setOrgUnitState(tempOrgUnitState));
|
|
4209
4440
|
function getTextColorFromBackGround(hex) {
|
|
4210
|
-
//
|
|
4441
|
+
// Removes the hash if present
|
|
4211
4442
|
hex = hex.replace('#', '');
|
|
4212
|
-
//
|
|
4443
|
+
// Converts to RGB
|
|
4213
4444
|
const r = parseInt(hex.substr(0, 2), 16);
|
|
4214
4445
|
const g = parseInt(hex.substr(2, 2), 16);
|
|
4215
4446
|
const b = parseInt(hex.substr(4, 2), 16);
|
|
4216
4447
|
// YIQ formula to calculate brightness
|
|
4217
4448
|
const yiq = (r * 299 + g * 587 + b * 114) / 1000;
|
|
4218
|
-
//
|
|
4449
|
+
// Returns black for light backgrounds, white for dark backgrounds
|
|
4219
4450
|
return yiq >= 128 ? colors$1.grey700 : '#FFFFFF';
|
|
4220
4451
|
}
|
|
4221
4452
|
return (React__default.createElement("div", null, loading ? (React__default.createElement("div", { style: {
|
|
@@ -4228,9 +4459,9 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4228
4459
|
React__default.createElement("div", { style: {
|
|
4229
4460
|
fontSize: 14,
|
|
4230
4461
|
} }, "Loading"))) : (React__default.createElement("div", null,
|
|
4231
|
-
React__default.createElement(OrgUnitSelector, { hide: hide, setHide: setHide, selectedOrgUnit: selectedOrgUnit, setSelectedOrgUnit: setSelectedOrgUnit, setOrgUnitState: setOrgUnitState }),
|
|
4232
|
-
this.showFilters && (React__default.createElement(FilterToolbar, { orgUnitLabel: orgUnitLabel, selectedOrgUnit: selectedOrgUnit, setSelectedOrgUnit: setSelectedOrgUnit, setOrgUnitState: setOrgUnitState, defaultOrgUnit: defaultOrgUnit, setHide: setHide, startDateState: startDateState, setStartDateState: setStartDateState, endDateState: endDateState, setEndDateState: setEndDateState, visibleFilters: visibleFilters, dateStates: dateStates, inputValues: inputValues, setInputValues: setInputValues, handleInputChange: handleInputChange, handleInputChangeForSelectField: handleInputChangeForSelectField, handleDateSelect: handleDateSelect, prevValue: prevValue, setPrevValue: setPrevValue, showAllFilters: showAllFilters, setShowAllFilters: setShowAllFilters })),
|
|
4233
|
-
React__default.createElement(LineListTable, { columns: columns, data: data, pager: pager, setPager: setPager, getTextColorFromBackGround: getTextColorFromBackGround, actionOptions: this.actionOptions, actionOptionOrientation: this.actionOptionOrientation, actionSelected: this.actionSelected, selectable: selectable, rowsSelected: this.rowsSelected })))));
|
|
4462
|
+
orgUnitModalVisible && (React__default.createElement(OrgUnitSelector, { hide: hide, setHide: setHide, selectedOrgUnit: selectedOrgUnit, setSelectedOrgUnit: setSelectedOrgUnit, setOrgUnitState: setOrgUnitState, setTempOrgUnitState: setTempOrgUnitState, tempOrgUnitState: tempOrgUnitState })),
|
|
4463
|
+
this.showFilters && (React__default.createElement(FilterToolbar, { orgUnitLabel: orgUnitLabel, selectedOrgUnit: selectedOrgUnit, setSelectedOrgUnit: setSelectedOrgUnit, setOrgUnitState: setOrgUnitState, defaultOrgUnit: defaultOrgUnit, setHide: setHide, startDateState: startDateState, setStartDateState: setStartDateState, endDateState: endDateState, setEndDateState: setEndDateState, visibleFilters: visibleFilters, dateStates: dateStates, inputValues: inputValues, setInputValues: setInputValues, handleInputChange: handleInputChange, handleInputChangeForSelectField: handleInputChangeForSelectField, handleDateSelect: handleDateSelect, prevValue: prevValue, setPrevValue: setPrevValue, showAllFilters: showAllFilters, setShowAllFilters: setShowAllFilters, handleSearch: handleSearch, setTempStartDateState: setTempStartDateState, setTempEndDateState: setTempEndDateState, setTempOrgUnitState: setTempOrgUnitState, tempStartDateState: tempStartDateState, tempEndDateState: tempEndDateState, tempOrgUnitState: tempOrgUnitState, dataQueryFiltersState: dataQueryFiltersState, setDataQueryFiltersState: setDataQueryFiltersState, SetOrgUnitModalVisible: setOrgUnitModalVisible })),
|
|
4464
|
+
React__default.createElement(LineListTable, { columns: columns, data: data, pager: pager, setPager: setPager, getTextColorFromBackGround: getTextColorFromBackGround, actionOptions: this.actionOptions, actionOptionOrientation: this.actionOptionOrientation, actionSelected: this.actionSelected, selectable: selectable, rowsSelected: this.rowsSelected, showActionButtons: showActionButtons })))));
|
|
4234
4465
|
};
|
|
4235
4466
|
}
|
|
4236
4467
|
ngOnChanges(changes) {
|
|
@@ -4275,7 +4506,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4275
4506
|
this.render();
|
|
4276
4507
|
}
|
|
4277
4508
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LineListTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: LineListTableComponent, isStandalone: false, selector: "ng-dhis2-ui-line-list", inputs: { programId: "programId", orgUnit: "orgUnit", programStageId: "programStageId", actionOptions: "actionOptions", actionOptionOrientation: "actionOptionOrientation", attributeFilters: "attributeFilters", useOuModeWithOlderDHIS2Instance: "useOuModeWithOlderDHIS2Instance", startDate: "startDate", endDate: "endDate", dataQueryFilters: "dataQueryFilters", ouMode: "ouMode", isButtonLoading: "isButtonLoading", buttonFilter: "buttonFilter", filterRootOrgUnit: "filterRootOrgUnit", showFilters: "showFilters", isOptionSetNameVisible: "isOptionSetNameVisible", allowRowsSelection: "allowRowsSelection", enrollmentStatus: "enrollmentStatus", triggerRefetch: "triggerRefetch", eventStatus: "eventStatus" }, outputs: { actionSelected: "actionSelected", rowsSelected: "rowsSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";::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"] }); }
|
|
4509
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: LineListTableComponent, isStandalone: false, selector: "ng-dhis2-ui-line-list", inputs: { programId: "programId", orgUnit: "orgUnit", programStageId: "programStageId", actionOptions: "actionOptions", actionOptionOrientation: "actionOptionOrientation", attributeFilters: "attributeFilters", useOuModeWithOlderDHIS2Instance: "useOuModeWithOlderDHIS2Instance", startDate: "startDate", endDate: "endDate", dataQueryFilters: "dataQueryFilters", ouMode: "ouMode", isButtonLoading: "isButtonLoading", buttonFilter: "buttonFilter", filterRootOrgUnit: "filterRootOrgUnit", showFilters: "showFilters", isOptionSetNameVisible: "isOptionSetNameVisible", allowRowsSelection: "allowRowsSelection", enrollmentStatus: "enrollmentStatus", triggerRefetch: "triggerRefetch", eventStatus: "eventStatus", showActionButtons: "showActionButtons" }, outputs: { actionSelected: "actionSelected", rowsSelected: "rowsSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";::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"] }); }
|
|
4279
4510
|
}
|
|
4280
4511
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LineListTableComponent, decorators: [{
|
|
4281
4512
|
type: Component,
|
|
@@ -4324,6 +4555,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
4324
4555
|
type: Output
|
|
4325
4556
|
}], rowsSelected: [{
|
|
4326
4557
|
type: Output
|
|
4558
|
+
}], showActionButtons: [{
|
|
4559
|
+
type: Input
|
|
4327
4560
|
}] } });
|
|
4328
4561
|
|
|
4329
4562
|
class LineListModule {
|