-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support excluding multiple platforms.
Summary: Currently the schema only allows to exclude a single platform (iOS OR Android). There are cases where we need to exclude multiple. This change converts the previous `excludePlatform` string property into an `excludePlatforms` array. Changelog: [Internal][Changed] - Added support to exclude multiple platforms in Codegen. Reviewed By: sammy-SC Differential Revision: D21426950 fbshipit-source-id: eff36ffa207109274794b4b300bf6313f8286161
- Loading branch information
1 parent
7bb1c4e
commit 16ea9ba
Showing
31 changed files
with
499 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
ReactAndroid/src/main/java/com/facebook/react/viewmanagers/DatePickerManagerDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaDelegate.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
import com.facebook.react.bridge.ReadableArray; | ||
import com.facebook.react.uimanager.BaseViewManagerDelegate; | ||
import com.facebook.react.uimanager.BaseViewManagerInterface; | ||
import com.facebook.react.uimanager.LayoutShadowNode; | ||
|
||
public class DatePickerManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & DatePickerManagerInterface<T>> extends BaseViewManagerDelegate<T, U> { | ||
public DatePickerManagerDelegate(U viewManager) { | ||
super(viewManager); | ||
} | ||
@Override | ||
public void setProperty(T view, String propName, @Nullable Object value) { | ||
switch (propName) { | ||
case "date": | ||
mViewManager.setDate(view, value == null ? 0f : ((Double) value).floatValue()); | ||
break; | ||
case "initialDate": | ||
mViewManager.setInitialDate(view, value == null ? 0f : ((Double) value).floatValue()); | ||
break; | ||
case "locale": | ||
mViewManager.setLocale(view, value == null ? null : (String) value); | ||
break; | ||
case "maximumDate": | ||
mViewManager.setMaximumDate(view, value == null ? 0f : ((Double) value).floatValue()); | ||
break; | ||
case "minimumDate": | ||
mViewManager.setMinimumDate(view, value == null ? 0f : ((Double) value).floatValue()); | ||
break; | ||
case "minuteInterval": | ||
mViewManager.setMinuteInterval(view, value == null ? 1 : ((Double) value).intValue()); | ||
break; | ||
case "mode": | ||
mViewManager.setMode(view, (String) value); | ||
break; | ||
case "timeZoneOffsetInMinutes": | ||
mViewManager.setTimeZoneOffsetInMinutes(view, value == null ? 0f : ((Double) value).floatValue()); | ||
break; | ||
default: | ||
super.setProperty(view, propName, value); | ||
} | ||
} | ||
|
||
public void receiveCommand(DatePickerManagerInterface<T> viewManager, T view, String commandName, ReadableArray args) { | ||
switch (commandName) { | ||
case "setNativeDate": | ||
viewManager.setNativeDate(view, (float) args.getDouble(0)); | ||
break; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
ReactAndroid/src/main/java/com/facebook/react/viewmanagers/DatePickerManagerInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaInterface.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
|
||
public interface DatePickerManagerInterface<T extends View> { | ||
void setDate(T view, float value); | ||
void setInitialDate(T view, float value); | ||
void setLocale(T view, @Nullable String value); | ||
void setMaximumDate(T view, float value); | ||
void setMinimumDate(T view, float value); | ||
void setMinuteInterval(T view, @Nullable Integer value); | ||
void setMode(T view, @Nullable String value); | ||
void setTimeZoneOffsetInMinutes(T view, float value); | ||
void setNativeDate(T view, float date); | ||
} |
51 changes: 51 additions & 0 deletions
51
...droid/src/main/java/com/facebook/react/viewmanagers/PullToRefreshViewManagerDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaDelegate.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
import com.facebook.react.bridge.ColorPropConverter; | ||
import com.facebook.react.bridge.ReadableArray; | ||
import com.facebook.react.uimanager.BaseViewManagerDelegate; | ||
import com.facebook.react.uimanager.BaseViewManagerInterface; | ||
import com.facebook.react.uimanager.LayoutShadowNode; | ||
|
||
public class PullToRefreshViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & PullToRefreshViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> { | ||
public PullToRefreshViewManagerDelegate(U viewManager) { | ||
super(viewManager); | ||
} | ||
@Override | ||
public void setProperty(T view, String propName, @Nullable Object value) { | ||
switch (propName) { | ||
case "tintColor": | ||
mViewManager.setTintColor(view, ColorPropConverter.getColor(value, view.getContext())); | ||
break; | ||
case "titleColor": | ||
mViewManager.setTitleColor(view, ColorPropConverter.getColor(value, view.getContext())); | ||
break; | ||
case "title": | ||
mViewManager.setTitle(view, value == null ? null : (String) value); | ||
break; | ||
case "refreshing": | ||
mViewManager.setRefreshing(view, value == null ? false : (boolean) value); | ||
break; | ||
default: | ||
super.setProperty(view, propName, value); | ||
} | ||
} | ||
|
||
public void receiveCommand(PullToRefreshViewManagerInterface<T> viewManager, T view, String commandName, ReadableArray args) { | ||
switch (commandName) { | ||
case "setNativeRefreshing": | ||
viewManager.setNativeRefreshing(view, args.getBoolean(0)); | ||
break; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...roid/src/main/java/com/facebook/react/viewmanagers/PullToRefreshViewManagerInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaInterface.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
|
||
public interface PullToRefreshViewManagerInterface<T extends View> { | ||
void setTintColor(T view, @Nullable Integer value); | ||
void setTitleColor(T view, @Nullable Integer value); | ||
void setTitle(T view, @Nullable String value); | ||
void setRefreshing(T view, boolean value); | ||
void setNativeRefreshing(T view, boolean refreshing); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.