big restructure

This commit is contained in:
2026-02-11 19:28:12 +01:00
parent cd59ccd99b
commit 3eb9cc0ac4
209 changed files with 5101 additions and 2459 deletions

View File

@@ -1,3 +1,5 @@
import { warnOnce } from '../core/app-dom.js';
export function bindBulkVisibility({
containerSelector,
buttonSelector,
@@ -5,7 +7,15 @@ export function bindBulkVisibility({
} = {}) {
const container = document.querySelector(containerSelector);
const buttons = Array.from(document.querySelectorAll(buttonSelector));
if (!container || !buttons.length) return { update: () => {} };
if (!container || !buttons.length) {
if (!container) {
warnOnce('UI_EL_MISSING', `Missing bulk container: ${containerSelector}`, { module: 'bulk-selection' });
}
if (!buttons.length) {
warnOnce('UI_EL_MISSING', `Missing bulk buttons: ${buttonSelector}`, { module: 'bulk-selection' });
}
return { update: () => {} };
}
const update = () => {
const selected = container.querySelectorAll(selectedRowSelector).length > 0;