Files
rspade_system/app/RSpade/Components/JS_Tree_Debug_Component.jqhtml
root 84ca3dfe42 Fix code quality violations and rename select input components
Move small tasks from wishlist to todo, update npm packages
Replace #[Auth] attributes with manual auth checks and code quality rule
Remove on_jqhtml_ready lifecycle method from framework
Complete ACL system with 100-based role indexing and /dev/acl tester
WIP: ACL system implementation with debug instrumentation
Convert rsx:check JS linting to RPC socket server
Clean up docs and fix $id→$sid in man pages, remove SSR/FPC feature
Reorganize wishlists: priority order, mark sublayouts complete, add email
Update model_fetch docs: mark MVP complete, fix enum docs, reorganize
Comprehensive documentation overhaul: clarity, compression, and critical rules
Convert Contacts/Projects CRUD to Model.fetch() and add fetch_or_null()
Add JS ORM relationship lazy-loading and fetch array handling
Add JS ORM relationship fetching and CRUD documentation
Fix ORM hydration and add IDE resolution for Base_* model stubs
Rename Json_Tree_Component to JS_Tree_Debug_Component and move to framework
Enhance JS ORM infrastructure and add Json_Tree class name badges

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:39:43 +00:00

30 lines
1.6 KiB
Plaintext
Executable File

<%--
JS_Tree_Debug_Component
A universal "var_dump" style component for debugging JavaScript values.
Renders any JavaScript value as an expandable/collapsible tree, similar to browser DevTools.
Useful for debugging, displaying error metadata, and inspecting ORM model instances.
$data - The JavaScript value to display. Pass directly (unquoted) for objects/arrays:
$data=this.data.myObject (correct - passes object reference)
$data="<%= this.data.myObject %>" (wrong - stringifies the object)
$expand_depth - How many levels deep to expand by default (default: 1)
$root_label - Optional label for the root element
$show_class_names - If true, display class names for object instances in a small
bordered badge (default: false). Shown after { when expanded,
after } when collapsed. Only for named class instances, not
generic Object or Array.
--%>
<Define:JS_Tree_Debug_Component tag="div" class="js-tree-debug">
<% if (JS_Tree_Debug_Node.get_type(this.args.data) !== 'object' && JS_Tree_Debug_Node.get_type(this.args.data) !== 'array') { %>
<span class="js-tree-debug-value js-tree-debug-<%= JS_Tree_Debug_Node.get_type(this.args.data) %>"><%= JS_Tree_Debug_Node.format_value(this.args.data, JS_Tree_Debug_Node.get_type(this.args.data)) %></span>
<% } else { %>
<JS_Tree_Debug_Node
$data=this.args.data
$expand_depth=(this.args.expand_depth ?? 1)
$label=(this.args.root_label || null)
$show_class_names=(this.args.show_class_names ?? false)
/>
<% } %>
</Define:JS_Tree_Debug_Component>