138 lines
7.8 KiB
React
138 lines
7.8 KiB
React
/* Metro module 4529; source: unknown; dependencies: [29, 31, 27, 33, 4530, 4522] */
|
|
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import React from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as Module04530Module from './module-04530.js'; /* Metro dependency 4530 */
|
|
|
|
function _fun38652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:6, offset: 0x010c64ef, size: 171 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const env0_3 = ['obscureBackground', 'hideNavigationBar', 'onFocus', 'onBlur', 'onSearchButtonPress',
|
|
'onCancelButtonPress', 'onChangeText'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.default = React.forwardRef(SearchBar);
|
|
function SearchBar(a0, a1) { // fn#38653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:291, offset: 0x010c659a, size: 379 bytes, params: 3, frame: 30
|
|
var Object;
|
|
var assign;
|
|
var value4;
|
|
var obscureBackground;
|
|
var hideNavigationBar;
|
|
var onFocus;
|
|
var onBlur;
|
|
var onSearchButtonPress;
|
|
var onCancelButtonPress;
|
|
var onChangeText;
|
|
var value5;
|
|
var defaultImport;
|
|
var object2;
|
|
var value;
|
|
const binding = env0_5;
|
|
const value2 = binding.useRef(null);
|
|
binding.useImperativeHandle(a1, function() {
|
|
return {blur: _fun38655, focus: _fun38657, toggleCancelButton: _fun38659, clearText: _fun38661,
|
|
setText: _fun38663,
|
|
cancelSearch: _fun38665};
|
|
});
|
|
const useCallback = binding.useCallback;
|
|
let object = [value2];
|
|
const env0_1 = Reflect.apply(useCallback, binding, [_fun38667, object]);
|
|
if ((require(4522) /* metro dependency 4522 */).isSearchBarAvailableForCurrentPlatform) {
|
|
Object = global.Object;
|
|
value4 = Object.assign({}, a0, {autoCapitalize: a0.autoCapitalize ?? 'systemDefault'});
|
|
obscureBackground = value4.obscureBackground;
|
|
hideNavigationBar = value4.hideNavigationBar;
|
|
onFocus = value4.onFocus;
|
|
onBlur = value4.onBlur;
|
|
onSearchButtonPress = value4.onSearchButtonPress;
|
|
onCancelButtonPress = value4.onCancelButtonPress;
|
|
onChangeText = value4.onChangeText;
|
|
value5 = ObjectWithoutProperties(value4, env0_3);
|
|
defaultImport = importDefault(4530) /* metro dependency 4530 */;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object = {ref: value2};
|
|
object2 = {};
|
|
value = require(4522) /* metro dependency 4522 */;
|
|
object2.obscureBackground = value.parseBooleanToOptionalBooleanNativeProp(obscureBackground);
|
|
value = require(4522) /* metro dependency 4522 */;
|
|
object2.hideNavigationBar = value.parseBooleanToOptionalBooleanNativeProp(hideNavigationBar);
|
|
object2.onSearchFocus = onFocus;
|
|
object2.onSearchBlur = onBlur;
|
|
object2.onSearchButtonPress = onSearchButtonPress;
|
|
object2.onCancelButtonPress = onCancelButtonPress;
|
|
object2.onChangeText = onChangeText;
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [object, value5,
|
|
object2])} />)(defaultImport);
|
|
}
|
|
global.console.warn('Importing SearchBar is only valid on iOS and Android devices.');
|
|
return View;
|
|
function _fun38654() { // fn#38654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:361, offset: 0x010c6715, size: 66 bytes, params: 1, frame: 3
|
|
return {blur: blur_38655, focus: focus_38657, toggleCancelButton: toggleCancelButton_38659,
|
|
clearText: clearText_38661, setText: setText_38663, cancelSearch: cancelSearch_38665};
|
|
function blur_38655() { // fn#38655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:384, offset: 0x010c6757, size: 23 bytes, params: 1, frame: 11
|
|
env1_1(function(a0) {
|
|
var Commands = require(dependencyMap[4]).Commands;
|
|
return Commands.blur(a0);
|
|
});
|
|
}
|
|
|
|
function focus_38657() { // fn#38657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:457, offset: 0x010c679d, size: 23 bytes, params: 1, frame: 11
|
|
env1_1(function(a0) {
|
|
var Commands = require(dependencyMap[4]).Commands;
|
|
return Commands.focus(a0);
|
|
});
|
|
}
|
|
|
|
function toggleCancelButton_38659(a0) { // fn#38659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:545, offset: 0x010c67e3, size: 30 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
env1_1(_fun38660);
|
|
function _fun38660(a0) { // fn#38660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:579, offset: 0x010c6801, size: 55 bytes, params: 2, frame: 13
|
|
const Commands = (Module04530Module).Commands;
|
|
return Commands.toggleCancelButton(a0, env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function clearText_38661() { // fn#38661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:653, offset: 0x010c6838, size: 23 bytes, params: 1, frame: 11
|
|
env1_1(function(a0) {
|
|
var Commands = require(dependencyMap[4]).Commands;
|
|
return Commands.clearText(a0);
|
|
});
|
|
}
|
|
|
|
function setText_38663(a0) { // fn#38663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:738, offset: 0x010c687e, size: 30 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
env1_1(_fun38664);
|
|
function _fun38664(a0) { // fn#38664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:761, offset: 0x010c689c, size: 55 bytes, params: 2, frame: 13
|
|
const Commands = (Module04530Module).Commands;
|
|
return Commands.setText(a0, env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function cancelSearch_38665() { // fn#38665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:827, offset: 0x010c68d3, size: 23 bytes, params: 1, frame: 11
|
|
env1_1(function(a0) {
|
|
var Commands = require(dependencyMap[4]).Commands;
|
|
return Commands.cancelSearch(a0);
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
function _fun38667(a0) { // fn#38667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4707:935, offset: 0x010c6919, size: 55 bytes, params: 2, frame: 12
|
|
const current = env0_0.current;
|
|
if (current) {
|
|
a0(current);
|
|
} else {
|
|
global.console.warn('Reference to native search bar component has not been updated yet');
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun38652, 4529, [29, 31, 27, 33, 4530,
|
|
4522]) /* metro module 4529, dependencies: [29, 31, 27, 33, 4530, 4522] */;
|