@bigbinary/neeto-commons-rn 1.4.20 → 1.6.0

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.
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.EmptyView=void 0;var _react=_interopRequireDefault(require("react"));var _neetouiRn=require("@bigbinary/neetoui-rn");var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSizeMatters=require("react-native-size-matters");var _empty=_interopRequireDefault(require("../assets/images/empty.svg"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/EmptyView.jsx";var EmptyView=exports.EmptyView=function EmptyView(_ref){var title=_ref.title,showCTA=_ref.showCTA,ctaLabel=_ref.ctaLabel,onCTAPress=_ref.onCTAPress;return(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",flex:1,justifyContent:"center",px:(0,_reactNativeSizeMatters.moderateScale)(4),children:[(0,_jsxRuntime.jsx)(_empty.default,{height:(0,_reactNativeSizeMatters.moderateScale)(200)}),(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:"font.primary",fontFamily:"sf700",fontSize:"m",textAlign:"center",children:title}),showCTA&&(0,_jsxRuntime.jsx)(_neetouiRn.Button,{label:ctaLabel,my:(0,_reactNativeSizeMatters.moderateScale)(3),p:(0,_reactNativeSizeMatters.moderateScale)(2),onPress:onCTAPress})]});};EmptyView.propTypes={title:_propTypes.default.string,showCTA:_propTypes.default.bool,ctaLabel:_propTypes.default.string,onCTAPress:_propTypes.default.func};EmptyView.defaultProps={title:null,showCTA:false,ctaLabel:null,onCTAPress:null};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.EmptyView=void 0;var _react=_interopRequireDefault(require("react"));var _neetouiRn=require("@bigbinary/neetoui-rn");var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSizeMatters=require("react-native-size-matters");var _empty=_interopRequireDefault(require("../assets/images/empty.svg"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/EmptyView.jsx";var EmptyView=exports.EmptyView=function EmptyView(_ref){var _ref$title=_ref.title,title=_ref$title===void 0?null:_ref$title,_ref$showCTA=_ref.showCTA,showCTA=_ref$showCTA===void 0?false:_ref$showCTA,_ref$ctaLabel=_ref.ctaLabel,ctaLabel=_ref$ctaLabel===void 0?null:_ref$ctaLabel,_ref$onCTAPress=_ref.onCTAPress,onCTAPress=_ref$onCTAPress===void 0?null:_ref$onCTAPress;return(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",flex:1,justifyContent:"center",px:(0,_reactNativeSizeMatters.moderateScale)(4),children:[(0,_jsxRuntime.jsx)(_empty.default,{height:(0,_reactNativeSizeMatters.moderateScale)(200)}),(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:"font.primary",fontFamily:"sf700",fontSize:"m",textAlign:"center",children:title}),showCTA&&(0,_jsxRuntime.jsx)(_neetouiRn.Button,{label:ctaLabel,my:(0,_reactNativeSizeMatters.moderateScale)(3),p:(0,_reactNativeSizeMatters.moderateScale)(2),onPress:onCTAPress})]});};EmptyView.propTypes={title:_propTypes.default.string,showCTA:_propTypes.default.bool,ctaLabel:_propTypes.default.string,onCTAPress:_propTypes.default.func};
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Header=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _neetoIconsRn=require("@bigbinary/neeto-icons-rn");var _neetouiRn=require("@bigbinary/neetoui-rn");var _native=require("@react-navigation/native");var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSizeMatters=require("react-native-size-matters");var _native2=require("styled-components/native");var _utils=require("../helpers/utils");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/Header.jsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var Header=exports.Header=function Header(_ref){var title=_ref.title,subTitle=_ref.subTitle,canGoBack=_ref.canGoBack,onBackPress=_ref.onBackPress,showSideMenu=_ref.showSideMenu,handleSearch=_ref.handleSearch,RightComponent=_ref.RightComponent,isLoading=_ref.isLoading,showWorkspaceLogo=_ref.showWorkspaceLogo,onMarkAllAsRead=_ref.onMarkAllAsRead,showMarkAllOption=_ref.showMarkAllOption;var navigation=(0,_native.useNavigation)();var theme=(0,_react.useContext)(_native2.ThemeContext);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),showSheet=_useState2[0],setShowSheet=_useState2[1];var menuOptions=[{label:"Mark all as read",onPress:function onPress(){return onMarkAllAsRead&&onMarkAllAsRead();}}];return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",flexDirection:"row",px:(0,_reactNativeSizeMatters.moderateScale)(16),children:[showWorkspaceLogo&&(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{mr:(0,_reactNativeSizeMatters.moderateScale)(8),style:{backgroundColor:"red",width:40,height:40},onPress:function onPress(){return navigation.openDrawer();},children:(0,_jsxRuntime.jsx)(_neetouiRn.Avatar,{name:"S",size:"xs"})}),showSideMenu&&(0,_jsxRuntime.jsx)(_neetouiRn.ActionIcon,{color:theme.colors.font.grey800,icon:_neetoIconsRn.HamburgerMenu,maxWidth:(0,_reactNativeSizeMatters.moderateScale)(28),mr:(0,_reactNativeSizeMatters.moderateScale)(2),size:(0,_reactNativeSizeMatters.moderateScale)(20),onPress:function onPress(){return navigation.openDrawer();}}),(onBackPress||canGoBack)&&(0,_jsxRuntime.jsx)(_neetouiRn.Container,{children:(0,_jsxRuntime.jsx)(_neetouiRn.Button,{height:(0,_reactNativeSizeMatters.moderateScale)(40),ml:(0,_reactNativeSizeMatters.moderateScale)(-16),p:(0,_reactNativeSizeMatters.moderateScale)(8),rippleConfig:{shouldOverflowContainer:true},variant:"text",width:(0,_reactNativeSizeMatters.moderateScale)(40),LeftIcon:function LeftIcon(){return(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{onPress:(0,_utils.debounce)(onBackPress||navigation.goBack),children:(0,_jsxRuntime.jsx)(_neetoIconsRn.LeftArrow,{color:theme.colors.font.primary,size:(0,_reactNativeSizeMatters.moderateScale)(18),viewBox:"0 0 20 20"})});},onPress:(0,_utils.debounce)(onBackPress||navigation.goBack)})}),(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{flex:1,mx:(0,_reactNativeSizeMatters.moderateScale)(6),my:(0,_reactNativeSizeMatters.moderateScale)(16),children:[(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:"font.primary",fontFamily:"sf600",fontSize:"xl",numberOfLines:1,children:title}),!!subTitle&&(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:theme.colors.font.grey600,fontFamily:"sf400",fontSize:"xs",children:subTitle})]}),handleSearch&&(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{hitSlop:{top:10,right:10,bottom:10,left:10},onPress:handleSearch,children:(0,_jsxRuntime.jsx)(_neetoIconsRn.Search,{color:theme.colors.font.grey800,size:(0,_reactNativeSizeMatters.moderateScale)(28),viewBox:"0 0 25 25"})}),showMarkAllOption&&(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{accessibilityLabel:"Open menu",hitSlop:{top:10,right:10,bottom:10,left:10},onPress:function onPress(){return setShowSheet(true);},children:(0,_jsxRuntime.jsx)(_neetoIconsRn.MenuVertical,{color:theme.colors.font.grey800,size:(0,_reactNativeSizeMatters.moderateScale)(28),viewBox:"0 0 25 25"})}),RightComponent&&(0,_jsxRuntime.jsx)(RightComponent,{})]}),(0,_jsxRuntime.jsx)(_neetouiRn.LineLoader,{isLoading:isLoading}),(0,_jsxRuntime.jsx)(_neetouiRn.BottomSheet,{data:menuOptions,hide:function hide(){return setShowSheet(false);},isVisible:showSheet,ContentRow:function ContentRow(_ref2){var item=_ref2.item;return(0,_jsxRuntime.jsx)(_neetouiRn.Button,{label:item.label,variant:"solid",onPress:function onPress(){setShowSheet(false);item.onPress();}});}})]});};Header.propTypes={title:_propTypes.default.string.isRequired,subTitle:_propTypes.default.string,onBackPress:_propTypes.default.func,canGoBack:_propTypes.default.bool,showSideMenu:_propTypes.default.bool,handleSearch:_propTypes.default.func,RightComponent:_propTypes.default.func,isLoading:_propTypes.default.bool,showWorkspaceLogo:_propTypes.default.bool,onMarkAllAsRead:_propTypes.default.func,showMarkAllOption:_propTypes.default.bool};Header.defaultProps={canGoBack:false,isLoading:false,showWorkspaceLogo:false,onMarkAllAsRead:undefined,showMarkAllOption:false};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Header=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _neetoIconsRn=require("@bigbinary/neeto-icons-rn");var _neetouiRn=require("@bigbinary/neetoui-rn");var _native=require("@react-navigation/native");var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSizeMatters=require("react-native-size-matters");var _native2=require("styled-components/native");var _utils=require("../helpers/utils");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/Header.jsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var Header=exports.Header=function Header(_ref){var title=_ref.title,subTitle=_ref.subTitle,_ref$canGoBack=_ref.canGoBack,canGoBack=_ref$canGoBack===void 0?false:_ref$canGoBack,onBackPress=_ref.onBackPress,showSideMenu=_ref.showSideMenu,handleSearch=_ref.handleSearch,RightComponent=_ref.RightComponent,_ref$isLoading=_ref.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$showWorkspaceLog=_ref.showWorkspaceLogo,showWorkspaceLogo=_ref$showWorkspaceLog===void 0?false:_ref$showWorkspaceLog,onMarkAllAsRead=_ref.onMarkAllAsRead,_ref$showMarkAllOptio=_ref.showMarkAllOption,showMarkAllOption=_ref$showMarkAllOptio===void 0?false:_ref$showMarkAllOptio;var navigation=(0,_native.useNavigation)();var theme=(0,_react.useContext)(_native2.ThemeContext);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),showSheet=_useState2[0],setShowSheet=_useState2[1];var menuOptions=[{label:"Mark all as read",onPress:function onPress(){return onMarkAllAsRead&&onMarkAllAsRead();}}];return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",flexDirection:"row",px:(0,_reactNativeSizeMatters.moderateScale)(16),children:[showWorkspaceLogo&&(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{mr:(0,_reactNativeSizeMatters.moderateScale)(8),style:{backgroundColor:"red",width:40,height:40},onPress:function onPress(){return navigation.openDrawer();},children:(0,_jsxRuntime.jsx)(_neetouiRn.Avatar,{name:"S",size:"xs"})}),showSideMenu&&(0,_jsxRuntime.jsx)(_neetouiRn.ActionIcon,{color:theme.colors.font.grey800,icon:_neetoIconsRn.HamburgerMenu,maxWidth:(0,_reactNativeSizeMatters.moderateScale)(28),mr:(0,_reactNativeSizeMatters.moderateScale)(2),size:(0,_reactNativeSizeMatters.moderateScale)(20),onPress:function onPress(){return navigation.openDrawer();}}),(onBackPress||canGoBack)&&(0,_jsxRuntime.jsx)(_neetouiRn.Container,{children:(0,_jsxRuntime.jsx)(_neetouiRn.Button,{height:(0,_reactNativeSizeMatters.moderateScale)(40),ml:(0,_reactNativeSizeMatters.moderateScale)(-16),p:(0,_reactNativeSizeMatters.moderateScale)(8),rippleConfig:{shouldOverflowContainer:true},variant:"text",width:(0,_reactNativeSizeMatters.moderateScale)(40),LeftIcon:function LeftIcon(){return(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{onPress:(0,_utils.debounce)(onBackPress||navigation.goBack),children:(0,_jsxRuntime.jsx)(_neetoIconsRn.LeftArrow,{color:theme.colors.font.primary,size:(0,_reactNativeSizeMatters.moderateScale)(18),viewBox:"0 0 20 20"})});},onPress:(0,_utils.debounce)(onBackPress||navigation.goBack)})}),(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{flex:1,mx:(0,_reactNativeSizeMatters.moderateScale)(6),my:(0,_reactNativeSizeMatters.moderateScale)(16),children:[(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:"font.primary",fontFamily:"sf600",fontSize:"xl",numberOfLines:1,children:title}),!!subTitle&&(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:theme.colors.font.grey600,fontFamily:"sf400",fontSize:"xs",children:subTitle})]}),handleSearch&&(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{hitSlop:{top:10,right:10,bottom:10,left:10},onPress:handleSearch,children:(0,_jsxRuntime.jsx)(_neetoIconsRn.Search,{color:theme.colors.font.grey800,size:(0,_reactNativeSizeMatters.moderateScale)(28),viewBox:"0 0 25 25"})}),showMarkAllOption&&(0,_jsxRuntime.jsx)(_neetouiRn.Touchable,{accessibilityLabel:"Open menu",hitSlop:{top:10,right:10,bottom:10,left:10},onPress:function onPress(){return setShowSheet(true);},children:(0,_jsxRuntime.jsx)(_neetoIconsRn.MenuVertical,{color:theme.colors.font.grey800,size:(0,_reactNativeSizeMatters.moderateScale)(28),viewBox:"0 0 25 25"})}),RightComponent&&(0,_jsxRuntime.jsx)(RightComponent,{})]}),(0,_jsxRuntime.jsx)(_neetouiRn.LineLoader,{isLoading:isLoading}),(0,_jsxRuntime.jsx)(_neetouiRn.BottomSheet,{data:menuOptions,hide:function hide(){return setShowSheet(false);},isVisible:showSheet,ContentRow:function ContentRow(_ref2){var item=_ref2.item;return(0,_jsxRuntime.jsx)(_neetouiRn.Button,{label:item.label,variant:"solid",onPress:function onPress(){setShowSheet(false);item.onPress();}});}})]});};Header.propTypes={title:_propTypes.default.string.isRequired,subTitle:_propTypes.default.string,onBackPress:_propTypes.default.func,canGoBack:_propTypes.default.bool,showSideMenu:_propTypes.default.bool,handleSearch:_propTypes.default.func,RightComponent:_propTypes.default.func,isLoading:_propTypes.default.bool,showWorkspaceLogo:_propTypes.default.bool,onMarkAllAsRead:_propTypes.default.func,showMarkAllOption:_propTypes.default.bool};
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.OfflineScreen=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _neetouiRn=require("@bigbinary/neetoui-rn");var _netinfo=_interopRequireDefault(require("@react-native-community/netinfo"));var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSizeMatters=require("react-native-size-matters");var _localization=require("../contexts/localization");var _wifi=_interopRequireDefault(require("../assets/images/wifi.png"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/OfflineScreen.jsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var OfflineScreen=exports.OfflineScreen=function OfflineScreen(_ref){var setIsConnected=_ref.setIsConnected;var _useLocalization=(0,_localization.useLocalization)(),strings=_useLocalization.strings;(0,_react.useEffect)(function(){var unsubscribe=_netinfo.default.addEventListener(function(state){setIsConnected(state.isConnected);});return function(){unsubscribe();};},[setIsConnected]);var handleRetry=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var netInfo=yield _netinfo.default.fetch();setIsConnected(netInfo.isConnected);if(!netInfo.isConnected){_neetouiRn.Toast.show({type:"error",text1:strings.commons.alertMessage.noInternetConnection});}});return function handleRetry(){return _ref2.apply(this,arguments);};}();return(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",bg:"background.white",flex:1,justifyContent:"center",children:[(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_wifi.default,style:{width:(0,_reactNativeSizeMatters.moderateScale)(100),height:(0,_reactNativeSizeMatters.moderateScale)(100)}}),(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:"font.grey600",fontFamily:"sf700",mt:(0,_reactNativeSizeMatters.moderateScale)(10),children:strings.commons.alertMessage.noInternetConnection})]}),(0,_jsxRuntime.jsx)(_neetouiRn.Button,{label:strings.commons.buttons.tryAgain,mt:(0,_reactNativeSizeMatters.moderateScale)(20),width:(0,_reactNativeSizeMatters.moderateScale)(140),onPress:handleRetry})]});};OfflineScreen.propTypes={setIsConnected:_propTypes.default.func};OfflineScreen.defaultProps={setIsConnected:function setIsConnected(){}};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.OfflineScreen=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _neetouiRn=require("@bigbinary/neetoui-rn");var _netinfo=_interopRequireDefault(require("@react-native-community/netinfo"));var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSizeMatters=require("react-native-size-matters");var _localization=require("../contexts/localization");var _wifi=_interopRequireDefault(require("../assets/images/wifi.png"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/OfflineScreen.jsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var OfflineScreen=exports.OfflineScreen=function OfflineScreen(_ref){var setIsConnected=_ref.setIsConnected;var _useLocalization=(0,_localization.useLocalization)(),strings=_useLocalization.strings;(0,_react.useEffect)(function(){var unsubscribe=_netinfo.default.addEventListener(function(state){setIsConnected(state.isConnected);});return function(){unsubscribe();};},[setIsConnected]);var handleRetry=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var netInfo=yield _netinfo.default.fetch();setIsConnected(netInfo.isConnected);if(!netInfo.isConnected){_neetouiRn.Toast.show({type:"error",text1:strings.commons.alertMessage.noInternetConnection});}});return function handleRetry(){return _ref2.apply(this,arguments);};}();return(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",bg:"background.white",flex:1,justifyContent:"center",children:[(0,_jsxRuntime.jsxs)(_neetouiRn.Container,{alignItems:"center",children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_wifi.default,style:{width:(0,_reactNativeSizeMatters.moderateScale)(100),height:(0,_reactNativeSizeMatters.moderateScale)(100)}}),(0,_jsxRuntime.jsx)(_neetouiRn.Typography,{color:"font.grey600",fontFamily:"sf700",mt:(0,_reactNativeSizeMatters.moderateScale)(10),children:strings.commons.alertMessage.noInternetConnection})]}),(0,_jsxRuntime.jsx)(_neetouiRn.Button,{label:strings.commons.buttons.tryAgain,mt:(0,_reactNativeSizeMatters.moderateScale)(20),width:(0,_reactNativeSizeMatters.moderateScale)(140),onPress:handleRetry})]});};OfflineScreen.propTypes={setIsConnected:_propTypes.default.func.isRequired};
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.TextWithUrl=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _neetouiRn=require("@bigbinary/neetoui-rn");var _propTypes=_interopRequireDefault(require("prop-types"));var _constants=require("./constants");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["text"];var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/TextWithUrl.jsx";var TextWithUrl=exports.TextWithUrl=function TextWithUrl(_ref){var text=_ref.text,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);if(typeof text!=="string")return text;var parts=text.split(_constants.VALID_URL_EMAIL_REGEX);return parts.map(function(part,index){if(_constants.VALID_URL_EMAIL_REGEX.test(part)){var isEmailPresent=_constants.VALID_EMAIL_REGEX.test(part);return(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:function onPress(){return isEmailPresent?_reactNative.Linking.openURL("mailto:"+part):_reactNative.Linking.openURL(part);},children:(0,_jsxRuntime.jsx)(_neetouiRn.Typography,Object.assign({fontSize:"l"},rest,{color:"font.blue",children:part}))},index);}return(0,_jsxRuntime.jsx)(_neetouiRn.Typography,Object.assign({},rest,{children:part}),index);});};TextWithUrl.propTypes={text:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.number]).isRequired,rest:_propTypes.default.object};TextWithUrl.defaultProps={text:"",rest:{}};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.TextWithUrl=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _neetouiRn=require("@bigbinary/neetoui-rn");var _propTypes=_interopRequireDefault(require("prop-types"));var _constants=require("./constants");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["text"];var _this=this,_jsxFileName="/home/runner/work/neeto-commons-rn/neeto-commons-rn/src/components/TextWithUrl.jsx";var TextWithUrl=exports.TextWithUrl=function TextWithUrl(_ref){var _ref$text=_ref.text,text=_ref$text===void 0?"":_ref$text,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);if(typeof text!=="string")return text;var parts=text.split(_constants.VALID_URL_EMAIL_REGEX);return parts.map(function(part,index){if(_constants.VALID_URL_EMAIL_REGEX.test(part)){var isEmailPresent=_constants.VALID_EMAIL_REGEX.test(part);return(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:function onPress(){return isEmailPresent?_reactNative.Linking.openURL("mailto:"+part):_reactNative.Linking.openURL(part);},children:(0,_jsxRuntime.jsx)(_neetouiRn.Typography,Object.assign({fontSize:"l"},rest,{color:"font.blue",children:part}))},index);}return(0,_jsxRuntime.jsx)(_neetouiRn.Typography,Object.assign({},rest,{children:part}),index);});};TextWithUrl.propTypes={text:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.number]),rest:_propTypes.default.object};
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.STORAGE_KEYS=exports.DEFAULT_PAGE_SIZE=void 0;Object.defineProperty(exports,"dateTimeFormats",{enumerable:true,get:function get(){return _dayjs.dateTimeFormats;}});var _dayjs=require("../config/dayjs");var STORAGE_KEYS=exports.STORAGE_KEYS={DEVICE_TOKEN:"devicetoken",IS_VISITED:"isVisited",NOTIFICATION_PERMISSION_REQUESTED:"notificationPermissionRequested",DEVICE_REGISTERED:"deviceRegistered"};var DEFAULT_PAGE_SIZE=exports.DEFAULT_PAGE_SIZE=30;
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.STORAGE_KEYS=exports.DEFAULT_PAGE_SIZE=void 0;Object.defineProperty(exports,"dateTimeFormats",{enumerable:true,get:function get(){return _dayjs.dateTimeFormats;}});var _dayjs=require("../config/dayjs");var STORAGE_KEYS=exports.STORAGE_KEYS={DEVICE_TOKEN:"devicetoken",IS_VISITED:"isVisited",NOTIFICATION_PERMISSION_REQUESTED:"notificationPermissionRequested"};var DEFAULT_PAGE_SIZE=exports.DEFAULT_PAGE_SIZE=30;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.usePushNotification=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _reactNative=require("react-native");var _dayjs=_interopRequireDefault(require("dayjs"));var _reactNativeNotifications=require("react-native-notifications");var _reactNativePermissions=require("react-native-permissions");var _reactNativePushNotification=_interopRequireDefault(require("react-native-push-notification"));var _bugsnag=require("../../config/bugsnag");var _constants=require("../../constants");var _asyncStore=require("../asyncStore");var _useNotification2=require("../../hooks/query/useNotification");var _useAppState=require("../../hooks/useAppState");var _store=require("../../store");var usePushNotification=exports.usePushNotification=function usePushNotification(isLoggedIn){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{handleClick:function handleClick(){}},handleClick=_ref.handleClick;var appState=(0,_useAppState.useAppState)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),notificationPermission=_useState2[0],setNotificationPermission=_useState2[1];var _useNotification=(0,_useNotification2.useNotification)(),useRegisterTokenMutation=_useNotification.useRegisterTokenMutation,useMarkReadUnreadNotification=_useNotification.useMarkReadUnreadNotification;var _useRegisterTokenMuta=useRegisterTokenMutation(),registerToken=_useRegisterTokenMuta.mutate;var _useMarkReadUnreadNot=useMarkReadUnreadNotification(),markReadUnreadNotification=_useMarkReadUnreadNot.mutate;(0,_react.useEffect)(function(){var checkPermission=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){try{if(_reactNative.Platform.OS==="android"&&_reactNative.Platform.Version<33){setNotificationPermission(true);return;}var _yield$checkNotificat=yield(0,_reactNativePermissions.checkNotifications)(),status=_yield$checkNotificat.status;setNotificationPermission(status===_reactNativePermissions.RESULTS.GRANTED);}catch(error){(0,_bugsnag.bugsnagErrorHandler)(JSON.stringify(error),"notification");}});return function checkPermission(){return _ref2.apply(this,arguments);};}();if(appState==="active"){checkPermission();}},[appState]);var registerNotificationEvents=(0,_react.useCallback)(function(){var foregroundEvent=_reactNativeNotifications.Notifications.events().registerNotificationReceivedForeground(function(notification,completion){if(_reactNative.Platform.OS==="android"){var _notification$payload,_notification$payload2,_notification$payload3,_notification$payload4,_notification$payload5;var notificationTitle=(notification==null?void 0:(_notification$payload=notification.payload)==null?void 0:_notification$payload["gcm.notification.title"])||(notification==null?void 0:(_notification$payload2=notification.payload)==null?void 0:_notification$payload2.title)||"New Notification";var notificationBody=(notification==null?void 0:(_notification$payload3=notification.payload)==null?void 0:_notification$payload3["gcm.notification.body"])||(notification==null?void 0:(_notification$payload4=notification.payload)==null?void 0:_notification$payload4.message)||"You have a new message";_reactNativeNotifications.Notifications.postLocalNotification({body:notificationBody,title:notificationTitle,url:notification==null?void 0:(_notification$payload5=notification.payload)==null?void 0:_notification$payload5.url,channelId:_reactNative.Platform.OS==="android"?"default":undefined,android_channel_id:"default"});}completion({alert:true,sound:true,badge:false});});var backgroundEvent=_reactNativeNotifications.Notifications.events().registerNotificationReceivedBackground(function(notification,completion){if(_reactNative.Platform.OS==="android"){var _notification$payload6,_notification$payload7,_notification$payload8,_notification$payload9,_notification$payload0;var notificationTitle=(notification==null?void 0:(_notification$payload6=notification.payload)==null?void 0:_notification$payload6["gcm.notification.title"])||(notification==null?void 0:(_notification$payload7=notification.payload)==null?void 0:_notification$payload7.title)||"New Notification";var notificationBody=(notification==null?void 0:(_notification$payload8=notification.payload)==null?void 0:_notification$payload8["gcm.notification.body"])||(notification==null?void 0:(_notification$payload9=notification.payload)==null?void 0:_notification$payload9.message)||"You have a new message";_reactNativeNotifications.Notifications.postLocalNotification({body:notificationBody,title:notificationTitle,url:notification==null?void 0:(_notification$payload0=notification.payload)==null?void 0:_notification$payload0.url,channelId:_reactNative.Platform.OS==="android"?"default":undefined,android_channel_id:"default"});}completion({alert:true,sound:true,badge:false});});var openedEvent=_reactNativeNotifications.Notifications.events().registerNotificationOpened(function(notification,completion){markNotificationsAsRead(notification);completion();});if(_reactNative.Platform.OS==="android"){var defaultNotificationChannel={channelId:"default",name:"Default Channel",importance:5,sound:"default",enableVibration:true,enableLights:true,showBadge:true};var channel01NotificationChannel={channelId:"channel_01",name:"Channel 01",importance:5,enableLights:true,enableVibration:true,showBadge:true};_reactNativeNotifications.Notifications.setNotificationChannel(defaultNotificationChannel);_reactNativeNotifications.Notifications.setNotificationChannel(channel01NotificationChannel);}return[foregroundEvent,backgroundEvent,openedEvent];},[]);(0,_react.useEffect)(function(){var events=registerNotificationEvents();return function(){events.forEach(function(event){return event.remove();});};},[registerNotificationEvents]);(0,_react.useEffect)(function(){if(isLoggedIn&&appState==="active"&&notificationPermission){initializePN();}},[initializePN,isLoggedIn,appState,notificationPermission]);var registerForRemoteNotifications=(0,_react.useCallback)(function(){_reactNativeNotifications.Notifications.registerRemoteNotifications();var registerDeviceOnce=function(){var isRegistered=false;return function(){var _ref3=(0,_asyncToGenerator2.default)(function*(event){var _Store$getState,_Store$getState$auth;if(isRegistered)return;var isLoggedIn=((_Store$getState=_store.Store.getState())==null?void 0:(_Store$getState$auth=_Store$getState.auth)==null?void 0:_Store$getState$auth.isLoggedIn)||false;if(isLoggedIn&&event.deviceToken){isRegistered=true;var payload={device:{device_token:event.deviceToken,platform:_reactNative.Platform.OS}};var notificationDeviceId=yield(0,_asyncStore.getItem)(_constants.STORAGE_KEYS.DEVICE_TOKEN);if(typeof notificationDeviceId!=="string"){registerToken(payload,{onSuccess:function(){var _onSuccess=(0,_asyncToGenerator2.default)(function*(){yield(0,_asyncStore.setItem)(_constants.STORAGE_KEYS.DEVICE_REGISTERED,true);});function onSuccess(){return _onSuccess.apply(this,arguments);}return onSuccess;}(),onError:function onError(){isRegistered=false;}});}}});return function(_x){return _ref3.apply(this,arguments);};}();}();_reactNativeNotifications.Notifications.events().registerRemoteNotificationsRegistered(function(event){registerDeviceOnce(event);});_reactNativeNotifications.Notifications.events().registerRemoteNotificationsRegistrationFailed(function(event){(0,_bugsnag.bugsnagErrorHandler)(JSON.stringify(event),"notification");});},[registerToken]);var initializePN=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){try{var isRegisteredAlready=yield _reactNativeNotifications.Notifications.isRegisteredForRemoteNotifications();var storedDeviceToken=yield(0,_asyncStore.getItem)(_constants.STORAGE_KEYS.DEVICE_TOKEN);var deviceRegistered=yield(0,_asyncStore.getItem)(_constants.STORAGE_KEYS.DEVICE_REGISTERED);if(isRegisteredAlready&&storedDeviceToken&&deviceRegistered)return;registerForRemoteNotifications();}catch(error){(0,_bugsnag.bugsnagErrorHandler)(JSON.stringify(error),"notification");}}),[registerForRemoteNotifications]);var markNotificationsAsRead=function markNotificationsAsRead(notification){var _notification$payload1,_notification$payload10,_notification$payload11,_notification$payload12;var notificationId=(notification==null?void 0:(_notification$payload1=notification.payload)==null?void 0:_notification$payload1.notification_id)||(notification==null?void 0:(_notification$payload10=notification.payload)==null?void 0:(_notification$payload11=_notification$payload10.aps)==null?void 0:(_notification$payload12=_notification$payload11.alert)==null?void 0:_notification$payload12.notification_id);handleClick(notification);if(notificationId){markReadUnreadNotification({readAt:(0,_dayjs.default)().toISOString(),notificationId:notificationId});}};_reactNativePushNotification.default.configure({onNotification:function onNotification(notification){return handleClick(notification);}});return[];};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.usePushNotification=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _reactNative=require("react-native");var _dayjs=_interopRequireDefault(require("dayjs"));var _reactNativeNotifications=require("react-native-notifications");var _reactNativePermissions=require("react-native-permissions");var _reactNativePushNotification=_interopRequireDefault(require("react-native-push-notification"));var _bugsnag=require("../../config/bugsnag");var _constants=require("../../constants");var _asyncStore=require("../asyncStore");var _useNotification2=require("../../hooks/query/useNotification");var _useAppState=require("../../hooks/useAppState");var _store=require("../../store");var usePushNotification=exports.usePushNotification=function usePushNotification(isLoggedIn){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{handleClick:function handleClick(){}},handleClick=_ref.handleClick;var appState=(0,_useAppState.useAppState)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),notificationPermission=_useState2[0],setNotificationPermission=_useState2[1];var _useNotification=(0,_useNotification2.useNotification)(),useRegisterTokenMutation=_useNotification.useRegisterTokenMutation,useMarkReadUnreadNotification=_useNotification.useMarkReadUnreadNotification;var _useRegisterTokenMuta=useRegisterTokenMutation(),registerToken=_useRegisterTokenMuta.mutate;var _useMarkReadUnreadNot=useMarkReadUnreadNotification(),markReadUnreadNotification=_useMarkReadUnreadNot.mutate;(0,_react.useEffect)(function(){var checkPermission=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){try{if(_reactNative.Platform.OS==="android"&&_reactNative.Platform.Version<33){setNotificationPermission(true);return;}var _yield$checkNotificat=yield(0,_reactNativePermissions.checkNotifications)(),status=_yield$checkNotificat.status;setNotificationPermission(status===_reactNativePermissions.RESULTS.GRANTED);}catch(error){(0,_bugsnag.bugsnagErrorHandler)(JSON.stringify(error),"notification");}});return function checkPermission(){return _ref2.apply(this,arguments);};}();if(appState==="active"){checkPermission();}},[appState]);var registerNotificationEvents=(0,_react.useCallback)(function(){var foregroundEvent=_reactNativeNotifications.Notifications.events().registerNotificationReceivedForeground(function(notification,completion){if(_reactNative.Platform.OS==="android"){var _notification$payload,_notification$payload2,_notification$payload3,_notification$payload4,_notification$payload5;var notificationTitle=(notification==null?void 0:(_notification$payload=notification.payload)==null?void 0:_notification$payload["gcm.notification.title"])||(notification==null?void 0:(_notification$payload2=notification.payload)==null?void 0:_notification$payload2.title)||"New Notification";var notificationBody=(notification==null?void 0:(_notification$payload3=notification.payload)==null?void 0:_notification$payload3["gcm.notification.body"])||(notification==null?void 0:(_notification$payload4=notification.payload)==null?void 0:_notification$payload4.message)||"You have a new message";_reactNativeNotifications.Notifications.postLocalNotification({body:notificationBody,title:notificationTitle,url:notification==null?void 0:(_notification$payload5=notification.payload)==null?void 0:_notification$payload5.url,channelId:_reactNative.Platform.OS==="android"?"default":undefined,android_channel_id:"default",sound:"default"});}completion({alert:true,sound:true,badge:true});});var backgroundEvent=_reactNativeNotifications.Notifications.events().registerNotificationReceivedBackground(function(notification,completion){if(_reactNative.Platform.OS==="android"){var _notification$payload6,_notification$payload7,_notification$payload8,_notification$payload9,_notification$payload0;var notificationTitle=(notification==null?void 0:(_notification$payload6=notification.payload)==null?void 0:_notification$payload6["gcm.notification.title"])||(notification==null?void 0:(_notification$payload7=notification.payload)==null?void 0:_notification$payload7.title)||"New Notification";var notificationBody=(notification==null?void 0:(_notification$payload8=notification.payload)==null?void 0:_notification$payload8["gcm.notification.body"])||(notification==null?void 0:(_notification$payload9=notification.payload)==null?void 0:_notification$payload9.message)||"You have a new message";_reactNativeNotifications.Notifications.postLocalNotification({body:notificationBody,title:notificationTitle,url:notification==null?void 0:(_notification$payload0=notification.payload)==null?void 0:_notification$payload0.url,channelId:_reactNative.Platform.OS==="android"?"default":undefined,android_channel_id:"default",sound:"default"});}completion({alert:true,sound:true,badge:true});});var openedEvent=_reactNativeNotifications.Notifications.events().registerNotificationOpened(function(notification,completion){markNotificationsAsRead(notification);completion();});var registeredEvent=_reactNativeNotifications.Notifications.events().registerRemoteNotificationsRegistered(function(){var _ref3=(0,_asyncToGenerator2.default)(function*(event){var _Store$getState,_Store$getState$auth;var isLoggedIn=((_Store$getState=_store.Store.getState())==null?void 0:(_Store$getState$auth=_Store$getState.auth)==null?void 0:_Store$getState$auth.isLoggedIn)||false;if(!isLoggedIn||!event.deviceToken)return;var storedToken=yield(0,_asyncStore.getItem)(_constants.STORAGE_KEYS.DEVICE_TOKEN);if(storedToken===event.deviceToken)return;var payload={device:{device_token:event.deviceToken,platform:_reactNative.Platform.OS}};registerToken(payload,{onSuccess:function(){var _onSuccess=(0,_asyncToGenerator2.default)(function*(){yield(0,_asyncStore.setItem)(_constants.STORAGE_KEYS.DEVICE_TOKEN,event.deviceToken);});function onSuccess(){return _onSuccess.apply(this,arguments);}return onSuccess;}()});});return function(_x){return _ref3.apply(this,arguments);};}());var registrationFailedEvent=_reactNativeNotifications.Notifications.events().registerRemoteNotificationsRegistrationFailed(function(event){(0,_bugsnag.bugsnagErrorHandler)(JSON.stringify(event),"notification");});if(_reactNative.Platform.OS==="android"){var defaultNotificationChannel={channelId:"default",name:"Default Channel",importance:5,sound:"default",enableVibration:true,enableLights:true,showBadge:true};var channel01NotificationChannel={channelId:"channel_01",name:"Channel 01",importance:5,enableLights:true,enableVibration:true,showBadge:true};_reactNativeNotifications.Notifications.setNotificationChannel(defaultNotificationChannel);_reactNativeNotifications.Notifications.setNotificationChannel(channel01NotificationChannel);}return[foregroundEvent,backgroundEvent,openedEvent,registeredEvent,registrationFailedEvent];},[registerToken]);(0,_react.useEffect)(function(){var events=registerNotificationEvents();return function(){events.forEach(function(event){return event.remove();});};},[registerNotificationEvents]);(0,_react.useEffect)(function(){if(isLoggedIn&&appState==="active"&&notificationPermission){initializePN();}},[initializePN,isLoggedIn,appState,notificationPermission]);var registerForRemoteNotifications=(0,_react.useCallback)(function(){_reactNativeNotifications.Notifications.registerRemoteNotifications();},[]);var initializePN=(0,_react.useCallback)(function(){try{registerForRemoteNotifications();}catch(error){(0,_bugsnag.bugsnagErrorHandler)(JSON.stringify(error),"notification");}},[registerForRemoteNotifications]);var markNotificationsAsRead=function markNotificationsAsRead(notification){var _notification$payload1,_notification$payload10,_notification$payload11,_notification$payload12;var notificationId=(notification==null?void 0:(_notification$payload1=notification.payload)==null?void 0:_notification$payload1.notification_id)||(notification==null?void 0:(_notification$payload10=notification.payload)==null?void 0:(_notification$payload11=_notification$payload10.aps)==null?void 0:(_notification$payload12=_notification$payload11.alert)==null?void 0:_notification$payload12.notification_id);handleClick(notification);if(notificationId){markReadUnreadNotification({readAt:(0,_dayjs.default)().toISOString(),notificationId:notificationId});}};_reactNativePushNotification.default.configure({onNotification:function onNotification(notification){return handleClick(notification);}});return[];};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-rn",
3
- "version": "1.4.20",
3
+ "version": "1.6.0",
4
4
  "main": ".",
