semantic markup update

This commit is contained in:
2026-01-18 21:29:54 +03:00
parent 11c59fb420
commit 76baeb1038
85 changed files with 7020 additions and 5953 deletions

View File

@@ -61,6 +61,8 @@
// [DEF:handleSort:Function]
// @PURPOSE: Toggles sort direction or changes sort column.
// @PRE: column name is provided.
// @POST: sortColumn and sortDirection state updated.
function handleSort(column: keyof DashboardMetadata) {
if (sortColumn === column) {
sortDirection = sortDirection === "asc" ? "desc" : "asc";
@@ -73,6 +75,8 @@
// [DEF:handleSelectionChange:Function]
// @PURPOSE: Handles individual checkbox changes.
// @PRE: dashboard ID and checked status provided.
// @POST: selectedIds array updated and selectionChanged event dispatched.
function handleSelectionChange(id: number, checked: boolean) {
let newSelected = [...selectedIds];
if (checked) {
@@ -87,6 +91,8 @@
// [DEF:handleSelectAll:Function]
// @PURPOSE: Handles select all checkbox.
// @PRE: checked status provided.
// @POST: selectedIds array updated for all paginated items and event dispatched.
function handleSelectAll(checked: boolean) {
let newSelected = [...selectedIds];
if (checked) {
@@ -105,6 +111,8 @@
// [DEF:goToPage:Function]
// @PURPOSE: Changes current page.
// @PRE: page index is provided.
// @POST: currentPage state updated if within valid range.
function goToPage(page: number) {
if (page >= 0 && page < totalPages) {
currentPage = page;