fix(core): resolve 68 compiler errors and stabilize Svelte 5 reactivity
- Fixed 'Captured initial value' warnings in 65+ components by implementing proper sync effects with 'untrack' and derived states. - Hardened Event Settings JSON editors using a temporary string-buffer pattern to safely decouple object-based data from CodeMirror's string requirements. - Resolved strict TypeScript mismatches across core routes (Accounts, Sites, etc.) and improved property indexing safety in views. - Patched Flowbite-Svelte Drawer transitions for Svelte 5 compatibility using prop spreading. - Added comprehensive safety comments to high-risk reactivity blocks. - Synchronized 'ae_types.ts' with V3 backend models.
This commit is contained in:
@@ -27,24 +27,26 @@
|
||||
|
||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||
// $slct.account_id = data.account_id;
|
||||
let ae_acct = data[$slct.account_id];
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
let ae_acct = $derived(data[$slct.account_id]);
|
||||
|
||||
if (log_lvl > 1) {
|
||||
console.log(`[event_id] +layout A: ${data.params.event_id}`);
|
||||
console.log(`[event_id] +layout B: ${ae_acct.slct.event_id}`);
|
||||
console.log(`[event_id] +layout C: ${$events_slct.event_id}`);
|
||||
}
|
||||
$effect(() => {
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
// $: event_id = data.params.event_id;
|
||||
// console.log(`event_id layout D: ${event_id}`);
|
||||
if (log_lvl > 1) {
|
||||
console.log(`[event_id] +layout A: ${data.params.event_id}`);
|
||||
if (ae_acct) console.log(`[event_id] +layout B: ${ae_acct.slct.event_id}`);
|
||||
console.log(`[event_id] +layout C: ${$events_slct.event_id}`);
|
||||
}
|
||||
});
|
||||
|
||||
// $events_slct.event_id = event_id;
|
||||
// $events_slct.event_obj = ae_acct.slct.event_obj;
|
||||
$events_slct.event_session_obj_li = ae_acct.slct.event_session_obj_li;
|
||||
$events_slct.event_location_obj_li = ae_acct.slct.event_location_obj_li;
|
||||
$effect(() => {
|
||||
if (ae_acct) {
|
||||
$events_slct.event_session_obj_li = ae_acct.slct.event_session_obj_li;
|
||||
$events_slct.event_location_obj_li = ae_acct.slct.event_location_obj_li;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{@render children?.()}
|
||||
|
||||
Reference in New Issue
Block a user