2016-10-09 14:50:04 +02:00
|
|
|
//
|
|
|
|
// RCTConvert+InstabugEnums.m
|
|
|
|
// instabugDemo
|
|
|
|
//
|
|
|
|
// Created by Yousef Hamza on 9/29/16.
|
|
|
|
// Copyright © 2016 Facebook. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "RCTConvert+InstabugEnums.h"
|
|
|
|
#import <Instabug/IBGEnums.h>
|
|
|
|
|
|
|
|
@implementation RCTConvert (InstabugEnums)
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGInvocationEvent, (@{
|
|
|
|
@"invocationEventNone": @(IBGInvocationEventNone),
|
|
|
|
@"invocationEventShake": @(IBGInvocationEventShake),
|
|
|
|
@"invocationEventScreenshot": @(IBGInvocationEventScreenshot),
|
|
|
|
@"invocationEventTwoFingersSwipeLeft": @(IBGInvocationEventTwoFingersSwipeLeft),
|
|
|
|
@"invocationEventRightEdgePan": @(IBGInvocationEventRightEdgePan),
|
|
|
|
@"invocationEventFloatingButton": @(IBGInvocationEventFloatingButton)
|
|
|
|
}), IBGInvocationEventNone, integerValue);
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGInvocationMode, (@{
|
|
|
|
@"invocationModeNA": @(IBGInvocationModeNA),
|
|
|
|
@"invocationModeNewBug": @(IBGInvocationModeNewBug),
|
2017-01-10 01:22:11 +02:00
|
|
|
@"invocationModeNewFeedback": @(IBGInvocationModeNewFeedback),
|
2016-10-09 14:50:04 +02:00
|
|
|
@"invocationModeNewChat": @(IBGInvocationModeNewChat),
|
|
|
|
@"invocationModeChatsList": @(IBGInvocationModeChatsList)
|
|
|
|
}), IBGInvocationModeNA, integerValue);
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGDismissType, (@{
|
|
|
|
@"dismissTypeSubmit": @(IBGDismissTypeSubmit),
|
|
|
|
@"dismissTypeCancel": @(IBGDismissTypeCancel),
|
|
|
|
@"dismissTypeAddAtttachment": @(IBGDismissTypeAddAttachment)
|
|
|
|
}), IBGDismissTypeSubmit, integerValue)
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGReportType, (@{
|
|
|
|
@"reportTypeBug": @(IBGReportTypeBug),
|
|
|
|
@"reportTypeFeedback": @(IBGReportTypeFeedback)
|
|
|
|
}), IBGReportTypeBug, integerValue);
|
|
|
|
|
2016-10-09 16:10:11 +02:00
|
|
|
RCT_ENUM_CONVERTER(CGRectEdge, (@{
|
|
|
|
@"rectMinXEdge": @(CGRectMinXEdge),
|
|
|
|
@"rectMinYEdge": @(CGRectMinYEdge),
|
|
|
|
@"rectMaxXEdge": @(CGRectMaxXEdge),
|
|
|
|
@"rectMaxYEdge": @(CGRectMaxYEdge)
|
|
|
|
}), CGRectMinXEdge, unsignedIntegerValue);
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGLocale, (@{
|
|
|
|
@"localeArabic": @(IBGLocaleArabic),
|
|
|
|
@"localeChineseSimplified": @(IBGLocaleChineseSimplified),
|
|
|
|
@"localeChineseTraditional": @(IBGLocaleChineseTraditional),
|
|
|
|
@"localeCzech": @(IBGLocaleCzech),
|
|
|
|
@"localeDanish": @(IBGLocaleDanish),
|
|
|
|
@"localeEnglish": @(IBGLocaleEnglish),
|
|
|
|
@"localeFrench": @(IBGLocaleFrench),
|
|
|
|
@"localeGerman": @(IBGLocaleGerman),
|
|
|
|
@"localeItalian": @(IBGLocaleItalian),
|
|
|
|
@"localeJapanese": @(IBGLocaleJapanese),
|
|
|
|
@"localeKorean": @(IBGLocaleKorean),
|
|
|
|
@"localePolish": @(IBGLocalePolish),
|
|
|
|
@"localePortugueseBrazil": @(IBGLocalePortugueseBrazil),
|
|
|
|
@"localeRussian": @(IBGLocaleRussian),
|
|
|
|
@"localeSpanish": @(IBGLocaleSpanish),
|
|
|
|
@"localeSwedish": @(IBGLocaleSwedish),
|
|
|
|
@"localeTurkish": @(IBGLocaleTurkish)
|
|
|
|
}), IBGLocaleEnglish, integerValue);
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGColorTheme, (@{
|
|
|
|
@"colorThemeLight": @(IBGColorThemeLight),
|
|
|
|
@"colorThemeDark": @(IBGColorThemeDark)
|
|
|
|
}), IBGColorThemeLight, integerValue);
|
|
|
|
|
|
|
|
RCT_ENUM_CONVERTER(IBGString, (@{
|
2016-10-10 18:08:20 +02:00
|
|
|
@"shakeHint": @(IBGStringShakeHint),
|
|
|
|
@"swipeHint": @(IBGStringSwipeHint),
|
|
|
|
@"edgeSwipeStartHint": @(IBGStringEdgeSwipeStartHint),
|
|
|
|
@"startAlertText": @(IBGStringStartAlertText),
|
|
|
|
@"invalidEmailMessage": @(IBGStringInvalidEmailMessage),
|
|
|
|
@"invalidEmailTitle": @(IBGStringInvalidEmailTitle),
|
|
|
|
@"invalidCommentMessage": @(IBGStringInvalidCommentMessage),
|
|
|
|
@"invalidCommentTitle": @(IBGStringInvalidCommentTitle),
|
|
|
|
@"invocationHeader": @(IBGStringInvocationHeader),
|
|
|
|
@"talkToUs": @(IBGStringTalkToUs),
|
|
|
|
@"reportBug": @(IBGStringReportBug),
|
|
|
|
@"reportFeedback": @(IBGStringReportFeedback),
|
|
|
|
@"emailFieldHint": @(IBGStringEmailFieldHint),
|
|
|
|
@"commentFieldHintForBugReport": @(IBGStringCommentFieldHintForBugReport),
|
|
|
|
@"commentFieldHintForFeedback": @(IBGStringCommentFieldHintForFeedback),
|
2016-10-17 17:41:42 +02:00
|
|
|
@"addScreenRecordingMessage": @(IBGStringAddScreenRecordingMessage),
|
2016-10-10 18:08:20 +02:00
|
|
|
@"addVoiceMessage": @(IBGStringAddVoiceMessage),
|
|
|
|
@"addImageFromGallery": @(IBGStringAddImageFromGallery),
|
|
|
|
@"addExtraScreenshot": @(IBGStringAddExtraScreenshot),
|
|
|
|
@"audioRecordingPermissionDeniedTitle": @(IBGStringAudioRecordingPermissionDeniedTitle),
|
|
|
|
@"audioRecordingPermissionDeniedMessage": @(IBGStringAudioRecordingPermissionDeniedMessage),
|
2016-10-17 17:41:42 +02:00
|
|
|
@"microphonePermissionAlertSettingsButtonTitle": @(IBGStringMicrophonePermissionAlertSettingsButtonTitle),
|
|
|
|
@"chatsHeaderTitle": @(IBGStringChatsHeaderTitle),
|
|
|
|
@"team": @(IBGStringTeam),
|
2016-10-10 18:08:20 +02:00
|
|
|
@"recordingMessageToHoldText": @(IBGStringRecordingMessageToHoldText),
|
|
|
|
@"recordingMessageToReleaseText": @(IBGStringRecordingMessageToReleaseText),
|
2016-10-17 17:41:42 +02:00
|
|
|
@"messagesNotification": @(IBGStringMessagesNotification),
|
|
|
|
@"messagesNotificationAndOthers": @(IBGStringMessagesNotificationAndOthers),
|
2016-10-10 18:08:20 +02:00
|
|
|
@"screenshotHeaderTitle": @(IBGStringScreenshotHeaderTitle),
|
2016-10-17 17:41:42 +02:00
|
|
|
@"okButtonTitle": @(IBGStringOkButtonTitle),
|
|
|
|
@"cancelButtonTitle": @(IBGStringCancelButtonTitle),
|
2016-10-10 18:08:20 +02:00
|
|
|
@"thankYouText": @(IBGStringThankYouText),
|
|
|
|
@"audio": @(IBGStringAudio),
|
2016-10-17 17:41:42 +02:00
|
|
|
@"screenRecording": @(IBGStringScreenRecording),
|
2016-10-10 18:08:20 +02:00
|
|
|
@"image": @(IBGStringImage),
|
|
|
|
}), IBGStringShakeHint, integerValue);
|
2016-10-09 14:50:04 +02:00
|
|
|
@end
|