forked from Shopify/flash-list
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
14,233 additions
and
1,463 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,15 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | |
|
||
## [Unreleased] | ||
|
||
- Added Fabric support for iOS and Android | ||
|
||
## [1.6.1] - 2023-09-14 | ||
|
||
- Prevent an expired layout provider from being used again | ||
- https://github.com/Shopify/flash-list/pull/915 | ||
|
||
## [1.6.0] - 2023-09-13 | ||
|
||
- Update types to match `[email protected]` view types. | ||
- https://github.com/Shopify/flash-list/pull/890 | ||
- Add type definition for `ViewToken["item"]` | ||
|
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
12 changes: 12 additions & 0 deletions
12
android/src/fabric/java/com/shopify/reactnative/flash_list/ReactContextExtensions.kt
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,12 @@ | ||
package com.shopify.reactnative.flash_list | ||
|
||
import com.facebook.react.bridge.ReactContext | ||
import com.facebook.react.fabric.FabricUIManager | ||
import com.facebook.react.uimanager.UIManagerHelper | ||
import com.facebook.react.uimanager.common.UIManagerType | ||
import com.facebook.react.bridge.WritableMap | ||
|
||
fun ReactContext.dispatchEvent(nativeTag: Int, eventName: String, event: WritableMap) { | ||
val fabricUIManager = UIManagerHelper.getUIManager(this, UIManagerType.FABRIC) as FabricUIManager | ||
fabricUIManager.receiveEvent(nativeTag, eventName, event) | ||
} |
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
46 changes: 46 additions & 0 deletions
46
android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerDelegate.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,46 @@ | ||
/** | ||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
* | ||
* Do not edit this file as changes may cause incorrect behavior and will be lost | ||
* once the code is regenerated. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaDelegate.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
import com.facebook.react.uimanager.BaseViewManagerDelegate; | ||
import com.facebook.react.uimanager.BaseViewManagerInterface; | ||
|
||
public class AutoLayoutViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & AutoLayoutViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> { | ||
public AutoLayoutViewManagerDelegate(U viewManager) { | ||
super(viewManager); | ||
} | ||
@Override | ||
public void setProperty(T view, String propName, @Nullable Object value) { | ||
switch (propName) { | ||
case "horizontal": | ||
mViewManager.setHorizontal(view, value == null ? false : (boolean) value); | ||
break; | ||
case "scrollOffset": | ||
mViewManager.setScrollOffset(view, value == null ? 0f : ((Double) value).doubleValue()); | ||
break; | ||
case "windowSize": | ||
mViewManager.setWindowSize(view, value == null ? 0f : ((Double) value).doubleValue()); | ||
break; | ||
case "renderAheadOffset": | ||
mViewManager.setRenderAheadOffset(view, value == null ? 0f : ((Double) value).doubleValue()); | ||
break; | ||
case "enableInstrumentation": | ||
mViewManager.setEnableInstrumentation(view, value == null ? false : (boolean) value); | ||
break; | ||
case "disableAutoLayout": | ||
mViewManager.setDisableAutoLayout(view, value == null ? false : (boolean) value); | ||
break; | ||
default: | ||
super.setProperty(view, propName, value); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerInterface.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 @@ | ||
/** | ||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
* | ||
* Do not edit this file as changes may cause incorrect behavior and will be lost | ||
* once the code is regenerated. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaInterface.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
|
||
public interface AutoLayoutViewManagerInterface<T extends View> { | ||
void setHorizontal(T view, boolean value); | ||
void setScrollOffset(T view, double value); | ||
void setWindowSize(T view, double value); | ||
void setRenderAheadOffset(T view, double value); | ||
void setEnableInstrumentation(T view, boolean value); | ||
void setDisableAutoLayout(T view, boolean value); | ||
} |
31 changes: 31 additions & 0 deletions
31
android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerDelegate.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,31 @@ | ||
/** | ||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
* | ||
* Do not edit this file as changes may cause incorrect behavior and will be lost | ||
* once the code is regenerated. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaDelegate.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
import com.facebook.react.uimanager.BaseViewManagerDelegate; | ||
import com.facebook.react.uimanager.BaseViewManagerInterface; | ||
|
||
public class CellContainerManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & CellContainerManagerInterface<T>> extends BaseViewManagerDelegate<T, U> { | ||
public CellContainerManagerDelegate(U viewManager) { | ||
super(viewManager); | ||
} | ||
@Override | ||
public void setProperty(T view, String propName, @Nullable Object value) { | ||
switch (propName) { | ||
case "index": | ||
mViewManager.setIndex(view, value == null ? 0 : ((Double) value).intValue()); | ||
break; | ||
default: | ||
super.setProperty(view, propName, value); | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerInterface.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,16 @@ | ||
/** | ||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
* | ||
* Do not edit this file as changes may cause incorrect behavior and will be lost | ||
* once the code is regenerated. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaInterface.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
|
||
public interface CellContainerManagerInterface<T extends View> { | ||
void setIndex(T view, int value); | ||
} |
Oops, something went wrong.