You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
4.4 KiB
1 line
4.4 KiB
{"ast":null,"code":"function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nimport * as React from 'react';\nimport RNDrawerLayoutAndroid from \"react-native-web/dist/exports/DrawerLayoutAndroid\";\nimport RNFlatList from \"react-native-web/dist/exports/FlatList\";\nimport RNSwitch from \"react-native-web/dist/exports/Switch\";\nimport RNTextInput from \"react-native-web/dist/exports/TextInput\";\nimport RNScrollView from \"react-native-web/dist/exports/ScrollView\";\nimport View from \"react-native-web/dist/exports/View\";\nimport createNativeWrapper from \"../handlers/createNativeWrapper\";\nexport var ScrollView = createNativeWrapper(RNScrollView, {\n disallowInterruption: false\n});\nexport var Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true\n});\nexport var TextInput = createNativeWrapper(RNTextInput);\nexport var DrawerLayoutAndroid = createNativeWrapper(RNDrawerLayoutAndroid, {\n disallowInterruption: true\n});\nDrawerLayoutAndroid.positions = RNDrawerLayoutAndroid.positions;\nexport var RefreshControl = createNativeWrapper(View);\nexport var FlatList = React.forwardRef(function (props, ref) {\n return React.createElement(RNFlatList, _extends({\n ref: ref\n }, props, {\n renderScrollComponent: function renderScrollComponent(scrollProps) {\n return React.createElement(ScrollView, scrollProps);\n }\n }));\n});","map":{"version":3,"sources":["GestureComponents.web.tsx"],"names":["React","createNativeWrapper","ScrollView","RNScrollView","disallowInterruption","Switch","RNSwitch","shouldCancelWhenOutside","shouldActivateOnStart","TextInput","RNTextInput","DrawerLayoutAndroid","RNDrawerLayoutAndroid","positions","RefreshControl","View","FlatList","forwardRef","props","ref","scrollProps"],"mappings":";;;;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,OAAOC,mBAAP;AAEA,OAAO,IAAMC,UAAU,GAAGD,mBAAmB,CAACE,YAAD,EAAe;EAC1DC,oBAAoB,EAAE;AADoC,CAAf,CAAtC;AAIP,OAAO,IAAMC,MAAM,GAAGJ,mBAAmB,CAACK,QAAD,EAAW;EAClDC,uBAAuB,EAAE,KADyB;EAElDC,qBAAqB,EAAE,IAF2B;EAGlDJ,oBAAoB,EAAE;AAH4B,CAAX,CAAlC;AAKP,OAAO,IAAMK,SAAS,GAAGR,mBAAmB,CAACS,WAAD,CAArC;AACP,OAAO,IAAMC,mBAAmB,GAAGV,mBAAmB,CAACW,qBAAD,EAAwB;EAC5ER,oBAAoB,EAAE;AADsD,CAAxB,CAA/C;AAIPO,mBAAmB,CAACE,SAApBF,GAAgCC,qBAAqB,CAACC,SAAtDF;AAIA,OAAO,IAAMG,cAAc,GAAGb,mBAAmB,CAACc,IAAD,CAA1C;AAEP,OAAO,IAAMC,QAAQ,GAAG,KAAK,CAACC,UAAN,CACtB,UAAoBC,KAApB,EAAiDC,GAAjD;EAAA,OACE,KAAA,CAAA,aAAA,CAAC,UAAD,EAAA,QAAA,CAAA;IACE,GAAG,EAAEA;EADP,CAAA,EAEMD,KAFN,EAAA;IAGE,qBAAqB,EAAGE,+BAAAA,WAAD;MAAA,OAAiB,KAAA,CAAA,aAAA,CAAC,UAAD,EAAgBA,WAAhB,CAAA;IAAA;EAH1C,CAAA,CAAA,CAFoB;AAAA,EAAjB","sourcesContent":["import * as React from 'react';\nimport {\n DrawerLayoutAndroid as RNDrawerLayoutAndroid,\n FlatList as RNFlatList,\n Switch as RNSwitch,\n TextInput as RNTextInput,\n ScrollView as RNScrollView,\n FlatListProps,\n View,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nexport const ScrollView = createNativeWrapper(RNScrollView, {\n disallowInterruption: false,\n});\n\nexport const Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\nexport const TextInput = createNativeWrapper(RNTextInput);\nexport const DrawerLayoutAndroid = createNativeWrapper(RNDrawerLayoutAndroid, {\n disallowInterruption: true,\n});\n// @ts-ignore -- TODO(TS) to investigate if it's needed\nDrawerLayoutAndroid.positions = RNDrawerLayoutAndroid.positions;\n// RefreshControl is implemented as a functional component, rendering a View\n// NativeViewGestureHandler needs to set a ref on its child, which cannot be done\n// on functional components\nexport const RefreshControl = createNativeWrapper(View);\n\nexport const FlatList = React.forwardRef(\n <ItemT extends any>(props: FlatListProps<ItemT>, ref: any) => (\n <RNFlatList\n ref={ref}\n {...props}\n renderScrollComponent={(scrollProps) => <ScrollView {...scrollProps} />}\n />\n )\n);\n"]},"metadata":{},"sourceType":"module"} |