Skip to content
Permalink
Browse files
Remove TimePickerAndroid from React Native
Summary: Lean Core

Reviewed By: rubennorte

Differential Revision: D17344045

fbshipit-source-id: a5a7ab41075da93f8a1929059abe183838b00c82
  • Loading branch information
cpojer authored and facebook-github-bot committed Sep 13, 2019
1 parent 3666244 commit dbf070c51ecd14127a8317faa75cb661697b5a6b
Showing 9 changed files with 13 additions and 428 deletions.

This file was deleted.

This file was deleted.

@@ -1995,39 +1995,6 @@ + (RCTManagedPointer *)JS_NativeStatusBarManager_SpecGetHeightCallbackResult:(id

} // namespace react
} // namespace facebook
@implementation RCTCxxConvert (NativeTimePickerAndroid_TimePickerOptions)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerOptions:(id)json
{
return facebook::react::managedPointer<JS::NativeTimePickerAndroid::TimePickerOptions>(json);
}
@end
namespace facebook {
namespace react {


static facebook::jsi::Value __hostFunction_NativeTimePickerAndroidSpecJSI_open(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "open", @selector(open:resolve:reject:), args, count);
}


NativeTimePickerAndroidSpecJSI::NativeTimePickerAndroidSpecJSI(id<RCTTurboModule> instance, std::shared_ptr<JSCallInvoker> jsInvoker)
: ObjCTurboModule("TimePickerAndroid", instance, jsInvoker) {

methodMap_["open"] = MethodMetadata {1, __hostFunction_NativeTimePickerAndroidSpecJSI_open};

setMethodArgConversionSelector(@"open", 0, @"JS_NativeTimePickerAndroid_TimePickerOptions:");


}

} // namespace react
} // namespace facebook
@implementation RCTCxxConvert (NativeTimePickerAndroid_TimePickerResult)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerResult:(id)json
{
return facebook::react::managedPointer<JS::NativeTimePickerAndroid::TimePickerResult>(json);
}
@end
namespace facebook {
namespace react {

@@ -2038,63 +2038,6 @@ namespace facebook {
};
} // namespace react
} // namespace facebook

namespace JS {
namespace NativeTimePickerAndroid {
struct TimePickerOptions {
folly::Optional<double> hour() const;
folly::Optional<double> minute() const;
folly::Optional<bool> is24Hour() const;
NSString *mode() const;

TimePickerOptions(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}

@interface RCTCxxConvert (NativeTimePickerAndroid_TimePickerOptions)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerOptions:(id)json;
@end
@protocol NativeTimePickerAndroidSpec <RCTBridgeModule, RCTTurboModule>

- (void)open:(JS::NativeTimePickerAndroid::TimePickerOptions &)options
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;

@end
namespace facebook {
namespace react {
/**
* ObjC++ class for module 'TimePickerAndroid'
*/

class JSI_EXPORT NativeTimePickerAndroidSpecJSI : public ObjCTurboModule {
public:
NativeTimePickerAndroidSpecJSI(id<RCTTurboModule> instance, std::shared_ptr<JSCallInvoker> jsInvoker);

};
} // namespace react
} // namespace facebook

namespace JS {
namespace NativeTimePickerAndroid {
struct TimePickerResult {
NSString *action() const;
double hour() const;
double minute() const;

TimePickerResult(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}

@interface RCTCxxConvert (NativeTimePickerAndroid_TimePickerResult)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerResult:(id)json;
@end
@protocol NativeTimingSpec <RCTBridgeModule, RCTTurboModule>

- (void)createTimer:(double)callbackID
@@ -3074,41 +3017,6 @@ inline JS::NativeStatusBarManager::Constants::Builder::Builder(const Input i) :
inline JS::NativeStatusBarManager::Constants::Builder::Builder(Constants i) : _factory(^{
return i.unsafeRawValue();
}) {}
inline folly::Optional<double> JS::NativeTimePickerAndroid::TimePickerOptions::hour() const
{
id const p = _v[@"hour"];
return RCTBridgingToOptionalDouble(p);
}
inline folly::Optional<double> JS::NativeTimePickerAndroid::TimePickerOptions::minute() const
{
id const p = _v[@"minute"];
return RCTBridgingToOptionalDouble(p);
}
inline folly::Optional<bool> JS::NativeTimePickerAndroid::TimePickerOptions::is24Hour() const
{
id const p = _v[@"is24Hour"];
return RCTBridgingToOptionalBool(p);
}
inline NSString *JS::NativeTimePickerAndroid::TimePickerOptions::mode() const
{
id const p = _v[@"mode"];
return RCTBridgingToString(p);
}
inline NSString *JS::NativeTimePickerAndroid::TimePickerResult::action() const
{
id const p = _v[@"action"];
return RCTBridgingToString(p);
}
inline double JS::NativeTimePickerAndroid::TimePickerResult::hour() const
{
id const p = _v[@"hour"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeTimePickerAndroid::TimePickerResult::minute() const
{
id const p = _v[@"minute"];
return RCTBridgingToDouble(p);
}
inline JS::NativeToastAndroid::Constants::Builder::Builder(const Input i) : _factory(^{
NSMutableDictionary *d = [NSMutableDictionary new];
auto SHORT = i.SHORT.get();

This file was deleted.

@@ -204,10 +204,6 @@ const APIExamples: Array<RNTesterExample> = [
key: 'ShareExample',
module: require('../examples/Share/ShareExample'),
},
{
key: 'TimePickerAndroidExample',
module: require('../examples/TimePicker/TimePickerAndroidExample'),
},
{
key: 'TimerExample',
module: require('../examples/Timer/TimerExample'),

0 comments on commit dbf070c

Please sign in to comment.