@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,217 @@
|
|
|
1
|
+
import React from "$react";
|
|
2
|
+
import {defaultObj,defaultStr,isNonNullString} from "$utils";
|
|
3
|
+
import TextField from "$ecomponents/TextField";
|
|
4
|
+
import { StyleSheet,Image,TouchableOpacity} from 'react-native';
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import theme,{DISABLED_OPACITY} from "$theme";
|
|
7
|
+
import {keyboardTypes,flatMode} from "$ecomponents/TextField";
|
|
8
|
+
import Icon from "$ecomponents/Icon";
|
|
9
|
+
import PhoneNumber from "./PhoneNumber";
|
|
10
|
+
import SelectCountry from "$ecomponents/Countries/SelectCountry";
|
|
11
|
+
import {getFlag} from "$ecomponents/Countries";
|
|
12
|
+
import View from "$ecomponents/View";
|
|
13
|
+
|
|
14
|
+
import libPhoneNumber from 'google-libphonenumber';
|
|
15
|
+
const asYouTypeFormatter = libPhoneNumber.AsYouTypeFormatter;
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line class-methods-use-this
|
|
18
|
+
export const format = (number, iso2) => {
|
|
19
|
+
const formatter = new asYouTypeFormatter(iso2); // eslint-disable-line new-cap
|
|
20
|
+
let formatted;
|
|
21
|
+
number.replace(/-/g, '')
|
|
22
|
+
.replace(/ /g, '')
|
|
23
|
+
.replace(/\(/g, '')
|
|
24
|
+
.replace(/\)/g, '')
|
|
25
|
+
.split('')
|
|
26
|
+
.forEach((n) => {
|
|
27
|
+
formatted = formatter.inputDigit(n);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return formatted;
|
|
31
|
+
}
|
|
32
|
+
const prepareState = ({defaultValue,country})=>{
|
|
33
|
+
defaultValue = defaultStr(defaultValue);
|
|
34
|
+
country = defaultStr(country);
|
|
35
|
+
if (defaultValue) {
|
|
36
|
+
if (defaultValue[0] !== '+') {
|
|
37
|
+
defaultValue = `+${defaultValue}`;
|
|
38
|
+
}
|
|
39
|
+
country = PhoneNumber.getCountryCodeOfNumber(defaultValue);
|
|
40
|
+
const displayValue = format(defaultValue,country);
|
|
41
|
+
if(displayValue){
|
|
42
|
+
return {displayValue,defaultValue,country}
|
|
43
|
+
}
|
|
44
|
+
} else if(country) {
|
|
45
|
+
const countryData = PhoneNumber.getCountryDataByCode(country);
|
|
46
|
+
return {displayValue:countryData ? `+${countryData.dialCode}` : '',defaultValue:'',country};
|
|
47
|
+
}
|
|
48
|
+
return {defaultValue:'',displayValue:'',country:''};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const possiblyEliminateZeroAfterCountryCode = (number) => {
|
|
52
|
+
if(!isNonNullString(number)) return "";
|
|
53
|
+
const dialCode = PhoneNumber.getDialCode(number);
|
|
54
|
+
return number.startsWith(`${dialCode}0`)
|
|
55
|
+
? dialCode + number.substr(dialCode.length + 1)
|
|
56
|
+
: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default function PhoneInputComponent(props){
|
|
60
|
+
let {country,onChange,contentContainerProps,allowZeroAfterCountryCode,testID,inputProps,selectionColor,label,error,errorText,helperText,defaultValue,text,setRef,...rest} = props;
|
|
61
|
+
rest = defaultObj(rest);
|
|
62
|
+
contentContainerProps = defaultObj(contentContainerProps);
|
|
63
|
+
contentContainerProps.style = [styles.inputContainer,contentContainerProps.style];
|
|
64
|
+
const ref = React.useRef(null);
|
|
65
|
+
const [state,setState] = React.useStateIfMounted({
|
|
66
|
+
visible : false,
|
|
67
|
+
...prepareState({defaultValue,country})
|
|
68
|
+
})
|
|
69
|
+
const prevVisible = React.usePrevious(state.visible);
|
|
70
|
+
label = defaultVal(label,text);
|
|
71
|
+
React.useEffect(()=>{
|
|
72
|
+
React.setRef(ref,ref.current,setRef);
|
|
73
|
+
setState({...state})
|
|
74
|
+
},[])
|
|
75
|
+
React.useEffect(()=>{
|
|
76
|
+
const nState = prepareState({defaultValue,country});
|
|
77
|
+
if(nState.defaultValue !== state.defaultValue && nState.country !== state.country){
|
|
78
|
+
setState({...state,...nState});
|
|
79
|
+
}
|
|
80
|
+
},[defaultValue,country])
|
|
81
|
+
const onPressFlag = (e)=>{
|
|
82
|
+
if(!state.visible){
|
|
83
|
+
setState({...state,visible:true})
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
inputProps = defaultObj(inputProps);
|
|
87
|
+
const disabledStyle = props.disabled ?{opacity:DISABLED_OPACITY}:undefined;
|
|
88
|
+
const flagImageSource = getFlag(state.country);
|
|
89
|
+
const getValue = (text) => {
|
|
90
|
+
return isNonNullString(text) ? text.replace(/[^0-9]/g, '') : defaultStr(state.defaultValue);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const updateValue = (number) => {
|
|
94
|
+
let modifiedNumber = getValue(number);
|
|
95
|
+
|
|
96
|
+
if (modifiedNumber[0] !== '+' && number.length) {
|
|
97
|
+
modifiedNumber = `+${modifiedNumber}`;
|
|
98
|
+
}
|
|
99
|
+
modifiedNumber = allowZeroAfterCountryCode
|
|
100
|
+
? modifiedNumber
|
|
101
|
+
: possiblyEliminateZeroAfterCountryCode(modifiedNumber);
|
|
102
|
+
const iso2 = PhoneNumber.getCountryCodeOfNumber(modifiedNumber);
|
|
103
|
+
|
|
104
|
+
let countryDialCode;
|
|
105
|
+
if (iso2) {
|
|
106
|
+
const countryData = PhoneNumber.getCountryDataByCode(iso2);
|
|
107
|
+
countryDialCode = countryData.dialCode;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
let displayValue;
|
|
111
|
+
if (modifiedNumber === `+${countryDialCode}`) {
|
|
112
|
+
displayValue = modifiedNumber;
|
|
113
|
+
} else {
|
|
114
|
+
displayValue = format(modifiedNumber);
|
|
115
|
+
}
|
|
116
|
+
const nState = {
|
|
117
|
+
country : iso2,
|
|
118
|
+
displayValue,
|
|
119
|
+
defaultValue : modifiedNumber,
|
|
120
|
+
}
|
|
121
|
+
setState(nState);
|
|
122
|
+
return nState;
|
|
123
|
+
}
|
|
124
|
+
const pointerEvents = props.disabled || props.editable === false || props.readOnly ? "none":"auto";
|
|
125
|
+
const isFlatMode = theme.textFieldMode === flatMode;
|
|
126
|
+
testID = defaultStr(testID,"RN_PhoneInputComponent");
|
|
127
|
+
return <SelectCountry
|
|
128
|
+
label = {label}
|
|
129
|
+
controlled = {true}
|
|
130
|
+
visible = {state.visible}
|
|
131
|
+
defaultValue = {state.country}
|
|
132
|
+
testID = {testID+"_SelectCountry"}
|
|
133
|
+
onDismiss = {({value},force) =>{
|
|
134
|
+
if(force !== true && value === state.country && state.visible == prevVisible) return;
|
|
135
|
+
setState({...state,...prepareState({country:value,defaultValue:state.country==value?state.defaultValue:""}),visible:false})
|
|
136
|
+
}}
|
|
137
|
+
anchor = {
|
|
138
|
+
<>
|
|
139
|
+
<TextField
|
|
140
|
+
{...rest}
|
|
141
|
+
testID = {testID}
|
|
142
|
+
error = {error}
|
|
143
|
+
errorText = {errorText}
|
|
144
|
+
helperText = {helperText}
|
|
145
|
+
contentContainerProps = {contentContainerProps}
|
|
146
|
+
label = {label}
|
|
147
|
+
accessibilityLabel = {defaultStr(label,text)}
|
|
148
|
+
formatValue = {false}
|
|
149
|
+
disabled = {props.disabled}
|
|
150
|
+
pointerEvents = {pointerEvents}
|
|
151
|
+
left = {
|
|
152
|
+
<TouchableOpacity testID={testID+"_Left"} style={[styles.flag,disabledStyle,!isFlatMode && styles.notFlatModeFlag]}
|
|
153
|
+
accessibilityRole="button"
|
|
154
|
+
disabled = {props.disabled}
|
|
155
|
+
pointerEvents = {pointerEvents}
|
|
156
|
+
onPress={onPressFlag}
|
|
157
|
+
>
|
|
158
|
+
<>
|
|
159
|
+
{flagImageSource && <Image testID={testID+"_FlagImage"} source={flagImageSource} height={20} width={30} style={[styles.flagImage]} />}
|
|
160
|
+
<Icon testID={testID+"_FlagChevronIcon"} name="chevron-down" size={16} style={[styles.flagIcon]} onPress={onPressFlag} />
|
|
161
|
+
</>
|
|
162
|
+
</TouchableOpacity>
|
|
163
|
+
}
|
|
164
|
+
keyboardType ={keyboardTypes.number}
|
|
165
|
+
defaultValue = {state.displayValue}
|
|
166
|
+
onChange = {({value:nValue})=>{
|
|
167
|
+
const prevState = state;
|
|
168
|
+
const nState = updateValue(nValue);
|
|
169
|
+
if(prevState.defaultValue === nState.defaultValue || (prevState.defaultValue.length <= 3 && nState.defaultValue.length <= 3)) return;
|
|
170
|
+
let value = nState.displayValue;
|
|
171
|
+
if(value.length <=3){
|
|
172
|
+
value = "";
|
|
173
|
+
}
|
|
174
|
+
if(prevState.defaultValue === value) return;
|
|
175
|
+
if(onChange){
|
|
176
|
+
onChange({value,country:nState.country,displayValue:nState.displayValue,realValue:nState.defaultValue})
|
|
177
|
+
}
|
|
178
|
+
}}
|
|
179
|
+
ref = {ref}
|
|
180
|
+
style = {[props.style,inputProps.style,disabledStyle]}
|
|
181
|
+
/>
|
|
182
|
+
</>
|
|
183
|
+
}
|
|
184
|
+
/>
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const styles = StyleSheet.create({
|
|
188
|
+
notFlatModeFlag : {
|
|
189
|
+
marginLeft : 7,
|
|
190
|
+
},
|
|
191
|
+
flagImage : {
|
|
192
|
+
borderWidth:0,
|
|
193
|
+
width : 30,
|
|
194
|
+
height : 20,
|
|
195
|
+
marginLeft : 10
|
|
196
|
+
},
|
|
197
|
+
flagIcon : {
|
|
198
|
+
marginRight : 4,
|
|
199
|
+
marginLeft : -3
|
|
200
|
+
},
|
|
201
|
+
flag : {
|
|
202
|
+
width : 50,
|
|
203
|
+
flexDirection : "row",
|
|
204
|
+
alignItems : 'center',
|
|
205
|
+
justifyContent : 'center'
|
|
206
|
+
},
|
|
207
|
+
inputContainer : {
|
|
208
|
+
paddingVertical : 5,
|
|
209
|
+
paddingHorizontal : 0,
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
PhoneInputComponent.propTypes = {
|
|
214
|
+
onChange : PropTypes.func,
|
|
215
|
+
autoFormat : PropTypes.bool, //si le texte de telephone sera formatté automatiquement
|
|
216
|
+
allowZeroAfterCountryCode : PropTypes.bool,
|
|
217
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StyleSheet, Dimensions } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const { width } = Dimensions.get('window');
|
|
4
|
+
|
|
5
|
+
const SCREEN_WIDTH = width;
|
|
6
|
+
|
|
7
|
+
export default StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
// borderWidth:1,
|
|
13
|
+
},
|
|
14
|
+
mainBox: {
|
|
15
|
+
|
|
16
|
+
},
|
|
17
|
+
basicContainer: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
justifyContent: 'flex-end',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
},
|
|
22
|
+
modalContainer: {
|
|
23
|
+
width: SCREEN_WIDTH,
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
padding: 0,
|
|
27
|
+
},
|
|
28
|
+
buttonView: {
|
|
29
|
+
width: SCREEN_WIDTH,
|
|
30
|
+
padding: 8,
|
|
31
|
+
borderTopWidth: 0.5,
|
|
32
|
+
borderTopColor: 'lightgrey',
|
|
33
|
+
justifyContent: 'space-between',
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
},
|
|
36
|
+
bottomPicker: {
|
|
37
|
+
width: SCREEN_WIDTH,
|
|
38
|
+
},
|
|
39
|
+
flag: {
|
|
40
|
+
height: 20,
|
|
41
|
+
width: 30,
|
|
42
|
+
borderRadius: 2,
|
|
43
|
+
borderWidth: 0.5,
|
|
44
|
+
borderColor: '#cecece',
|
|
45
|
+
backgroundColor: '#cecece',
|
|
46
|
+
},
|
|
47
|
+
text: {
|
|
48
|
+
height: 20,
|
|
49
|
+
padding: 0,
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import {ActivityIndicator} from "react-native";
|
|
2
|
+
import Dialog from "$ecomponents/Dialog";
|
|
3
|
+
import {defaultVal,isObj,defaultBool,defaultObj,isObjOrArray,defaultStr,uniqid} from "$utils";
|
|
4
|
+
import Label from "$ecomponents/Label";
|
|
5
|
+
import {StyleSheet} from "react-native";
|
|
6
|
+
import View from "$ecomponents/View";
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import React,{ createContext} from "$react";
|
|
9
|
+
import {isIos} from "$cplatform";
|
|
10
|
+
import theme,{Colors} from "$theme";
|
|
11
|
+
|
|
12
|
+
export const PRELOADERS = {};
|
|
13
|
+
|
|
14
|
+
const MAIN_PRELOADER_ID = uniqid("main-preloader-id");
|
|
15
|
+
|
|
16
|
+
const statesProps = ['visible','content','footer','title'];
|
|
17
|
+
|
|
18
|
+
const PreloaderContext = createContext(null);
|
|
19
|
+
|
|
20
|
+
export const usePreloader = ()=> defaultObj(React.useContext(PreloaderContext), {subscribe,unsubscribe});
|
|
21
|
+
|
|
22
|
+
const PreloaderComponent = React.forwardRef((props,ref)=>{
|
|
23
|
+
let {content,children,title,visible:customVisible,right,indicatorProps,id,preloaderId:customPreloaderId,contentProps,actions,footer,...rest} = props;
|
|
24
|
+
const [state,setState] = React.useState({
|
|
25
|
+
visible : defaultBool(customVisible,true),
|
|
26
|
+
visibleKey : false,
|
|
27
|
+
});
|
|
28
|
+
const {visible} = state;
|
|
29
|
+
const isMounted = React.useIsMounted();
|
|
30
|
+
const setVisible = (visible)=>{
|
|
31
|
+
if(!isMounted()) return;
|
|
32
|
+
return setState({...state,visible,visibleKey:!state.visibleKey})
|
|
33
|
+
}
|
|
34
|
+
const [context] = React.useState({});
|
|
35
|
+
const titleRef = React.useRef(title);
|
|
36
|
+
if(titleRef.current !== false){
|
|
37
|
+
title = titleRef.current;
|
|
38
|
+
}
|
|
39
|
+
titleRef.current = false;
|
|
40
|
+
const contentRef = React.useRef(defaultVal(children,content));
|
|
41
|
+
const footerRef = React.useRef(footer);
|
|
42
|
+
if(isObjOrArray(footerRef.current)){
|
|
43
|
+
footer = footerRef.current;
|
|
44
|
+
}
|
|
45
|
+
footerRef.current = null;
|
|
46
|
+
|
|
47
|
+
content = defaultVal(contentRef.current,content,children,defaultContent)
|
|
48
|
+
contentProps = defaultObj(contentProps);
|
|
49
|
+
indicatorProps = defaultObj(indicatorProps);
|
|
50
|
+
indicatorProps.size = defaultVal(indicatorProps.size,isIos()?'large':48);
|
|
51
|
+
indicatorProps.style = [indicatorProps.style,right?styles.indicatorRight:styles.indicatorLeft];
|
|
52
|
+
indicatorProps.color = Colors.isValid(indicatorProps.color)? indicatorProps.color : theme.colors.primary;
|
|
53
|
+
const preloaderId = React.useRef(defaultStr(id,customPreloaderId,uniqid("preloader-ido-dynamic"))).current;
|
|
54
|
+
const {subscribe,unsubscribe} = usePreloader();
|
|
55
|
+
context.dialogRef = React.useRef(null);
|
|
56
|
+
context.close = ()=>{
|
|
57
|
+
setVisible(false);
|
|
58
|
+
}
|
|
59
|
+
context.open = (args)=>{
|
|
60
|
+
if(!isMounted()) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const arg = getProps(args);
|
|
64
|
+
contentRef.current = defaultVal(arg.content,arg.children);
|
|
65
|
+
if("footer" in arg){
|
|
66
|
+
footerRef.current = arg.footer;
|
|
67
|
+
}
|
|
68
|
+
if("title" in arg){
|
|
69
|
+
titleRef.current = arg.title;
|
|
70
|
+
}
|
|
71
|
+
setVisible(true);
|
|
72
|
+
}
|
|
73
|
+
context.isOpen = context.isVisible = ()=> visible;
|
|
74
|
+
context.isClosed = x => !context.isOpen();
|
|
75
|
+
React.useEffect(()=>{
|
|
76
|
+
if(typeof customVisible ==='boolean' && customVisible !== visible){
|
|
77
|
+
setVisible(customVisible);
|
|
78
|
+
}
|
|
79
|
+
},[props]);
|
|
80
|
+
React.setRef(ref,context);
|
|
81
|
+
subscribe(preloaderId,context);
|
|
82
|
+
React.useEffect(()=>{
|
|
83
|
+
return ()=>{
|
|
84
|
+
React.setRef(ref,null);
|
|
85
|
+
unsubscribe(preloaderId);
|
|
86
|
+
}
|
|
87
|
+
},[]);
|
|
88
|
+
return <Dialog
|
|
89
|
+
animate = {false}
|
|
90
|
+
overlayProps = {{elevation:5}}
|
|
91
|
+
{...defaultObj(rest)}
|
|
92
|
+
actions={defaultVal(footer,actions)}
|
|
93
|
+
dismissable={false}
|
|
94
|
+
visible={visible}
|
|
95
|
+
title={title}
|
|
96
|
+
contentProps = {{elevation:0}}
|
|
97
|
+
fullScreen = {false}
|
|
98
|
+
ref = {context.dialogRef}
|
|
99
|
+
isPreloader
|
|
100
|
+
>
|
|
101
|
+
<View style={[styles.container]}>
|
|
102
|
+
{!right ? <ActivityIndicator {...indicatorProps}/>:null}
|
|
103
|
+
{content ? <Label {...contentProps} style={[styles.text,contentProps.style]}>{content}</Label> : null}
|
|
104
|
+
{right ? <ActivityIndicator {...indicatorProps}/> : null}
|
|
105
|
+
</View>
|
|
106
|
+
</Dialog>
|
|
107
|
+
});
|
|
108
|
+
const styles = StyleSheet.create({
|
|
109
|
+
container : {
|
|
110
|
+
flexDirection:'row',
|
|
111
|
+
alignItems : 'center',
|
|
112
|
+
justifyContent : 'center',
|
|
113
|
+
paddingVertical : 15,
|
|
114
|
+
paddingHorizontal : 20,
|
|
115
|
+
},
|
|
116
|
+
text : {
|
|
117
|
+
marginLeft:20
|
|
118
|
+
},
|
|
119
|
+
content : {},
|
|
120
|
+
indicatorLeft : {
|
|
121
|
+
//marginRight : 16,
|
|
122
|
+
},
|
|
123
|
+
indicatorRight : {
|
|
124
|
+
//marginLeft : 16,
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
PreloaderComponent.propTypes= {
|
|
129
|
+
right : PropTypes.bool, //si l'activity indicator sera à la position droite
|
|
130
|
+
footer : PropTypes.oneOfType([
|
|
131
|
+
PropTypes.array,
|
|
132
|
+
PropTypes.object,
|
|
133
|
+
]),
|
|
134
|
+
///lorsque le contenu enfant est définit, alors le preloader sera chargé en pleinne page
|
|
135
|
+
children : PropTypes.any,
|
|
136
|
+
visible : PropTypes.bool,
|
|
137
|
+
onOpen : PropTypes.func,
|
|
138
|
+
onClose : PropTypes.func
|
|
139
|
+
}
|
|
140
|
+
export default PreloaderComponent;
|
|
141
|
+
|
|
142
|
+
PreloaderComponent.displayName = "PreloaderComponent";
|
|
143
|
+
|
|
144
|
+
export const subscribe = (preloaderId,context)=>{
|
|
145
|
+
PRELOADERS[preloaderId] = context;
|
|
146
|
+
}
|
|
147
|
+
export const unsubscribe = (preloaderId)=>{
|
|
148
|
+
delete PRELOADERS[preloaderId];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export const defaultContent = PreloaderComponent.defaultContent = "chargement...";
|
|
152
|
+
|
|
153
|
+
export function PreloaderProvider({ children }) {
|
|
154
|
+
React.useEffect(()=>{
|
|
155
|
+
return ()=>{ unlinkPreloader();}
|
|
156
|
+
},[])
|
|
157
|
+
return (<PreloaderContext.Provider value={{subscribe,unsubscribe}}>
|
|
158
|
+
<PreloaderComponent id={MAIN_PRELOADER_ID} visible = {false}/>
|
|
159
|
+
{children}
|
|
160
|
+
</PreloaderContext.Provider>);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const unlinkPreloader = x=> {
|
|
164
|
+
for(let i in PRELOADERS){
|
|
165
|
+
delete PRELOADERS[i];
|
|
166
|
+
};
|
|
167
|
+
return PRELOADERS;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
const getProps = (arg,reset)=>{
|
|
172
|
+
let s = {};
|
|
173
|
+
if(typeof arg ==="boolean"){
|
|
174
|
+
s = {visible:arg}
|
|
175
|
+
} else if(React.isValidElement(arg,true)){
|
|
176
|
+
s = {content:arg};
|
|
177
|
+
} else if(isObj(arg)){
|
|
178
|
+
s = arg;
|
|
179
|
+
}
|
|
180
|
+
if(reset !== false){
|
|
181
|
+
statesProps.map(k=>{
|
|
182
|
+
if(k !=='visible' && !s.hasOwnProperty(k)){
|
|
183
|
+
s[k] = null;
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
return s;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function isVisible (){
|
|
191
|
+
for(let i in PRELOADERS){
|
|
192
|
+
if(PRELOADERS[i] && PRELOADERS[i].isOpen()) return true;
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
export const isOpen = isVisible;
|
|
197
|
+
|
|
198
|
+
export function show (args){
|
|
199
|
+
const preloader = PRELOADERS[MAIN_PRELOADER_ID];
|
|
200
|
+
if(preloader){
|
|
201
|
+
return preloader.open(args)
|
|
202
|
+
}
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export const open = PreloaderComponent.open = PreloaderComponent.show = show;
|
|
207
|
+
|
|
208
|
+
export const hide = (all)=>{
|
|
209
|
+
const preloader = PRELOADERS[MAIN_PRELOADER_ID];
|
|
210
|
+
if(preloader){
|
|
211
|
+
return preloader.close();
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export const close = PreloaderComponent.close = PreloaderComponent.hide = hide;
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
export const closeAll = PreloaderComponent.hideAll = PreloaderComponent.closeAll = ()=>{
|
|
220
|
+
Object.map(PRELOADERS,(p,id)=>{
|
|
221
|
+
if(isObj(p) && p.close){
|
|
222
|
+
p.close();
|
|
223
|
+
}
|
|
224
|
+
})
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export const hideAll = closeAll;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, Animated, Easing } from 'react-native';
|
|
3
|
+
import View from "$ecomponents/View";
|
|
4
|
+
import {isNativeMobile} from "$cplatform"; //boris fouomene
|
|
5
|
+
const useNativeDriver = isNativeMobile();
|
|
6
|
+
const SIZE = 16
|
|
7
|
+
const MARGIN = 5
|
|
8
|
+
const BG = 'rgb(172, 172, 172)'
|
|
9
|
+
const ACTIVE_BG = '#808184'
|
|
10
|
+
const dots = [1, 2, 3]
|
|
11
|
+
const INTERVAL = 300
|
|
12
|
+
const ANIMATION_DURATION = 400
|
|
13
|
+
const ANIMATION_SCALE = 1.4
|
|
14
|
+
export default class ThreeDotsLoader extends React.Component {
|
|
15
|
+
state = {
|
|
16
|
+
active: 1
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
componentDidMount(){
|
|
20
|
+
this.interval = setInterval(() => {
|
|
21
|
+
const active = this.state.active
|
|
22
|
+
this.setState({ active: active > 2 ? 1 : active + 1})
|
|
23
|
+
}, INTERVAL);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
componentWillUnmount(){
|
|
27
|
+
clearInterval(this.interval)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
render() {
|
|
31
|
+
/*** update by boris Fouomene to fix react warning : every child must have an unique key :
|
|
32
|
+
* Warning: Each child in a list should have a unique "key" prop.
|
|
33
|
+
*/
|
|
34
|
+
const active = this.state.active
|
|
35
|
+
return (
|
|
36
|
+
<View style={styles.main}>
|
|
37
|
+
{dots.map(i => <Dot {...this.props} key={i} active={i === active}/>)}
|
|
38
|
+
</View>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class Dot extends React.Component {
|
|
44
|
+
static defaultProps = {
|
|
45
|
+
size: SIZE,
|
|
46
|
+
background: BG,
|
|
47
|
+
activeBackground: ACTIVE_BG,
|
|
48
|
+
dotMargin: MARGIN,
|
|
49
|
+
animationDuration: ANIMATION_DURATION,
|
|
50
|
+
animationScale: ANIMATION_SCALE,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
constructor(props) {
|
|
54
|
+
super(props)
|
|
55
|
+
this.scale = new Animated.Value(1)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
componentDidMount(){
|
|
59
|
+
if (this.props.active) this.scaleUp()
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
componentDidUpdate(prevProps){
|
|
63
|
+
if (prevProps.active && !this.props.active){
|
|
64
|
+
this.scaleDown()
|
|
65
|
+
}
|
|
66
|
+
if (!prevProps.active && this.props.active){
|
|
67
|
+
this.scaleUp()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
scaleDown = () => {
|
|
72
|
+
Animated.timing(
|
|
73
|
+
this.scale,
|
|
74
|
+
{
|
|
75
|
+
toValue: 1,
|
|
76
|
+
easing : this.props.easing,
|
|
77
|
+
duration: this.props.animationDuration,
|
|
78
|
+
delay : this.props.delay,
|
|
79
|
+
useNativeDriver,
|
|
80
|
+
}
|
|
81
|
+
).start((o) => {
|
|
82
|
+
if(o.finished) {
|
|
83
|
+
this.scaleDown();
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
scaleUp = () => {
|
|
89
|
+
Animated.timing(
|
|
90
|
+
this.scale,
|
|
91
|
+
{
|
|
92
|
+
toValue: this.props.animationScale,
|
|
93
|
+
easing : this.props.easing,
|
|
94
|
+
duration: this.props.animationDuration,
|
|
95
|
+
delay : this.props.delay,
|
|
96
|
+
useNativeDriver
|
|
97
|
+
}
|
|
98
|
+
).start((o) => {
|
|
99
|
+
if(o.finished) {
|
|
100
|
+
this.scaleUp();
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
render(){
|
|
106
|
+
const { active, size, background, activeBackground, dotMargin } = this.props
|
|
107
|
+
const style = {
|
|
108
|
+
height: size,
|
|
109
|
+
width: size,
|
|
110
|
+
borderRadius: size / 2,
|
|
111
|
+
marginHorizontal: dotMargin,
|
|
112
|
+
backgroundColor: active ? activeBackground : background
|
|
113
|
+
}
|
|
114
|
+
return (
|
|
115
|
+
<Animated.View style={[style, {transform: [{ scale: this.scale }]}]}/>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const styles = StyleSheet.create({
|
|
121
|
+
main: {
|
|
122
|
+
flexDirection: 'row',
|
|
123
|
+
justifyContent: 'center',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
},
|
|
126
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/****@see : https://www.npmjs.com/package/react-native-indicators */
|
|
2
|
+
export * from 'react-native-indicators'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/*** for usage, @see : https://www.npmjs.com/package/react-native-three-dots-loader */
|
|
6
|
+
/**** usage :
|
|
7
|
+
* Prop Description
|
|
8
|
+
size Dot size
|
|
9
|
+
background Dot background
|
|
10
|
+
activeBackground Active dot background
|
|
11
|
+
dotMargin Dots horizontal margin
|
|
12
|
+
animationDuration Scale animation duration
|
|
13
|
+
animationScale Maximum scale
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
import LoadingD from "./LoadingDots";
|
|
17
|
+
export const LoadingDots = LoadingD;
|
|
18
|
+
export const ThreeDots = LoadingD;
|