5
5
  "files": [
6
6
  "api",
@@ -29,73 +29,52 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@bigbinary/app-version-control": "^1.1.6",
32
- "@bigbinary/neetoui-rn": "^0.0.288",
32
+ "@bigbinary/neetoui-rn": ">=2.0.0",
33
33
  "@react-navigation/bottom-tabs": "^6.5.3",
34
34
  "@react-navigation/material-top-tabs": "^6.5.2",
35
35
  "@react-navigation/native": "^6.0.13",
36
- "@react-navigation/native-stack": "6.9.8",
37
- "axios": "^1.2.2",
36
+ "@react-navigation/native-stack": ">=6.9.8",
37
+ "axios": ">=1.16.0",
38
38
  "dayjs": "^1.11.6",
39
+ "react": ">=18.2.0 <19",
40
+ "react-native": ">=0.70.0",
39
41
  "react-native-cam": "^5.4.16",
40
- "react-native-keychain": "^13.7.0",
42
+ "react-native-keychain": "10.0.0",
41
43
  "react-native-notifications": "^5.1.0",
42
44
  "react-native-push-notification": "^8.1.1",
43
- "react-native-reanimated": "3.6.0",
44
- "react-native-safe-area-context": "^3.3.2",
45
- "react-native-svg": "^12.3.0",
45
+ "react-native-reanimated": ">=3.6.0",
46
+ "react-native-safe-area-context": ">=3.3.2",
47
+ "react-native-svg": ">=12.3.0",
46
48
  "react-query": "^3.38.1",
47
49
  "react-redux": "^8.0.5",
48
50
  "redux": "^4.1.2",
49
- "redux-flipper": "^2.0.2",
50
51
  "redux-persist": "^6.0.0",
51
52
  "redux-saga": "^1.2.2"
52
53
  },
