73 lines
4.5 KiB
TypeScript
73 lines
4.5 KiB
TypeScript
/* Metro module 9926; source: modules/notifications/native/NotificationSurveyActionSheet.tsx; dependencies: [31, 9904, 661, 33, 1244, 683, 9927, 9907, 4080, 9929, 1962, 2] */
|
|
function _fun77709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10112:6, offset: 0x01e07cd9, size: 193 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const trackOpen_77710 = function() {
|
|
var defaultImport = importDefault(dependencyMap[5]);
|
|
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
|
defaultImport.track(OPEN_POPOUT, {'type': 'Notification Feedback Sheet', 'source': 'Notification End'});
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(9904) /* metro dependency 9904: Constants */).NotificationUserFeedbackReasons;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NotificationSurveyActionSheet.tsx');
|
|
exports.default = NotificationSurveyActionSheet;
|
|
}
|
|
|
|
function NotificationSurveyActionSheet({notificationType, location, messageId}) { // fn#77711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10112:405, offset: 0x01e07dd8, size: 469 bytes, params: 2, frame: 22
|
|
let object2 = {};
|
|
const TOO_MANY = NotificationUserFeedbackReasons.TOO_MANY;
|
|
object2.value = TOO_MANY;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.pLeQp0]);
|
|
const items2 = [object2];
|
|
object2 = {};
|
|
const IRRELEVANT = NotificationUserFeedbackReasons.IRRELEVANT;
|
|
object2.value = IRRELEVANT;
|
|
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuwPcC);
|
|
items2[1] = object2;
|
|
object2 = {};
|
|
const DISLIKE_CONTENT = NotificationUserFeedbackReasons.DISLIKE_CONTENT;
|
|
object2.value = DISLIKE_CONTENT;
|
|
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.glUMhg);
|
|
items2[2] = object2;
|
|
const FeedbackActionSheet = importDefault(9927) /* metro dependency 9927: FeedbackActionSheet */;
|
|
const feedbackActionSheetProps = {'headerLabel': null, 'showHeaderCloseButton': true,
|
|
'hideDontShowAgainCheckbox': true,
|
|
headerLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wGioO1)};
|
|
string = intl.string;
|
|
const Yzl7Or = (require(1244) /* metro dependency 1244: indexNative */).t.Yzl7Or;
|
|
feedbackActionSheetProps.ratingsBodyLabel = Reflect.apply(string, intl, [Yzl7Or]);
|
|
feedbackActionSheetProps.reasonsHeaderLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g1q5fr);
|
|
feedbackActionSheetProps.reasons = items2;
|
|
feedbackActionSheetProps.trackOpen = trackOpen_77710;
|
|
feedbackActionSheetProps.trackReport = trackReport;
|
|
return <FeedbackActionSheet {...feedbackActionSheetProps} />;
|
|
}
|
|
|
|
function NotificationSurveyActionSheetTrackReport({rating, reason}) { // fn#77712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10112:1022, owner: NotificationSurveyActionSheet.trackReport, offset: 0x01e07fad, size: 277 bytes, params: 2, frame: 20
|
|
var value2;
|
|
var defaultImport;
|
|
let value = null;
|
|
if (value != rating) {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(dependencyMap[5]);
|
|
defaultImport.track(AnalyticEvents.NOTIFICATION_REPORT_SUBMITTED,
|
|
{reason: value != reason ? reason.value : value,
|
|
rating: rating, notification_type: notificationType, location: location, message_id: messageId});
|
|
}
|
|
value = environment.__proto__;
|
|
require(dependencyMap[7]).handleSurveyCleanup();
|
|
value = importDefault(dependencyMap[8]);
|
|
const openLazy = value.openLazy;
|
|
const value3 = require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths);
|
|
const object2 = {};
|
|
const intl = require(dependencyMap[4]).intl;
|
|
object2.header = intl.string(require(dependencyMap[4]).t.wGioO1);
|
|
Reflect.apply(openLazy, value, [value3, 'UserFeedbackSurvey', object2]);
|
|
}
|
|
|