Fix code quality violations and enhance ROUTE-EXISTS-01 rule

Implement JQHTML function cache ID system and fix bundle compilation
Implement underscore prefix for system tables
Fix JS syntax linter to support decorators and grant exception to Task system
SPA: Update planning docs and wishlists with remaining features
SPA: Document Navigation API abandonment and future enhancements
Implement SPA browser integration with History API (Phase 1)
Convert contacts view page to SPA action
Convert clients pages to SPA actions and document conversion procedure
SPA: Merge GET parameters and update documentation
Implement SPA route URL generation in JavaScript and PHP
Implement SPA bootstrap controller architecture
Add SPA routing manual page (rsx:man spa)
Add SPA routing documentation to CLAUDE.md
Phase 4 Complete: Client-side SPA routing implementation
Update get_routes() consumers for unified route structure
Complete SPA Phase 3: PHP-side route type detection and is_spa flag
Restore unified routes structure and Manifest_Query class
Refactor route indexing and add SPA infrastructure
Phase 3 Complete: SPA route registration in manifest
Implement SPA Phase 2: Extract router code and test decorators
Rename Jqhtml_Component to Component and complete SPA foundation setup

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-19 17:48:15 +00:00
parent 77b4d10af8
commit 9ebcc359ae
4360 changed files with 37751 additions and 18578 deletions

View File

