Fix: System-wide type hardening and V3 API alignment
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
let _cmCache: {
|
||||
EditorView?: any;
|
||||
EditorState?: any;
|
||||
EditorSelection?: any;
|
||||
markdown?: any;
|
||||
markdownLanguage?: any;
|
||||
keymap?: any;
|
||||
@@ -25,6 +26,7 @@ let _cmCache: {
|
||||
highlightSelectionMatches?: any;
|
||||
lintKeymap?: any;
|
||||
EditorState_allowMultipleSelections?: any;
|
||||
EditorState_readOnly?: any;
|
||||
EditorView_lineWrapping?: any;
|
||||
EditorView_editable?: any;
|
||||
EditorView_contentAttributes?: any;
|
||||
@@ -43,6 +45,7 @@ import { browser } from '$app/environment';
|
||||
type CMCache = {
|
||||
EditorView: any;
|
||||
EditorState: any;
|
||||
EditorSelection?: any;
|
||||
markdown?: any;
|
||||
markdownLanguage?: any;
|
||||
keymap?: any;
|
||||
@@ -67,6 +70,7 @@ type CMCache = {
|
||||
highlightSelectionMatches?: any;
|
||||
lintKeymap?: any;
|
||||
EditorState_allowMultipleSelections?: any;
|
||||
EditorState_readOnly?: any;
|
||||
EditorView_lineWrapping?: any;
|
||||
EditorView_editable?: any;
|
||||
EditorView_contentAttributes?: any;
|
||||
@@ -133,7 +137,7 @@ export async function ensureCodeMirrorModules(): Promise<CMCache> {
|
||||
|
||||
markdown: markdownMod?.markdown,
|
||||
markdownLanguage: markdownMod?.markdownLanguage,
|
||||
languages: languageMod?.languages, // From @codemirror/language-data, often re-exported by @codemirror/language
|
||||
languages: (languageMod as any)?.languages, // Cast to any to avoid TS error if property is missing from types
|
||||
|
||||
defaultKeymap: (commandsMod && commandsMod.defaultKeymap) || [],
|
||||
history: commandsMod?.history,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
// import { api } from '$lib/api';
|
||||
// import { update_ae_obj_id_crud } from '$lib/ae_core/core__crud_generic';
|
||||
import { update_ae_obj } from '$lib/ae_core/core__crud_generic';
|
||||
|
||||
@@ -3,41 +3,7 @@
|
||||
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
|
||||
import util from './utilities.js';
|
||||
|
||||
// import Select_element_lu from './element_select_lu.svelte';
|
||||
|
||||
console.log(`Input name=${name} value=${value}`);
|
||||
|
||||
console.log('Original Value', original_value);
|
||||
console.log('Data Type:', data_type);
|
||||
|
||||
let set_input_type = $state((node) => {
|
||||
node.type = 'text';
|
||||
});
|
||||
let input_element_type_list = ['checkbox', 'date', 'email', 'hidden', 'number', 'text'];
|
||||
if (input_element_type_list.includes(type)) {
|
||||
set_input_type = (node) => {
|
||||
node.type = type;
|
||||
};
|
||||
} else {
|
||||
}
|
||||
|
||||
console.log(`Input name=${name} value=${value} type=${type}`);
|
||||
|
||||
/* *** END *** Core input settings */
|
||||
|
||||
/* *** BEGIN *** Container content, layout, and behavior */
|
||||
|
||||
console.log(`Input input_mode=${input_mode}`);
|
||||
|
||||
/* *** END *** Container content, layout, and behavior */
|
||||
|
||||
/* *** BEGIN *** Input type specific */
|
||||
|
||||
if (type == 'textarea') {
|
||||
console.log(`Input textarea size=${size} rows=${rows} cols=${cols}`);
|
||||
}
|
||||
import { ae_util as util } from '$lib/ae_utils/ae_utils';
|
||||
|
||||
interface Props {
|
||||
/* *** BEGIN *** Core input settings */
|
||||
@@ -141,6 +107,39 @@
|
||||
date_time_tz = null,
|
||||
more_html
|
||||
}: Props = $props();
|
||||
|
||||
console.log(`Input name=${name} value=${value}`);
|
||||
|
||||
console.log('Original Value', original_value);
|
||||
console.log('Data Type:', data_type);
|
||||
|
||||
let set_input_type = $state((node) => {
|
||||
node.type = 'text';
|
||||
});
|
||||
let input_element_type_list = ['checkbox', 'date', 'email', 'hidden', 'number', 'text'];
|
||||
if (input_element_type_list.includes(type)) {
|
||||
set_input_type = (node) => {
|
||||
node.type = type;
|
||||
};
|
||||
} else {
|
||||
}
|
||||
|
||||
console.log(`Input name=${name} value=${value} type=${type}`);
|
||||
|
||||
/* *** END *** Core input settings */
|
||||
|
||||
/* *** BEGIN *** Container content, layout, and behavior */
|
||||
|
||||
console.log(`Input input_mode=${input_mode}`);
|
||||
|
||||
/* *** END *** Container content, layout, and behavior */
|
||||
|
||||
/* *** BEGIN *** Input type specific */
|
||||
|
||||
if (type == 'textarea') {
|
||||
console.log(`Input textarea size=${size} rows=${rows} cols=${cols}`);
|
||||
}
|
||||
|
||||
let value_datetime = null;
|
||||
let value_date = $state(null);
|
||||
let value_time = $state(null);
|
||||
@@ -802,4 +801,4 @@
|
||||
.container_inline {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user