Merge branch 'master' into feat/developer/13937-line-numbers-trancompiler

This commit is contained in:
Steven R. Loomis 2025-05-26 18:32:59 -05:00 • committed by GitHub
commit 7b9873b695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 25 additions and 21 deletions

View file

@ -1,5 +1,9 @@
# Keyman Version History
## 19.0.50 alpha 2025-05-26
* chore(web): mark async methods in UI components (#14034)
## 19.0.49 alpha 2025-05-25
* feat(developer): revamp line numbers per design doc (#14016)

View file

@ -1 +1 @@
19.0.50
19.0.51

View file

@ -28,7 +28,7 @@ if(!keymanweb) {
/**
* Do not enclose in an anonymous function, as the compiler may create
* global scope variables to replace true, false, null, whcih can then collide
* global scope variables to replace true, false, null, which can then collide
* with other variables.
* Instead, use the --output-wrapper command during optimization, which will
* add the anonymous function to enclose all code, including those optimized
@ -106,7 +106,7 @@ if(!keymanweb) {
* @param {Event} _id keyboard selection event
* @return {boolean}
*/
readonly _SelectKeyboard = (_id: Event) => {
private readonly _SelectKeyboard = async (_id: Event): Promise<boolean> => {
let id: string = '';
if(typeof(_id) == 'object') {
let t: HTMLElement = null;
@ -135,7 +135,7 @@ if(!keymanweb) {
_k.className='selected';
}
this._KMWSel = _k;
keymanweb.setActiveKeyboard(_name,_lgc);
await keymanweb.setActiveKeyboard(_name,_lgc);
} else {
_name=null;
}
@ -252,7 +252,7 @@ if(!keymanweb) {
*
* @param {Event} e event
*/
readonly _SelectorMouseOut = (e: MouseEvent) => {
private readonly _SelectorMouseOut = (e: MouseEvent) => {
if(keymanweb.activatingUI) {
keymanweb.activatingUI(0);
}

View file

@ -450,15 +450,15 @@ if(!keymanweb) {
* @param {Object} e event
* Description Change active keyboard in response to user selection event
*/
readonly SelectKeyboardChange = (e: Event) => {
private readonly SelectKeyboardChange = async (e: Event) => {
keymanweb.activatingUI(true);
if(this.KeyboardSelector.value != '-') {
const i=this.KeyboardSelector.selectedIndex;
const t=this.KeyboardSelector.options[i].value.split(':');
keymanweb.setActiveKeyboard(t[0],t[1]);
await keymanweb.setActiveKeyboard(t[0],t[1]);
} else {
keymanweb.setActiveKeyboard('');
await keymanweb.setActiveKeyboard('');
}
//if(osk['show']) osk['show'](osk['isEnabled']()); handled by keyboard change event???

View file

@ -187,7 +187,7 @@ if(!keymanweb) {
/**
* Toggle a single keyboard on or off - KMW button control event
**/
readonly switchSingleKbd = () => {
readonly switchSingleKbd = async () => {
const _v = keymanweb.getActiveKeyboard() == '';
let nLastKbd=0, kbdName='', lgCode='';
@ -202,10 +202,10 @@ if(!keymanweb) {
kbdName = this.keyboards[nLastKbd]._InternalName;
lgCode = this.keyboards[nLastKbd]._LanguageCode;
keymanweb.setActiveKeyboard(kbdName,lgCode);
await keymanweb.setActiveKeyboard(kbdName,lgCode);
this.lastActiveKeyboard = nLastKbd;
} else {
keymanweb.setActiveKeyboard('');
await keymanweb.setActiveKeyboard('');
}
if(this.kbdButton) {
@ -216,7 +216,7 @@ if(!keymanweb) {
/**
* Switch to the next keyboard in the list - KMW button control event
**/
readonly switchNextKbd = () => {
readonly switchNextKbd = async () => {
let _v = (keymanweb.getActiveKeyboard() == '');
let kbdName='', lgCode='';
@ -227,16 +227,16 @@ if(!keymanweb) {
kbdName = this.keyboards[0]._InternalName;
lgCode = this.keyboards[0]._LanguageCode;
keymanweb.setActiveKeyboard(kbdName,lgCode);
await keymanweb.setActiveKeyboard(kbdName,lgCode);
this.lastActiveKeyboard = 0;
} else {
if(this.lastActiveKeyboard == this.keyboards.length-1) {
keymanweb.setActiveKeyboard('');
await keymanweb.setActiveKeyboard('');
_v = false;
} else {
kbdName = this.keyboards[++this.lastActiveKeyboard]._InternalName;
lgCode = this.keyboards[this.lastActiveKeyboard]._LanguageCode;
keymanweb.setActiveKeyboard(kbdName,lgCode);
await keymanweb.setActiveKeyboard(kbdName,lgCode);
_v = true;
}
}
@ -558,7 +558,7 @@ if(!keymanweb) {
* @param {number} _kbd
* Description Select a keyboard from the drop down menu
**/
selectKbd(_kbd: number) {
private async selectKbd(_kbd: number): Promise<boolean> {
let _name,_lgCode;
if(_kbd < 0) {
_name = '';
@ -568,7 +568,7 @@ if(!keymanweb) {
_lgCode = this.keyboards[_kbd]._LanguageCode;
}
keymanweb.setActiveKeyboard(_name,_lgCode);
await keymanweb.setActiveKeyboard(_name,_lgCode);
keymanweb.focusLastActiveElement();
this.kbdButton._setSelected(_name != '');
if(_kbd >= 0) {

View file

@ -820,7 +820,7 @@ if(!keymanweb) {
* @param {boolean} updateKeyman
* @return {boolean}
**/
selectKeyboard(event: Event, lang: LanguageEntry, kbd: KeyboardDetail, updateKeyman: boolean) {
private async selectKeyboard(event: Event, lang: LanguageEntry, kbd: KeyboardDetail, updateKeyman: boolean) {
keymanweb.activatingUI(true);
if(this.selectedLanguage) {
@ -841,7 +841,7 @@ if(!keymanweb) {
// Return focus to input area and activate the selected keyboard
this.addKeyboardToList(lang, kbd);
if(updateKeyman) {
keymanweb.setActiveKeyboard(kbd.InternalName, kbd.LanguageCode).then(() => {
await keymanweb.setActiveKeyboard(kbd.InternalName, kbd.LanguageCode).then(() => {
// Restore focus _after_ the keyboard finishes loading.
this.setLastFocus();
});
@ -943,7 +943,7 @@ if(!keymanweb) {
* @return {boolean}
* Description Update the UI when all keyboards disabled by user
**/
readonly offButtonClickEvent = (event: Event) => {
private readonly offButtonClickEvent = async (event: Event) => {
if(this.toolbarNode.className != 'kmw_controls_disabled') {
this.hideKeyboardsForLanguage(null);
if(this.selectedLanguage) {
@ -959,7 +959,7 @@ if(!keymanweb) {
// Return the focus to the input area and set the active keyboard to nothing
this.setLastFocus();
keymanweb.setActiveKeyboard('','');
await keymanweb.setActiveKeyboard('','');
//Save current state when deselecting a keyboard (may not be needed)
this.saveCookie();