9 directories, 58 files

tinai

Home / tinai
/**
 * Class DocumentIndex
 * Manages the index list for a document. The list opens with a section header
 * naming the document type, styled like the archive headers. Document entries
 * and their navigation are not implemented yet.
 */
class DocumentIndex {
	#storage;
	#app_callbacks;

	/**
	 * Initializes the DocumentIndex manager instance.
	 * @param {Storage|null} [storage=null] - Storage manager instance.
	 * @param {object|null} [app_callbacks=null] - Application callback methods.
	 */
	constructor(storage = null, app_callbacks = null) {
		this.#storage = storage;
		this.#app_callbacks = app_callbacks;
	}

	/**
	 * Renders the document index list into the index column.
	 * @param {HTMLElement|null} div_main - The index list container element.
	 * @param {string} [type_label=''] - Display label of the document type.
	 */
	render(div_main, type_label = '') {
		if (!div_main) return;
		div_main.innerHTML = '<div class="div-index-archive-header"><span>' + (type_label || '').toUpperCase() + '</span></div>';
	}
}

export default DocumentIndex;
🌐
document-index.js ×
Type: Web, text/plain
1.04 Kilobytes
Last Modified 2026-11-04 09:48:28
⬇ Download File