@fto-consult/expo-ui 1.0.4
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.
- package/assets/adaptive-icon.png +0 -0
- package/assets/add_photo.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/icon.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/splash.png +0 -0
- package/babel.config.alias.js +32 -0
- package/babel.config.js +18 -0
- package/circular-dependencies.js +24 -0
- package/compiler.config.js +28 -0
- package/expo.metro.config.js +27 -0
- package/index.js +21 -0
- package/metro.config.js +1 -0
- package/package.json +60 -0
- package/src/App.js +65 -0
- package/src/Preferences.js +5 -0
- package/src/auth/Login.js +254 -0
- package/src/auth/index.js +3 -0
- package/src/components/ActivityIndicator/index.js +9 -0
- package/src/components/Animations/Animation/index.js +95 -0
- package/src/components/Animations/Animation/utils.js +78 -0
- package/src/components/Animations/OpacityAnimation/index.js +53 -0
- package/src/components/Animations/OpacityAnimation/utils.js +38 -0
- package/src/components/Animations/index.js +6 -0
- package/src/components/AppBar/Content.js +132 -0
- package/src/components/AppBar/index.js +164 -0
- package/src/components/AppBar/utils.js +204 -0
- package/src/components/AutoLink/index.js +45 -0
- package/src/components/Avatar/AutoHeightImage/AnimatableImage.js +22 -0
- package/src/components/Avatar/AutoHeightImage/ImagePolyfill.js +33 -0
- package/src/components/Avatar/AutoHeightImage/cache.js +75 -0
- package/src/components/Avatar/AutoHeightImage/helpers.js +2 -0
- package/src/components/Avatar/AutoHeightImage/index.js +97 -0
- package/src/components/Avatar/Image.js +115 -0
- package/src/components/Avatar/Text.js +74 -0
- package/src/components/Avatar/index.js +89 -0
- package/src/components/BackToTop/index.js +89 -0
- package/src/components/Badge/index.js +141 -0
- package/src/components/Badge/index1.js +34 -0
- package/src/components/BottomSheet/Content.js +19 -0
- package/src/components/BottomSheet/Menu.js +126 -0
- package/src/components/BottomSheet/Provider.js +58 -0
- package/src/components/BottomSheet/Sheet.js +434 -0
- package/src/components/BottomSheet/index.js +8 -0
- package/src/components/BottomSheet/utils.js +30 -0
- package/src/components/Br/index.js +4 -0
- package/src/components/Br/index.web.js +3 -0
- package/src/components/Browser/index.js +4 -0
- package/src/components/Button/index.js +465 -0
- package/src/components/CardView/index.android.js +55 -0
- package/src/components/CardView/index.ios.js +36 -0
- package/src/components/CardView/index.web.js +3 -0
- package/src/components/Chart/appexchart.3.5.text +14 -0
- package/src/components/Chart/index.js +22 -0
- package/src/components/Chart/index.native.js +61 -0
- package/src/components/Chart/utils.js +0 -0
- package/src/components/Checkbox/index.js +178 -0
- package/src/components/Chip/index.js +350 -0
- package/src/components/Color/ColorPicker.js +724 -0
- package/src/components/Color/assets/black-gradient-rotated.png +0 -0
- package/src/components/Color/assets/black-gradient.png +0 -0
- package/src/components/Color/assets/color-wheel.png +0 -0
- package/src/components/Color/index.js +158 -0
- package/src/components/ContentLoader/BarChar.js +19 -0
- package/src/components/ContentLoader/Circle.js +3 -0
- package/src/components/ContentLoader/Circle.web.js +3 -0
- package/src/components/ContentLoader/Datagrid.js +28 -0
- package/src/components/ContentLoader/Form.js +39 -0
- package/src/components/ContentLoader/Loader/RLoader/index.js +3 -0
- package/src/components/ContentLoader/Loader/RLoader/index.web.js +3 -0
- package/src/components/ContentLoader/Loader/index.js +20 -0
- package/src/components/ContentLoader/PieChart.js +22 -0
- package/src/components/ContentLoader/Placeholder/Placeholder.js +52 -0
- package/src/components/ContentLoader/Placeholder/PlaceholderLine.js +59 -0
- package/src/components/ContentLoader/Placeholder/PlaceholderMedia.js +47 -0
- package/src/components/ContentLoader/Placeholder/animations/Fade.js +58 -0
- package/src/components/ContentLoader/Placeholder/animations/Loader.js +24 -0
- package/src/components/ContentLoader/Placeholder/animations/Progressive.js +62 -0
- package/src/components/ContentLoader/Placeholder/animations/Raw.js +4 -0
- package/src/components/ContentLoader/Placeholder/animations/Shine.js +56 -0
- package/src/components/ContentLoader/Placeholder/animations/ShineOverlay.js +56 -0
- package/src/components/ContentLoader/Placeholder/animations/context.js +4 -0
- package/src/components/ContentLoader/Placeholder/index.js +12 -0
- package/src/components/ContentLoader/Placeholder/tokens.js +9 -0
- package/src/components/ContentLoader/Profile.js +27 -0
- package/src/components/ContentLoader/Rect.js +3 -0
- package/src/components/ContentLoader/Rect.web.js +3 -0
- package/src/components/ContentLoader/Skeleton.js +145 -0
- package/src/components/ContentLoader/Table.js +69 -0
- package/src/components/ContentLoader/TaskList.js +27 -0
- package/src/components/ContentLoader/index copy.js +148 -0
- package/src/components/ContentLoader/index.js +151 -0
- package/src/components/ContentLoader/utils.js +8 -0
- package/src/components/CountUp/index.js +67 -0
- package/src/components/Countries/SelectCountry.js +65 -0
- package/src/components/Countries/index.js +5 -0
- package/src/components/Countries/resources/countries.json +1746 -0
- package/src/components/Countries/resources/flags/images/ad.png +0 -0
- package/src/components/Countries/resources/flags/images/ae.png +0 -0
- package/src/components/Countries/resources/flags/images/af.png +0 -0
- package/src/components/Countries/resources/flags/images/ag.png +0 -0
- package/src/components/Countries/resources/flags/images/ai.png +0 -0
- package/src/components/Countries/resources/flags/images/al.png +0 -0
- package/src/components/Countries/resources/flags/images/am.png +0 -0
- package/src/components/Countries/resources/flags/images/ao.png +0 -0
- package/src/components/Countries/resources/flags/images/ar.png +0 -0
- package/src/components/Countries/resources/flags/images/as.png +0 -0
- package/src/components/Countries/resources/flags/images/at.png +0 -0
- package/src/components/Countries/resources/flags/images/au.png +0 -0
- package/src/components/Countries/resources/flags/images/aw.png +0 -0
- package/src/components/Countries/resources/flags/images/ax.png +0 -0
- package/src/components/Countries/resources/flags/images/az.png +0 -0
- package/src/components/Countries/resources/flags/images/ba.png +0 -0
- package/src/components/Countries/resources/flags/images/bb.png +0 -0
- package/src/components/Countries/resources/flags/images/bd.png +0 -0
- package/src/components/Countries/resources/flags/images/be.png +0 -0
- package/src/components/Countries/resources/flags/images/bf.png +0 -0
- package/src/components/Countries/resources/flags/images/bg.png +0 -0
- package/src/components/Countries/resources/flags/images/bh.png +0 -0
- package/src/components/Countries/resources/flags/images/bi.png +0 -0
- package/src/components/Countries/resources/flags/images/bj.png +0 -0
- package/src/components/Countries/resources/flags/images/bl.png +0 -0
- package/src/components/Countries/resources/flags/images/bm.png +0 -0
- package/src/components/Countries/resources/flags/images/bn.png +0 -0
- package/src/components/Countries/resources/flags/images/bo.png +0 -0
- package/src/components/Countries/resources/flags/images/bq.png +0 -0
- package/src/components/Countries/resources/flags/images/br.png +0 -0
- package/src/components/Countries/resources/flags/images/bs.png +0 -0
- package/src/components/Countries/resources/flags/images/bt.png +0 -0
- package/src/components/Countries/resources/flags/images/bw.png +0 -0
- package/src/components/Countries/resources/flags/images/by.png +0 -0
- package/src/components/Countries/resources/flags/images/bz.png +0 -0
- package/src/components/Countries/resources/flags/images/ca.png +0 -0
- package/src/components/Countries/resources/flags/images/cc.png +0 -0
- package/src/components/Countries/resources/flags/images/cd.png +0 -0
- package/src/components/Countries/resources/flags/images/cf.png +0 -0
- package/src/components/Countries/resources/flags/images/cg.png +0 -0
- package/src/components/Countries/resources/flags/images/ch.png +0 -0
- package/src/components/Countries/resources/flags/images/ci.png +0 -0
- package/src/components/Countries/resources/flags/images/ck.png +0 -0
- package/src/components/Countries/resources/flags/images/cl.png +0 -0
- package/src/components/Countries/resources/flags/images/cm.png +0 -0
- package/src/components/Countries/resources/flags/images/cn.png +0 -0
- package/src/components/Countries/resources/flags/images/co.png +0 -0
- package/src/components/Countries/resources/flags/images/cr.png +0 -0
- package/src/components/Countries/resources/flags/images/cu.png +0 -0
- package/src/components/Countries/resources/flags/images/cv.png +0 -0
- package/src/components/Countries/resources/flags/images/cw.png +0 -0
- package/src/components/Countries/resources/flags/images/cx.png +0 -0
- package/src/components/Countries/resources/flags/images/cy.png +0 -0
- package/src/components/Countries/resources/flags/images/cz.png +0 -0
- package/src/components/Countries/resources/flags/images/de.png +0 -0
- package/src/components/Countries/resources/flags/images/dj.png +0 -0
- package/src/components/Countries/resources/flags/images/dk.png +0 -0
- package/src/components/Countries/resources/flags/images/dm.png +0 -0
- package/src/components/Countries/resources/flags/images/do.png +0 -0
- package/src/components/Countries/resources/flags/images/dz.png +0 -0
- package/src/components/Countries/resources/flags/images/ec.png +0 -0
- package/src/components/Countries/resources/flags/images/ee.png +0 -0
- package/src/components/Countries/resources/flags/images/eg.png +0 -0
- package/src/components/Countries/resources/flags/images/eh.png +0 -0
- package/src/components/Countries/resources/flags/images/er.png +0 -0
- package/src/components/Countries/resources/flags/images/es.png +0 -0
- package/src/components/Countries/resources/flags/images/et.png +0 -0
- package/src/components/Countries/resources/flags/images/fi.png +0 -0
- package/src/components/Countries/resources/flags/images/fj.png +0 -0
- package/src/components/Countries/resources/flags/images/fk.png +0 -0
- package/src/components/Countries/resources/flags/images/fm.png +0 -0
- package/src/components/Countries/resources/flags/images/fo.png +0 -0
- package/src/components/Countries/resources/flags/images/fr.png +0 -0
- package/src/components/Countries/resources/flags/images/ga.png +0 -0
- package/src/components/Countries/resources/flags/images/gb.png +0 -0
- package/src/components/Countries/resources/flags/images/gd.png +0 -0
- package/src/components/Countries/resources/flags/images/ge.png +0 -0
- package/src/components/Countries/resources/flags/images/gf.png +0 -0
- package/src/components/Countries/resources/flags/images/gg.png +0 -0
- package/src/components/Countries/resources/flags/images/gh.png +0 -0
- package/src/components/Countries/resources/flags/images/gi.png +0 -0
- package/src/components/Countries/resources/flags/images/gm.png +0 -0
- package/src/components/Countries/resources/flags/images/gn.png +0 -0
- package/src/components/Countries/resources/flags/images/gp.png +0 -0
- package/src/components/Countries/resources/flags/images/gq.png +0 -0
- package/src/components/Countries/resources/flags/images/gr.png +0 -0
- package/src/components/Countries/resources/flags/images/gt.png +0 -0
- package/src/components/Countries/resources/flags/images/gu.png +0 -0
- package/src/components/Countries/resources/flags/images/gw.png +0 -0
- package/src/components/Countries/resources/flags/images/gy.png +0 -0
- package/src/components/Countries/resources/flags/images/hk.png +0 -0
- package/src/components/Countries/resources/flags/images/hn.png +0 -0
- package/src/components/Countries/resources/flags/images/hr.png +0 -0
- package/src/components/Countries/resources/flags/images/ht.png +0 -0
- package/src/components/Countries/resources/flags/images/hu.png +0 -0
- package/src/components/Countries/resources/flags/images/id.png +0 -0
- package/src/components/Countries/resources/flags/images/ie.png +0 -0
- package/src/components/Countries/resources/flags/images/il.png +0 -0
- package/src/components/Countries/resources/flags/images/im.png +0 -0
- package/src/components/Countries/resources/flags/images/in.png +0 -0
- package/src/components/Countries/resources/flags/images/io.png +0 -0
- package/src/components/Countries/resources/flags/images/iq.png +0 -0
- package/src/components/Countries/resources/flags/images/ir.png +0 -0
- package/src/components/Countries/resources/flags/images/is.png +0 -0
- package/src/components/Countries/resources/flags/images/it.png +0 -0
- package/src/components/Countries/resources/flags/images/je.png +0 -0
- package/src/components/Countries/resources/flags/images/jm.png +0 -0
- package/src/components/Countries/resources/flags/images/jo.png +0 -0
- package/src/components/Countries/resources/flags/images/jp.png +0 -0
- package/src/components/Countries/resources/flags/images/ke.png +0 -0
- package/src/components/Countries/resources/flags/images/kg.png +0 -0
- package/src/components/Countries/resources/flags/images/kh.png +0 -0
- package/src/components/Countries/resources/flags/images/ki.png +0 -0
- package/src/components/Countries/resources/flags/images/km.png +0 -0
- package/src/components/Countries/resources/flags/images/kn.png +0 -0
- package/src/components/Countries/resources/flags/images/kp.png +0 -0
- package/src/components/Countries/resources/flags/images/kr.png +0 -0
- package/src/components/Countries/resources/flags/images/ks.png +0 -0
- package/src/components/Countries/resources/flags/images/kw.png +0 -0
- package/src/components/Countries/resources/flags/images/ky.png +0 -0
- package/src/components/Countries/resources/flags/images/kz.png +0 -0
- package/src/components/Countries/resources/flags/images/la.png +0 -0
- package/src/components/Countries/resources/flags/images/lb.png +0 -0
- package/src/components/Countries/resources/flags/images/lc.png +0 -0
- package/src/components/Countries/resources/flags/images/li.png +0 -0
- package/src/components/Countries/resources/flags/images/lk.png +0 -0
- package/src/components/Countries/resources/flags/images/lr.png +0 -0
- package/src/components/Countries/resources/flags/images/ls.png +0 -0
- package/src/components/Countries/resources/flags/images/lt.png +0 -0
- package/src/components/Countries/resources/flags/images/lu.png +0 -0
- package/src/components/Countries/resources/flags/images/lv.png +0 -0
- package/src/components/Countries/resources/flags/images/ly.png +0 -0
- package/src/components/Countries/resources/flags/images/ma.png +0 -0
- package/src/components/Countries/resources/flags/images/mc.png +0 -0
- package/src/components/Countries/resources/flags/images/md.png +0 -0
- package/src/components/Countries/resources/flags/images/me.png +0 -0
- package/src/components/Countries/resources/flags/images/mf.png +0 -0
- package/src/components/Countries/resources/flags/images/mg.png +0 -0
- package/src/components/Countries/resources/flags/images/mh.png +0 -0
- package/src/components/Countries/resources/flags/images/mk.png +0 -0
- package/src/components/Countries/resources/flags/images/ml.png +0 -0
- package/src/components/Countries/resources/flags/images/mm.png +0 -0
- package/src/components/Countries/resources/flags/images/mn.png +0 -0
- package/src/components/Countries/resources/flags/images/mo.png +0 -0
- package/src/components/Countries/resources/flags/images/mp.png +0 -0
- package/src/components/Countries/resources/flags/images/mq.png +0 -0
- package/src/components/Countries/resources/flags/images/mr.png +0 -0
- package/src/components/Countries/resources/flags/images/ms.png +0 -0
- package/src/components/Countries/resources/flags/images/mt.png +0 -0
- package/src/components/Countries/resources/flags/images/mu.png +0 -0
- package/src/components/Countries/resources/flags/images/mv.png +0 -0
- package/src/components/Countries/resources/flags/images/mw.png +0 -0
- package/src/components/Countries/resources/flags/images/mx.png +0 -0
- package/src/components/Countries/resources/flags/images/my.png +0 -0
- package/src/components/Countries/resources/flags/images/mz.png +0 -0
- package/src/components/Countries/resources/flags/images/na.png +0 -0
- package/src/components/Countries/resources/flags/images/nc.png +0 -0
- package/src/components/Countries/resources/flags/images/ne.png +0 -0
- package/src/components/Countries/resources/flags/images/nf.png +0 -0
- package/src/components/Countries/resources/flags/images/ng.png +0 -0
- package/src/components/Countries/resources/flags/images/ni.png +0 -0
- package/src/components/Countries/resources/flags/images/nl.png +0 -0
- package/src/components/Countries/resources/flags/images/no.png +0 -0
- package/src/components/Countries/resources/flags/images/np.png +0 -0
- package/src/components/Countries/resources/flags/images/nr.png +0 -0
- package/src/components/Countries/resources/flags/images/nu.png +0 -0
- package/src/components/Countries/resources/flags/images/nz.png +0 -0
- package/src/components/Countries/resources/flags/images/om.png +0 -0
- package/src/components/Countries/resources/flags/images/pa.png +0 -0
- package/src/components/Countries/resources/flags/images/pe.png +0 -0
- package/src/components/Countries/resources/flags/images/pf.png +0 -0
- package/src/components/Countries/resources/flags/images/pg.png +0 -0
- package/src/components/Countries/resources/flags/images/ph.png +0 -0
- package/src/components/Countries/resources/flags/images/pk.png +0 -0
- package/src/components/Countries/resources/flags/images/pl.png +0 -0
- package/src/components/Countries/resources/flags/images/pm.png +0 -0
- package/src/components/Countries/resources/flags/images/pr.png +0 -0
- package/src/components/Countries/resources/flags/images/ps.png +0 -0
- package/src/components/Countries/resources/flags/images/pt.png +0 -0
- package/src/components/Countries/resources/flags/images/pw.png +0 -0
- package/src/components/Countries/resources/flags/images/py.png +0 -0
- package/src/components/Countries/resources/flags/images/qa.png +0 -0
- package/src/components/Countries/resources/flags/images/re.png +0 -0
- package/src/components/Countries/resources/flags/images/ro.png +0 -0
- package/src/components/Countries/resources/flags/images/rs.png +0 -0
- package/src/components/Countries/resources/flags/images/ru.png +0 -0
- package/src/components/Countries/resources/flags/images/rw.png +0 -0
- package/src/components/Countries/resources/flags/images/sa.png +0 -0
- package/src/components/Countries/resources/flags/images/sb.png +0 -0
- package/src/components/Countries/resources/flags/images/sc.png +0 -0
- package/src/components/Countries/resources/flags/images/sd.png +0 -0
- package/src/components/Countries/resources/flags/images/se.png +0 -0
- package/src/components/Countries/resources/flags/images/sg.png +0 -0
- package/src/components/Countries/resources/flags/images/sh.png +0 -0
- package/src/components/Countries/resources/flags/images/si.png +0 -0
- package/src/components/Countries/resources/flags/images/sj.png +0 -0
- package/src/components/Countries/resources/flags/images/sk.png +0 -0
- package/src/components/Countries/resources/flags/images/sl.png +0 -0
- package/src/components/Countries/resources/flags/images/sm.png +0 -0
- package/src/components/Countries/resources/flags/images/sn.png +0 -0
- package/src/components/Countries/resources/flags/images/so.png +0 -0
- package/src/components/Countries/resources/flags/images/sr.png +0 -0
- package/src/components/Countries/resources/flags/images/ss.png +0 -0
- package/src/components/Countries/resources/flags/images/st.png +0 -0
- package/src/components/Countries/resources/flags/images/sv.png +0 -0
- package/src/components/Countries/resources/flags/images/sx.png +0 -0
- package/src/components/Countries/resources/flags/images/sy.png +0 -0
- package/src/components/Countries/resources/flags/images/sz.png +0 -0
- package/src/components/Countries/resources/flags/images/tc.png +0 -0
- package/src/components/Countries/resources/flags/images/td.png +0 -0
- package/src/components/Countries/resources/flags/images/tg.png +0 -0
- package/src/components/Countries/resources/flags/images/th.png +0 -0
- package/src/components/Countries/resources/flags/images/tj.png +0 -0
- package/src/components/Countries/resources/flags/images/tk.png +0 -0
- package/src/components/Countries/resources/flags/images/tl.png +0 -0
- package/src/components/Countries/resources/flags/images/tm.png +0 -0
- package/src/components/Countries/resources/flags/images/tn.png +0 -0
- package/src/components/Countries/resources/flags/images/to.png +0 -0
- package/src/components/Countries/resources/flags/images/tr.png +0 -0
- package/src/components/Countries/resources/flags/images/tt.png +0 -0
- package/src/components/Countries/resources/flags/images/tv.png +0 -0
- package/src/components/Countries/resources/flags/images/tw.png +0 -0
- package/src/components/Countries/resources/flags/images/tz.png +0 -0
- package/src/components/Countries/resources/flags/images/ua.png +0 -0
- package/src/components/Countries/resources/flags/images/ug.png +0 -0
- package/src/components/Countries/resources/flags/images/us.png +0 -0
- package/src/components/Countries/resources/flags/images/uy.png +0 -0
- package/src/components/Countries/resources/flags/images/uz.png +0 -0
- package/src/components/Countries/resources/flags/images/va.png +0 -0
- package/src/components/Countries/resources/flags/images/vc.png +0 -0
- package/src/components/Countries/resources/flags/images/ve.png +0 -0
- package/src/components/Countries/resources/flags/images/vg.png +0 -0
- package/src/components/Countries/resources/flags/images/vi.png +0 -0
- package/src/components/Countries/resources/flags/images/vn.png +0 -0
- package/src/components/Countries/resources/flags/images/vu.png +0 -0
- package/src/components/Countries/resources/flags/images/wf.png +0 -0
- package/src/components/Countries/resources/flags/images/ws.png +0 -0
- package/src/components/Countries/resources/flags/images/ye.png +0 -0
- package/src/components/Countries/resources/flags/images/yt.png +0 -0
- package/src/components/Countries/resources/flags/images/za.png +0 -0
- package/src/components/Countries/resources/flags/images/zm.png +0 -0
- package/src/components/Countries/resources/flags/images/zw.png +0 -0
- package/src/components/Countries/resources/flags/index.js +255 -0
- package/src/components/Countries/utils.js +28 -0
- package/src/components/Datagrid/Accordion/AppleSwipeable.js +123 -0
- package/src/components/Datagrid/Accordion/Filters.js +186 -0
- package/src/components/Datagrid/Accordion/GmailSwipeable.js +85 -0
- package/src/components/Datagrid/Accordion/Row.js +295 -0
- package/src/components/Datagrid/Accordion/index.js +719 -0
- package/src/components/Datagrid/Accordion/utils.js +22 -0
- package/src/components/Datagrid/Actions/Header.js +58 -0
- package/src/components/Datagrid/Actions/index.js +104 -0
- package/src/components/Datagrid/Checkbox.js +40 -0
- package/src/components/Datagrid/Common/Common.js +1866 -0
- package/src/components/Datagrid/Common/TableData.js +245 -0
- package/src/components/Datagrid/Common/factory.js +9 -0
- package/src/components/Datagrid/Common/index.js +7 -0
- package/src/components/Datagrid/Common/session.js +20 -0
- package/src/components/Datagrid/Common/setQueryLimit.js +32 -0
- package/src/components/Datagrid/Footer/Footer.js +86 -0
- package/src/components/Datagrid/Footer/index.js +93 -0
- package/src/components/Datagrid/List.js +2 -0
- package/src/components/Datagrid/RenderType.js +53 -0
- package/src/components/Datagrid/RenderTypes/index.native.js +1 -0
- package/src/components/Datagrid/RenderTypes/index.web.js +10 -0
- package/src/components/Datagrid/RenderTypes/utils.js +5 -0
- package/src/components/Datagrid/Table/Cell.js +45 -0
- package/src/components/Datagrid/Table/Datatable.js +232 -0
- package/src/components/Datagrid/Table/index.js +446 -0
- package/src/components/Datagrid/Table/renderTable.js +664 -0
- package/src/components/Datagrid/factory.js +12 -0
- package/src/components/Datagrid/getComponent.js +26 -0
- package/src/components/Datagrid/index.js +43 -0
- package/src/components/Datagrid/utils.js +185 -0
- package/src/components/Date/DatePickerModal/index.js +10 -0
- package/src/components/Date/DatePickerModal/index.native.js +22 -0
- package/src/components/Date/PickerInput/TextInputMask.js +106 -0
- package/src/components/Date/PickerInput/index.js +253 -0
- package/src/components/Date/Time.js +154 -0
- package/src/components/Date/TimePickerModal/index.js +3 -0
- package/src/components/Date/TimePickerModal/index.native.js +21 -0
- package/src/components/Date/dictionary.js +26 -0
- package/src/components/Date/index.js +11 -0
- package/src/components/Date/utils.common.js +3 -0
- package/src/components/Date/utils.common.native.js +0 -0
- package/src/components/Date/utils.js +209 -0
- package/src/components/Dialog/AppBarDialog.js +41 -0
- package/src/components/Dialog/Dialog.js +377 -0
- package/src/components/Dialog/DialogActions.js +69 -0
- package/src/components/Dialog/DialogFooter.js +36 -0
- package/src/components/Dialog/DialogTitle.js +47 -0
- package/src/components/Dialog/DropdownAlert/Queue.js +28 -0
- package/src/components/Dialog/DropdownAlert/Utils.js +36 -0
- package/src/components/Dialog/DropdownAlert/assets/cancel.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/cancel@2x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/cancel@3x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/error.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/error@2x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/error@3x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/info.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/info@2x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/info@3x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/success.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/success@2x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/success@3x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/warn.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/warn@2x.png +0 -0
- package/src/components/Dialog/DropdownAlert/assets/warn@3x.png +0 -0
- package/src/components/Dialog/DropdownAlert/index.js +685 -0
- package/src/components/Dialog/Provider.js +75 -0
- package/src/components/Dialog/confirm/Alert/Alert.old/Alert.web.js +360 -0
- package/src/components/Dialog/confirm/Alert/Alert.old/index.js +2 -0
- package/src/components/Dialog/confirm/Alert/index.js +43 -0
- package/src/components/Dialog/confirm/index.js +12 -0
- package/src/components/Dialog/confirm/showConfirmOrAlertOrPrompt.js +145 -0
- package/src/components/Dialog/dialogs.js +70 -0
- package/src/components/Dialog/index.js +17 -0
- package/src/components/Dialog/showConfirmOrAlertOrPrompt.js +90 -0
- package/src/components/Dialog/style.css +103 -0
- package/src/components/Dialog/utils.js +33 -0
- package/src/components/Divider/index.js +44 -0
- package/src/components/Drawer/DrawerHeader.js +70 -0
- package/src/components/Drawer/DrawerItems/DrawerItem.js +88 -0
- package/src/components/Drawer/DrawerItems/DrawerSection.js +34 -0
- package/src/components/Drawer/DrawerItems/ExpandableItem.js +44 -0
- package/src/components/Drawer/DrawerItems/_DrawerItem.js +173 -0
- package/src/components/Drawer/DrawerItems/index.js +155 -0
- package/src/components/Drawer/DrawerItems/utils.js +107 -0
- package/src/components/Drawer/DrawerLayout/index.js +476 -0
- package/src/components/Drawer/NavigationView.js +90 -0
- package/src/components/Drawer/Provider.js +6 -0
- package/src/components/Drawer/index.js +455 -0
- package/src/components/Drawer/session.js +28 -0
- package/src/components/Drawer/utils.js +39 -0
- package/src/components/Dropdown/index.js +1317 -0
- package/src/components/Dropdown/utils.js +19 -0
- package/src/components/ErrorBoundary/ErrorMessage.js +107 -0
- package/src/components/ErrorBoundary/Provider.js +68 -0
- package/src/components/ErrorBoundary/index.js +64 -0
- package/src/components/Expandable/Item.js +159 -0
- package/src/components/Expandable/index.js +229 -0
- package/src/components/Fab/Fab.js +46 -0
- package/src/components/Fab/Group.js +143 -0
- package/src/components/Fab/GroupComponent.js +384 -0
- package/src/components/Fab/index.js +8 -0
- package/src/components/FadeInOut/index.js +70 -0
- package/src/components/Filter/filterTextTypes.js +1 -0
- package/src/components/Filter/index.js +570 -0
- package/src/components/Filter/session.js +18 -0
- package/src/components/Filter/utils.js +289 -0
- package/src/components/Form/Action.js +112 -0
- package/src/components/Form/Fields/Checkbox.js +29 -0
- package/src/components/Form/Fields/Color.js +21 -0
- package/src/components/Form/Fields/Date.js +24 -0
- package/src/components/Form/Fields/Field.js +1048 -0
- package/src/components/Form/Fields/Html.js +21 -0
- package/src/components/Form/Fields/IdField.js +131 -0
- package/src/components/Form/Fields/Image.js +65 -0
- package/src/components/Form/Fields/PieceField.js +143 -0
- package/src/components/Form/Fields/Radio.js +31 -0
- package/src/components/Form/Fields/SelectCountry.js +12 -0
- package/src/components/Form/Fields/SelectField.js +147 -0
- package/src/components/Form/Fields/SelectStructData.js +24 -0
- package/src/components/Form/Fields/SelectTableData.js +24 -0
- package/src/components/Form/Fields/SelectTheme.js +11 -0
- package/src/components/Form/Fields/Slider.js +32 -0
- package/src/components/Form/Fields/Switch.js +34 -0
- package/src/components/Form/Fields/Tel.js +21 -0
- package/src/components/Form/Fields/TextField.js +44 -0
- package/src/components/Form/Fields/Time.js +28 -0
- package/src/components/Form/Fields/index.js +52 -0
- package/src/components/Form/Fields/selectPromptField.js +59 -0
- package/src/components/Form/Fields/sprintf.js +42 -0
- package/src/components/Form/Fields/sprintfSelectors.js +117 -0
- package/src/components/Form/Fields/utils.js +8 -0
- package/src/components/Form/Form.js +221 -0
- package/src/components/Form/FormData/Dialog.js +116 -0
- package/src/components/Form/FormData/DialogProvider.js +117 -0
- package/src/components/Form/FormData/FormData.js +403 -0
- package/src/components/Form/FormData/FormDataActions.js +155 -0
- package/src/components/Form/FormData/componentsTypes.js +117 -0
- package/src/components/Form/FormData/index.js +15 -0
- package/src/components/Form/FormData/utils.js +111 -0
- package/src/components/Form/KeyboardAvoidingView.js +23 -0
- package/src/components/Form/KeyboardEventHandler/index.js +115 -0
- package/src/components/Form/KeyboardEventHandler/keyEvents.js +139 -0
- package/src/components/Form/KeyboardEventHandler/readMe.md +1 -0
- package/src/components/Form/List/List.js +794 -0
- package/src/components/Form/List/index.js +2 -0
- package/src/components/Form/index.js +14 -0
- package/src/components/Form/utils/FormsManager.js +101 -0
- package/src/components/Form/utils/index.js +8 -0
- package/src/components/Form/utils/keyboardEvents.js +8 -0
- package/src/components/Form/utils/keyboardShortcuts.js +57 -0
- package/src/components/Grid/Cell.js +108 -0
- package/src/components/Grid/Col.js +30 -0
- package/src/components/Grid/Grid.js +35 -0
- package/src/components/Grid/Row.js +30 -0
- package/src/components/Grid/index.js +11 -0
- package/src/components/Hashtag/index.js +119 -0
- package/src/components/HeavyScreen/index.js +52 -0
- package/src/components/HeavyScreen/utils.js +36 -0
- package/src/components/HelperText/index.js +36 -0
- package/src/components/Html/AutoSizedImage.js +56 -0
- package/src/components/Html/HtmlToElement.js +173 -0
- package/src/components/Html/View.js +166 -0
- package/src/components/Icon/Checkbox.js +83 -0
- package/src/components/Icon/CrossFadeIcon.js +133 -0
- package/src/components/Icon/Icon.js +52 -0
- package/src/components/Icon/IconButton.js +155 -0
- package/src/components/Icon/MaterialCommunityIcon.js +93 -0
- package/src/components/Icon/index.js +10 -0
- package/src/components/Icon/utils.js +15 -0
- package/src/components/Image/Editor/index copy.js +42 -0
- package/src/components/Image/Editor/index.js +52 -0
- package/src/components/Image/index.js +309 -0
- package/src/components/InlineIndicator/Select.js +58 -0
- package/src/components/InlineIndicator/index.js +156 -0
- package/src/components/Label/index.js +104 -0
- package/src/components/Link/Browser.js +17 -0
- package/src/components/Link/getUrlCallback.js +10 -0
- package/src/components/Link/index.js +38 -0
- package/src/components/List/BigList.js +44 -0
- package/src/components/List/Common.js +233 -0
- package/src/components/List/FlashList.js +29 -0
- package/src/components/List/FlatList.js +34 -0
- package/src/components/List/RecyclerView.js +83 -0
- package/src/components/List/index.js +12 -0
- package/src/components/List/utils.js +23 -0
- package/src/components/Logo/Logo.js +98 -0
- package/src/components/Logo/Progress.js +21 -0
- package/src/components/Logo/index.js +3 -0
- package/src/components/Menu/Item.js +203 -0
- package/src/components/Menu/Menu.js +590 -0
- package/src/components/Menu/index.js +118 -0
- package/src/components/Menu/utils.js +81 -0
- package/src/components/Modal/index.js +212 -0
- package/src/components/NewLine/index.js +4 -0
- package/src/components/NewLine/index.web.js +3 -0
- package/src/components/Paragraph/index.js +32 -0
- package/src/components/PasswordText/index.js +29 -0
- package/src/components/PhoneInput/PhoneNumber.js +121 -0
- package/src/components/PhoneInput/country.js +54 -0
- package/src/components/PhoneInput/index.js +217 -0
- package/src/components/PhoneInput/numberType.json +14 -0
- package/src/components/PhoneInput/styles.js +52 -0
- package/src/components/Portal/index.js +5 -0
- package/src/components/Preloader/index.js +227 -0
- package/src/components/Progress/LoadingDots.js +126 -0
- package/src/components/Progress/index.js +18 -0
- package/src/components/Radio/index.js +164 -0
- package/src/components/ReadMoreText/index.js +120 -0
- package/src/components/ScrollView/index.js +34 -0
- package/src/components/Signature/Panel.js +246 -0
- package/src/components/Signature/index.js +69 -0
- package/src/components/SimpleSelect/index.js +483 -0
- package/src/components/Slider/Slider.js +770 -0
- package/src/components/Slider/index.js +144 -0
- package/src/components/Slider/styles.js +39 -0
- package/src/components/SplashScreen/index.js +194 -0
- package/src/components/SplashScreen/styles.js +74 -0
- package/src/components/StatusBar/Component/index.js +5 -0
- package/src/components/StatusBar/Component/index.web.js +88 -0
- package/src/components/StatusBar/index.js +7 -0
- package/src/components/Surface/Elevations.js +218 -0
- package/src/components/Surface/index.js +22 -0
- package/src/components/Swipeable/Swipe.js +225 -0
- package/src/components/Swipeable/SwipeableGesture.js +77 -0
- package/src/components/Swipeable/index.js +5 -0
- package/src/components/Swiper/Controls.js +277 -0
- package/src/components/Swiper/index.js +463 -0
- package/src/components/Swiper/nodeType.js +8 -0
- package/src/components/Swiper/renderNode.js +21 -0
- package/src/components/Switch/index.js +172 -0
- package/src/components/Tab/TabContent.js +72 -0
- package/src/components/Tab/TabItem.js +112 -0
- package/src/components/Tab/TabItems.js +246 -0
- package/src/components/Tab/index.js +114 -0
- package/src/components/Table/index.js +383 -0
- package/src/components/TextField/Affix.js +18 -0
- package/src/components/TextField/index.js +749 -0
- package/src/components/TextField/utils.js +64 -0
- package/src/components/Tooltip/Popover/index.js +254 -0
- package/src/components/Tooltip/Popover/index.web.js +60 -0
- package/src/components/Tooltip/index.js +42 -0
- package/src/components/TouchableRipple/index.js +0 -0
- package/src/components/View/index.js +49 -0
- package/src/components/WebView/Component/index.native.js +2 -0
- package/src/components/WebView/Component/index.web.js +154 -0
- package/src/components/WebView/Component/postMock.html +21 -0
- package/src/components/WebView/index.js +79 -0
- package/src/index.js +166 -0
- package/src/layouts/AppBar/index.js +59 -0
- package/src/layouts/AppBar/utils.js +12 -0
- package/src/layouts/Fab/actions.js +5 -0
- package/src/layouts/Fab/index.js +60 -0
- package/src/layouts/Fab/utils.js +25 -0
- package/src/layouts/Footer/index.js +8 -0
- package/src/layouts/Screen/FormData/FormData.js +103 -0
- package/src/layouts/Screen/FormData/List.js +83 -0
- package/src/layouts/Screen/FormData/index.js +3 -0
- package/src/layouts/Screen/Screen.js +173 -0
- package/src/layouts/Screen/index.js +11 -0
- package/src/media/Assets/index.js +6 -0
- package/src/media/Assets/utils.js +28 -0
- package/src/media/camera.js +1 -0
- package/src/media/camera.native.js +4 -0
- package/src/media/camera.web.js +9 -0
- package/src/media/file-system/index.js +20 -0
- package/src/media/file-system/utils/index.js +32 -0
- package/src/media/file-system/utils/utils.js +0 -0
- package/src/media/file-system/utils.native/index.js +1 -0
- package/src/media/index.js +137 -0
- package/src/navigation/Drawer/ProfilAvatar/defaultAvatar.js +1 -0
- package/src/navigation/Drawer/ProfilAvatar/index.js +142 -0
- package/src/navigation/Drawer/ProfilAvatar/style.css +18 -0
- package/src/navigation/Drawer/index.js +81 -0
- package/src/navigation/Drawer/items/SidebarFeedsItems.js +0 -0
- package/src/navigation/Drawer/items/SyncDataItem.js +20 -0
- package/src/navigation/Drawer/items/index.js +23 -0
- package/src/navigation/Drawer/items/items.js +31 -0
- package/src/navigation/Drawer/utils.js +18 -0
- package/src/navigation/index.js +45 -0
- package/src/navigation/utils.js +1 -0
- package/src/screens/Auth/index.js +31 -0
- package/src/screens/Auth/routes.js +9 -0
- package/src/screens/Auth/utils.js +5 -0
- package/src/screens/index.js +201 -0
- package/src/screens/mainScreens.js +4 -0
- package/src/screens/utils.js +13 -0
- package/webpack.config.js +31 -0
- package/workflows/release-package.yml +33 -0
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
import React, {Component} from '$react';
|
|
2
|
+
import {isObj,defaultStr} from "$utils";
|
|
3
|
+
import View from "$ecomponents/View";
|
|
4
|
+
import Portal from "$ecomponents/Portal";
|
|
5
|
+
import theme,{Colors} from "$theme";
|
|
6
|
+
import {
|
|
7
|
+
StyleSheet,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
Animated,
|
|
10
|
+
StatusBar,
|
|
11
|
+
PanResponder,
|
|
12
|
+
Keyboard,
|
|
13
|
+
Image,
|
|
14
|
+
} from 'react-native';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
16
|
+
import Label from "$ecomponents/Label";
|
|
17
|
+
import {
|
|
18
|
+
DEFAULT_IMAGE_DIMENSIONS,
|
|
19
|
+
IS_ANDROID,
|
|
20
|
+
IS_IOS_BELOW_11,
|
|
21
|
+
TYPE,
|
|
22
|
+
ACTION,
|
|
23
|
+
HEIGHT,
|
|
24
|
+
getDefaultStatusBarStyle,
|
|
25
|
+
getDefaultStatusBarBackgroundColor,
|
|
26
|
+
} from './Utils';
|
|
27
|
+
import Queue from './Queue';
|
|
28
|
+
|
|
29
|
+
const compareQueues = (a,b)=>{
|
|
30
|
+
return isObj(a) && isObj(b) && (a.title || b.title) && a.title === b.title && a.message == b.message ? true : false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const BOTTOM = 50;
|
|
34
|
+
const TOP = 50;
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export default class DropdownAlert extends Component {
|
|
38
|
+
static propTypes = {
|
|
39
|
+
imageSrc: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
40
|
+
infoImageSrc: PropTypes.oneOfType([
|
|
41
|
+
PropTypes.string,
|
|
42
|
+
PropTypes.number,
|
|
43
|
+
PropTypes.object,
|
|
44
|
+
]),
|
|
45
|
+
warnImageSrc: PropTypes.oneOfType([
|
|
46
|
+
PropTypes.string,
|
|
47
|
+
PropTypes.number,
|
|
48
|
+
PropTypes.object,
|
|
49
|
+
]),
|
|
50
|
+
errorImageSrc: PropTypes.oneOfType([
|
|
51
|
+
PropTypes.string,
|
|
52
|
+
PropTypes.number,
|
|
53
|
+
PropTypes.object,
|
|
54
|
+
]),
|
|
55
|
+
successImageSrc: PropTypes.oneOfType([
|
|
56
|
+
PropTypes.string,
|
|
57
|
+
PropTypes.number,
|
|
58
|
+
PropTypes.object,
|
|
59
|
+
]),
|
|
60
|
+
cancelBtnImageSrc: PropTypes.oneOfType([
|
|
61
|
+
PropTypes.string,
|
|
62
|
+
PropTypes.number,
|
|
63
|
+
PropTypes.object,
|
|
64
|
+
]),
|
|
65
|
+
infoColor: PropTypes.string,
|
|
66
|
+
warnColor: PropTypes.string,
|
|
67
|
+
errorColor: PropTypes.string,
|
|
68
|
+
successColor: PropTypes.string,
|
|
69
|
+
closeInterval: PropTypes.number,
|
|
70
|
+
startDelta: PropTypes.number,
|
|
71
|
+
endDelta: PropTypes.number,
|
|
72
|
+
wrapperStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
73
|
+
containerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
74
|
+
contentContainerStyle: PropTypes.oneOfType([
|
|
75
|
+
PropTypes.object,
|
|
76
|
+
PropTypes.number,
|
|
77
|
+
]),
|
|
78
|
+
titleStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
79
|
+
messageStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
80
|
+
imageStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
81
|
+
cancelBtnImageStyle: PropTypes.oneOfType([
|
|
82
|
+
PropTypes.object,
|
|
83
|
+
PropTypes.number,
|
|
84
|
+
]),
|
|
85
|
+
titleNumberOfLines: PropTypes.number,
|
|
86
|
+
messageNumberOfLines: PropTypes.number,
|
|
87
|
+
onClose: PropTypes.func,
|
|
88
|
+
onCancel: PropTypes.func,
|
|
89
|
+
showCancel: PropTypes.bool,
|
|
90
|
+
tapToCloseEnabled: PropTypes.bool,
|
|
91
|
+
panResponderEnabled: PropTypes.bool,
|
|
92
|
+
translucent: PropTypes.bool,
|
|
93
|
+
useNativeDriver: PropTypes.bool,
|
|
94
|
+
isInteraction: PropTypes.bool,
|
|
95
|
+
activeStatusBarStyle: PropTypes.string,
|
|
96
|
+
activeStatusBarBackgroundColor: PropTypes.string,
|
|
97
|
+
inactiveStatusBarStyle: PropTypes.string,
|
|
98
|
+
inactiveStatusBarBackgroundColor: PropTypes.string,
|
|
99
|
+
elevation: PropTypes.number,
|
|
100
|
+
zIndex: PropTypes.number,
|
|
101
|
+
sensitivity: PropTypes.number,
|
|
102
|
+
defaultContainer: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
103
|
+
defaultTextContainer: PropTypes.oneOfType([
|
|
104
|
+
PropTypes.object,
|
|
105
|
+
PropTypes.number,
|
|
106
|
+
]),
|
|
107
|
+
renderImage: PropTypes.func,
|
|
108
|
+
renderCancel: PropTypes.func,
|
|
109
|
+
renderTitle: PropTypes.func,
|
|
110
|
+
renderMessage: PropTypes.func,
|
|
111
|
+
testID: PropTypes.string,
|
|
112
|
+
accessibilityLabel: PropTypes.string,
|
|
113
|
+
accessible: PropTypes.bool,
|
|
114
|
+
titleTextProps: PropTypes.object,
|
|
115
|
+
messageTextProps: PropTypes.object,
|
|
116
|
+
onTap: PropTypes.func,
|
|
117
|
+
};
|
|
118
|
+
static defaultProps = {
|
|
119
|
+
onClose: () => {},
|
|
120
|
+
onCancel: () => {},
|
|
121
|
+
closeInterval: 4000,
|
|
122
|
+
startDelta: -100,
|
|
123
|
+
endDelta: 0,
|
|
124
|
+
titleNumberOfLines: 2,
|
|
125
|
+
messageNumberOfLines: 10,
|
|
126
|
+
imageSrc: null,
|
|
127
|
+
infoImageSrc: require('./assets/info.png'),
|
|
128
|
+
warnImageSrc: require('./assets/warn.png'),
|
|
129
|
+
errorImageSrc: require('./assets/error.png'),
|
|
130
|
+
successImageSrc: require('./assets/success.png'),
|
|
131
|
+
cancelBtnImageSrc: require('./assets/cancel.png'),
|
|
132
|
+
/*infoColor: '#2B73B6',
|
|
133
|
+
warnColor: '#cd853f',
|
|
134
|
+
errorColor: '#cc3232',
|
|
135
|
+
successColor: '#32A54A',*/
|
|
136
|
+
showCancel: false,
|
|
137
|
+
tapToCloseEnabled: true,
|
|
138
|
+
panResponderEnabled: true,
|
|
139
|
+
wrapperStyle: null,
|
|
140
|
+
containerStyle: {
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
backgroundColor: '#202020',
|
|
143
|
+
},
|
|
144
|
+
contentContainerStyle: {
|
|
145
|
+
flex: 1,
|
|
146
|
+
flexDirection: 'row',
|
|
147
|
+
},
|
|
148
|
+
titleStyle: {
|
|
149
|
+
fontSize: 16,
|
|
150
|
+
textAlign: 'left',
|
|
151
|
+
fontWeight: 'bold',
|
|
152
|
+
color: 'white',
|
|
153
|
+
backgroundColor: 'transparent',
|
|
154
|
+
},
|
|
155
|
+
messageStyle: {
|
|
156
|
+
fontSize: 14,
|
|
157
|
+
textAlign: 'left',
|
|
158
|
+
fontWeight: 'normal',
|
|
159
|
+
color: 'white',
|
|
160
|
+
backgroundColor: 'transparent',
|
|
161
|
+
},
|
|
162
|
+
imageStyle: {
|
|
163
|
+
width: DEFAULT_IMAGE_DIMENSIONS,
|
|
164
|
+
height: DEFAULT_IMAGE_DIMENSIONS,
|
|
165
|
+
alignSelf: 'center',
|
|
166
|
+
},
|
|
167
|
+
cancelBtnImageStyle: {
|
|
168
|
+
width: DEFAULT_IMAGE_DIMENSIONS,
|
|
169
|
+
height: DEFAULT_IMAGE_DIMENSIONS,
|
|
170
|
+
},
|
|
171
|
+
cancelBtnStyle: {
|
|
172
|
+
alignSelf: 'center',
|
|
173
|
+
},
|
|
174
|
+
defaultContainer: {
|
|
175
|
+
flexDirection: 'row',
|
|
176
|
+
marginHorizontal : 15,
|
|
177
|
+
flexGrow : 1,
|
|
178
|
+
alignSelf : 'flex-end',
|
|
179
|
+
padding: 8,
|
|
180
|
+
},
|
|
181
|
+
defaultTextContainer: {
|
|
182
|
+
flex: 1,
|
|
183
|
+
paddingHorizontal: 8,
|
|
184
|
+
},
|
|
185
|
+
translucent: false,
|
|
186
|
+
activeStatusBarStyle: 'light-content',
|
|
187
|
+
activeStatusBarBackgroundColor: getDefaultStatusBarBackgroundColor(),
|
|
188
|
+
inactiveStatusBarStyle: getDefaultStatusBarStyle(),
|
|
189
|
+
inactiveStatusBarBackgroundColor: getDefaultStatusBarBackgroundColor(),
|
|
190
|
+
isInteraction: true,
|
|
191
|
+
useNativeDriver: true,
|
|
192
|
+
elevation: 1,
|
|
193
|
+
zIndex: null,
|
|
194
|
+
sensitivity: 20,
|
|
195
|
+
renderImage: undefined,
|
|
196
|
+
renderCancel: undefined,
|
|
197
|
+
renderTitle: undefined,
|
|
198
|
+
renderMessage: undefined,
|
|
199
|
+
testID: undefined,
|
|
200
|
+
accessibilityLabel: undefined,
|
|
201
|
+
accessible: false,
|
|
202
|
+
titleTextProps: undefined,
|
|
203
|
+
messageTextProps: undefined,
|
|
204
|
+
onTap: () => {},
|
|
205
|
+
};
|
|
206
|
+
constructor(props) {
|
|
207
|
+
super(props);
|
|
208
|
+
this.state = {
|
|
209
|
+
animationValue: new Animated.Value(0),
|
|
210
|
+
isOpen: false,
|
|
211
|
+
bottomValue: BOTTOM,
|
|
212
|
+
height: 0,
|
|
213
|
+
};
|
|
214
|
+
this.alertData = {
|
|
215
|
+
type: '',
|
|
216
|
+
message: '',
|
|
217
|
+
title: '',
|
|
218
|
+
payload: {},
|
|
219
|
+
interval: props.closeInterval,
|
|
220
|
+
action: '',
|
|
221
|
+
};
|
|
222
|
+
this.panResponder = this.getPanResponder();
|
|
223
|
+
Object.defineProperties(this,{
|
|
224
|
+
keyboardEvents : {value : {
|
|
225
|
+
show : Keyboard.addListener(
|
|
226
|
+
'keyboardDidShow',() => {
|
|
227
|
+
this.__isKeyboardOpen = true;
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
hide : Keyboard.addListener(
|
|
231
|
+
'keyboardDidHide',() => {
|
|
232
|
+
this.__isKeyboardOpen = false;
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
}}
|
|
236
|
+
})
|
|
237
|
+
this.queue = new Queue();
|
|
238
|
+
}
|
|
239
|
+
isKeyboardOpen(){
|
|
240
|
+
return this.__isKeyboardOpen;
|
|
241
|
+
}
|
|
242
|
+
componentWillUnmount() {
|
|
243
|
+
if (this.state.isOpen) {
|
|
244
|
+
this.closeAction(ACTION.programmatic);
|
|
245
|
+
}
|
|
246
|
+
Object.map(this.keyboardEvents,(ev)=>{
|
|
247
|
+
if(ev && ev.remove){
|
|
248
|
+
ev.remove();
|
|
249
|
+
}
|
|
250
|
+
})
|
|
251
|
+
}
|
|
252
|
+
getPanResponder = () => {
|
|
253
|
+
return PanResponder.create({
|
|
254
|
+
onStartShouldSetPanResponder: (event, gestureState) =>
|
|
255
|
+
this._onShouldStartPan(event, gestureState),
|
|
256
|
+
onMoveShouldSetPanResponder: (event, gestureState) =>
|
|
257
|
+
this._onShouldMovePan(event, gestureState),
|
|
258
|
+
onPanResponderMove: (event, gestureState) =>
|
|
259
|
+
this._onMovePan(event, gestureState),
|
|
260
|
+
onPanResponderRelease: (event, gestureState) =>
|
|
261
|
+
this._onDonePan(event, gestureState),
|
|
262
|
+
onPanResponderTerminate: (event, gestureState) =>
|
|
263
|
+
this._onDonePan(event, gestureState),
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
_onShouldStartPan = () => {
|
|
267
|
+
return this.props.panResponderEnabled;
|
|
268
|
+
};
|
|
269
|
+
_onShouldMovePan = (event, gestureState) => {
|
|
270
|
+
const {sensitivity, panResponderEnabled} = this.props;
|
|
271
|
+
const dx = Math.abs(gestureState.dx);
|
|
272
|
+
const dy = Math.abs(gestureState.dy);
|
|
273
|
+
const isDxSensitivity = dx < sensitivity;
|
|
274
|
+
const isDySensitivity = dy >= sensitivity;
|
|
275
|
+
return isDxSensitivity && isDySensitivity && panResponderEnabled;
|
|
276
|
+
};
|
|
277
|
+
_onMovePan = (event, gestureState) => {
|
|
278
|
+
if (gestureState.dy < 0) {
|
|
279
|
+
this.setState({bottomValue: gestureState.dy});
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
_onDonePan = (event, gestureState) => {
|
|
283
|
+
const start = this.getStartDelta(this.state.height, this.props.startDelta);
|
|
284
|
+
const delta = start / 5;
|
|
285
|
+
if (gestureState.dy < delta) {
|
|
286
|
+
this.closeAction(ACTION.pan);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
getStringValue = (value) => {
|
|
290
|
+
try {
|
|
291
|
+
if (typeof value !== 'string') {
|
|
292
|
+
if (Array.isArray(value)) {
|
|
293
|
+
return value.join(' ');
|
|
294
|
+
}
|
|
295
|
+
if (typeof value === 'object') {
|
|
296
|
+
return `${JSON.stringify(value)}`;
|
|
297
|
+
}
|
|
298
|
+
return `${value}`;
|
|
299
|
+
}
|
|
300
|
+
return value;
|
|
301
|
+
} catch (error) {
|
|
302
|
+
return error.toString();
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
alertWithType = async ({
|
|
306
|
+
type = '',
|
|
307
|
+
title = '',
|
|
308
|
+
message = '',
|
|
309
|
+
payload = {},
|
|
310
|
+
interval,
|
|
311
|
+
...rest
|
|
312
|
+
}) => {
|
|
313
|
+
// type is not validated so unexpected types will render alert with default styles.
|
|
314
|
+
// these default styles can be overridden with style props. (for example, containerStyle)
|
|
315
|
+
const {closeInterval} = this.props;
|
|
316
|
+
// title and message are converted to strings
|
|
317
|
+
const data = {
|
|
318
|
+
...rest,
|
|
319
|
+
type,
|
|
320
|
+
title: this.getStringValue(title),
|
|
321
|
+
message: this.getStringValue(message),
|
|
322
|
+
payload,
|
|
323
|
+
interval: closeInterval,
|
|
324
|
+
};
|
|
325
|
+
//previous queue data are same to new so do nothing
|
|
326
|
+
if(compareQueues(data,this.queue.firstItem)){
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
// closeInterval prop is overridden if interval is provided
|
|
330
|
+
if (interval && typeof interval === 'number') {
|
|
331
|
+
data.interval = interval;
|
|
332
|
+
}
|
|
333
|
+
this.queue.enqueue(data);
|
|
334
|
+
// start processing queue when it has at least one
|
|
335
|
+
if (this.getQueueSize() === 1) {
|
|
336
|
+
this._processQueue();
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
clearQueue = () => {
|
|
340
|
+
this.queue.clear();
|
|
341
|
+
};
|
|
342
|
+
getQueueSize = () => {
|
|
343
|
+
return this.queue.size;
|
|
344
|
+
};
|
|
345
|
+
_processQueue = () => {
|
|
346
|
+
const data = this.queue.firstItem;
|
|
347
|
+
if (data) {
|
|
348
|
+
this.open(data);
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
open = (data = {}) => {
|
|
352
|
+
this.alertData = data;
|
|
353
|
+
const position = data.top || this.isKeyboardOpen() ? "top" : data.position;
|
|
354
|
+
this.setState({isOpen: true,key:!this.state.key,position},()=>{
|
|
355
|
+
this.animate(1, 450, () => {
|
|
356
|
+
if (data.interval > 0) {
|
|
357
|
+
this.closeAutomatic(data.interval);
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
};
|
|
363
|
+
closeAction = (action = ACTION.programmatic, onDone = () => {}) => {
|
|
364
|
+
// action is how the alert was closed.
|
|
365
|
+
// alert currently closes itself by:
|
|
366
|
+
// tap, pan, cancel, programmatic or automatic
|
|
367
|
+
if (this.state.isOpen) {
|
|
368
|
+
this.clearCloseTimeoutID();
|
|
369
|
+
this.close(action, onDone);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
closeAutomatic = (interval) => {
|
|
373
|
+
this.clearCloseTimeoutID();
|
|
374
|
+
this.closeTimeoutID = setTimeout(() => {
|
|
375
|
+
this.close(ACTION.automatic);
|
|
376
|
+
}, interval);
|
|
377
|
+
};
|
|
378
|
+
close = (action, onDone = () => {}) => {
|
|
379
|
+
this.animate(0, 250, () => {
|
|
380
|
+
const {onClose, onCancel, onTap} = this.props;
|
|
381
|
+
this.alertData.action = action;
|
|
382
|
+
this.queue.dequeue();
|
|
383
|
+
if (action === ACTION.cancel) {
|
|
384
|
+
onCancel(this.alertData);
|
|
385
|
+
} else {
|
|
386
|
+
if (action === ACTION.tap) {
|
|
387
|
+
onTap(this.alertData);
|
|
388
|
+
}
|
|
389
|
+
onClose(this.alertData);
|
|
390
|
+
}
|
|
391
|
+
this.setState({isOpen: false, bottomValue: BOTTOM, height: 0});
|
|
392
|
+
this._processQueue();
|
|
393
|
+
onDone();
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
clearCloseTimeoutID = () => {
|
|
397
|
+
if (this.closeTimeoutID) {
|
|
398
|
+
clearTimeout(this.closeTimeoutID);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
animate = (toValue, duration = 450, onComplete = () => {}) => {
|
|
402
|
+
const {useNativeDriver, isInteraction} = this.props;
|
|
403
|
+
Animated.spring(this.state.animationValue, {
|
|
404
|
+
toValue: toValue,
|
|
405
|
+
duration: duration,
|
|
406
|
+
friction: 9,
|
|
407
|
+
useNativeDriver,
|
|
408
|
+
isInteraction,
|
|
409
|
+
}).start(onComplete);
|
|
410
|
+
};
|
|
411
|
+
getStartDelta = (height, start) => {
|
|
412
|
+
const windowHeight = HEIGHT;
|
|
413
|
+
const startMin = 0 - height;
|
|
414
|
+
const startMax = windowHeight + height;
|
|
415
|
+
if (start < 0 && start !== startMin) {
|
|
416
|
+
return startMin;
|
|
417
|
+
} else if (start > startMax) {
|
|
418
|
+
return startMax;
|
|
419
|
+
}
|
|
420
|
+
return start;
|
|
421
|
+
};
|
|
422
|
+
getEndDelta = (height, end) => {
|
|
423
|
+
const windowHeight = HEIGHT;
|
|
424
|
+
const endMin = 0;
|
|
425
|
+
const endMax = windowHeight;
|
|
426
|
+
if (end < endMin) {
|
|
427
|
+
return endMin;
|
|
428
|
+
} else if (end >= endMax) {
|
|
429
|
+
return endMax - height;
|
|
430
|
+
}
|
|
431
|
+
return end;
|
|
432
|
+
};
|
|
433
|
+
getOutputRange = (height, startDelta, endDelta) => {
|
|
434
|
+
if (!height) {
|
|
435
|
+
return [startDelta, endDelta];
|
|
436
|
+
}
|
|
437
|
+
const start = this.getStartDelta(height, startDelta);
|
|
438
|
+
const end = this.getEndDelta(height, endDelta);
|
|
439
|
+
return [start, end];
|
|
440
|
+
};
|
|
441
|
+
getInfoColor(){
|
|
442
|
+
return Colors.isValid(this.props.infoColor)? this.props.infoColor : theme.colors.info || '#2B73B6';
|
|
443
|
+
}
|
|
444
|
+
getSuccessColor(){
|
|
445
|
+
return Colors.isValid(this.props.successColor)? this.props.successColor : theme.colors.success || '#32A54A';
|
|
446
|
+
}
|
|
447
|
+
getWarnColor(){
|
|
448
|
+
return Colors.isValid(this.props.warnColor)? this.props.warnColor : theme.colors.warning || '#cd853f';
|
|
449
|
+
}
|
|
450
|
+
getErrorColor(){
|
|
451
|
+
return Colors.isValid(this.props.errorColor)? this.props.errorColor : theme.colors.error || '#cc3232';
|
|
452
|
+
}
|
|
453
|
+
getStyleForType = (type) => {
|
|
454
|
+
const {defaultContainer} = this.props;
|
|
455
|
+
switch (type) {
|
|
456
|
+
case TYPE.info:
|
|
457
|
+
return [
|
|
458
|
+
StyleSheet.flatten(defaultContainer),
|
|
459
|
+
{backgroundColor: this.getInfoColor()},
|
|
460
|
+
];
|
|
461
|
+
case TYPE.warn:
|
|
462
|
+
return [
|
|
463
|
+
StyleSheet.flatten(defaultContainer),
|
|
464
|
+
{backgroundColor: this.getWarnColor()},
|
|
465
|
+
];
|
|
466
|
+
case TYPE.error:
|
|
467
|
+
return [
|
|
468
|
+
StyleSheet.flatten(defaultContainer),
|
|
469
|
+
{backgroundColor: this.getErrorColor()},
|
|
470
|
+
];
|
|
471
|
+
case TYPE.success:
|
|
472
|
+
return [
|
|
473
|
+
StyleSheet.flatten(defaultContainer),
|
|
474
|
+
{backgroundColor: this.getSuccessColor()},
|
|
475
|
+
];
|
|
476
|
+
default:
|
|
477
|
+
return [
|
|
478
|
+
StyleSheet.flatten(defaultContainer),
|
|
479
|
+
StyleSheet.flatten(this.props.containerStyle),
|
|
480
|
+
];
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
getSourceForType = (type) => {
|
|
484
|
+
switch (type) {
|
|
485
|
+
case TYPE.info:
|
|
486
|
+
return this.props.infoImageSrc;
|
|
487
|
+
case TYPE.warn:
|
|
488
|
+
return this.props.warnImageSrc;
|
|
489
|
+
case TYPE.error:
|
|
490
|
+
return this.props.errorImageSrc;
|
|
491
|
+
case TYPE.success:
|
|
492
|
+
return this.props.successImageSrc;
|
|
493
|
+
default:
|
|
494
|
+
return this.props.imageSrc;
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
getBackgroundColorForType = (type) => {
|
|
498
|
+
switch (type) {
|
|
499
|
+
case TYPE.info:
|
|
500
|
+
return this.getInfoColor();
|
|
501
|
+
case TYPE.warn:
|
|
502
|
+
return this.getWarnColor();
|
|
503
|
+
case TYPE.error:
|
|
504
|
+
return this.getErrorColor();
|
|
505
|
+
case TYPE.success:
|
|
506
|
+
return this.getSuccessColor();
|
|
507
|
+
default:
|
|
508
|
+
return this.props.containerStyle.backgroundColor;
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
_onLayoutEvent = (event) => {
|
|
512
|
+
const {height} = event.nativeEvent.layout;
|
|
513
|
+
if (height > this.state.height) {
|
|
514
|
+
const {startDelta, endDelta} = this.props;
|
|
515
|
+
const start = this.getStartDelta(height, startDelta);
|
|
516
|
+
const end = this.getEndDelta(height, endDelta);
|
|
517
|
+
if (startDelta !== start || endDelta !== end) {
|
|
518
|
+
this.setState({height});
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
_renderImage = (source, imageStyle) => {
|
|
523
|
+
const {renderImage} = this.props;
|
|
524
|
+
if (renderImage) {
|
|
525
|
+
return renderImage(this.props, this.alertData);
|
|
526
|
+
}
|
|
527
|
+
if (!source) {
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
let style = imageStyle;
|
|
531
|
+
if (!style.width) {
|
|
532
|
+
style.width = DEFAULT_IMAGE_DIMENSIONS;
|
|
533
|
+
}
|
|
534
|
+
if (!style.height) {
|
|
535
|
+
style.height = DEFAULT_IMAGE_DIMENSIONS;
|
|
536
|
+
}
|
|
537
|
+
const isRemote = typeof source === 'string';
|
|
538
|
+
const src = isRemote ? {uri: source} : source;
|
|
539
|
+
return <Image style={style} source={src} />;
|
|
540
|
+
};
|
|
541
|
+
_renderTitle = () => {
|
|
542
|
+
if (this.props.renderTitle) {
|
|
543
|
+
return this.props.renderTitle(this.props, this.alertData);
|
|
544
|
+
}
|
|
545
|
+
const {titleTextProps, titleStyle, titleNumberOfLines} = this.props;
|
|
546
|
+
return (
|
|
547
|
+
<Label
|
|
548
|
+
{...titleTextProps}
|
|
549
|
+
style={titleStyle}
|
|
550
|
+
numberOfLines={titleNumberOfLines}>
|
|
551
|
+
{this.alertData.title}
|
|
552
|
+
</Label>
|
|
553
|
+
);
|
|
554
|
+
};
|
|
555
|
+
_renderMessage = () => {
|
|
556
|
+
if (this.props.renderMessage) {
|
|
557
|
+
return this.props.renderMessage(this.props, this.alertData);
|
|
558
|
+
}
|
|
559
|
+
const {messageTextProps, messageStyle, messageNumberOfLines} = this.props;
|
|
560
|
+
return (
|
|
561
|
+
<Label
|
|
562
|
+
{...messageTextProps}
|
|
563
|
+
style={messageStyle}
|
|
564
|
+
numberOfLines={messageNumberOfLines}>
|
|
565
|
+
{this.alertData.message}
|
|
566
|
+
</Label>
|
|
567
|
+
);
|
|
568
|
+
};
|
|
569
|
+
_renderCancel = (show = false) => {
|
|
570
|
+
if (!show) {
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
const {
|
|
574
|
+
renderCancel,
|
|
575
|
+
cancelBtnStyle,
|
|
576
|
+
cancelBtnImageSrc,
|
|
577
|
+
cancelBtnImageStyle,
|
|
578
|
+
} = this.props;
|
|
579
|
+
if (renderCancel) {
|
|
580
|
+
return renderCancel(this.props, this.alertData);
|
|
581
|
+
}
|
|
582
|
+
return (
|
|
583
|
+
<TouchableOpacity
|
|
584
|
+
style={cancelBtnStyle}
|
|
585
|
+
onPress={() => this.closeAction(ACTION.cancel)}>
|
|
586
|
+
{this._renderImage(cancelBtnImageSrc, cancelBtnImageStyle)}
|
|
587
|
+
</TouchableOpacity>
|
|
588
|
+
);
|
|
589
|
+
};
|
|
590
|
+
render() {
|
|
591
|
+
const {isOpen} = this.state;
|
|
592
|
+
if (!isOpen) {
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
const {
|
|
596
|
+
elevation,
|
|
597
|
+
zIndex,
|
|
598
|
+
wrapperStyle,
|
|
599
|
+
tapToCloseEnabled,
|
|
600
|
+
accessibilityLabel,
|
|
601
|
+
testID,
|
|
602
|
+
accessible,
|
|
603
|
+
contentContainerStyle,
|
|
604
|
+
defaultTextContainer,
|
|
605
|
+
startDelta,
|
|
606
|
+
endDelta,
|
|
607
|
+
translucent,
|
|
608
|
+
showCancel,
|
|
609
|
+
imageStyle,
|
|
610
|
+
} = this.props;
|
|
611
|
+
const {animationValue, bottomValue, height} = this.state;
|
|
612
|
+
const {type, payload} = this.alertData;
|
|
613
|
+
let style = this.getStyleForType(type);
|
|
614
|
+
let imageSrc = this.getSourceForType(type);
|
|
615
|
+
if (
|
|
616
|
+
payload &&
|
|
617
|
+
payload.hasOwnProperty('source') &&
|
|
618
|
+
payload.source &&
|
|
619
|
+
typeof payload.source !== 'object'
|
|
620
|
+
) {
|
|
621
|
+
imageSrc = payload.source;
|
|
622
|
+
}
|
|
623
|
+
if (IS_ANDROID && translucent) {
|
|
624
|
+
style = [style, {paddingTop: StatusBar.currentHeight}];
|
|
625
|
+
}
|
|
626
|
+
const outputRange = this.getOutputRange(height, startDelta, endDelta);
|
|
627
|
+
const position = defaultStr(this.state.position).toLowerCase();
|
|
628
|
+
const isTopPosition = position ==='top';
|
|
629
|
+
const wrapperAnimStyle = {
|
|
630
|
+
transform: [
|
|
631
|
+
{
|
|
632
|
+
translateY: animationValue.interpolate({
|
|
633
|
+
inputRange: [0, 1],
|
|
634
|
+
outputRange,
|
|
635
|
+
}),
|
|
636
|
+
},
|
|
637
|
+
],
|
|
638
|
+
position: "absolute",
|
|
639
|
+
[isTopPosition? 'top':'bottom']: isTopPosition ? TOP : bottomValue,
|
|
640
|
+
left: 0,
|
|
641
|
+
right: 0,
|
|
642
|
+
elevation: elevation,
|
|
643
|
+
};
|
|
644
|
+
/*wrapperAnimStyle.zIndex = 1000100;
|
|
645
|
+
if (zIndex != null) {
|
|
646
|
+
wrapperAnimStyle.zIndex = zIndex;
|
|
647
|
+
}*/
|
|
648
|
+
let ContentView = View//SafeAreaView;
|
|
649
|
+
if (IS_IOS_BELOW_11 || IS_ANDROID) {
|
|
650
|
+
ContentView = View;
|
|
651
|
+
}
|
|
652
|
+
const activeOpacity = !tapToCloseEnabled || showCancel ? 1 : 0.95;
|
|
653
|
+
const onPress = !tapToCloseEnabled
|
|
654
|
+
? null
|
|
655
|
+
: () => this.closeAction(ACTION.tap);
|
|
656
|
+
return (
|
|
657
|
+
<Portal>
|
|
658
|
+
<Animated.View
|
|
659
|
+
ref={(ref) => (this.mainView = ref)}
|
|
660
|
+
{...this.panResponder.panHandlers}
|
|
661
|
+
style={[wrapperAnimStyle, wrapperStyle]}>
|
|
662
|
+
<TouchableOpacity
|
|
663
|
+
activeOpacity={activeOpacity}
|
|
664
|
+
onPress={onPress}
|
|
665
|
+
disabled={!tapToCloseEnabled}
|
|
666
|
+
onLayout={(event) => this._onLayoutEvent(event)}
|
|
667
|
+
testID={testID}
|
|
668
|
+
accessibilityLabel={accessibilityLabel}
|
|
669
|
+
accessible={accessible}>
|
|
670
|
+
<View style={style}>
|
|
671
|
+
<ContentView style={StyleSheet.flatten(contentContainerStyle)}>
|
|
672
|
+
{this._renderImage(imageSrc, imageStyle)}
|
|
673
|
+
<View style={StyleSheet.flatten(defaultTextContainer)}>
|
|
674
|
+
{this._renderTitle()}
|
|
675
|
+
{this._renderMessage()}
|
|
676
|
+
</View>
|
|
677
|
+
{this._renderCancel(showCancel)}
|
|
678
|
+
</ContentView>
|
|
679
|
+
</View>
|
|
680
|
+
</TouchableOpacity>
|
|
681
|
+
</Animated.View>
|
|
682
|
+
</Portal>
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
}
|