- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks - Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists - Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services - Add Microsoft OIDC SSO, API token management, and user lifecycle features - Add swagger-ui vendor integration and OpenAPI spec - Add production Docker setup and bin/ scripts - Update composer dependencies, config, templates, and frontend assets throughout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
764 B
JavaScript
28 lines
764 B
JavaScript
const warned = new Set();
|
|
|
|
export const warnOnce = (code, message, details = {}) => {
|
|
const key = `${code}:${message}`;
|
|
if (warned.has(key)) {return;}
|
|
warned.add(key);
|
|
console.warn(`[${code}] ${message}`, details);
|
|
};
|
|
|
|
export const requireEl = (selector, details = {}) => {
|
|
const el = document.querySelector(selector);
|
|
if (!el) {
|
|
warnOnce('UI_EL_MISSING', `Missing element: ${selector}`, details);
|
|
return null;
|
|
}
|
|
return el;
|
|
};
|
|
|
|
export const requireAll = (selector, details = {}) => {
|
|
const list = Array.from(document.querySelectorAll(selector));
|
|
if (!list.length) {
|
|
warnOnce('UI_EL_MISSING', `Missing elements: ${selector}`, details);
|
|
}
|
|
return list;
|
|
};
|
|
|
|
export const optionalEl = (selector) => document.querySelector(selector);
|