84 lines
3.0 KiB
React
84 lines
3.0 KiB
React
// Metro module 1200 (f1201).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import _possibleConstructorReturn from "./_possibleConstructorReturn";
|
|
import _getPrototypeOf from "./_getPrototypeOf";
|
|
import _inherits from "./_inherits";
|
|
import { Component } from "react";
|
|
import { Appearance, TouchableOpacity, Image, Text } from "react-native";
|
|
import { lazyLoadFeedbackIntegration } from "./Module1198";
|
|
import { getTheme } from "./Module1199";
|
|
import { defaultButtonConfiguration } from "./Module1201";
|
|
import { defaultButtonStyles } from "./_default_1202";
|
|
import { showFeedbackWidget } from "./NOOP_SET_VISIBILITY";
|
|
import { feedbackIcon } from "./Module1203";
|
|
let FeedbackButton;
|
|
let env1010 = {};
|
|
env1010[10] = function _isNativeReflectConstruct() {
|
|
let c12907_0;
|
|
try {
|
|
c12907_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c12907_0;
|
|
};
|
|
env1010[10] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
FeedbackButton = function FeedbackButton(a0) {
|
|
_classCallCheck(this, FeedbackButton);
|
|
const r9 = [a0];
|
|
const r8 = _getPrototypeOf(FeedbackButton);
|
|
const r21 = _possibleConstructorReturn(this, (0, env1010[10])() ? Reflect.construct(r8, r9, _getPrototypeOf(this).constructor) : r8.apply(this, r9));
|
|
lazyLoadFeedbackIntegration();
|
|
return r21;
|
|
};
|
|
_inherits(FeedbackButton, Component);
|
|
exports.FeedbackButton = _createClass(FeedbackButton, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
this._themeListener = Appearance.addChangeListener(() => {
|
|
this.forceUpdate();
|
|
});
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function componentWillUnmount() {
|
|
if (this._themeListener) {
|
|
this._themeListener.remove();
|
|
}
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
const theme = getTheme();
|
|
const r28 = {
|
|
...defaultButtonConfiguration,
|
|
...this.props
|
|
};
|
|
const r29 = Object;
|
|
const r38 = {
|
|
...defaultButtonStyles(theme).triggerButton
|
|
};
|
|
const styles = this.props.styles;
|
|
const style = r29.assign(r38, styles !== null ? styles !== void 0 ? styles.triggerButton : void 0 : void 0);
|
|
const r43 = Object;
|
|
const r52 = {
|
|
...defaultButtonStyles(theme).triggerText
|
|
};
|
|
const styles2 = this.props.styles;
|
|
const style2 = r43.assign(r52, styles2 !== null ? styles2 !== void 0 ? styles2.triggerText : void 0 : void 0);
|
|
const r57 = Object;
|
|
const r67 = {
|
|
...defaultButtonStyles(theme).triggerIcon
|
|
};
|
|
const styles3 = this.props.styles;
|
|
return <TouchableOpacity style={style} onPress={showFeedbackWidget} accessibilityLabel={r28.triggerAriaLabel}>
|
|
<Image source={{
|
|
uri: feedbackIcon
|
|
}} style={r57.assign(r67, styles3 !== null ? styles3 !== void 0 ? styles3.triggerIcon : void 0 : void 0)} />
|
|
<Text style={style2} testID="sentry-feedback-button">{r28.triggerLabel}</Text>
|
|
</TouchableOpacity>;
|
|
}
|
|
}]);
|