parseColumns (src/sidebar-columns.ts)

platform · packages/gantt/src/sidebar-columns.ts · typescript · EPL-2.0
ui, tag:embed-classified

Pure helper functions for parsing and validating Gantt sidebar column configurations.

// Source: https://github.com/hcengineering/platform | License: EPL-2.0 | Modified files must remain under EPL-2.0
// Modifications to this file must remain under EPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
//
// Copyright © 2026 Hardcore Engineering Inc.
// SPDX-License-Identifier: EPL-2.0
//

/**
 * Sidebar inline-grid columns.
 *
 * Pure helpers for the configurable Gantt sidebar column system. All inputs
 * are runtime-unknown (ViewOption storage) so the parsing path is defensive:
 * unknown shapes degrade gracefully to {@link DEFAULT_COLUMNS}. Width values
 * are clamped between {@link MIN_WIDTH} and {@link MAX_WIDTH} on every entry
 * The resize handle in the header writes through `clampWidth`, so even a
 * misbehaving pointer (or a tampered preference) 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key