@@ -1,6 +1,6 @@
"use strict";
class Dropdown_Menu extends Jqhtml_Component {
class Dropdown_Menu extends Component {
on_ready() {
// Wrap bare text children in <li><a> structure
const $menu = this.$id('menu');

View File

@@ -1,6 +1,6 @@
"use strict";
class Sidebar_Nav extends Jqhtml_Component {
class Sidebar_Nav extends Component {
on_ready() {
// Auto-wrap children in nav structure if needed
const $nav_items = this.$id('nav_items');

View File

@@ -1,6 +1,6 @@
"use strict";
class Info_Box extends Jqhtml_Component {
class Info_Box extends Component {
on_ready() {
// Apply color from args
if (this.args.color) {

View File

@@ -15,7 +15,7 @@
* - Have .Widget CSS class
* - Have data-name attribute set by Form_Field
*/
class Form_Input_Abstract extends Jqhtml_Component {
class Form_Input_Abstract extends Component {
/**
* val() - Get or set the current value
* Subclasses MUST implement this method

View File

@@ -1,6 +1,6 @@
"use strict";
class Advanced_Search_Panel extends Jqhtml_Component {
class Advanced_Search_Panel extends Component {
on_ready() {
// Populate dropdowns if provided
if (this.args.categories) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Kanban_Board extends Jqhtml_Component {
class Kanban_Board extends Component {
async on_load() {
if (this.args.data_source) {
const response = await fetch(this.args.data_source);

View File

@@ -1,6 +1,6 @@
"use strict";
class Notification_Dropdown extends Jqhtml_Component {
class Notification_Dropdown extends Component {
on_ready() {
// No special behavior
}

View File

@@ -1,6 +1,6 @@
"use strict";
class Icon extends Jqhtml_Component {
class Icon extends Component {
// SVG icon container with size variants
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJJY29uIiwiSnFodG1sX0NvbXBvbmVudCJdLCJzb3VyY2VzIjpbInJzeC90aGVtZS9jb21wb25lbnRzL19hcmNoaXZlZC91bmZpbmlzaGVkL2ljb24uanMiXSwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgSWNvbiBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFNWRyBpY29uIGNvbnRhaW5lciB3aXRoIHNpemUgdmFyaWFudHNcbn1cbiJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxJQUFJLFNBQVNDLGdCQUFnQixDQUFDO0VBQ2hDO0FBQUEiLCJpZ25vcmVMaXN0IjpbXX0=

View File

@@ -1,6 +1,6 @@
"use strict";
class Table_Pagination extends Jqhtml_Component {
class Table_Pagination extends Component {
on_ready() {
// Generate pagination if pages provided via args
if (this.args.current_page && this.args.total_pages) {

View File

@@ -6,7 +6,7 @@
* Instance of a modal dialog. Handles lifecycle, sizing, and user interaction.
* Typically created and managed by the Modal static API class.
*/
class Rsx_Modal extends Jqhtml_Component {
class Rsx_Modal extends Component {
on_create() {
this.data.title = '';
this.data.body_content = null;

View File

@@ -1,6 +1,6 @@
"use strict";
class Metric_Card extends Jqhtml_Component {
class Metric_Card extends Component {
// Pure container - children already styled
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJNZXRyaWNfQ2FyZCIsIkpxaHRtbF9Db21wb25lbnQiXSwic291cmNlcyI6WyJyc3gvdGhlbWUvY29tcG9uZW50cy9fYXJjaGl2ZWQvdW5maW5pc2hlZC9NZXRyaWNfQ2FyZC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBNZXRyaWNfQ2FyZCBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFB1cmUgY29udGFpbmVyIC0gY2hpbGRyZW4gYWxyZWFkeSBzdHlsZWRcbn1cbiJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxXQUFXLFNBQVNDLGdCQUFnQixDQUFDO0VBQ3ZDO0FBQUEiLCJpZ25vcmVMaXN0IjpbXX0=

View File

@@ -1,6 +1,6 @@
"use strict";
class Bulk_Action_Bar extends Jqhtml_Component {
class Bulk_Action_Bar extends Component {
on_ready() {
// Clear selection on close
this.$id('close_btn').on('click', () => {

View File

@@ -7,7 +7,7 @@
* Design: Flexbox layout using Bootstrap utility classes
* Layout: Title/breadcrumbs on left, actions/buttons on right
*/
class Page_Header extends Jqhtml_Component {
class Page_Header extends Component {
// Page_Header is a pure container component - no lifecycle methods needed
// All layout from Bootstrap utilities: d-flex, justify-content-between, align-items-center, py-4
}

View File

@@ -1,6 +1,6 @@
"use strict";
class Icon_Button extends Jqhtml_Component {
class Icon_Button extends Component {
on_ready() {
// Add aria-label for accessibility (icon-only buttons need labels)
if (this.args.label) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Chart_Component extends Jqhtml_Component {
class Chart_Component extends Component {
// Placeholder component - no functionality yet
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJDaGFydF9Db21wb25lbnQiLCJKcWh0bWxfQ29tcG9uZW50Il0sInNvdXJjZXMiOlsicnN4L3RoZW1lL2NvbXBvbmVudHMvX2FyY2hpdmVkL3VuZmluaXNoZWQvQ2hhcnRfQ29tcG9uZW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNsYXNzIENoYXJ0X0NvbXBvbmVudCBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFBsYWNlaG9sZGVyIGNvbXBvbmVudCAtIG5vIGZ1bmN0aW9uYWxpdHkgeWV0XG59XG4iXSwibWFwcGluZ3MiOiI7O0FBQUEsTUFBTUEsZUFBZSxTQUFTQyxnQkFBZ0IsQ0FBQztFQUMzQztBQUFBIiwiaWdub3JlTGlzdCI6W119

View File

@@ -7,7 +7,7 @@
* Design: Bootstrap .form-select styling with dropdown arrow
* Content: Contains <option> elements
*/
class Select_Dropdown extends Jqhtml_Component {
class Select_Dropdown extends Component {
on_ready() {
// Set value if provided
if (this.args.value) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Blockquote extends Jqhtml_Component {
class Blockquote extends Component {
on_ready() {
// No special behavior
}

View File

@@ -1,6 +1,6 @@
"use strict";
class Button_Secondary extends Jqhtml_Component {
class Button_Secondary extends Component {
// Secondary action button - lower prominence than primary
// Bootstrap btn-secondary provides gray color scheme
}

View File

@@ -1,6 +1,6 @@
"use strict";
class Rich_Text_Editor extends Jqhtml_Component {
class Rich_Text_Editor extends Component {
on_ready() {
const $editor = this.$id('editor');

View File

@@ -1,6 +1,6 @@
"use strict";
class Overdue_Indicator extends Jqhtml_Component {
class Overdue_Indicator extends Component {
// Pure Bootstrap styling - no JavaScript needed
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJPdmVyZHVlX0luZGljYXRvciIsIkpxaHRtbF9Db21wb25lbnQiXSwic291cmNlcyI6WyJyc3gvdGhlbWUvY29tcG9uZW50cy9fYXJjaGl2ZWQvdW5maW5pc2hlZC9PdmVyZHVlX0luZGljYXRvci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBPdmVyZHVlX0luZGljYXRvciBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFB1cmUgQm9vdHN0cmFwIHN0eWxpbmcgLSBubyBKYXZhU2NyaXB0IG5lZWRlZFxufVxuIl0sIm1hcHBpbmdzIjoiOztBQUFBLE1BQU1BLGlCQUFpQixTQUFTQyxnQkFBZ0IsQ0FBQztFQUM3QztBQUFBIiwiaWdub3JlTGlzdCI6W119

View File

@@ -1,6 +1,6 @@
"use strict";
class Bulk_Selection extends Jqhtml_Component {
class Bulk_Selection extends Component {
on_ready() {
const $checkbox = this.$id('checkbox');

View File

@@ -1,6 +1,6 @@
"use strict";
class Text_Display extends Jqhtml_Component {
class Text_Display extends Component {
// Generic text display - inherits Bootstrap typography
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJUZXh0X0Rpc3BsYXkiLCJKcWh0bWxfQ29tcG9uZW50Il0sInNvdXJjZXMiOlsicnN4L3RoZW1lL2NvbXBvbmVudHMvX2FyY2hpdmVkL3VuZmluaXNoZWQvdGV4dF9kaXNwbGF5LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNsYXNzIFRleHRfRGlzcGxheSBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIEdlbmVyaWMgdGV4dCBkaXNwbGF5IC0gaW5oZXJpdHMgQm9vdHN0cmFwIHR5cG9ncmFwaHlcbn1cbiJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxZQUFZLFNBQVNDLGdCQUFnQixDQUFDO0VBQ3hDO0FBQUEiLCJpZ25vcmVMaXN0IjpbXX0=

View File

@@ -4,7 +4,7 @@
* JQHTML Integration - Automatic component registration and binding
*
* This module automatically:
* 1. Registers component classes that extend Jqhtml_Component
* 1. Registers component classes that extend Component
* 2. Binds templates to component classes when names match
* 3. Enables $(selector).component("Component_Name") syntax
*/
@@ -15,7 +15,7 @@ class Jqhtml_Integration {
* of framework init.
*/
static _on_framework_modules_define() {
let jqhtml_components = Manifest.get_extending('Jqhtml_Component');
let jqhtml_components = Manifest.get_extending('Component');
console_debug('JQHTML_INIT', 'Registering ' + jqhtml_components.length + ' Jqhtml Components');
for (let component of jqhtml_components) {
jqhtml.register_component(component.class_name, component.class_object);
@@ -31,7 +31,7 @@ class Jqhtml_Integration {
static _on_framework_modules_init($scope) {
const is_top_level = !$scope;
const promises = [];
const components_needing_init = ($scope || $('body')).find('.Jqhtml_Component_Init');
const components_needing_init = ($scope || $('body')).find('.Component_Init');
if (components_needing_init.length > 0) {
console_debug('JQHTML_INIT', `Initializing ${components_needing_init.length} DOM components`);
}
@@ -44,10 +44,10 @@ class Jqhtml_Integration {
return;
}
// Check if any parent has Jqhtml_Component_Init class - skip nested components
// Check if any parent has Component_Init class - skip nested components
let parent = $element[0].parentElement;
while (parent) {
if (parent.classList.contains('Jqhtml_Component_Init')) {
if (parent.classList.contains('Component_Init')) {
return; // Skip this element, it's nested
}
parent = parent.parentElement;
@@ -92,7 +92,7 @@ class Jqhtml_Integration {
$element.empty();
// Remove the init class before instantiation to prevent re-initialization
$element.removeClass('Jqhtml_Component_Init');
$element.removeClass('Component_Init');
// Create promise for this component's initialization
const component_promise = new Promise(resolve => {

View File

@@ -1,6 +1,6 @@
"use strict";
class Input_With_Icon extends Jqhtml_Component {
class Input_With_Icon extends Component {
on_ready() {
const $input = this.$id('input');
if (this.args.value) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Data_Table extends Jqhtml_Component {
class Data_Table extends Component {
on_render() {
// Hide until data loads to prevent visual glitches
if (Object.keys(this.data).length === 0) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Client_Label_Link extends Jqhtml_Component {
class Client_Label_Link extends Component {
on_create() {
this.data.loading = true;
this.data.client = null;

View File

@@ -1,6 +1,6 @@
"use strict";
class Gantt_Chart extends Jqhtml_Component {
class Gantt_Chart extends Component {
async on_load() {
if (this.args.data_source) {
const response = await fetch(this.args.data_source);

View File

@@ -1,6 +1,6 @@
"use strict";
class List extends Jqhtml_Component {
class List extends Component {
on_ready() {
// Add list-group-item class to each direct child
this.$.children().each(function () {

View File

@@ -1,6 +1,6 @@
"use strict";
class Timestamp_Display extends Jqhtml_Component {
class Timestamp_Display extends Component {
// Pure Bootstrap styling - no JavaScript needed
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJUaW1lc3RhbXBfRGlzcGxheSIsIkpxaHRtbF9Db21wb25lbnQiXSwic291cmNlcyI6WyJyc3gvdGhlbWUvY29tcG9uZW50cy9fYXJjaGl2ZWQvdW5maW5pc2hlZC9UaW1lc3RhbXBfRGlzcGxheS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBUaW1lc3RhbXBfRGlzcGxheSBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFB1cmUgQm9vdHN0cmFwIHN0eWxpbmcgLSBubyBKYXZhU2NyaXB0IG5lZWRlZFxufVxuIl0sIm1hcHBpbmdzIjoiOztBQUFBLE1BQU1BLGlCQUFpQixTQUFTQyxnQkFBZ0IsQ0FBQztFQUM3QztBQUFBIiwiaWdub3JlTGlzdCI6W119

View File

@@ -1,6 +1,6 @@
"use strict";
class Client_Label extends Jqhtml_Component {
class Client_Label extends Component {
on_create() {
this.data.loading = true;
this.data.client = null;

View File

@@ -1,6 +1,6 @@
"use strict";
class Searchable_Select extends Jqhtml_Component {
class Searchable_Select extends Component {
on_ready() {
this.selected_value = this.args.value || null;
this.all_options = this.args.options || [];

View File

@@ -1,6 +1,6 @@
"use strict";
class Inline_Edit_Field extends Jqhtml_Component {
class Inline_Edit_Field extends Component {
on_ready() {
this.current_value = this.args.value || '';

View File

@@ -8,7 +8,7 @@
* 2. on_load() - Fetch data from APIs (parallel execution, no DOM modifications)
* 3. on_ready() - Component fully initialized, runs bottom-up through component tree
*/
class Form_Row_Component extends Jqhtml_Component {
class Form_Row_Component extends Component {
/**
* Called after render, quick UI setup (bottom-up)
* Use for: Initial state, event bindings, showing loading indicators

View File

@@ -1,6 +1,6 @@
"use strict";
class Popover extends Jqhtml_Component {
class Popover extends Component {
on_ready() {
// Set popover content from args
if (this.args.title) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Multi_Select extends Jqhtml_Component {
class Multi_Select extends Component {
on_ready() {
this.selected_values = this.args.value || [];
this.all_options = this.args.options || [];

View File

@@ -1,6 +1,6 @@
"use strict";
class Page_Section extends Jqhtml_Component {
class Page_Section extends Component {
// Content section with spacing - no special behavior needed
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJQYWdlX1NlY3Rpb24iLCJKcWh0bWxfQ29tcG9uZW50Il0sInNvdXJjZXMiOlsicnN4L3RoZW1lL2NvbXBvbmVudHMvX2FyY2hpdmVkL3VuZmluaXNoZWQvcGFnZV9zZWN0aW9uLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNsYXNzIFBhZ2VfU2VjdGlvbiBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIENvbnRlbnQgc2VjdGlvbiB3aXRoIHNwYWNpbmcgLSBubyBzcGVjaWFsIGJlaGF2aW9yIG5lZWRlZFxufVxuIl0sIm1hcHBpbmdzIjoiOztBQUFBLE1BQU1BLFlBQVksU0FBU0MsZ0JBQWdCLENBQUM7RUFDeEM7QUFBQSIsImlnbm9yZUxpc3QiOltdfQ==

View File

@@ -14,7 +14,7 @@
* - Provides seed() support for debug/testing data
* - Bridges between form validation state and child widget
*/
class Form_Field_Abstract extends Jqhtml_Component {
class Form_Field_Abstract extends Component {
on_create() {
// Find parent form for error display
this.form = this.closest('.Rsx_Form');

View File

@@ -1,6 +1,6 @@
"use strict";
class Icon_With_Text extends Jqhtml_Component {
class Icon_With_Text extends Component {
// Pure Bootstrap styling - no JavaScript needed
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJJY29uX1dpdGhfVGV4dCIsIkpxaHRtbF9Db21wb25lbnQiXSwic291cmNlcyI6WyJyc3gvdGhlbWUvY29tcG9uZW50cy9fYXJjaGl2ZWQvdW5maW5pc2hlZC9JY29uX1dpdGhfVGV4dC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBJY29uX1dpdGhfVGV4dCBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFB1cmUgQm9vdHN0cmFwIHN0eWxpbmcgLSBubyBKYXZhU2NyaXB0IG5lZWRlZFxufVxuIl0sIm1hcHBpbmdzIjoiOztBQUFBLE1BQU1BLGNBQWMsU0FBU0MsZ0JBQWdCLENBQUM7RUFDMUM7QUFBQSIsImlnbm9yZUxpc3QiOltdfQ==

View File

@@ -1,6 +1,6 @@
"use strict";
class Breadcrumbs extends Jqhtml_Component {
class Breadcrumbs extends Component {
// Placeholder component - currently empty in dashboard usage
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJCcmVhZGNydW1icyIsIkpxaHRtbF9Db21wb25lbnQiXSwic291cmNlcyI6WyJyc3gvdGhlbWUvY29tcG9uZW50cy9fYXJjaGl2ZWQvdW5maW5pc2hlZC9CcmVhZGNydW1icy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBCcmVhZGNydW1icyBleHRlbmRzIEpxaHRtbF9Db21wb25lbnQge1xuICAgIC8vIFBsYWNlaG9sZGVyIGNvbXBvbmVudCAtIGN1cnJlbnRseSBlbXB0eSBpbiBkYXNoYm9hcmQgdXNhZ2Vcbn1cbiJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxXQUFXLFNBQVNDLGdCQUFnQixDQUFDO0VBQ3ZDO0FBQUEiLCJpZ25vcmVMaXN0IjpbXX0=

View File

@@ -1,6 +1,6 @@
"use strict";
class Export_Button extends Jqhtml_Component {
class Export_Button extends Component {
on_ready() {
const that = this;
this.$.find('[data-format]').on('click', e => {

View File

@@ -1,6 +1,6 @@
"use strict";
class Progress_Bar extends Jqhtml_Component {
class Progress_Bar extends Component {
on_ready() {
const $bar = this.$id('bar');

View File

@@ -1,6 +1,6 @@
"use strict";
class Link extends Jqhtml_Component {
class Link extends Component {
on_ready() {
// Support $href attribute for dynamic URLs
if (this.args.href) {

View File

@@ -7,7 +7,7 @@
* Design: Bootstrap .invalid-feedback (default) or .valid-feedback styling
* Visibility: Only shows when sibling input has .is-valid or .is-invalid class
*/
class Form_Validation_Message extends Jqhtml_Component {
class Form_Validation_Message extends Component {
on_ready() {
// Add custom classes if provided (e.g., switching to valid-feedback)
if (this.args.class) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Input_With_Validation extends Jqhtml_Component {
class Input_With_Validation extends Component {
on_ready() {
const $input = this.$id('input');
if (this.args.value) {

View File

@@ -1,6 +1,6 @@
"use strict";
class Empty_State extends Jqhtml_Component {
class Empty_State extends Component {
on_ready() {
// No special behavior
}

View File

@@ -7,7 +7,7 @@
* Design: Bootstrap .form-check-input styling
* Wrapper: Typically used within <div class="form-check"> for proper layout
*/
class Checkbox extends Jqhtml_Component {
class Checkbox extends Component {
on_ready() {
// Set checked state if provided
if (this.args.checked) {

View File

@@ -6,7 +6,7 @@
* Purpose: Multi-line text input for longer content like descriptions, comments, notes
* Design: Bootstrap .form-control styling (same as Input)
*/
class Textarea extends Jqhtml_Component {
class Textarea extends Component {
on_ready() {
// Set rows if provided
if (this.args.rows) {

Some files were not shown because too many files have changed in this diff Show More