53
54
  "dependencies": {
54
- "@babel/cli": "^7.18.10",
55
55
  "@bigbinary/neeto-cist": "^1.0.15",
56
56
  "@bugsnag/plugin-react-navigation": "^7.11.0",
57
57
  "@bugsnag/react-native": "^7.11.0",
58
58
  "@invertase/react-native-apple-authentication": "^2.2.2",
59
59
  "@logrocket/react-native": "^1.35.1",
60
60
  "@react-native-async-storage/async-storage": "^1.15.5",
61
- "@react-native-community/datetimepicker": "^6.7.1",
62
- "@react-native-community/masked-view": "^0.1.11",
63
61
  "@react-native-community/netinfo": "^11.3.1",
64
- "@react-native-community/push-notification-ios": "^1.11.0",
65
62
  "@react-native-google-signin/google-signin": "^13.2.0",
66
63
  "@reduxjs/toolkit": "^1.7.1",
67
- "@shopify/flash-list": "^1.4.0",
68
64
  "compare-versions": "^6.0.0-rc.1",
69
- "del-cli": "^5.1.0",
70
65
  "formik": "^2.2.9",
71
- "immutable": "^4.2.2",
72
- "memoize-one": "^6.0.0",
73
66
  "qs": "^6.11.2",
74
67
  "ramda": "^0.28.0",
75
68
  "react-content-loader": "^6.1.0",
76
- "react-native-background-timer": "^2.4.1",
77
69
  "react-native-device-info": "^10.3.0",
78
- "react-native-fast-image": "^8.6.3",
79
- "react-native-flipper": "^0.176.1",
80
- "react-native-gesture-handler": "^2.20.0",
81
70
  "react-native-hyperlink": "^0.0.22",
82
- "react-native-keyboard-aware-scroll-view": "^0.9.5",
83
- "react-native-modal-datetime-picker": "^14.0.1",
84
71
  "react-native-notifications": "^5.1.0",
85
- "react-native-pager-view": "^6.1.2",
86
72
  "react-native-permissions": "^3.2.0",
87
73
  "react-native-push-notification": "^8.1.1",
88
- "react-native-raw-bottom-sheet": "^2.2.0",
89
74
  "react-native-remix-icon": "^0.4.0",
90
- "react-native-screens": "^3.4.0",
91
75
  "react-native-splash-screen": "^3.3.0",
92
- "react-native-swipe-gestures": "^1.0.5",
93
- "react-native-tab-view": "^3.3.4",
94
76
  "react-native-webview": "^11.13.0",
95
- "react-use": "^17.4.0",
96
77
  "styled-components": "^5.3.3",
97
- "styled-system": "^5.1.5",
98
- "xdate": "^0.8.2",
99
78
  "yup": "^0.32.11"
100
79
  },
