Skip to main content

Documentation: Data Format for the Advanced Tree Selector

This document defines the JSON object structure for a single “node” as expected by the SelectAdvancedDialog.vue component and generated by the Laravel AdminController’s tree-related methods (postGetOptionTree, postGetOptionCompoundTree).

Anatomy of a Single Node

Each item in the tree, whether it’s a root element or a child, is an object with a standardized set of properties.

Property Breakdown

Properties are grouped by their purpose: Core Data, Hierarchy, and UI Control. Properties starting with an underscore _ are considered metadata to control UI behavior.

Core Properties

These properties contain the essential data for the node.

Hierarchy Properties

These properties define the tree structure and enable lazy loading.

UI State & Behavior Properties

These properties are generated by the backend to directly control how the node is rendered and behaves in the user interface.

Frontend-Managed Properties

The Vue component will add these properties to the object in memory for its internal state management. They are not sent by the backend.

Dokumentasi (Bahasa Indonesia)

Format Data untuk Pemilih Pohon (Tree Selector) Lanjutan

Dokumen ini mendefinisikan struktur objek JSON untuk sebuah “node” tunggal yang digunakan oleh komponen SelectAdvancedDialog.vue dan dihasilkan oleh metode-metode terkait pohon data di AdminController Laravel (postGetOptionTree, postGetOptionCompoundTree).

Anatomi Sebuah Node Tunggal

Setiap item di dalam pohon, baik elemen akar maupun turunan, adalah sebuah objek dengan properti yang terstandarisasi.

Rincian Properti

Properti dikelompokkan berdasarkan tujuannya: Data Inti, Hirarki, dan Kontrol UI. Properti yang diawali dengan garis bawah _ dianggap sebagai metadata untuk mengontrol perilaku UI.

Properti Inti (Core Properties)

Properti ini berisi data esensial untuk sebuah node.

Properti Hirarki (Hierarchy Properties)

Properti ini mendefinisikan struktur pohon dan memungkinkan lazy loading.

Properti Status & Perilaku UI (UI State & Behavior Properties)

Properti ini dihasilkan oleh backend untuk mengontrol secara langsung bagaimana node ditampilkan dan berperilaku di antarmuka pengguna.

Properti yang Dikelola Frontend (Frontend-Managed Properties)

Komponen Vue akan menambahkan properti-properti ini ke dalam objek di memori untuk manajemen status internalnya. Properti ini tidak dikirim oleh backend.