Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
140 lines
4.5 KiB
JavaScript
140 lines
4.5 KiB
JavaScript
// Module ID: 6888
|
|
// Function ID: 6889
|
|
// Dependencies: [109, 41, 42, 93, 95, 98, 19, 17, 21, 6889]
|
|
|
|
// Module 6888
|
|
import _modDef6889 from "module_6889" /* 6889 */;
|
|
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
|
|
import _classCallCheck from "_classCallCheck" /* 41 */;
|
|
import _createClass from "_createClass" /* 42 */;
|
|
import metroRequire from "_possibleConstructorReturn" /* 93 */;
|
|
import _getPrototypeOf from "_getPrototypeOf" /* 95 */;
|
|
import _inherits from "_inherits" /* 98 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const TouchableHighlight = fn;
|
|
function _isNativeReflectConstruct() {
|
|
try {
|
|
const _Boolean = Boolean;
|
|
const call = valueOf.call;
|
|
const _Reflect = Reflect;
|
|
const _Boolean2 = Boolean;
|
|
if (typeof call === "unknown") {
|
|
let callResult = valueOf();
|
|
} else {
|
|
callResult = call(constructResult);
|
|
}
|
|
closure_0 = !callResult;
|
|
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
return closure_0;
|
|
};
|
|
return _isNativeReflectConstruct();
|
|
} catch (err) {
|
|
}
|
|
}
|
|
let closure_3 = ["style"];
|
|
get_ActivityIndicator = fn(17);
|
|
({ StyleSheet: closure_9, View: c10 } = get_ActivityIndicator);
|
|
const jsx = fn(21).jsx;
|
|
class TouchableHighlight {
|
|
constructor(arg0) {
|
|
self = this;
|
|
tmp = hasOwnProperty(this, TouchableHighlight);
|
|
items = [];
|
|
items[0] = global;
|
|
tmp2 = closure_7;
|
|
obj = closure_7(TouchableHighlight);
|
|
tmp3 = metroRequire;
|
|
if (closure_12()) {
|
|
tmp5 = globalThis;
|
|
_Reflect = Reflect;
|
|
constructResult = Reflect.construct(obj, items, tmp2(self).constructor);
|
|
} else {
|
|
constructResult = obj.apply(self, items);
|
|
}
|
|
tmp3Result = tmp3(self, constructResult);
|
|
closure_0 = tmp3Result;
|
|
tmp3Result.showUnderlay = () => {
|
|
if (closure_0.hasPressHandler()) {
|
|
const obj2 = { extraChildStyle: null, extraUnderlayStyle: null };
|
|
const obj3 = { opacity: obj.props.activeOpacity };
|
|
obj2.extraChildStyle = obj3;
|
|
const obj4 = { backgroundColor: obj.props.underlayColor };
|
|
obj2.extraUnderlayStyle = obj4;
|
|
obj.setState(obj2);
|
|
const props = obj.props;
|
|
const onShowUnderlay = props.onShowUnderlay;
|
|
if (onShowUnderlay != null) {
|
|
onShowUnderlay();
|
|
}
|
|
}
|
|
};
|
|
tmp3Result.hasPressHandler = () => closure_0.props.onPress || closure_0.props.onPressIn || closure_0.props.onPressOut || closure_0.props.onLongPress;
|
|
tmp3Result.hideUnderlay = () => {
|
|
closure_0.setState({ extraChildStyle: null, extraUnderlayStyle: null });
|
|
const props = closure_0.props;
|
|
const onHideUnderlay = props.onHideUnderlay;
|
|
if (onHideUnderlay != null) {
|
|
onHideUnderlay();
|
|
}
|
|
};
|
|
tmp3Result.onStateChange = (arg0, arg1) => {
|
|
if (arg1 === TouchableHighlight(6889).TOUCHABLE_STATE.BEGAN) {
|
|
closure_0.showUnderlay();
|
|
} else {
|
|
if (!tmp3) {
|
|
closure_0.hideUnderlay();
|
|
}
|
|
tmp3 = arg1 !== tmp(6889).TOUCHABLE_STATE.UNDETERMINED && arg1 !== tmp(6889).TOUCHABLE_STATE.MOVED_OUTSIDE;
|
|
}
|
|
};
|
|
tmp3Result.state = { extraChildStyle: null, extraUnderlayStyle: null };
|
|
return tmp3Result;
|
|
}
|
|
}
|
|
_inherits(TouchableHighlight, fn(19).Component);
|
|
const entry = {
|
|
key: "renderChildren",
|
|
value: function renderChildren() {
|
|
const self = this;
|
|
if (this.props.children) {
|
|
const Children = noop.Children;
|
|
const onlyResult = Children.only(self.props.children);
|
|
const obj = { style: React7.compose(onlyResult.props.style, self.state.extraChildStyle) };
|
|
return noop.cloneElement(onlyResult, obj);
|
|
} else {
|
|
return <closure_1_10 />;
|
|
}
|
|
}
|
|
};
|
|
let items = [
|
|
entry,
|
|
{
|
|
key: "render",
|
|
value: function render() {
|
|
const self = this;
|
|
const props = this.props;
|
|
let style = props.style;
|
|
if (undefined === style) {
|
|
style = {};
|
|
}
|
|
const obj = {};
|
|
const tmp = _objectWithoutProperties(props, closure_3);
|
|
const merged = Object.assign(tmp);
|
|
const items = [style, self.state.extraUnderlayStyle];
|
|
obj.style = items;
|
|
obj.onStateChange = self.onStateChange;
|
|
obj.children = self.renderChildren();
|
|
return jsx(_modDef6889, {});
|
|
}
|
|
}
|
|
];
|
|
const importDefaultResultResult = _createClass(TouchableHighlight, items);
|
|
let obj = {};
|
|
let merged = Object.assign(_modDef6889.defaultProps);
|
|
obj.activeOpacity = 0.85;
|
|
obj.delayPressOut = 100;
|
|
obj.underlayColor = "black";
|
|
importDefaultResultResult.defaultProps = obj;
|
|
|
|
export default importDefaultResultResult;
|