101
80
  "jest": {
package/store/index.js CHANGED
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.persistConfig=exports.Store=exports.Persistor=void 0;var _asyncStorage=_interopRequireDefault(require("@react-native-async-storage/async-storage"));var _redux=require("redux");var _reduxPersist=require("redux-persist");var _slices=require("../slices");var persistConfig=exports.persistConfig={key:"root",storage:_asyncStorage.default,blacklist:[]};var middlewareToApply=[];if(__DEV__){var createDebugger=require("redux-flipper").default;middlewareToApply.push(createDebugger());}var persistedReducer=(0,_reduxPersist.persistReducer)(persistConfig,_slices.rootReducer);var Store=exports.Store=(0,_redux.createStore)(persistedReducer);var Persistor=exports.Persistor=(0,_reduxPersist.persistStore)(Store);Store.Persistor=Persistor;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.persistConfig=exports.Store=exports.Persistor=void 0;var _asyncStorage=_interopRequireDefault(require("@react-native-async-storage/async-storage"));var _redux=require("redux");var _reduxPersist=require("redux-persist");var _slices=require("../slices");var persistConfig=exports.persistConfig={key:"root",storage:_asyncStorage.default,blacklist:[]};var persistedReducer=(0,_reduxPersist.persistReducer)(persistConfig,_slices.rootReducer);var Store=exports.Store=(0,_redux.createStore)(persistedReducer);var Persistor=exports.Persistor=(0,_reduxPersist.persistStore)(Store);Store.Persistor=Persistor;