@iapps/ng-dhis2-ui 1.2.61 → 1.2.64
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 +279 -41
- package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -1
- package/lib/modules/form/utils/field-type.util.d.ts +1 -1
- package/lib/modules/form/utils/field.util.d.ts +1 -1
- package/lib/modules/line-list/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 +3 -1
- package/package.json +1 -1
|
@@ -3290,43 +3290,67 @@ 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, }) => (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: () => setHide(false), className: "custom-input", clearable: true, onChange: (event) => {
|
|
3319
|
+
setSelectedOrgUnit(event.value);
|
|
3320
|
+
setOrgUnitState(defaultOrgUnit);
|
|
3321
|
+
} }),
|
|
3322
|
+
React__default.createElement(CalendarInput, { label: "Start date:", calendar: "gregory", locale: "en-GB", timeZone: "Africa/Dar_es_Salaam", className: "custom-input",
|
|
3323
|
+
//clearable={!!tempStartDateState}
|
|
3324
|
+
//date={tempStartDateState || undefined}
|
|
3325
|
+
//date={tempStartDateState || "yyyy-mm-dd"}
|
|
3326
|
+
clearable: !!tempStartDateState && tempStartDateState !== "yyyy-mm-dd", date: tempStartDateState || "yyyy-mm-dd", onDateSelect: (selectedDate) => {
|
|
3327
|
+
setTempStartDateState(selectedDate.calendarDateString);
|
|
3328
|
+
console.log('selectedDate', selectedDate);
|
|
3329
|
+
if (selectedDate.calendarDateString === null) {
|
|
3330
|
+
setStartDateState(selectedDate.calendarDateString);
|
|
3331
|
+
}
|
|
3332
|
+
} }),
|
|
3333
|
+
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) => {
|
|
3334
|
+
setTempEndDateState(selectedDate.calendarDateString);
|
|
3335
|
+
if (selectedDate.calendarDateString === null) {
|
|
3336
|
+
setEndDateState(selectedDate.calendarDateString);
|
|
3337
|
+
}
|
|
3338
|
+
} }),
|
|
3339
|
+
React__default.createElement(Button$1, { onClick: handleSearch }, "Search"),
|
|
3340
|
+
React__default.createElement(Button$1, { onClick: () => setShowAllFilters(!showAllFilters) }, showAllFilters ? 'Less Filters' : 'More Filters')),
|
|
3341
|
+
visibleFilters?.length > 0 && (React__default.createElement("div", { style: {
|
|
3342
|
+
display: 'flex',
|
|
3343
|
+
alignItems: 'center',
|
|
3344
|
+
gap: '10px',
|
|
3345
|
+
flexWrap: 'wrap',
|
|
3346
|
+
} }, (visibleFilters ?? []).map(({ label, key, valueType, options }) => {
|
|
3327
3347
|
if (valueType === 'DATE') {
|
|
3328
3348
|
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
3349
|
handleDateSelect(key, selectedDate);
|
|
3350
|
+
const filteredFilters = dataQueryFiltersState.filter((f) => f.attribute !== key);
|
|
3351
|
+
if (selectedDate === null) {
|
|
3352
|
+
setDataQueryFiltersState(filteredFilters);
|
|
3353
|
+
}
|
|
3330
3354
|
} }));
|
|
3331
3355
|
}
|
|
3332
3356
|
if (options && options.options.length > 0) {
|
|
@@ -3336,6 +3360,10 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3336
3360
|
[key]: selected ?? '',
|
|
3337
3361
|
}));
|
|
3338
3362
|
handleInputChangeForSelectField(key, selected ?? '');
|
|
3363
|
+
const filteredFilters = dataQueryFiltersState.filter((f) => f.attribute !== key);
|
|
3364
|
+
if (selected === '') {
|
|
3365
|
+
setDataQueryFiltersState(filteredFilters);
|
|
3366
|
+
}
|
|
3339
3367
|
} }, (options.options ?? []).map((opt) => (React__default.createElement(SingleSelectOption, { key: opt.id, label: opt.name, value: opt.code })))));
|
|
3340
3368
|
}
|
|
3341
3369
|
return (React__default.createElement(InputField$1, { key: key, label: `${label}:`, className: "custom-input", value: inputValues[key] || '', clearable: true, onChange: (e) => {
|
|
@@ -3344,8 +3372,9 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3344
3372
|
...prevValues,
|
|
3345
3373
|
[key]: currentValue,
|
|
3346
3374
|
}));
|
|
3375
|
+
const filteredFilters = dataQueryFiltersState.filter((f) => f.attribute !== key);
|
|
3347
3376
|
if (currentValue === '') {
|
|
3348
|
-
|
|
3377
|
+
setDataQueryFiltersState(filteredFilters);
|
|
3349
3378
|
}
|
|
3350
3379
|
}, onBlur: (e) => {
|
|
3351
3380
|
const currentValue = 'target' in e ? e.target.value : e.value ?? '';
|
|
@@ -3354,8 +3383,164 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3354
3383
|
setPrevValue(currentValue);
|
|
3355
3384
|
}
|
|
3356
3385
|
} }));
|
|
3357
|
-
})
|
|
3358
|
-
|
|
3386
|
+
})))))
|
|
3387
|
+
// <DataTableToolbar className="table-top-toolbar">
|
|
3388
|
+
// <div
|
|
3389
|
+
// style={{
|
|
3390
|
+
// display: 'flex',
|
|
3391
|
+
// alignItems: 'center',
|
|
3392
|
+
// gap: '10px',
|
|
3393
|
+
// flexWrap: 'wrap',
|
|
3394
|
+
// }}
|
|
3395
|
+
// >
|
|
3396
|
+
// <InputField
|
|
3397
|
+
// key="location"
|
|
3398
|
+
// label={orgUnitLabel ? orgUnitLabel : 'registering unit:'}
|
|
3399
|
+
// value={selectedOrgUnit}
|
|
3400
|
+
// onFocus={() => setHide(false)}
|
|
3401
|
+
// className="custom-input"
|
|
3402
|
+
// clearable
|
|
3403
|
+
// onChange={(event: { value: string }) => {
|
|
3404
|
+
// setSelectedOrgUnit(event.value);
|
|
3405
|
+
// setOrgUnitState(defaultOrgUnit);
|
|
3406
|
+
// }}
|
|
3407
|
+
// />
|
|
3408
|
+
// <CalendarInput
|
|
3409
|
+
// label="Start date:"
|
|
3410
|
+
// calendar="gregory"
|
|
3411
|
+
// locale="en-GB"
|
|
3412
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3413
|
+
// className="custom-input"
|
|
3414
|
+
// clearable={!!tempStartDateState}
|
|
3415
|
+
// date={tempStartDateState}
|
|
3416
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3417
|
+
// // if (!(selectedDate.calendarDateString === null)) {
|
|
3418
|
+
// setTempStartDateState(selectedDate.calendarDateString);
|
|
3419
|
+
// //}
|
|
3420
|
+
// if (selectedDate.calendarDateString === null) {
|
|
3421
|
+
// setStartDateState(selectedDate.calendarDateString);
|
|
3422
|
+
// }
|
|
3423
|
+
// }}
|
|
3424
|
+
// />
|
|
3425
|
+
// <CalendarInput
|
|
3426
|
+
// label="End date:"
|
|
3427
|
+
// calendar="gregory"
|
|
3428
|
+
// locale="en-GB"
|
|
3429
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3430
|
+
// className="custom-input"
|
|
3431
|
+
// clearable={!!tempEndDateState}
|
|
3432
|
+
// date={tempEndDateState}
|
|
3433
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3434
|
+
// // if (!(selectedDate.calendarDateString === null)) {
|
|
3435
|
+
// setTempEndDateState(selectedDate.calendarDateString);
|
|
3436
|
+
// //}
|
|
3437
|
+
// if (selectedDate.calendarDateString === null) {
|
|
3438
|
+
// setEndDateState(selectedDate.calendarDateString);
|
|
3439
|
+
// }
|
|
3440
|
+
// }}
|
|
3441
|
+
// />
|
|
3442
|
+
// <Button onClick={() => handleSearch()}>Search</Button>
|
|
3443
|
+
// <Button onClick={() => setShowAllFilters(!showAllFilters)}>
|
|
3444
|
+
// {showAllFilters ? 'Less Filters' : 'More Filters'}
|
|
3445
|
+
// </Button>
|
|
3446
|
+
// {(visibleFilters ?? []).map(({ label, key, valueType, options }: any) => {
|
|
3447
|
+
// if (valueType === 'DATE') {
|
|
3448
|
+
// return (
|
|
3449
|
+
// <CalendarInput
|
|
3450
|
+
// key={key}
|
|
3451
|
+
// label={`${label}:`}
|
|
3452
|
+
// calendar="gregory"
|
|
3453
|
+
// locale="en-GB"
|
|
3454
|
+
// timeZone="Africa/Dar_es_Salaam"
|
|
3455
|
+
// className="custom-input"
|
|
3456
|
+
// clearable={!!dateStates[key]}
|
|
3457
|
+
// date={dateStates[key]}
|
|
3458
|
+
// onDateSelect={(selectedDate: any) => {
|
|
3459
|
+
// handleDateSelect(key, selectedDate);
|
|
3460
|
+
// const filteredFilters = dataQueryFiltersState.filter(
|
|
3461
|
+
// (f: { attribute: any }) => f.attribute !== key
|
|
3462
|
+
// );
|
|
3463
|
+
// if (selectedDate === null) {
|
|
3464
|
+
// setDataQueryFiltersState(filteredFilters);
|
|
3465
|
+
// }
|
|
3466
|
+
// }}
|
|
3467
|
+
// />
|
|
3468
|
+
// );
|
|
3469
|
+
// }
|
|
3470
|
+
// // const filteredFilters = prevFilters.filter((f) => f.attribute !== key);
|
|
3471
|
+
// if (options && options.options.length > 0) {
|
|
3472
|
+
// return (
|
|
3473
|
+
// <SingleSelectField
|
|
3474
|
+
// key={key}
|
|
3475
|
+
// label={`${label}:`}
|
|
3476
|
+
// selected={inputValues[key] || ''}
|
|
3477
|
+
// className="custom-select-input"
|
|
3478
|
+
// clearable
|
|
3479
|
+
// onChange={({ selected }: { selected: string }) => {
|
|
3480
|
+
// setInputValues((prevValues: any) => ({
|
|
3481
|
+
// ...prevValues,
|
|
3482
|
+
// [key]: selected ?? '',
|
|
3483
|
+
// }));
|
|
3484
|
+
// handleInputChangeForSelectField(key, selected ?? '');
|
|
3485
|
+
// const filteredFilters = dataQueryFiltersState.filter(
|
|
3486
|
+
// (f: { attribute: any }) => f.attribute !== key
|
|
3487
|
+
// );
|
|
3488
|
+
// if (selected === '') {
|
|
3489
|
+
// setDataQueryFiltersState(filteredFilters);
|
|
3490
|
+
// }
|
|
3491
|
+
// }}
|
|
3492
|
+
// >
|
|
3493
|
+
// {(options.options ?? []).map((opt: any) => (
|
|
3494
|
+
// <SingleSelectOption
|
|
3495
|
+
// key={opt.id}
|
|
3496
|
+
// label={opt.name}
|
|
3497
|
+
// value={opt.code}
|
|
3498
|
+
// />
|
|
3499
|
+
// ))}
|
|
3500
|
+
// </SingleSelectField>
|
|
3501
|
+
// );
|
|
3502
|
+
// }
|
|
3503
|
+
// return (
|
|
3504
|
+
// <InputField
|
|
3505
|
+
// key={key}
|
|
3506
|
+
// label={`${label}:`}
|
|
3507
|
+
// className="custom-input"
|
|
3508
|
+
// value={inputValues[key] || ''}
|
|
3509
|
+
// clearable
|
|
3510
|
+
// onChange={(e: any) => {
|
|
3511
|
+
// const currentValue =
|
|
3512
|
+
// 'target' in e ? e.target.value : e.value ?? '';
|
|
3513
|
+
// setInputValues((prevValues: any) => ({
|
|
3514
|
+
// ...prevValues,
|
|
3515
|
+
// [key]: currentValue,
|
|
3516
|
+
// }));
|
|
3517
|
+
// // if (currentValue === '') {
|
|
3518
|
+
// // handleInputChange(key, '');
|
|
3519
|
+
// // }
|
|
3520
|
+
// const filteredFilters = dataQueryFiltersState.filter(
|
|
3521
|
+
// (f: { attribute: any }) => f.attribute !== key
|
|
3522
|
+
// );
|
|
3523
|
+
// if (currentValue === '') {
|
|
3524
|
+
// setDataQueryFiltersState(filteredFilters);
|
|
3525
|
+
// }
|
|
3526
|
+
// }}
|
|
3527
|
+
// onBlur={(e: any) => {
|
|
3528
|
+
// const currentValue =
|
|
3529
|
+
// 'target' in e ? e.target.value : e.value ?? '';
|
|
3530
|
+
// if (currentValue !== '' && currentValue !== prevValue) {
|
|
3531
|
+
// handleInputChange(key, currentValue);
|
|
3532
|
+
// setPrevValue(currentValue);
|
|
3533
|
+
// }
|
|
3534
|
+
// }}
|
|
3535
|
+
// />
|
|
3536
|
+
// );
|
|
3537
|
+
// })}
|
|
3538
|
+
// <div>
|
|
3539
|
+
// {/* <p>hello</p> */}
|
|
3540
|
+
// </div>
|
|
3541
|
+
// </div>
|
|
3542
|
+
// </DataTableToolbar>
|
|
3543
|
+
);
|
|
3359
3544
|
|
|
3360
3545
|
// export const TableHeader = ({
|
|
3361
3546
|
// columns,
|
|
@@ -3386,7 +3571,7 @@ const FilterToolbar = ({ orgUnitLabel, selectedOrgUnit, setSelectedOrgUnit, setO
|
|
|
3386
3571
|
// </TableHead>
|
|
3387
3572
|
// );
|
|
3388
3573
|
// };
|
|
3389
|
-
const TableHeader = ({ columns, allSelected, onSelectAll, selectable, }) => {
|
|
3574
|
+
const TableHeader = ({ columns, allSelected, onSelectAll, selectable, showActionButtons }) => {
|
|
3390
3575
|
const handleCheckboxChange = () => {
|
|
3391
3576
|
onSelectAll(!allSelected);
|
|
3392
3577
|
};
|
|
@@ -3394,7 +3579,9 @@ const TableHeader = ({ columns, allSelected, onSelectAll, selectable, }) => {
|
|
|
3394
3579
|
React__default.createElement(DataTableRow, null,
|
|
3395
3580
|
selectable && (React__default.createElement(DataTableColumnHeader, { width: "48px" },
|
|
3396
3581
|
React__default.createElement(Checkbox, { checked: allSelected, onChange: handleCheckboxChange }))),
|
|
3397
|
-
columns
|
|
3582
|
+
columns
|
|
3583
|
+
.filter((col) => showActionButtons || col.key !== 'actions')
|
|
3584
|
+
.map((col) => (React__default.createElement(DataTableColumnHeader, { key: col.key }, col.label))))));
|
|
3398
3585
|
};
|
|
3399
3586
|
|
|
3400
3587
|
const dropdownStyles$1 = {
|
|
@@ -3610,7 +3797,7 @@ const TableCell = ({ cell, getTextColorFromBackGround, }) => {
|
|
|
3610
3797
|
// </DataTableRow>
|
|
3611
3798
|
// );
|
|
3612
3799
|
// };
|
|
3613
|
-
const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, isChecked, onToggle, selectable, }) => {
|
|
3800
|
+
const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, isChecked, onToggle, selectable, showActionButtons }) => {
|
|
3614
3801
|
const handleCheckBoxChange = () => {
|
|
3615
3802
|
onToggle(row);
|
|
3616
3803
|
};
|
|
@@ -3619,7 +3806,7 @@ const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, act
|
|
|
3619
3806
|
React__default.createElement(Checkbox, { onChange: handleCheckBoxChange, checked: isChecked }))),
|
|
3620
3807
|
columns.map((col) => {
|
|
3621
3808
|
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) => {
|
|
3809
|
+
return (React__default.createElement(DataTableCell, { key: col.key }, actionOptions && showActionButtons && (React__default.createElement(DataTableActions, { actionOptions: actionOptions, data: row, actionOptionOrientation: actionOptionOrientation, onClick: (option) => {
|
|
3623
3810
|
const data = row['responseData']?.['value'];
|
|
3624
3811
|
if (option.onClick)
|
|
3625
3812
|
option.onClick(data);
|
|
@@ -3671,7 +3858,7 @@ const TableRow = ({ row, columns, getTextColorFromBackGround, actionOptions, act
|
|
|
3671
3858
|
// )}
|
|
3672
3859
|
// </DHISTableBody>
|
|
3673
3860
|
// );
|
|
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,
|
|
3861
|
+
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
3862
|
React__default.createElement(DataTableCell, { colSpan: columns.length.toString(), style: {
|
|
3676
3863
|
textAlign: 'center',
|
|
3677
3864
|
fontWeight: 'bold',
|
|
@@ -3728,7 +3915,7 @@ const TableFooter = ({ pager, setPager, columns }) => {
|
|
|
3728
3915
|
// </DataTable>
|
|
3729
3916
|
// );
|
|
3730
3917
|
// };
|
|
3731
|
-
const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectable, rowsSelected, }) => {
|
|
3918
|
+
const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGround, actionOptions, actionOptionOrientation, actionSelected, selectable, rowsSelected, showActionButtons }) => {
|
|
3732
3919
|
const [selectedRows, setSelectedRows] = useState([]);
|
|
3733
3920
|
const handleRowToggle = (row) => {
|
|
3734
3921
|
const exists = selectedRows.find((r) => r.index?.value === row.index?.value);
|
|
@@ -3744,8 +3931,8 @@ const LineListTable = ({ columns, data, pager, setPager, getTextColorFromBackGro
|
|
|
3744
3931
|
rowsSelected.emit(updatedRows);
|
|
3745
3932
|
};
|
|
3746
3933
|
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 }),
|
|
3934
|
+
React__default.createElement(TableHeader, { columns: columns, allSelected: selectedRows.length === data.length && data.length > 0, onSelectAll: handleSelectAll, selectable: selectable, showActionButtons: showActionButtons }),
|
|
3935
|
+
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
3936
|
React__default.createElement(TableFooter, { columns: columns, pager: pager, setPager: setPager })));
|
|
3750
3937
|
};
|
|
3751
3938
|
|
|
@@ -3784,7 +3971,6 @@ const getTrackedEntityTableData = (response, programId, pager, metaData) => {
|
|
|
3784
3971
|
const orgUnitLabel = metaData.orgUnitLabel;
|
|
3785
3972
|
const orgUnitMap = response.data
|
|
3786
3973
|
.orgUnitsMap;
|
|
3787
|
-
console.log('thhis is the metadata', metaData);
|
|
3788
3974
|
const attributeColumns = metaData.displayInListTrackedEntityAttributes
|
|
3789
3975
|
.sort((a, b) => a.sortOrder - b.sortOrder)
|
|
3790
3976
|
.map((trackedEntityAttribute) => ({
|
|
@@ -3851,9 +4037,30 @@ const getTrackedEntityTableData = (response, programId, pager, metaData) => {
|
|
|
3851
4037
|
}
|
|
3852
4038
|
return attr;
|
|
3853
4039
|
});
|
|
4040
|
+
// attributesData.forEach((attr: any) => {
|
|
4041
|
+
// const attributeMeta = metaData.programTrackedEntityAttributes?.find(
|
|
4042
|
+
// (metadata) => metadata.trackedEntityAttribute.id === attr.attribute
|
|
4043
|
+
// );
|
|
4044
|
+
// if (attributeMeta?.trackedEntityAttribute.optionSetValue) {
|
|
4045
|
+
// const optionSet = attributeMeta?.trackedEntityAttribute?.optionSet;
|
|
4046
|
+
// const option = optionSet?.options?.find(
|
|
4047
|
+
// (option) => option.code === attr.value
|
|
4048
|
+
// );
|
|
4049
|
+
// row[attr.attribute] = option
|
|
4050
|
+
// ? { value: option?.name }
|
|
4051
|
+
// : { value: attr.value };
|
|
4052
|
+
// } else {
|
|
4053
|
+
// row[attr.attribute] = { value: attr.value };
|
|
4054
|
+
// }
|
|
4055
|
+
// });
|
|
3854
4056
|
attributesData.forEach((attr) => {
|
|
3855
4057
|
const attributeMeta = metaData.programTrackedEntityAttributes?.find((metadata) => metadata.trackedEntityAttribute.id === attr.attribute);
|
|
3856
|
-
|
|
4058
|
+
const valueType = attributeMeta?.trackedEntityAttribute?.valueType;
|
|
4059
|
+
if (valueType === 'ORGANISATION_UNIT') {
|
|
4060
|
+
const orgUnitName = orgUnitMap?.get(attr.value);
|
|
4061
|
+
row[attr.attribute] = { value: orgUnitName || attr.value };
|
|
4062
|
+
}
|
|
4063
|
+
else if (attributeMeta?.trackedEntityAttribute.optionSetValue) {
|
|
3857
4064
|
const optionSet = attributeMeta?.trackedEntityAttribute?.optionSet;
|
|
3858
4065
|
const option = optionSet?.options?.find((option) => option.code === attr.value);
|
|
3859
4066
|
row[attr.attribute] = option
|
|
@@ -3968,8 +4175,10 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3968
4175
|
this.showFilters = false;
|
|
3969
4176
|
this.isOptionSetNameVisible = false;
|
|
3970
4177
|
this.allowRowsSelection = false;
|
|
4178
|
+
this.triggerRefetch = false;
|
|
3971
4179
|
this.actionSelected = new EventEmitter();
|
|
3972
4180
|
this.rowsSelected = new EventEmitter();
|
|
4181
|
+
this.showActionButtons = true;
|
|
3973
4182
|
this.reactStateUpdaters = null;
|
|
3974
4183
|
this.setReactStateUpdaters = (updaters) => {
|
|
3975
4184
|
this.reactStateUpdaters = updaters;
|
|
@@ -3987,11 +4196,15 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
3987
4196
|
const [programIdState, setProgramIdState] = useState(this.programId);
|
|
3988
4197
|
const [isOptionSetNameVisibleState, setOptionSetNameVisible] = useState(this.isOptionSetNameVisible);
|
|
3989
4198
|
const [orgUnitState, setOrgUnitState] = useState(this.orgUnit);
|
|
4199
|
+
const [tempOrgUnitState, setTempOrgUnitState] = useState(this.orgUnit);
|
|
3990
4200
|
const [programStageIdState, setProgramStageIdState] = useState(this.programStageId);
|
|
3991
4201
|
const [attributeFiltersState, setAttributeFiltersState] = useState(this.attributeFilters);
|
|
3992
4202
|
const [dataQueryFiltersState, setDataQueryFiltersState] = useState(this.dataQueryFilters);
|
|
4203
|
+
const [tempDataQueryFiltersState, setTempDataQueryFiltersState] = useState(this.dataQueryFilters);
|
|
3993
4204
|
const [startDateState, setStartDateState] = useState(this.startDate);
|
|
4205
|
+
const [tempStartDateState, setTempStartDateState] = useState(this.startDate);
|
|
3994
4206
|
const [endDateState, setEndDateState] = useState(this.endDate);
|
|
4207
|
+
const [tempEndDateState, setTempEndDateState] = useState(this.endDate);
|
|
3995
4208
|
const [loading, setLoading] = useState(false);
|
|
3996
4209
|
const [metaDataLoadng, setMetaDataLoading] = useState(false);
|
|
3997
4210
|
const [filteredColumns, setFilteredColumns] = useState();
|
|
@@ -4002,12 +4215,17 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4002
4215
|
const [showAllFilters, setShowAllFilters] = useState(false);
|
|
4003
4216
|
const visibleFilters = showAllFilters
|
|
4004
4217
|
? filteredColumns ?? []
|
|
4005
|
-
: (filteredColumns ?? []).slice(0,
|
|
4218
|
+
: (filteredColumns ?? []).slice(0, 0);
|
|
4219
|
+
// const visibleFilters = showAllFilters
|
|
4220
|
+
// ? filteredColumns ?? []
|
|
4221
|
+
// : filteredColumns ?? []).slice(0, 2);
|
|
4006
4222
|
const defaultOrgUnit = this.orgUnit;
|
|
4007
4223
|
const [prevValue, setPrevValue] = useState();
|
|
4008
4224
|
const [dateStates, setDateStates] = useState({});
|
|
4009
4225
|
const [metaData, setMetaData] = useState(null);
|
|
4010
4226
|
const [selectable, setSelectable] = useState(this.allowRowsSelection);
|
|
4227
|
+
const [triggerRefetch, setTriggerRefetch] = useState(this.triggerRefetch);
|
|
4228
|
+
const [showActionButtons, setShowActionButtons] = useState(this.showActionButtons);
|
|
4011
4229
|
const d2 = window.d2Web;
|
|
4012
4230
|
// Store updaters in refs for Angular to access
|
|
4013
4231
|
const updateRefs = useRef({
|
|
@@ -4019,6 +4237,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4019
4237
|
setEndDateState,
|
|
4020
4238
|
setOptionSetNameVisible,
|
|
4021
4239
|
setSelectable,
|
|
4240
|
+
setTriggerRefetch,
|
|
4022
4241
|
});
|
|
4023
4242
|
useEffect(() => {
|
|
4024
4243
|
this.setReactStateUpdaters?.(updateRefs.current);
|
|
@@ -4098,7 +4317,11 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4098
4317
|
? response.data
|
|
4099
4318
|
: [response.data];
|
|
4100
4319
|
const orgUnitIdsFromEnrollments = new Set(trackedEntityInstances.map((tei) => tei.latestEnrollment.orgUnit));
|
|
4101
|
-
const
|
|
4320
|
+
const orgUnitsFromAttributes = new Set(trackedEntityInstances
|
|
4321
|
+
.flatMap((tei) => tei.attributes
|
|
4322
|
+
?.filter((attr) => attr.valueType === 'ORGANISATION_UNIT')
|
|
4323
|
+
.map((attr) => attr.value) || []));
|
|
4324
|
+
const uniqueOrgUnitIds = [...orgUnitIdsFromEnrollments, ...orgUnitsFromAttributes];
|
|
4102
4325
|
this.lineListService.fetchOrgUnits(uniqueOrgUnitIds).subscribe({
|
|
4103
4326
|
next: (fetchedOrgUnits) => {
|
|
4104
4327
|
const trackedEntityResponse = {
|
|
@@ -4137,13 +4360,14 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4137
4360
|
pager.pageSize,
|
|
4138
4361
|
isOptionSetNameVisibleState,
|
|
4139
4362
|
dataQueryFiltersState,
|
|
4363
|
+
triggerRefetch,
|
|
4140
4364
|
]);
|
|
4141
4365
|
const handleInputChange = (key, value) => {
|
|
4142
4366
|
setInputValues((prevValues) => ({
|
|
4143
4367
|
...prevValues,
|
|
4144
4368
|
[key]: value ?? '',
|
|
4145
4369
|
}));
|
|
4146
|
-
|
|
4370
|
+
setTempDataQueryFiltersState((prevFilters) => {
|
|
4147
4371
|
// Remove old filter for this key
|
|
4148
4372
|
const filteredFilters = prevFilters.filter((f) => f.attribute !== key);
|
|
4149
4373
|
// Only add new filter if value is not empty
|
|
@@ -4165,7 +4389,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4165
4389
|
...prevValues,
|
|
4166
4390
|
[key]: value ?? '',
|
|
4167
4391
|
}));
|
|
4168
|
-
|
|
4392
|
+
setTempDataQueryFiltersState((prevFilters = []) => {
|
|
4169
4393
|
// Remove existing filter for the same key (attribute)
|
|
4170
4394
|
const filteredFilters = prevFilters.filter((f) => f.attribute !== key);
|
|
4171
4395
|
// Only add new filter if value is not empty
|
|
@@ -4189,7 +4413,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4189
4413
|
[key]: selectedDateString,
|
|
4190
4414
|
}));
|
|
4191
4415
|
// Update dataQueryFilters
|
|
4192
|
-
|
|
4416
|
+
setTempDataQueryFiltersState((prevFilters) => {
|
|
4193
4417
|
const filteredFilters = (prevFilters || []).filter((f) => f.attribute !== key);
|
|
4194
4418
|
const updatedFilters = selectedDateString.trim()
|
|
4195
4419
|
? [
|
|
@@ -4203,6 +4427,13 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4203
4427
|
return updatedFilters;
|
|
4204
4428
|
});
|
|
4205
4429
|
};
|
|
4430
|
+
const handleSearch = () => (setDataQueryFiltersState(tempDataQueryFiltersState),
|
|
4431
|
+
setStartDateState(tempStartDateState),
|
|
4432
|
+
setEndDateState(tempEndDateState),
|
|
4433
|
+
setOrgUnitState(tempOrgUnitState)
|
|
4434
|
+
// console.log(
|
|
4435
|
+
// 'Search button clicked',)
|
|
4436
|
+
);
|
|
4206
4437
|
function getTextColorFromBackGround(hex) {
|
|
4207
4438
|
// Remove the hash if present
|
|
4208
4439
|
hex = hex.replace('#', '');
|
|
@@ -4225,9 +4456,9 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4225
4456
|
React__default.createElement("div", { style: {
|
|
4226
4457
|
fontSize: 14,
|
|
4227
4458
|
} }, "Loading"))) : (React__default.createElement("div", null,
|
|
4228
|
-
React__default.createElement(OrgUnitSelector, { hide: hide, setHide: setHide, selectedOrgUnit: selectedOrgUnit, setSelectedOrgUnit: setSelectedOrgUnit, setOrgUnitState: setOrgUnitState }),
|
|
4229
|
-
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 })),
|
|
4230
|
-
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 })))));
|
|
4459
|
+
React__default.createElement(OrgUnitSelector, { hide: hide, setHide: setHide, selectedOrgUnit: selectedOrgUnit, setSelectedOrgUnit: setSelectedOrgUnit, setOrgUnitState: setOrgUnitState, setTempOrgUnitState: setTempOrgUnitState, tempOrgUnitState: tempOrgUnitState }),
|
|
4460
|
+
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 })),
|
|
4461
|
+
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 })))));
|
|
4231
4462
|
};
|
|
4232
4463
|
}
|
|
4233
4464
|
ngOnChanges(changes) {
|
|
@@ -4259,6 +4490,9 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4259
4490
|
if (changes['allowRowsSelection']) {
|
|
4260
4491
|
this.reactStateUpdaters.setIsButtonLoading(this.allowRowsSelection);
|
|
4261
4492
|
}
|
|
4493
|
+
if (changes['triggerRefetch']) {
|
|
4494
|
+
this.reactStateUpdaters.setTriggerRefetch(this.triggerRefetch);
|
|
4495
|
+
}
|
|
4262
4496
|
}
|
|
4263
4497
|
}
|
|
4264
4498
|
async ngAfterViewInit() {
|
|
@@ -4269,7 +4503,7 @@ class LineListTableComponent extends ReactWrapperModule {
|
|
|
4269
4503
|
this.render();
|
|
4270
4504
|
}
|
|
4271
4505
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LineListTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4272
|
-
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", 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"] }); }
|
|
4506
|
+
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"] }); }
|
|
4273
4507
|
}
|
|
4274
4508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LineListTableComponent, decorators: [{
|
|
4275
4509
|
type: Component,
|
|
@@ -4310,12 +4544,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
4310
4544
|
type: Input
|
|
4311
4545
|
}], enrollmentStatus: [{
|
|
4312
4546
|
type: Input
|
|
4547
|
+
}], triggerRefetch: [{
|
|
4548
|
+
type: Input
|
|
4313
4549
|
}], eventStatus: [{
|
|
4314
4550
|
type: Input
|
|
4315
4551
|
}], actionSelected: [{
|
|
4316
4552
|
type: Output
|
|
4317
4553
|
}], rowsSelected: [{
|
|
4318
4554
|
type: Output
|
|
4555
|
+
}], showActionButtons: [{
|
|
4556
|
+
type: Input
|
|
4319
4557
|
}] } });
|
|
4320
4558
|
|
|
4321
4559
|
class LineListModule {
|