2020-12-21 09:18:57 +01:00
module . exports =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = "./src/CustomListView.tsx" ) ;
/******/ } )
/************************************************************************/
/******/ ( {
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / arrayLikeToArray . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; } module . exports = _arrayLikeToArray ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / arrayWithoutHoles . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
var arrayLikeToArray = _ _webpack _require _ _ ( /*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js" ) ; function _arrayWithoutHoles ( arr ) { if ( Array . isArray ( arr ) ) return arrayLikeToArray ( arr ) ; } module . exports = _arrayWithoutHoles ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / defineProperty . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; } module . exports = _defineProperty ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/extends.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / extends . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function _extends ( ) { module . exports = _extends = Object . assign || function ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] ; for ( var key in source ) { if ( Object . prototype . hasOwnProperty . call ( source , key ) ) { target [ key ] = source [ key ] ; } } } return target ; } ; return _extends . apply ( this , arguments ) ; } module . exports = _extends ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / interopRequireDefault . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { "default" : obj } ; } module . exports = _interopRequireDefault ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / iterableToArray . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function _iterableToArray ( iter ) { if ( typeof Symbol !== "undefined" && Symbol . iterator in Object ( iter ) ) return Array . from ( iter ) ; } module . exports = _iterableToArray ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / nonIterableSpread . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function _nonIterableSpread ( ) { throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } module . exports = _nonIterableSpread ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / toConsumableArray . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
var arrayWithoutHoles = _ _webpack _require _ _ ( /*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js" ) ; var iterableToArray = _ _webpack _require _ _ ( /*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js" ) ; var unsupportedIterableToArray = _ _webpack _require _ _ ( /*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js" ) ; var nonIterableSpread = _ _webpack _require _ _ ( /*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js" ) ; function _toConsumableArray ( arr ) { return arrayWithoutHoles ( arr ) || iterableToArray ( arr ) || unsupportedIterableToArray ( arr ) || nonIterableSpread ( ) ; } module . exports = _toConsumableArray ;
/***/ } ) ,
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ babel / runtime / helpers / unsupportedIterableToArray . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
var arrayLikeToArray = _ _webpack _require _ _ ( /*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js" ) ; function _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return arrayLikeToArray ( o , minLen ) ; } module . exports = _unsupportedIterableToArray ;
/***/ } ) ,
/***/ "./node_modules/@mendix/pluggable-widgets-tools/dist/index.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ mendix / pluggable - widgets - tools / dist / index . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _ _createBinding = this && this . _ _createBinding || ( Object . create ? function ( o , m , k , k2 ) { if ( k2 === undefined ) k2 = k ; Object . defineProperty ( o , k2 , { enumerable : true , get : function get ( ) { return m [ k ] ; } } ) ; } : function ( o , m , k , k2 ) { if ( k2 === undefined ) k2 = k ; o [ k2 ] = m [ k ] ; } ) ; var _ _exportStar = this && this . _ _exportStar || function ( m , exports ) { for ( var p in m ) { if ( p !== "default" && ! exports . hasOwnProperty ( p ) ) _ _createBinding ( exports , m , p ) ; } } ; Object . defineProperty ( exports , "__esModule" , { value : true } ) ; _ _exportStar ( _ _webpack _require _ _ ( /*! ./native/common */ "./node_modules/@mendix/pluggable-widgets-tools/dist/native/common.js" ) , exports ) ; _ _exportStar ( _ _webpack _require _ _ ( /*! ./web/common */ "./node_modules/@mendix/pluggable-widgets-tools/dist/web/common.js" ) , exports ) ;
/***/ } ) ,
/***/ "./node_modules/@mendix/pluggable-widgets-tools/dist/native/common.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ mendix / pluggable - widgets - tools / dist / native / common . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
var _interopRequireDefault = _ _webpack _require _ _ ( /*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js" ) ; var _defineProperty2 = _interopRequireDefault ( _ _webpack _require _ _ ( /*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js" ) ) ; var _extends3 = _interopRequireDefault ( _ _webpack _require _ _ ( /*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js" ) ) ; var _toConsumableArray2 = _interopRequireDefault ( _ _webpack _require _ _ ( /*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js" ) ) ; Object . defineProperty ( exports , "__esModule" , { value : true } ) ; exports . mergeNativeStyles = void 0 ; function mergeNativeStyles ( defaultStyle , overrideStyles ) { var styles = [ defaultStyle ] . concat ( ( 0 , _toConsumableArray2 . default ) ( overrideStyles . filter ( function ( object ) { return object !== undefined ; } ) ) ) ; return Object . keys ( defaultStyle ) . reduce ( function ( flattened , currentKey ) { var styleItems = styles . map ( function ( object ) { return object [ currentKey ] ; } ) ; return ( 0 , _extends3 . default ) ( ( 0 , _extends3 . default ) ( { } , flattened ) , ( 0 , _defineProperty2 . default ) ( { } , currentKey , flattenObjects ( styleItems ) ) ) ; } , { } ) ; } exports . mergeNativeStyles = mergeNativeStyles ; function flattenObjects ( objects ) { return objects . reduce ( function ( merged , object ) { return ( 0 , _extends3 . default ) ( ( 0 , _extends3 . default ) ( { } , merged ) , object ) ; } , { } ) ; }
/***/ } ) ,
/***/ "./node_modules/@mendix/pluggable-widgets-tools/dist/web/common.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / @ mendix / pluggable - widgets - tools / dist / web / common . js * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , { value : true } ) ; exports . parseInlineStyle = void 0 ; function parseInlineStyle ( ) { var style = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : "" ; try { return style . split ( ";" ) . reduce ( function ( styleObject , line ) { var pair = line . split ( ":" ) ; if ( pair . length === 2 ) { var name = pair [ 0 ] . trim ( ) . replace ( /(-.)/g , function ( match ) { return match [ 1 ] . toUpperCase ( ) ; } ) ; styleObject [ name ] = pair [ 1 ] . trim ( ) ; } return styleObject ; } , { } ) ; } catch ( _ ) { return { } ; } } exports . parseInlineStyle = parseInlineStyle ;
/***/ } ) ,
/***/ "./src/CustomListView.tsx" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / CustomListView . tsx * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: CustomListView */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CustomListView" , function ( ) { return CustomListView ; } ) ;
/* harmony import */ var react _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! react */ "react" ) ;
/* harmony import */ var react _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! react-native */ "react-native" ) ;
/* harmony import */ var react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2022-11-16 20:31:14 +01:00
/* harmony import */ var react _native _gesture _handler _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! react-native-gesture-handler */ "react-native-gesture-handler" ) ;
/* harmony import */ var react _native _gesture _handler _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( react _native _gesture _handler _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
/* harmony import */ var big _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! big.js */ "big.js" ) ;
/* harmony import */ var big _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( big _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ ) ;
/* harmony import */ var _mendix _pluggable _widgets _tools _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @mendix/pluggable-widgets-tools */ "./node_modules/@mendix/pluggable-widgets-tools/dist/index.js" ) ;
/* harmony import */ var _mendix _pluggable _widgets _tools _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _mendix _pluggable _widgets _tools _ _WEBPACK _IMPORTED _MODULE _4 _ _ ) ;
2020-12-21 09:18:57 +01:00
let clickTimer ;
2022-11-16 20:31:14 +01:00
let ScreenHeight = react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Dimensions" ] . get ( "window" ) . height ;
2020-12-21 09:18:57 +01:00
const defaultStyle = {
footer : {
2022-11-16 20:31:14 +01:00
marginBottom : ScreenHeight * 0.1 ,
2020-12-21 09:18:57 +01:00
}
} ;
class CustomListView extends react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "PureComponent" ] {
constructor ( props ) {
var _a ;
super ( props ) ;
2022-11-16 20:31:14 +01:00
this . styles = Object ( _mendix _pluggable _widgets _tools _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "mergeNativeStyles" ] ) ( defaultStyle , this . props . style ) ;
2020-12-21 09:18:57 +01:00
this . renderFlatListHandler = this . renderFlatList . bind ( this ) ;
this . renderScrollViewHandler = this . renderScrollView . bind ( this ) ;
this . onClickHandler = this . onClick . bind ( this ) ;
this . renderEmptyHandler = this . renderEmpty . bind ( this ) ;
this . renderFooterHandler = this . renderFooter . bind ( this ) ;
this . flatListRef = Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createRef" ] ) ( ) ;
this . renderItem = ( { item , index } ) => {
const { container , useItemLayout , itemSize } = this . props ;
return ( Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , null ,
Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "TouchableOpacity" ] , { onPress : ( ) => this . onClickHandler ( item , index ) , disabled : this . state . clickDisabled } ,
Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , { key : item . id , style : useItemLayout ? { height : Number ( itemSize ) } : null } , container ( item ) ) ) ) ) ;
} ;
this . scrollToOffset = ( index ) => {
var _a , _b ;
const { itemSize } = this . props ;
( _a = this . flatListRef . current ) === null || _a === void 0 ? void 0 : _a . scrollToOffset ( { animated : true , offset : index * Number ( itemSize ) } ) ;
( _b = this . props . scrollToItem ) === null || _b === void 0 ? void 0 : _b . setValue ( false ) ;
} ;
this . state = {
clickDisabled : false ,
scrollIndex : Number ( ( _a = this . props . scrollItem ) === null || _a === void 0 ? void 0 : _a . displayValue ) ,
} ;
}
render ( ) {
const { scrollView } = this . props ;
return ( Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , null , scrollView ? Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( this . renderScrollViewHandler , null ) : Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( this . renderFlatListHandler , null ) ) ) ;
}
renderFlatList ( ) {
const { ds , windowSize , initialNumToRender , removeClippedSubviews , maxNumberToRenderPerBatch , cellBatchingSize , useItemLayout , itemSize } = this . props ;
const size = Number ( itemSize ) ;
return ( Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , null , useItemLayout ?
2022-11-16 20:31:14 +01:00
Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _gesture _handler _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FlatList" ] , { getItemLayout : ( data , index ) => ( {
2020-12-21 09:18:57 +01:00
length : size ,
offset : size * index ,
index ,
data
2022-11-16 20:31:14 +01:00
} ) , ref : this . flatListRef , data : ds === null || ds === void 0 ? void 0 : ds . items , renderItem : this . renderItem , windowSize : windowSize , initialNumToRender : initialNumToRender , removeClippedSubviews : removeClippedSubviews , ListEmptyComponent : this . renderEmptyHandler ( ) , maxToRenderPerBatch : maxNumberToRenderPerBatch , ListFooterComponent : this . renderFooterHandler ( ) , canCancelContentTouches : true } )
2020-12-21 09:18:57 +01:00
:
2022-11-16 20:31:14 +01:00
Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _gesture _handler _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FlatList" ] , { data : ds === null || ds === void 0 ? void 0 : ds . items , renderItem : this . renderItem , windowSize : windowSize , initialNumToRender : initialNumToRender , removeClippedSubviews : removeClippedSubviews , ListEmptyComponent : this . renderEmptyHandler ( ) , maxToRenderPerBatch : maxNumberToRenderPerBatch , ListFooterComponent : this . renderFooterHandler ( ) , updateCellsBatchingPeriod : cellBatchingSize } ) ) ) ;
2020-12-21 09:18:57 +01:00
}
renderScrollView ( ) {
var _a ;
const { ds , container } = this . props ;
return ( Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , null ,
2022-11-16 20:31:14 +01:00
Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _gesture _handler _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "ScrollView" ] , null , ( _a = ds . items ) === null || _a === void 0 ? void 0 : _a . map ( ( item ) => Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , { key : item . id } , container ( item ) ) ) ) ) ) ;
2020-12-21 09:18:57 +01:00
}
renderFooter ( ) {
return Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , { style : this . styles . footer } ) ;
}
renderEmpty ( ) {
const { emptyMessage } = this . props ;
return Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "View" ] , null ,
Object ( react _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( react _native _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Text" ] , null , emptyMessage ) ) ;
}
onClick ( item , index ) {
const { onClick , scrollItem } = this . props ;
const actionValue = onClick ( item ) ;
if ( ! this . state . clickDisabled ) {
this . setState ( { clickDisabled : true } ) ;
actionValue . execute ( ) ;
2022-11-16 20:31:14 +01:00
scrollItem === null || scrollItem === void 0 ? void 0 : scrollItem . setValue ( new big _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Big" ] ( index ) ) ;
2020-12-21 09:18:57 +01:00
clickTimer = setTimeout ( ( ) => {
this . setState ( { clickDisabled : false } ) ;
} , 3000 ) ;
}
}
componentDidMount ( ) {
const { scrollToItem , useItemLayout } = this . props ;
if ( useItemLayout ) {
setTimeout ( ( ) => {
if ( useItemLayout ) {
( scrollToItem === null || scrollToItem === void 0 ? void 0 : scrollToItem . value ) ? this . scrollToOffset ( this . state . scrollIndex ) : null ;
}
} , 100 ) ;
}
}
componentWillUnmount ( ) {
const { scrollToItem } = this . props ;
clearTimeout ( clickTimer ) ;
scrollToItem === null || scrollToItem === void 0 ? void 0 : scrollToItem . setValue ( false ) ;
}
}
/***/ } ) ,
/***/ "big.js" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "big.js" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
module . exports = require ( "big.js" ) ;
/***/ } ) ,
/***/ "react" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "react" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
module . exports = require ( "react" ) ;
/***/ } ) ,
/***/ "react-native" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "react-native" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
module . exports = require ( "react-native" ) ;
2022-11-16 20:31:14 +01:00
/***/ } ) ,
/***/ "react-native-gesture-handler" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * external "react-native-gesture-handler" * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
module . exports = require ( "react-native-gesture-handler" ) ;
2020-12-21 09:18:57 +01:00
/***/ } )
/******/ } ) ;
//# sourceMappingURL=CustomListView.js.map