initFormsTab function exported

Last updated: 2026-03-04T23:21:38.431Z

Metrics

LOC: 28 Complexity: 2 Params: 0

Signature

initFormsTab(): : void

Source Code

export function initFormsTab(): void {
  void loadSavedForms();

  document
    .getElementById("btn-create-template")
    ?.addEventListener("click", () => {
      openCreatePanel();
    });

  document.getElementById("btn-export-forms")?.addEventListener("click", () => {
    void exportForms();
  });

  const fileInput = document.getElementById(
    "import-forms-file",
  ) as HTMLInputElement | null;

  document.getElementById("btn-import-forms")?.addEventListener("click", () => {
    fileInput?.click();
  });

  fileInput?.addEventListener("change", () => {
    const file = fileInput.files?.[0];
    if (!file) return;
    void importForms(file);
    fileInput.value = "";
  });
}

Dependencies (Outgoing)

graph LR initFormsTab["initFormsTab"] loadSavedForms["loadSavedForms"] openCreatePanel["openCreatePanel"] exportForms["exportForms"] importForms["importForms"] initFormsTab -->|calls| loadSavedForms initFormsTab -->|calls| openCreatePanel initFormsTab -->|calls| exportForms initFormsTab -->|calls| importForms style initFormsTab fill:#dbeafe,stroke:#2563eb,stroke-width:2px click initFormsTab "016a6b967c8f6192.html" click loadSavedForms "cf1ee6d5c3ab3b9b.html" click openCreatePanel "16ceabf613d86e61.html" click exportForms "8ec1be65bac66e52.html" click importForms "8f033b80a44a7e60.html"
TargetType
loadSavedForms calls
openCreatePanel calls
exportForms calls
importForms calls
click dynamic_call
change dynamic_call

Impact (Incoming)

graph LR initFormsTab["initFormsTab"] main["main"] main -->|calls| initFormsTab style initFormsTab fill:#dbeafe,stroke:#2563eb,stroke-width:2px click initFormsTab "016a6b967c8f6192.html" click main "14348c66c1e5604a.html"
SourceType
main calls