Clean up dead toolbox code and harden routing and static serving
This commit is contained in:
parent
184314d913
commit
cce3f3c7f8
9 changed files with 25 additions and 98 deletions
|
|
@ -1,3 +0,0 @@
|
|||
// Rôle : conserve les exports publics historiques des sous-composants task planner.
|
||||
export { TaskPlannerBranch } from "./TaskPlannerBranch.jsx";
|
||||
export { TaskPlannerItem } from "./TaskPlannerItem.jsx";
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
// Rôle : conserve les exports publics historiques des sous-composants timer.
|
||||
export { CountdownControls, CountdownList } from "./TimerCountdown.jsx";
|
||||
export { EditableTimerLabel, TimerAlertModeSwitch, TimerValue, TimePartsInput } from "./TimerSharedControls.jsx";
|
||||
export { StopwatchControls, StopwatchLapList } from "./TimerStopwatch.jsx";
|
||||
|
|
@ -191,11 +191,6 @@ export function getEventDurationMs(event) {
|
|||
return Number.isFinite(startMinutes) && Number.isFinite(endMinutes) && endMinutes > startMinutes ? (endMinutes - startMinutes) * MINUTE_MS : 0;
|
||||
}
|
||||
|
||||
export function getEventEndMs(event, startMs) {
|
||||
const durationMs = getEventDurationMs(event);
|
||||
return durationMs > 0 ? startMs + durationMs : startMs;
|
||||
}
|
||||
|
||||
export function getCalendarAlertOffsets(event) {
|
||||
const rawOffsets = Array.isArray(event?.alertOffsetMinutes) ? event.alertOffsetMinutes : [event?.alertOffsetMinutes];
|
||||
const offsets = [...new Set(rawOffsets.map(Number).filter((offset) => CALENDAR_ALERT_OFFSETS.includes(offset)))];
|
||||
|
|
|
|||
|
|
@ -1,20 +1,11 @@
|
|||
// Rôle : normalise et compacte les cellules et libellés de l'outil table.
|
||||
import { columnIndexToName } from "../../modules/tableFormulaEngine.js";
|
||||
|
||||
function clampTableSize(value, fallback, max) {
|
||||
const parsed = Number.parseInt(value, 10);
|
||||
return Number.isInteger(parsed) ? Math.min(max, Math.max(1, parsed)) : fallback;
|
||||
}
|
||||
|
||||
function columnIndexToName(index) {
|
||||
let value = Math.max(0, Number(index) || 0) + 1;
|
||||
let name = "";
|
||||
while (value > 0) {
|
||||
const remainder = (value - 1) % 26;
|
||||
name = String.fromCharCode(65 + remainder) + name;
|
||||
value = Math.floor((value - 1) / 26);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
function tableCellAddress(rowIndex, columnIndex) {
|
||||
return `${columnIndexToName(columnIndex)}${rowIndex + 1}`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue