decord/source/143_focusInput.js

94 lines
1.9 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 143
// Function ID: 2331
// Name: focusInput
2026-07-23 10:11:24 +00:00
// Dependencies: [117, 144]
2026-07-20 16:05:17 +00:00
// Module 143 (focusInput)
2026-07-23 10:11:24 +00:00
const require = arg1;
const dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
function focusInput(current) {
let tmp = closure_2 !== current;
if (tmp) {
tmp = null != current;
}
if (tmp) {
closure_2 = current;
}
}
function blurInput(current) {
2026-07-23 10:11:24 +00:00
let tmp = c2 === current;
2026-07-20 16:05:17 +00:00
if (tmp) {
tmp = null != current;
}
if (tmp) {
2026-07-23 10:11:24 +00:00
c2 = null;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
let c2 = null;
2026-07-20 16:05:17 +00:00
const set = new Set();
arg5.default = {
currentlyFocusedInput() {
2026-07-23 10:11:24 +00:00
return c2;
2026-07-20 16:05:17 +00:00
},
focusInput,
blurInput,
currentlyFocusedField() {
2026-07-23 10:11:24 +00:00
return require(117) /* renderElement */.findNodeHandle(c2);
2026-07-20 16:05:17 +00:00
},
focusField(arg0) {
},
blurField(arg0) {
},
focusTextInput(currentProps) {
if ("number" !== typeof currentProps) {
if (null != currentProps) {
2026-07-23 10:11:24 +00:00
if (c2 !== currentProps) {
2026-07-20 16:05:17 +00:00
currentProps = currentProps.currentProps;
let editable;
if (null != currentProps) {
editable = currentProps.editable;
}
if (false !== editable) {
focusInput(currentProps);
2026-07-23 10:11:24 +00:00
const Commands = require(144) /* Commands */.Commands;
2026-07-20 16:05:17 +00:00
Commands.focus(currentProps);
}
}
}
}
},
blurTextInput(result) {
let tmp = "number" !== typeof result;
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = c2 === result;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
tmp = null != result;
}
if (tmp) {
blurInput(result);
2026-07-23 10:11:24 +00:00
const Commands = require(144) /* Commands */.Commands;
2026-07-20 16:05:17 +00:00
Commands.blur(result);
}
},
registerInput(current) {
if ("number" !== typeof current) {
set.add(current);
}
},
unregisterInput(current) {
if ("number" !== typeof current) {
set.delete(current);
}
},
isTextInput(result) {
let hasItem = "number" !== typeof result;
if (hasItem) {
hasItem = set.has(result);
}
return hasItem;
}
};