@draftbit/core 50.1.2-8b3aec.2 → 50.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -1
  2. package/lib/commonjs/components/KeyboardAvoidingView.js +1 -1
  3. package/lib/commonjs/components/SectionList/SectionList.js +1 -1
  4. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlashList.js +1 -1
  5. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
  6. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
  7. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +1 -1
  8. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
  9. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
  10. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
  11. package/lib/commonjs/components/SwipeableItem/SwipeableList.js +1 -1
  12. package/lib/commonjs/components/TabView/TabView.js +1 -1
  13. package/lib/typescript/src/components/Checkbox/CheckboxRow.js +3 -3
  14. package/lib/typescript/src/components/Checkbox/CheckboxRow.js.map +1 -1
  15. package/lib/typescript/src/components/KeyboardAvoidingView.d.ts +1 -1
  16. package/lib/typescript/src/components/KeyboardAvoidingView.js +1 -1
  17. package/lib/typescript/src/components/KeyboardAvoidingView.js.map +1 -1
  18. package/lib/typescript/src/components/SectionList/SectionList.d.ts +6 -4
  19. package/lib/typescript/src/components/SectionList/SectionList.js +4 -4
  20. package/lib/typescript/src/components/SectionList/SectionList.js.map +1 -1
  21. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.d.ts +2 -1
  22. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
  23. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  24. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.d.ts +2 -1
  25. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
  26. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  27. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.d.ts +2 -1
  28. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +3 -3
  29. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
  30. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.d.ts +2 -2
  31. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
  32. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  33. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.d.ts +2 -1
  34. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
  35. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
  36. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.d.ts +6 -2
  37. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
  38. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  39. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.d.ts +6 -2
  40. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
  41. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  42. package/lib/typescript/src/components/SwipeableItem/SwipeableList.d.ts +3 -3
  43. package/lib/typescript/src/components/SwipeableItem/SwipeableList.js +4 -4
  44. package/lib/typescript/src/components/SwipeableItem/SwipeableList.js.map +1 -1
  45. package/lib/typescript/src/components/TabView/TabView.d.ts +2 -0
  46. package/lib/typescript/src/components/TabView/TabView.js +17 -2
  47. package/lib/typescript/src/components/TabView/TabView.js.map +1 -1
  48. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +3 -3
  50. package/src/components/Checkbox/CheckboxRow.js +3 -3
  51. package/src/components/Checkbox/CheckboxRow.js.map +1 -1
  52. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  53. package/src/components/KeyboardAvoidingView.js +1 -1
  54. package/src/components/KeyboardAvoidingView.js.map +1 -1
  55. package/src/components/KeyboardAvoidingView.tsx +2 -2
  56. package/src/components/SectionList/SectionList.js +4 -4
  57. package/src/components/SectionList/SectionList.js.map +1 -1
  58. package/src/components/SectionList/SectionList.tsx +152 -145
  59. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
  60. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  61. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx +22 -16
  62. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
  63. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  64. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx +22 -16
  65. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +3 -3
  66. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
  67. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx +20 -13
  68. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
  69. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  70. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx +27 -17
  71. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
  72. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
  73. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx +20 -13
  74. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
  75. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  76. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx +28 -20
  77. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
  78. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  79. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx +28 -20
  80. package/src/components/SwipeableItem/SwipeableList.js +4 -4
  81. package/src/components/SwipeableItem/SwipeableList.js.map +1 -1
  82. package/src/components/SwipeableItem/SwipeableList.tsx +47 -32
  83. package/src/components/TabView/TabView.js +17 -2
  84. package/src/components/TabView/TabView.js.map +1 -1
  85. package/src/components/TabView/TabView.tsx +19 -0
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","labelStyle","labelContainerStyle","checkboxStyle","direction","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Checkbox/CheckboxRow.tsx";import*as React from"react";import{StyleSheet,View,Platform,Pressable}from"react-native";import{isString}from"lodash";import{extractStyles}from"../../utilities";import{usePrevious}from"../../hooks";import Text from"../Text";import Checkbox from"./Checkbox";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Direction=function(Direction){Direction["Row"]="row";Direction["RowReverse"]="row-reverse";return Direction;}({});var renderLabel=function renderLabel(value,labelStyle,textStyle){if(isString(value)){return _jsx(Text,{style:[textStyle,labelStyle],children:value});}else{return _jsx(_Fragment,{children:value});}};var CheckboxRow=function CheckboxRow(_ref){var _ref$label=_ref.label,label=_ref$label===void 0?"Label":_ref$label,labelStyle=_ref.labelStyle,labelContainerStyle=_ref.labelContainerStyle,checkboxStyle=_ref.checkboxStyle,_ref$direction=_ref.direction,direction=_ref$direction===void 0?Direction.Row:_ref$direction,Icon=_ref.Icon,status=_ref.status,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,onPress=_ref.onPress,onCheck=_ref.onCheck,onUncheck=_ref.onUncheck,color=_ref.color,uncheckedColor=_ref.uncheckedColor,defaultValue=_ref.defaultValue,checkedIcon=_ref.checkedIcon,uncheckedIcon=_ref.uncheckedIcon,size=_ref.size,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(status||defaultValue||false),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];React.useEffect(function(){if(status!=null){setInternalValue(status);}},[status]);var previousDefaultValue=usePrevious(defaultValue);React.useEffect(function(){if(defaultValue!==previousDefaultValue){setInternalValue(Boolean(defaultValue));}},[defaultValue,previousDefaultValue]);var handlePress=function handlePress(){var newValue=!internalValue;setInternalValue(newValue);onPress==null?void 0:onPress(newValue);if(newValue){onCheck==null?void 0:onCheck();}if(!newValue){onUncheck==null?void 0:onUncheck();}};var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;return _jsxs(Pressable,Object.assign({onPress:handlePress,style:[viewStyles,styles.mainParent,{flexDirection:direction}],disabled:disabled},rest,{children:[_jsx(View,{style:[styles.label,{alignItems:direction===Direction.Row?"flex-start":"flex-end"},labelContainerStyle],children:renderLabel(label,textStyles,labelStyle)}),_jsx(Checkbox,{Icon:Icon,status:internalValue,style:checkboxStyle,disabled:disabled,onPress:handlePress,color:color,uncheckedColor:uncheckedColor,checkedIcon:checkedIcon,uncheckedIcon:uncheckedIcon,size:size})]}));};var styles=StyleSheet.create({mainParent:Object.assign({alignItems:"center",justifyContent:"space-around",paddingStart:20,minHeight:50,paddingEnd:20,display:"flex"},Platform.select({web:{cursor:"pointer",userSelect:"none"}})),label:{flex:3}});export default CheckboxRow;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","labelStyle","labelContainerStyle","checkboxStyle","direction","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Checkbox/CheckboxRow.tsx";import*as React from"react";import{StyleSheet,View,Platform,Pressable}from"react-native";import{isString}from"lodash";import{extractStyles}from"../../utilities";import{usePrevious}from"../../hooks";import Text from"../Text";import Checkbox from"./Checkbox";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Direction=function(Direction){Direction["Row"]="row";Direction["RowReverse"]="row-reverse";return Direction;}({});var renderLabel=function renderLabel(value,labelStyle,textStyle){if(isString(value)){return _jsx(Text,{style:[textStyle,labelStyle],children:value});}else{return _jsx(_Fragment,{children:value});}};var CheckboxRow=function CheckboxRow(_ref){var _ref$label=_ref.label,label=_ref$label===void 0?"Label":_ref$label,labelStyle=_ref.labelStyle,labelContainerStyle=_ref.labelContainerStyle,checkboxStyle=_ref.checkboxStyle,_ref$direction=_ref.direction,direction=_ref$direction===void 0?Direction.Row:_ref$direction,Icon=_ref.Icon,status=_ref.status,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,onPress=_ref.onPress,onCheck=_ref.onCheck,onUncheck=_ref.onUncheck,color=_ref.color,uncheckedColor=_ref.uncheckedColor,defaultValue=_ref.defaultValue,checkedIcon=_ref.checkedIcon,uncheckedIcon=_ref.uncheckedIcon,size=_ref.size,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(status||defaultValue||false),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];React.useEffect(function(){if(status!=null){setInternalValue(status);}},[status]);var previousDefaultValue=usePrevious(defaultValue);React.useEffect(function(){if(defaultValue!==previousDefaultValue){setInternalValue(Boolean(defaultValue));}},[defaultValue,previousDefaultValue]);var handlePress=function handlePress(){var newValue=!internalValue;setInternalValue(newValue);onPress==null?void 0:onPress(newValue);if(newValue){onCheck==null?void 0:onCheck();}if(!newValue){onUncheck==null?void 0:onUncheck();}};var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;return _jsxs(Pressable,Object.assign({onPress:handlePress,style:[styles.mainParent,viewStyles,,{flexDirection:direction}],disabled:disabled},rest,{children:[_jsx(View,{style:[styles.label,{alignItems:direction===Direction.Row?"flex-start":"flex-end"},labelContainerStyle],children:renderLabel(label,textStyles,labelStyle)}),_jsx(Checkbox,{Icon:Icon,status:internalValue,style:checkboxStyle,disabled:disabled,onPress:handlePress,color:color,uncheckedColor:uncheckedColor,checkedIcon:checkedIcon,uncheckedIcon:uncheckedIcon,size:size})]}));};var styles=StyleSheet.create({mainParent:Object.assign({alignItems:"center",justifyContent:"space-around",paddingLeft:20,paddingRight:20,minHeight:50,display:"flex"},Platform.select({web:{cursor:"pointer",userSelect:"none"}})),label:{flex:3}});export default CheckboxRow;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["behavior","keyboardVerticalOffset","androidBehavior","androidKeyboardVerticalOffset","iosBehavior","iosKeyboardVerticalOffset"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/KeyboardAvoidingView.tsx";import React from"react";import{KeyboardAvoidingView as KeyboardAvoidingViewComponent,Platform}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";var isIos=Platform.OS==="ios";var isAndroid=Platform.OS==="android";var KeyboardAvoidingView=function KeyboardAvoidingView(_ref){var _behaviorResult;var _ref$behavior=_ref.behavior,behavior=_ref$behavior===void 0?"padding":_ref$behavior,_ref$keyboardVertical=_ref.keyboardVerticalOffset,keyboardVerticalOffset=_ref$keyboardVertical===void 0?0:_ref$keyboardVertical,androidBehavior=_ref.androidBehavior,androidKeyboardVerticalOffset=_ref.androidKeyboardVerticalOffset,iosBehavior=_ref.iosBehavior,iosKeyboardVerticalOffset=_ref.iosKeyboardVerticalOffset,rest=_objectWithoutProperties(_ref,_excluded);var behaviorResult;if(isIos&&iosBehavior!==undefined){behaviorResult=iosBehavior;}else if(isAndroid&&androidBehavior!==undefined){behaviorResult=androidBehavior;}else{behaviorResult=behavior;}var keyboardVerticalOffsetResult;if(isIos&&iosKeyboardVerticalOffset!==undefined){keyboardVerticalOffsetResult=iosKeyboardVerticalOffset;}else if(isAndroid&&androidKeyboardVerticalOffset!==undefined){keyboardVerticalOffsetResult=androidKeyboardVerticalOffset;}else{keyboardVerticalOffsetResult=keyboardVerticalOffset;}return _jsx(KeyboardAvoidingViewComponent,Object.assign({behavior:(_behaviorResult=behaviorResult)!=null?_behaviorResult:undefined,keyboardVerticalOffset:keyboardVerticalOffsetResult},rest));};export default KeyboardAvoidingView;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["behavior","keyboardVerticalOffset","androidBehavior","androidKeyboardVerticalOffset","iosBehavior","iosKeyboardVerticalOffset"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/KeyboardAvoidingView.tsx";import React from"react";import{KeyboardAvoidingView as KeyboardAvoidingViewComponent,Platform}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";var isIos=Platform.OS==="ios";var isAndroid=Platform.OS==="android";var KeyboardAvoidingView=function KeyboardAvoidingView(_ref){var _ref$behavior=_ref.behavior,behavior=_ref$behavior===void 0?"padding":_ref$behavior,_ref$keyboardVertical=_ref.keyboardVerticalOffset,keyboardVerticalOffset=_ref$keyboardVertical===void 0?0:_ref$keyboardVertical,androidBehavior=_ref.androidBehavior,androidKeyboardVerticalOffset=_ref.androidKeyboardVerticalOffset,iosBehavior=_ref.iosBehavior,iosKeyboardVerticalOffset=_ref.iosKeyboardVerticalOffset,rest=_objectWithoutProperties(_ref,_excluded);var behaviorResult;if(isIos&&iosBehavior!==undefined){behaviorResult=iosBehavior;}else if(isAndroid&&androidBehavior!==undefined){behaviorResult=androidBehavior;}else{behaviorResult=behavior;}var keyboardVerticalOffsetResult;if(isIos&&iosKeyboardVerticalOffset!==undefined){keyboardVerticalOffsetResult=iosKeyboardVerticalOffset;}else if(isAndroid&&androidKeyboardVerticalOffset!==undefined){keyboardVerticalOffsetResult=androidKeyboardVerticalOffset;}else{keyboardVerticalOffsetResult=keyboardVerticalOffset;}return _jsx(KeyboardAvoidingViewComponent,Object.assign({behavior:behaviorResult,keyboardVerticalOffset:keyboardVerticalOffsetResult},rest));};export default KeyboardAvoidingView;
@@ -1 +1 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["sectionKey","stickyHeader","listComponent","data","renderItem","keyExtractor"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SectionList/SectionList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import{FlatList}from"react-native";import SectionHeader,{DefaultSectionHeader}from"./SectionHeader";import{flattenReactFragments}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";export var DEFAULT_SECTION="Uncategorized";var SectionList=function SectionList(_ref){var sectionKey=_ref.sectionKey,_ref$stickyHeader=_ref.stickyHeader,stickyHeader=_ref$stickyHeader===void 0?false:_ref$stickyHeader,_ref$listComponent=_ref.listComponent,listComponent=_ref$listComponent===void 0?"FlatList":_ref$listComponent,dataProp=_ref.data,renderItemProp=_ref.renderItem,keyExtractorProp=_ref.keyExtractor,rest=_objectWithoutProperties(_ref,_excluded);var data=React.useMemo(function(){return Array.isArray(dataProp)?dataProp:[];},[dataProp]);var dataWithSections=React.useMemo(function(){var result=[];var sectionDataItems={};for(var _item of data){var _item$sectionKey;var section=((_item$sectionKey=_item[sectionKey])==null?void 0:_item$sectionKey.toString())||DEFAULT_SECTION;if(sectionDataItems[section]){sectionDataItems[section].push(_item);}else{sectionDataItems[section]=[_item];}}for(var _section in sectionDataItems){result.push({type:"SECTION_ITEM",title:_section});var sectionItems=sectionDataItems[_section].map(function(item){return{type:"DATA_ITEM",data:item};});result.push.apply(result,_toConsumableArray(sectionItems));}return result;},[data,sectionKey]);var sectionHeaderIndicies=React.useMemo(function(){return stickyHeader?dataWithSections.filter(function(item){return item.type==="SECTION_ITEM";}).map(function(item){return dataWithSections.indexOf(item);}):undefined;},[dataWithSections,stickyHeader]);var extractSectionHeader=function extractSectionHeader(element){if(!element){return null;}var props=element.props||{};var children=flattenReactFragments(React.Children.toArray(props.children));if(element.type===SectionHeader){return element;}else{for(var child of children){if(child.type===SectionHeader){return child;}}}return null;};var extractRemainingNonSectionHeader=function extractRemainingNonSectionHeader(element){if(!element){return null;}var props=element.props||{};var children=flattenReactFragments(React.Children.toArray(props.children));if(element.type===SectionHeader){return null;}else{var newChildren=[];for(var child of children){if(child.type!==SectionHeader){newChildren.push(child);}}return React.cloneElement(element,Object.assign({},props,{children:newChildren}));}};var renderItem=function renderItem(_ref2){var item=_ref2.item,index=_ref2.index;switch(item.type){case"SECTION_ITEM":{var renderedItem=renderItemProp({index:index,section:item.title});return extractSectionHeader(renderedItem)||_jsx(DefaultSectionHeader,{title:item.title});}case"DATA_ITEM":{var _renderedItem=renderItemProp({item:item.data,index:index,section:item.data[sectionKey]||DEFAULT_SECTION});return extractRemainingNonSectionHeader(_renderedItem);}}};var keyExtractor=function keyExtractor(item,index){switch(item.type){case"SECTION_ITEM":{return`section_${index.toString()}`;}case"DATA_ITEM":{return(keyExtractorProp==null?void 0:keyExtractorProp(item.data,index))||index.toString();}}};switch(listComponent){case"FlatList":return _jsx(FlatList,Object.assign({stickyHeaderIndices:sectionHeaderIndicies},rest,{data:dataWithSections,renderItem:renderItem,keyExtractor:keyExtractor}));case"FlashList":return _jsx(FlashList,Object.assign({stickyHeaderIndices:sectionHeaderIndicies},rest,{data:dataWithSections,renderItem:renderItem,keyExtractor:keyExtractor}));}};export default SectionList;
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["sectionKey","stickyHeader","listComponent","data","renderItem","keyExtractor"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SectionList/SectionList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import{FlatList}from"react-native";import SectionHeader,{DefaultSectionHeader}from"./SectionHeader";import{flattenReactFragments}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";export var DEFAULT_SECTION="Uncategorized";var SectionList=React.forwardRef(function(_ref,ref){var sectionKey=_ref.sectionKey,_ref$stickyHeader=_ref.stickyHeader,stickyHeader=_ref$stickyHeader===void 0?false:_ref$stickyHeader,_ref$listComponent=_ref.listComponent,listComponent=_ref$listComponent===void 0?"FlatList":_ref$listComponent,dataProp=_ref.data,renderItemProp=_ref.renderItem,keyExtractorProp=_ref.keyExtractor,rest=_objectWithoutProperties(_ref,_excluded);var data=React.useMemo(function(){return Array.isArray(dataProp)?dataProp:[];},[dataProp]);var dataWithSections=React.useMemo(function(){var result=[];var sectionDataItems={};for(var _item of data){var _item$sectionKey;var section=((_item$sectionKey=_item[sectionKey])==null?void 0:_item$sectionKey.toString())||DEFAULT_SECTION;if(sectionDataItems[section]){sectionDataItems[section].push(_item);}else{sectionDataItems[section]=[_item];}}for(var _section in sectionDataItems){result.push({type:"SECTION_ITEM",title:_section});var sectionItems=sectionDataItems[_section].map(function(item){return{type:"DATA_ITEM",data:item};});result.push.apply(result,_toConsumableArray(sectionItems));}return result;},[data,sectionKey]);var sectionHeaderIndicies=React.useMemo(function(){return stickyHeader?dataWithSections.filter(function(item){return item.type==="SECTION_ITEM";}).map(function(item){return dataWithSections.indexOf(item);}):undefined;},[dataWithSections,stickyHeader]);var extractSectionHeader=function extractSectionHeader(element){if(!element){return null;}var props=element.props||{};var children=flattenReactFragments(React.Children.toArray(props.children));if(element.type===SectionHeader){return element;}else{for(var child of children){if(child.type===SectionHeader){return child;}}}return null;};var extractRemainingNonSectionHeader=function extractRemainingNonSectionHeader(element){if(!element){return null;}var props=element.props||{};var children=flattenReactFragments(React.Children.toArray(props.children));if(element.type===SectionHeader){return null;}else{var newChildren=[];for(var child of children){if(child.type!==SectionHeader){newChildren.push(child);}}return React.cloneElement(element,Object.assign({},props,{children:newChildren}));}};var renderItem=function renderItem(_ref2){var item=_ref2.item,index=_ref2.index;switch(item.type){case"SECTION_ITEM":{var renderedItem=renderItemProp({index:index,section:item.title});return extractSectionHeader(renderedItem)||_jsx(DefaultSectionHeader,{title:item.title});}case"DATA_ITEM":{var _renderedItem=renderItemProp({item:item.data,index:index,section:item.data[sectionKey]||DEFAULT_SECTION});return extractRemainingNonSectionHeader(_renderedItem);}}};var keyExtractor=function keyExtractor(item,index){switch(item.type){case"SECTION_ITEM":{return`section_${index.toString()}`;}case"DATA_ITEM":{return(keyExtractorProp==null?void 0:keyExtractorProp(item.data,index))||index.toString();}}};switch(listComponent){case"FlatList":return _jsx(FlatList,Object.assign({ref:ref,stickyHeaderIndices:sectionHeaderIndicies},rest,{data:dataWithSections,renderItem:renderItem,keyExtractor:keyExtractor}));case"FlashList":return _jsx(FlashList,Object.assign({ref:ref,stickyHeaderIndices:sectionHeaderIndicies},rest,{data:dataWithSections,renderItem:renderItem,keyExtractor:keyExtractor}));}});export default SectionList;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlashList=function SimpleStyleFlashList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlashList,Object.assign({style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleFlashList;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlashList=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlashList,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle,data:data},rest));});export default SimpleStyleFlashList;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx";import React from"react";import{FlatList}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlatList=function SimpleStyleFlatList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlatList,Object.assign({style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleFlatList;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx";import React from"react";import{FlatList}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlatList=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlatList,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle,data:data},rest));});export default SimpleStyleFlatList;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx";import React from"react";import{KeyboardAwareScrollView}from"react-native-keyboard-aware-scroll-view";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleKeyboardAwareScrollView=function SimpleStyleKeyboardAwareScrollView(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(KeyboardAwareScrollView,Object.assign({style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleKeyboardAwareScrollView;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx";import React from"react";import{KeyboardAwareScrollView}from"react-native-keyboard-aware-scroll-view";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleKeyboardAwareScrollView=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(KeyboardAwareScrollView,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle},rest));});export default SimpleStyleKeyboardAwareScrollView;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx";import React from"react";import{MasonryFlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleMasonryFlashList=function SimpleStyleMasonryFlashList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(MasonryFlashList,Object.assign({style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleMasonryFlashList;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx";import React from"react";import{MasonryFlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleMasonryFlashList=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(MasonryFlashList,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle,data:data},rest));});export default SimpleStyleMasonryFlashList;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx";import React from"react";import{ScrollView}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleScrollView=function SimpleStyleScrollView(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(ScrollView,Object.assign({style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleScrollView;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx";import React from"react";import{ScrollView}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleScrollView=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(ScrollView,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle},rest));});export default SimpleStyleScrollView;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx";import React from"react";import{SectionList}from"../SectionList";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSectionList=function SimpleStyleSectionList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SectionList,Object.assign({style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleSectionList;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx";import React from"react";import{SectionList}from"../SectionList";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSectionList=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SectionList,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle,data:data},rest));});export default SimpleStyleSectionList;
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx";import React from"react";import{SwipeableList}from"../SwipeableItem";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSwipeableList=function SimpleStyleSwipeableList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SwipeableList,Object.assign({style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleSwipeableList;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx";import React from"react";import{SwipeableList}from"../SwipeableItem";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSwipeableList=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SwipeableList,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle,data:data},rest));});export default SimpleStyleSwipeableList;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["disableScrollWhenSwiping","listComponent"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SwipeableItem/SwipeableList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import{FlatList}from"react-native";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";export var SwipeableListContext=React.createContext({onStartSwiping:function onStartSwiping(){},onStopSwiping:function onStopSwiping(){}});var SwipeableList=function SwipeableList(_ref){var _ref$disableScrollWhe=_ref.disableScrollWhenSwiping,disableScrollWhenSwiping=_ref$disableScrollWhe===void 0?true:_ref$disableScrollWhe,_ref$listComponent=_ref.listComponent,listComponent=_ref$listComponent===void 0?"FlatList":_ref$listComponent,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isSwiping=_React$useState2[0],setIsSwiping=_React$useState2[1];var onStartSwiping=function onStartSwiping(){setIsSwiping(true);};var onStopSwiping=function onStopSwiping(){setIsSwiping(false);};rest.scrollEnabled=disableScrollWhenSwiping?!isSwiping:true;var renderListComponent=function renderListComponent(){switch(listComponent){case"FlatList":return _jsx(FlatList,Object.assign({},rest));case"FlashList":return _jsx(FlashList,Object.assign({},rest));}};return _jsx(SwipeableListContext.Provider,{value:{onStartSwiping:onStartSwiping,onStopSwiping:onStopSwiping},children:_jsx(_Fragment,{children:renderListComponent()})});};export default SwipeableList;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["disableScrollWhenSwiping","listComponent"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SwipeableItem/SwipeableList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import{FlatList}from"react-native";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";export var SwipeableListContext=React.createContext({onStartSwiping:function onStartSwiping(){},onStopSwiping:function onStopSwiping(){}});var SwipeableList=React.forwardRef(function(_ref,ref){var _ref$disableScrollWhe=_ref.disableScrollWhenSwiping,disableScrollWhenSwiping=_ref$disableScrollWhe===void 0?true:_ref$disableScrollWhe,_ref$listComponent=_ref.listComponent,listComponent=_ref$listComponent===void 0?"FlatList":_ref$listComponent,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isSwiping=_React$useState2[0],setIsSwiping=_React$useState2[1];var onStartSwiping=function onStartSwiping(){setIsSwiping(true);};var onStopSwiping=function onStopSwiping(){setIsSwiping(false);};rest.scrollEnabled=disableScrollWhenSwiping?!isSwiping:true;var renderListComponent=function renderListComponent(){switch(listComponent){case"FlatList":return _jsx(FlatList,Object.assign({ref:ref},rest));case"FlashList":return _jsx(FlashList,Object.assign({ref:ref},rest));}};return _jsx(SwipeableListContext.Provider,{value:{onStartSwiping:onStartSwiping,onStopSwiping:onStopSwiping},children:_jsx(_Fragment,{children:renderListComponent()})});});export default SwipeableList;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/TabView/TabView.tsx";import*as React from"react";import{TabView,TabBar}from"react-native-tab-view";import TabViewItem from"./TabViewItem";import{withTheme}from"../../theming";import{flattenReactFragments,extractStyles}from"../../utilities";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";var TabViewComponent=function TabViewComponent(_ref){var Icon=_ref.Icon,onIndexChanged=_ref.onIndexChanged,onEndReached=_ref.onEndReached,_ref$initialTabIndex=_ref.initialTabIndex,initialTabIndex=_ref$initialTabIndex===void 0?0:_ref$initialTabIndex,tabBarPosition=_ref.tabBarPosition,keyboardDismissMode=_ref.keyboardDismissMode,swipeEnabled=_ref.swipeEnabled,scrollEnabled=_ref.scrollEnabled,activeColor=_ref.activeColor,inactiveColor=_ref.inactiveColor,pressColor=_ref.pressColor,indicatorColor=_ref.indicatorColor,tabsBackgroundColor=_ref.tabsBackgroundColor,_ref$iconSize=_ref.iconSize,iconSize=_ref$iconSize===void 0?16:_ref$iconSize,style=_ref.style,theme=_ref.theme,childrenProp=_ref.children;var _React$useState=React.useState(initialTabIndex),_React$useState2=_slicedToArray(_React$useState,2),index=_React$useState2[0],setIndex=_React$useState2[1];var _React$useState3=React.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),routes=_React$useState4[0],setRoutes=_React$useState4[1];var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;var children=React.useMemo(function(){return flattenReactFragments(React.Children.toArray(childrenProp)).filter(function(child){return React.isValidElement(child)&&child.type===TabViewItem;});},[childrenProp]);React.useEffect(function(){var newRoutes=[];children.forEach(function(item,idx){var child=item;newRoutes.push({key:idx.toString(),title:child.props.title,icon:child.props.icon,accessibilityLabel:child.props.accessibilityLabel});});setRoutes(newRoutes);},[children]);var indexChangeHandler=function indexChangeHandler(i){setIndex(i);onIndexChanged==null?void 0:onIndexChanged(i);if(i===routes.length){onEndReached==null?void 0:onEndReached();}};var renderTabBar=function renderTabBar(props){return _jsx(TabBar,Object.assign({},props,{activeColor:activeColor||theme.colors.primary,inactiveColor:inactiveColor||"rgb(200,200,200)",pressColor:pressColor||theme.colors.primary,scrollEnabled:scrollEnabled,indicatorStyle:{backgroundColor:indicatorColor||theme.colors.primary},labelStyle:[{textTransform:"none"},textStyles],renderIcon:function renderIcon(_ref2){var route=_ref2.route,color=_ref2.color;return route!=null&&route.icon?_jsx(Icon,{name:route.icon,color:color,size:iconSize}):null;},style:{backgroundColor:tabsBackgroundColor||theme.colors.background}}));};var renderScene=function renderScene(_ref3){var route=_ref3.route;var index=Number(route.key);return children[index];};if(!routes.length){return _jsx(_Fragment,{});}return _jsx(TabView,{style:viewStyles,navigationState:{index:index,routes:routes},renderScene:renderScene,renderTabBar:renderTabBar,onIndexChange:indexChangeHandler,tabBarPosition:tabBarPosition,keyboardDismissMode:keyboardDismissMode,swipeEnabled:swipeEnabled});};export default withTheme(TabViewComponent);
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/TabView/TabView.tsx";import*as React from"react";import{TabView,TabBar}from"react-native-tab-view";import TabViewItem from"./TabViewItem";import{withTheme}from"../../theming";import{flattenReactFragments,extractStyles}from"../../utilities";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";var TabViewComponent=function TabViewComponent(_ref){var Icon=_ref.Icon,onIndexChanged=_ref.onIndexChanged,onEndReached=_ref.onEndReached,_ref$initialTabIndex=_ref.initialTabIndex,initialTabIndex=_ref$initialTabIndex===void 0?0:_ref$initialTabIndex,tabBarPosition=_ref.tabBarPosition,keyboardDismissMode=_ref.keyboardDismissMode,swipeEnabled=_ref.swipeEnabled,scrollEnabled=_ref.scrollEnabled,activeColor=_ref.activeColor,inactiveColor=_ref.inactiveColor,pressColor=_ref.pressColor,indicatorColor=_ref.indicatorColor,tabsBackgroundColor=_ref.tabsBackgroundColor,_ref$iconSize=_ref.iconSize,iconSize=_ref$iconSize===void 0?16:_ref$iconSize,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?"top":_ref$iconPosition,style=_ref.style,theme=_ref.theme,childrenProp=_ref.children;var _React$useState=React.useState(initialTabIndex),_React$useState2=_slicedToArray(_React$useState,2),index=_React$useState2[0],setIndex=_React$useState2[1];var _React$useState3=React.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),routes=_React$useState4[0],setRoutes=_React$useState4[1];var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;var children=React.useMemo(function(){return flattenReactFragments(React.Children.toArray(childrenProp)).filter(function(child){return React.isValidElement(child)&&child.type===TabViewItem;});},[childrenProp]);React.useEffect(function(){var newRoutes=[];children.forEach(function(item,idx){var child=item;newRoutes.push({key:idx.toString(),title:child.props.title,icon:child.props.icon,accessibilityLabel:child.props.accessibilityLabel});});setRoutes(newRoutes);},[children]);var indexChangeHandler=function indexChangeHandler(i){setIndex(i);onIndexChanged==null?void 0:onIndexChanged(i);if(i===routes.length){onEndReached==null?void 0:onEndReached();}};var renderTabBar=function renderTabBar(props){var tabFlexDirection;switch(iconPosition){case"top":tabFlexDirection="column";break;case"bottom":tabFlexDirection="column-reverse";break;case"left":tabFlexDirection="row";break;case"right":tabFlexDirection="row-reverse";break;}return _jsx(TabBar,Object.assign({},props,{activeColor:activeColor||theme.colors.primary,inactiveColor:inactiveColor||"rgb(200,200,200)",pressColor:pressColor||theme.colors.primary,scrollEnabled:scrollEnabled,indicatorStyle:{backgroundColor:indicatorColor||theme.colors.primary},labelStyle:[{textTransform:"none"},textStyles],tabStyle:{flexDirection:tabFlexDirection},renderIcon:function renderIcon(_ref2){var route=_ref2.route,color=_ref2.color;return route!=null&&route.icon?_jsx(Icon,{name:route.icon,color:color,size:iconSize}):null;},style:{backgroundColor:tabsBackgroundColor||theme.colors.background}}));};var renderScene=function renderScene(_ref3){var route=_ref3.route;var index=Number(route.key);return children[index];};if(!routes.length){return _jsx(_Fragment,{});}return _jsx(TabView,{style:viewStyles,navigationState:{index:index,routes:routes},renderScene:renderScene,renderTabBar:renderTabBar,onIndexChange:indexChangeHandler,tabBarPosition:tabBarPosition,keyboardDismissMode:keyboardDismissMode,swipeEnabled:swipeEnabled});};export default withTheme(TabViewComponent);
@@ -45,7 +45,7 @@ const CheckboxRow = ({ label = "Label", labelStyle, labelContainerStyle, checkbo
45
45
  }
46
46
  };
47
47
  const { textStyles, viewStyles } = extractStyles(style);
48
- return (React.createElement(Pressable, { onPress: handlePress, style: [viewStyles, styles.mainParent, { flexDirection: direction }], disabled: disabled, ...rest },
48
+ return (React.createElement(Pressable, { onPress: handlePress, style: [styles.mainParent, viewStyles, , { flexDirection: direction }], disabled: disabled, ...rest },
49
49
  React.createElement(View, { style: [
50
50
  styles.label,
51
51
  {
@@ -59,9 +59,9 @@ const styles = StyleSheet.create({
59
59
  mainParent: {
60
60
  alignItems: "center",
61
61
  justifyContent: "space-around",
62
- paddingStart: 20,
62
+ paddingLeft: 20,
63
+ paddingRight: 20,
63
64
  minHeight: 50,
64
- paddingEnd: 20,
65
65
  display: "flex",
66
66
  ...Platform.select({
67
67
  web: {
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxRow.js","sourceRoot":"","sources":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,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,IAAI,GACV,CACQ,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,UAAU,EAAE;QACV,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,MAAM;QACf,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,MAAM,EAAE,SAAS;gBACjB,UAAU,EAAE,MAAM;aACnB;SACF,CAAC;KACH;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ViewProps } from "react-native";
3
- declare type KeyboardAvoidingViewBehavior = "height" | "position" | "padding" | null;
3
+ declare type KeyboardAvoidingViewBehavior = "height" | "position" | "padding";
4
4
  interface KeyboardAvoidingViewProps extends ViewProps {
5
5
  enabled?: boolean;
6
6
  behavior?: KeyboardAvoidingViewBehavior;
@@ -23,7 +23,7 @@ const KeyboardAvoidingView = ({ behavior = "padding", keyboardVerticalOffset = 0
23
23
  else {
24
24
  keyboardVerticalOffsetResult = keyboardVerticalOffset;
25
25
  }
26
- return (React.createElement(KeyboardAvoidingViewComponent, { behavior: behaviorResult !== null && behaviorResult !== void 0 ? behaviorResult : undefined, keyboardVerticalOffset: keyboardVerticalOffsetResult, ...rest }));
26
+ return (React.createElement(KeyboardAvoidingViewComponent, { behavior: behaviorResult, keyboardVerticalOffset: keyboardVerticalOffsetResult, ...rest }));
27
27
  };
28
28
  export default KeyboardAvoidingView;
29
29
  //# sourceMappingURL=KeyboardAvoidingView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyboardAvoidingView.js","sourceRoot":"","sources":["../../../../src/components/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,oBAAoB,IAAI,6BAA6B,EACrD,QAAQ,GAET,MAAM,cAAc,CAAC;AAEtB,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AACpC,MAAM,SAAS,GAAG,QAAQ,CAAC,EAAE,KAAK,SAAS,CAAC;AAc5C,MAAM,oBAAoB,GAAwC,CAAC,EACjE,QAAQ,GAAG,SAAS,EACpB,sBAAsB,GAAG,CAAC,EAC1B,eAAe,EACf,6BAA6B,EAC7B,WAAW,EACX,yBAAyB,EACzB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,IAAI,cAA4C,CAAC;IAEjD,IAAI,KAAK,IAAI,WAAW,KAAK,SAAS,EAAE;QACtC,cAAc,GAAG,WAAW,CAAC;KAC9B;SAAM,IAAI,SAAS,IAAI,eAAe,KAAK,SAAS,EAAE;QACrD,cAAc,GAAG,eAAe,CAAC;KAClC;SAAM;QACL,cAAc,GAAG,QAAQ,CAAC;KAC3B;IAED,IAAI,4BAAoC,CAAC;IAEzC,IAAI,KAAK,IAAI,yBAAyB,KAAK,SAAS,EAAE;QACpD,4BAA4B,GAAG,yBAAyB,CAAC;KAC1D;SAAM,IAAI,SAAS,IAAI,6BAA6B,KAAK,SAAS,EAAE;QACnE,4BAA4B,GAAG,6BAA6B,CAAC;KAC9D;SAAM;QACL,4BAA4B,GAAG,sBAAsB,CAAC;KACvD;IAED,OAAO,CACL,oBAAC,6BAA6B,IAC5B,QAAQ,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,SAAS,EACrC,sBAAsB,EAAE,4BAA4B,KAChD,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"KeyboardAvoidingView.js","sourceRoot":"","sources":["../../../../src/components/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,oBAAoB,IAAI,6BAA6B,EACrD,QAAQ,GAET,MAAM,cAAc,CAAC;AAEtB,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AACpC,MAAM,SAAS,GAAG,QAAQ,CAAC,EAAE,KAAK,SAAS,CAAC;AAc5C,MAAM,oBAAoB,GAAwC,CAAC,EACjE,QAAQ,GAAG,SAAS,EACpB,sBAAsB,GAAG,CAAC,EAC1B,eAAe,EACf,6BAA6B,EAC7B,WAAW,EACX,yBAAyB,EACzB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,IAAI,cAA4C,CAAC;IAEjD,IAAI,KAAK,IAAI,WAAW,KAAK,SAAS,EAAE;QACtC,cAAc,GAAG,WAAW,CAAC;KAC9B;SAAM,IAAI,SAAS,IAAI,eAAe,KAAK,SAAS,EAAE;QACrD,cAAc,GAAG,eAAe,CAAC;KAClC;SAAM;QACL,cAAc,GAAG,QAAQ,CAAC;KAC3B;IAED,IAAI,4BAAoC,CAAC;IAEzC,IAAI,KAAK,IAAI,yBAAyB,KAAK,SAAS,EAAE;QACpD,4BAA4B,GAAG,yBAAyB,CAAC;KAC1D;SAAM,IAAI,SAAS,IAAI,6BAA6B,KAAK,SAAS,EAAE;QACnE,4BAA4B,GAAG,6BAA6B,CAAC;KAC9D;SAAM;QACL,4BAA4B,GAAG,sBAAsB,CAAC;KACvD;IAED,OAAO,CACL,oBAAC,6BAA6B,IAC5B,QAAQ,EAAE,cAAc,EACxB,sBAAsB,EAAE,4BAA4B,KAChD,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { FlashListProps } from "@shopify/flash-list";
3
- import { FlatListProps } from "react-native";
2
+ import { FlashListProps, FlashList } from "@shopify/flash-list";
3
+ import { FlatListProps, FlatList } from "react-native";
4
4
  declare type ListComponentType = "FlatList" | "FlashList";
5
5
  interface AdditionalSectionListProps<T> {
6
6
  sectionKey: string;
@@ -16,7 +16,9 @@ interface AdditionalSectionListProps<T> {
16
16
  export declare type FlatListSectionListProps<T> = Omit<FlatListProps<T>, "renderItem"> & AdditionalSectionListProps<T>;
17
17
  export declare type FlashListSectionListProps<T> = Omit<FlashListProps<T>, "renderItem"> & AdditionalSectionListProps<T>;
18
18
  export declare const DEFAULT_SECTION = "Uncategorized";
19
- declare const SectionList: <T extends {
19
+ declare const SectionList: React.ForwardRefExoticComponent<(FlatListSectionListProps<{
20
20
  [key: string]: any;
21
- }>({ sectionKey, stickyHeader, listComponent, data: dataProp, renderItem: renderItemProp, keyExtractor: keyExtractorProp, ...rest }: FlatListSectionListProps<T> | FlashListSectionListProps<T>) => React.JSX.Element;
21
+ }> | FlashListSectionListProps<{
22
+ [key: string]: any;
23
+ }>) & React.RefAttributes<FlatList<any> | FlashList<any>>>;
22
24
  export default SectionList;
@@ -4,7 +4,7 @@ import { FlatList } from "react-native";
4
4
  import SectionHeader, { DefaultSectionHeader } from "./SectionHeader";
5
5
  import { flattenReactFragments } from "../../utilities";
6
6
  export const DEFAULT_SECTION = "Uncategorized";
7
- const SectionList = ({ sectionKey, stickyHeader = false, listComponent = "FlatList", data: dataProp, renderItem: renderItemProp, keyExtractor: keyExtractorProp, ...rest }) => {
7
+ const SectionList = React.forwardRef(({ sectionKey, stickyHeader = false, listComponent = "FlatList", data: dataProp, renderItem: renderItemProp, keyExtractor: keyExtractorProp, ...rest }, ref) => {
8
8
  const data = React.useMemo(() => (Array.isArray(dataProp) ? dataProp : []), [dataProp]);
9
9
  const dataWithSections = React.useMemo(() => {
10
10
  var _a;
@@ -102,10 +102,10 @@ const SectionList = ({ sectionKey, stickyHeader = false, listComponent = "FlatLi
102
102
  };
103
103
  switch (listComponent) {
104
104
  case "FlatList":
105
- return (React.createElement(FlatList, { stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
105
+ return (React.createElement(FlatList, { ref: ref, stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
106
106
  case "FlashList":
107
- return (React.createElement(FlashList, { stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
107
+ return (React.createElement(FlashList, { ref: ref, stickyHeaderIndices: sectionHeaderIndicies, ...rest, data: dataWithSections, renderItem: renderItem, keyExtractor: keyExtractor }));
108
108
  }
109
- };
109
+ });
110
110
  export default SectionList;
111
111
  //# sourceMappingURL=SectionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionList.js","sourceRoot":"","sources":["../../../../../src/components/SectionList/SectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,aAAa,EAAE,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAqCxD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C,MAAM,WAAW,GAAG,CAAmC,EACrD,UAAU,EACV,YAAY,GAAG,KAAK,EACpB,aAAa,GAAG,UAAU,EAC1B,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,gBAAgB,EAC9B,GAAG,IAAI,EACoD,EAAE,EAAE;IAC/D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CACxB,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAQ,E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AAE,qBAAqB,KACrC,IAA0C,EAC/C,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,SAAS,IACR,mBAAmB,EAAE,qBAAqB,KACrC,IAA2C,EAChD,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;KACL;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SectionList.js","sourceRoot":"","sources":["../../../../../src/components/SectionList/SectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,aAAa,EAAE,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAqCxD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,UAAU,EACV,YAAY,GAAG,KAAK,EACpB,aAAa,GAAG,UAAU,EAC1B,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,cAAc,EAC1B,YAAY,EAAE,gBAAgB,EAC9B,GAAG,IAAI,EACoD,EAC7D,GAAyC,EACzC,EAAE;IACF,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CACxB,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAQ,EACtD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,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,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAA+C,EACpD,mBAAmB,EAAE,qBAAqB,KACrC,IAA2C,EAChD,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;KACL;AACH,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
+ import { FlashList } from "@shopify/flash-list";
2
3
  import type { FlashListProps } from "@shopify/flash-list";
3
4
  /**
4
5
  * A FlashList wrapper that takes a single `style` prop and internally extracts
5
6
  * the appropriate style keys into the `contentContainerStyle`
6
7
  */
7
- declare const SimpleStyleFlashList: <T extends unknown>({ style: styleProp, data, ...rest }: Omit<FlashListProps<T>, "contentContainerStyle">) => React.JSX.Element;
8
+ declare const SimpleStyleFlashList: React.ForwardRefExoticComponent<Omit<FlashListProps<unknown>, "contentContainerStyle"> & React.RefAttributes<FlashList<any>>>;
8
9
  export default SimpleStyleFlashList;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A FlashList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleFlashList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleFlashList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(FlashList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
- };
10
+ return (React.createElement(FlashList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
+ });
12
12
  export default SimpleStyleFlashList;
13
13
  //# sourceMappingURL=SimpleStyleFlashList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAgB,EAC3C,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAC0C,EAAE,EAAE;IACrD,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAC3C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAC0C,EACnD,GAA8B,EAC9B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
+ import { FlatList } from "react-native";
2
3
  import type { FlatListProps } from "react-native";
3
4
  /**
4
5
  * A FlatList wrapper that takes a single `style` prop and internally extracts
5
6
  * the appropriate style keys into the `contentContainerStyle`
6
7
  */
7
- declare const SimpleStyleFlatList: <T extends unknown>({ style: styleProp, data, ...rest }: Omit<FlatListProps<T>, "contentContainerStyle">) => React.JSX.Element;
8
+ declare const SimpleStyleFlatList: React.ForwardRefExoticComponent<Omit<FlatListProps<unknown>, "contentContainerStyle"> & React.RefAttributes<FlatList<any>>>;
8
9
  export default SimpleStyleFlatList;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A FlatList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleFlatList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleFlatList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(FlatList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
- };
10
+ return (React.createElement(FlatList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
+ });
12
12
  export default SimpleStyleFlatList;
13
13
  //# sourceMappingURL=SimpleStyleFlatList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAAgB,EAC1C,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAAE,EAAE;IACpD,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAClD,GAAwB,EACxB,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,QAAQ,IACP,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
+ import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
2
3
  import type { KeyboardAwareScrollViewProps } from "react-native-keyboard-aware-scroll-view";
3
4
  /**
4
5
  * A KeyboardAwareScrollView wrapper that takes a single `style` prop and internally extracts
5
6
  * the appropriate style keys into the `contentContainerStyle`
6
7
  */
7
- declare const SimpleStyleKeyboardAwareScrollView: React.FC<Omit<KeyboardAwareScrollViewProps, "contentContainerStyle">>;
8
+ declare const SimpleStyleKeyboardAwareScrollView: React.ForwardRefExoticComponent<Omit<KeyboardAwareScrollViewProps, "contentContainerStyle"> & React.RefAttributes<KeyboardAwareScrollView>>;
8
9
  export default SimpleStyleKeyboardAwareScrollView;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A KeyboardAwareScrollView wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleKeyboardAwareScrollView = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleKeyboardAwareScrollView = React.forwardRef(({ style: styleProp, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(KeyboardAwareScrollView, { style: style, contentContainerStyle: contentContainerStyle, ...rest }));
11
- };
10
+ return (React.createElement(KeyboardAwareScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
11
+ });
12
12
  export default SimpleStyleKeyboardAwareScrollView;
13
13
  //# sourceMappingURL=SimpleStyleKeyboardAwareScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAEpC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,IACtB,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
1
+ {"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAAG,KAAK,CAAC,UAAU,CACzD,CACE,EACE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACqD,EAC9D,GAAuC,EACvC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,IACtB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import type { MasonryFlashListProps } from "@shopify/flash-list";
2
+ import type { MasonryFlashListProps, MasonryFlashListRef } from "@shopify/flash-list";
3
3
  /**
4
4
  * A MasonryFlashList wrapper that takes a single `style` prop and internally extracts
5
5
  * the appropriate style keys into the `contentContainerStyle`
6
6
  */
7
- declare const SimpleStyleMasonryFlashList: <T extends unknown>({ style: styleProp, data, ...rest }: Omit<MasonryFlashListProps<T>, "contentContainerStyle">) => React.JSX.Element;
7
+ declare const SimpleStyleMasonryFlashList: React.ForwardRefExoticComponent<Omit<MasonryFlashListProps<unknown>, "contentContainerStyle"> & React.RefAttributes<MasonryFlashListRef<any>>>;
8
8
  export default SimpleStyleMasonryFlashList;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A MasonryFlashList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleMasonryFlashList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleMasonryFlashList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(MasonryFlashList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
- };
10
+ return (React.createElement(MasonryFlashList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
11
+ });
12
12
  export default SimpleStyleMasonryFlashList;
13
13
  //# sourceMappingURL=SimpleStyleMasonryFlashList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleMasonryFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,2BAA2B,GAAG,CAAgB,EAClD,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACiD,EAAE,EAAE;IAC5D,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"SimpleStyleMasonryFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,2BAA2B,GAAG,KAAK,CAAC,UAAU,CAClD,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACiD,EAC1D,GAAwC,EACxC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,gBAAgB,IACf,GAAG,EAAE,GAAU,EACf,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
+ import { ScrollView } from "react-native";
2
3
  import type { ScrollViewProps } from "react-native";
3
4
  /**
4
5
  * A ScrollView wrapper that takes a single `style` prop and internally extracts
5
6
  * the appropriate style keys into the `contentContainerStyle`
6
7
  */
7
- declare const SimpleStyleScrollView: React.FC<Omit<ScrollViewProps, "contentContainerStyle">>;
8
+ declare const SimpleStyleScrollView: React.ForwardRefExoticComponent<Omit<ScrollViewProps, "contentContainerStyle"> & React.RefAttributes<ScrollView>>;
8
9
  export default SimpleStyleScrollView;
@@ -5,9 +5,9 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A ScrollView wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleScrollView = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleScrollView = React.forwardRef(({ style: styleProp, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(ScrollView, { style: style, contentContainerStyle: contentContainerStyle, ...rest }));
11
- };
10
+ return (React.createElement(ScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
11
+ });
12
12
  export default SimpleStyleScrollView;
13
13
  //# sourceMappingURL=SimpleStyleScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,qBAAqB,GAEvB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACwC,EACjD,GAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1,10 +1,14 @@
1
1
  import React from "react";
2
2
  import type { FlatListSectionListProps, FlashListSectionListProps } from "../SectionList";
3
+ import { FlatList } from "react-native-gesture-handler";
4
+ import { FlashList } from "@shopify/flash-list";
3
5
  /**
4
6
  * A SectionList wrapper that takes a single `style` prop and internally extracts
5
7
  * the appropriate style keys into the `contentContainerStyle`
6
8
  */
7
- declare const SimpleStyleSectionList: <T extends {
9
+ declare const SimpleStyleSectionList: React.ForwardRefExoticComponent<Omit<FlatListSectionListProps<{
8
10
  [key: string]: any;
9
- }>({ style: styleProp, data, ...rest }: Omit<FlatListSectionListProps<T> | FlashListSectionListProps<T>, "contentContainerStyle">) => React.JSX.Element;
11
+ }> | FlashListSectionListProps<{
12
+ [key: string]: any;
13
+ }>, "contentContainerStyle"> & React.RefAttributes<FlashList<any> | FlatList<any>>>;
10
14
  export default SimpleStyleSectionList;
@@ -5,11 +5,11 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A SectionList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleSectionList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleSectionList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
10
  return (
11
11
  //@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
12
- React.createElement(SectionList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
13
- };
12
+ React.createElement(SectionList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
13
+ });
14
14
  export default SimpleStyleSectionList;
15
15
  //# sourceMappingURL=SimpleStyleSectionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleSectionList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,sBAAsB,GAAG,CAAmC,EAChE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO;IACL,gHAAgH;IAChH,oBAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleSectionList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAI9E;;;GAGG;AACH,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAC7C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EACD,GAAyC,EACzC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO;IACL,gHAAgH;IAChH,oBAAC,WAAW,IACV,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,10 +1,14 @@
1
1
  import React from "react";
2
2
  import type { FlashListSwipeableListProps, FlatListSwipeableListProps } from "../SwipeableItem";
3
+ import { FlatList } from "react-native-gesture-handler";
4
+ import { FlashList } from "@shopify/flash-list";
3
5
  /**
4
6
  * A SwipeableList wrapper that takes a single `style` prop and internally extracts
5
7
  * the appropriate style keys into the `contentContainerStyle`
6
8
  */
7
- declare const SimpleStyleSwipeableList: <T extends {
9
+ declare const SimpleStyleSwipeableList: React.ForwardRefExoticComponent<Omit<FlashListSwipeableListProps<{
8
10
  [key: string]: any;
9
- }>({ style: styleProp, data, ...rest }: Omit<FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>, "contentContainerStyle">) => React.JSX.Element;
11
+ }> | FlatListSwipeableListProps<{
12
+ [key: string]: any;
13
+ }>, "contentContainerStyle"> & React.RefAttributes<FlashList<any> | FlatList<any>>>;
10
14
  export default SimpleStyleSwipeableList;
@@ -5,11 +5,11 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A SwipeableList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleSwipeableList = ({ style: styleProp, data, ...rest }) => {
8
+ const SimpleStyleSwipeableList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
10
  return (
11
11
  //@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
12
- React.createElement(SwipeableList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
13
- };
12
+ React.createElement(SwipeableList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
13
+ });
14
14
  export default SimpleStyleSwipeableList;
15
15
  //# sourceMappingURL=SimpleStyleSwipeableList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleSwipeableList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,wBAAwB,GAAG,CAAmC,EAClE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO;IACL,gHAAgH;IAChH,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleSwipeableList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAI9E;;;GAGG;AACH,MAAM,wBAAwB,GAAG,KAAK,CAAC,UAAU,CAC/C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EACD,GAAyC,EACzC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO;IACL,gHAAgH;IAChH,oBAAC,aAAa,IACZ,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { FlashListProps } from "@shopify/flash-list";
3
- import { FlatListProps } from "react-native";
2
+ import { FlashListProps, FlashList } from "@shopify/flash-list";
3
+ import { FlatListProps, FlatList } from "react-native";
4
4
  declare type ListComponentType = "FlatList" | "FlashList";
5
5
  interface AdditionalSwipeableListProps {
6
6
  disableScrollWhenSwiping?: boolean;
@@ -13,5 +13,5 @@ declare type SwipeableListContextType = {
13
13
  onStopSwiping: () => void;
14
14
  };
15
15
  export declare const SwipeableListContext: React.Context<SwipeableListContextType>;
16
- declare const SwipeableList: <T extends object>({ disableScrollWhenSwiping, listComponent, ...rest }: FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>) => React.JSX.Element;
16
+ declare const SwipeableList: React.ForwardRefExoticComponent<(FlashListSwipeableListProps<object> | FlatListSwipeableListProps<object>) & React.RefAttributes<FlatList<any> | FlashList<any>>>;
17
17
  export default SwipeableList;