@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
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/icon.png
ADDED
|
Binary file
|
package/assets/logo.png
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
module.exports = (opts)=>{
|
|
3
|
+
const dir = path.resolve(__dirname);
|
|
4
|
+
const expo = path.resolve(dir,"src");
|
|
5
|
+
const assets = path.resolve(dir,"assets");
|
|
6
|
+
opts = typeof opts =='object' && opts ? opts : {};
|
|
7
|
+
opts.platform = "expo";
|
|
8
|
+
opts.assets = opts.assets || assets;
|
|
9
|
+
opts.base = opts.base || dir;
|
|
10
|
+
const r = require("@fto-consult/common/babel.config.alias")(opts);
|
|
11
|
+
r["$eauth"] = path.resolve(expo,"auth");
|
|
12
|
+
r["$ecomponents"] = r["$expo-components"] = path.resolve(expo,"components");
|
|
13
|
+
r["$elayouts"] = path.resolve(expo,"layouts");
|
|
14
|
+
r["$emedia"] = path.resolve(expo,"media");
|
|
15
|
+
r["$enavigation"] = path.resolve(expo,"navigation");
|
|
16
|
+
r["$escreens"] = path.resolve(expo,"screens");
|
|
17
|
+
r["$escreen"] = path.resolve(expo,"layouts/Screen");
|
|
18
|
+
r["$screens"] = r["$screens"] || path.resolve(expo,"screens");
|
|
19
|
+
r["$expo"] = r["$expo-ui"] = expo;
|
|
20
|
+
if(typeof opts.mutator =='function'){
|
|
21
|
+
opts.mutator(r);
|
|
22
|
+
}
|
|
23
|
+
const aliases = [];
|
|
24
|
+
for(let i in r){
|
|
25
|
+
aliases.push({
|
|
26
|
+
root: r[i],
|
|
27
|
+
rootPathPrefix: i,
|
|
28
|
+
rootPathSuffix: '',
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
return aliases;
|
|
32
|
+
}
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = function(api,opts) {
|
|
2
|
+
opts = typeof opts =='object' && opts ? opts : {};
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const dir = path.resolve(__dirname);
|
|
5
|
+
api.cache(true);
|
|
6
|
+
const alias = require("./babel.config.alias")({base:dir,...opts,platform:"expo"});
|
|
7
|
+
return {
|
|
8
|
+
presets: [
|
|
9
|
+
['babel-preset-expo'],
|
|
10
|
+
["@babel/preset-react", {"runtime": "automatic"}],
|
|
11
|
+
],
|
|
12
|
+
plugins : [
|
|
13
|
+
['babel-plugin-root-import', {"paths": alias}],
|
|
14
|
+
['react-native-reanimated/plugin'],
|
|
15
|
+
['transform-inline-environment-variables'],
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
|
2
|
+
module.exports = new CircularDependencyPlugin({
|
|
3
|
+
exclude: /node_modules/,
|
|
4
|
+
failOnError: true,
|
|
5
|
+
allowAsyncCycles: false,
|
|
6
|
+
cwd: process.cwd(),
|
|
7
|
+
// allow import cycles that include an asyncronous import,
|
|
8
|
+
// e.g. via import(/* webpackMode: "weak" */ './file.js')
|
|
9
|
+
allowAsyncCycles: false,
|
|
10
|
+
// `onStart` is called before the cycle detection starts
|
|
11
|
+
onStart({ compilation }) {
|
|
12
|
+
console.log('\nstart detecting webpack modules cycles');
|
|
13
|
+
},
|
|
14
|
+
// `onDetected` is called for each module that is cyclical
|
|
15
|
+
onDetected({ module: webpackModuleRecord, paths, compilation }) {
|
|
16
|
+
// `paths` will be an Array of the relative module paths that make up the cycle
|
|
17
|
+
// `module` will be the module record generated by webpack that caused the cycle
|
|
18
|
+
compilation.errors.push(new Error(paths.join(' -> ')))
|
|
19
|
+
},
|
|
20
|
+
// `onEnd` is called before the cycle detection ends
|
|
21
|
+
onEnd({ compilation }) {
|
|
22
|
+
console.log('\nend detecting webpack modules cycles');
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
module.exports = function({config,isNext,nodeModulesPath,dir}){
|
|
3
|
+
const root = path.resolve(dir,"..");
|
|
4
|
+
nodeModulesPath = Array.isArray(nodeModulesPath)? nodeModulesPath : [];
|
|
5
|
+
config.resolve.modules = Array.isArray(config.resolve.modules)? config.resolve.modules:[]
|
|
6
|
+
config.resolve.modules = [path.resolve(dir, 'node_modules'),path.resolve(root, 'node_modules'), 'node_modules',...nodeModulesPath,...config.resolve.modules];
|
|
7
|
+
if(!isNext){
|
|
8
|
+
config.module.rules.push({
|
|
9
|
+
test: /\.(js|jsx|ts|tsx)$/,
|
|
10
|
+
include: [
|
|
11
|
+
dir,
|
|
12
|
+
path.resolve(dir,"node_modules","@fto-consult"),
|
|
13
|
+
/(common)/
|
|
14
|
+
],
|
|
15
|
+
exclude:[
|
|
16
|
+
path.resolve(dir,"node_modules"),
|
|
17
|
+
path.resolve(root,"node_modules"),
|
|
18
|
+
/node_modules[/\\](?!react-native-paper|react-native|react-native-vector-icons|react-native-safe-area-view)/,
|
|
19
|
+
/(node_modules)/
|
|
20
|
+
],
|
|
21
|
+
use: {
|
|
22
|
+
loader: 'babel-loader',
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
config.plugins.push(require("./circular-dependencies"));
|
|
27
|
+
return config;
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { getDefaultConfig } = require('@expo/metro-config');
|
|
2
|
+
const path = require("path");
|
|
3
|
+
module.exports = (opts)=>{
|
|
4
|
+
opts = opts && typeof opts =='object'? opts : {};
|
|
5
|
+
let {dir,nodeModulesPaths} = opts;
|
|
6
|
+
nodeModulesPaths = Array.isArray(nodeModulesPaths)? nodeModulesPaths : [];
|
|
7
|
+
dir = dir || path.resolve(__dirname);
|
|
8
|
+
const projectRoot = path.resolve(dir);
|
|
9
|
+
const workspaceRoot = path.resolve(projectRoot, '../..');
|
|
10
|
+
const config = getDefaultConfig(projectRoot);
|
|
11
|
+
config.watchFolders = [workspaceRoot];
|
|
12
|
+
// 2. Let Metro know where to resolve packages and in what order
|
|
13
|
+
config.resolver.nodeModulesPaths = [
|
|
14
|
+
path.resolve(projectRoot, 'node_modules'),
|
|
15
|
+
path.resolve(workspaceRoot, 'node_modules'),
|
|
16
|
+
path.resolve(__dirname,"node_modules"),
|
|
17
|
+
...nodeModulesPaths,
|
|
18
|
+
];
|
|
19
|
+
config.resolver.assetExts.push('db');
|
|
20
|
+
config.resolver.sourceExts = [
|
|
21
|
+
...config.resolver.sourceExts,
|
|
22
|
+
'jsx', 'js','tsx'
|
|
23
|
+
]
|
|
24
|
+
// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
|
|
25
|
+
config.resolver.disableHierarchicalLookup = true;
|
|
26
|
+
return config;
|
|
27
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { registerRootComponent } from 'expo';
|
|
2
|
+
import appConfig from "$capp/config";
|
|
3
|
+
//require('dotenv').config();
|
|
4
|
+
|
|
5
|
+
const isObj = x=>typeof x =='object' && x && !Array.isArray(x);
|
|
6
|
+
const defaultObj = x=> isObj(x)? x : {};
|
|
7
|
+
|
|
8
|
+
/**** initialise l'application expoUI avec les paramètres de configuration
|
|
9
|
+
* les options sont de la forme :
|
|
10
|
+
* {
|
|
11
|
+
* config {object}, le fichier de configuration de l'application
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export default function ExpoUIApp (options){
|
|
15
|
+
options = defaultObj(options);
|
|
16
|
+
const config = defaultObj(options.config);
|
|
17
|
+
appConfig.current = config;
|
|
18
|
+
registerRootComponent(require('./src/App').default);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ExpoUIApp();
|
package/metro.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./expo.metro.config")();
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fto-consult/expo-ui",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"publish": "npm publish --access=public",
|
|
8
|
+
"unpublish": "npm -f unpublish @fto-consult/common"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/borispipo/expo-ui.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"Expo",
|
|
16
|
+
"React-Native"
|
|
17
|
+
],
|
|
18
|
+
"author": "Boris Fouomene",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/borispipo/expo-ui/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/borispipo/expo-ui#readme",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@babel/preset-react": "^7.18.6",
|
|
26
|
+
"@emotion/native": "^11.10.0",
|
|
27
|
+
"@expo/metro-config": "^0.4.0",
|
|
28
|
+
"@expo/webpack-config": "^0.17.2",
|
|
29
|
+
"@fto-consult/common": "^1.0.11",
|
|
30
|
+
"@gorhom/portal": "^1.0.14",
|
|
31
|
+
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
32
|
+
"@react-native-community/netinfo": "9.3.0",
|
|
33
|
+
"@react-navigation/native": "^6.0.13",
|
|
34
|
+
"@react-navigation/native-stack": "^6.9.1",
|
|
35
|
+
"@shopify/flash-list": "1.1.0",
|
|
36
|
+
"babel-plugin-root-import": "^6.6.0",
|
|
37
|
+
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
38
|
+
"circular-dependency-plugin": "^5.2.2",
|
|
39
|
+
"dotenv": "^16.0.3",
|
|
40
|
+
"expo": "^46.0.15",
|
|
41
|
+
"expo-camera": "~12.3.0",
|
|
42
|
+
"expo-linking": "~3.2.2",
|
|
43
|
+
"expo-status-bar": "~1.4.0",
|
|
44
|
+
"expo-system-ui": "~1.3.0",
|
|
45
|
+
"expo-web-browser": "~11.0.0",
|
|
46
|
+
"google-libphonenumber": "^3.2.31",
|
|
47
|
+
"prop-types": "^15.8.1",
|
|
48
|
+
"react-content-loader": "^6.2.0",
|
|
49
|
+
"react-dom": "18.0.0",
|
|
50
|
+
"react-native": "0.69.6",
|
|
51
|
+
"react-native-big-list": "^1.5.5",
|
|
52
|
+
"react-native-gesture-handler": "~2.5.0",
|
|
53
|
+
"react-native-paper": "^4.12.5",
|
|
54
|
+
"react-native-reanimated": "~2.9.1",
|
|
55
|
+
"react-native-safe-area-context": "4.3.1",
|
|
56
|
+
"react-native-svg": "12.3.0",
|
|
57
|
+
"react-native-web": "~0.18.7",
|
|
58
|
+
"tippy.js": "^6.3.7"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/App.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import '$session';
|
|
2
|
+
import appConfig from '$capp/config';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import {updateTheme,defaultTheme} from "$theme";
|
|
5
|
+
import { AppRegistry} from 'react-native';
|
|
6
|
+
import {Provider as PaperProvider } from 'react-native-paper';
|
|
7
|
+
import App from '$src';
|
|
8
|
+
import {Portal } from 'react-native-paper';
|
|
9
|
+
import {PreloaderProvider} from "$preloader";
|
|
10
|
+
import DropdownAlert from '$ecomponents/Dialog/DropdownAlert';
|
|
11
|
+
import {notificationRef} from "$notify";
|
|
12
|
+
import BottomSheetProvider from "$ecomponents/BottomSheet/Provider";
|
|
13
|
+
import DialogProvider from "$ecomponents/Dialog/Provider";
|
|
14
|
+
import { DialogProvider as FormDataDialogProvider } from './components/Form/FormData';
|
|
15
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
16
|
+
import { PreferencesContext } from './Preferences';
|
|
17
|
+
import {AuthProvider} from '$cauth';
|
|
18
|
+
import {PortalProvider } from '$ecomponents/Portal';
|
|
19
|
+
import ErrorBoundary from "$ecomponents/ErrorBoundary";
|
|
20
|
+
import ErrorBoundaryProvider from "$ecomponents/ErrorBoundary/Provider";
|
|
21
|
+
import {GestureHandlerRootView} from "react-native-gesture-handler";
|
|
22
|
+
import StatusBar from "$ecomponents/StatusBar";
|
|
23
|
+
import SimpleSelect from '$ecomponents/SimpleSelect';
|
|
24
|
+
import {Provider as AlertProvider} from '$ecomponents/Dialog/confirm/Alert';
|
|
25
|
+
|
|
26
|
+
export default function MainAppComponent() {
|
|
27
|
+
React.useEffect(()=>{
|
|
28
|
+
return ()=>{}
|
|
29
|
+
},[])
|
|
30
|
+
const [theme,setTheme] = React.useState(updateTheme(defaultTheme));
|
|
31
|
+
const preferences = React.useMemo(()=>({
|
|
32
|
+
updateTheme : (customTheme,persist)=>{
|
|
33
|
+
setTheme(updateTheme(customTheme));
|
|
34
|
+
},
|
|
35
|
+
theme,
|
|
36
|
+
}),[theme]);
|
|
37
|
+
return (
|
|
38
|
+
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
39
|
+
<PaperProvider theme={theme}>
|
|
40
|
+
<SafeAreaProvider>
|
|
41
|
+
<AuthProvider>
|
|
42
|
+
<PortalProvider>
|
|
43
|
+
<Portal.Host>
|
|
44
|
+
<ErrorBoundary>
|
|
45
|
+
<StatusBar/>
|
|
46
|
+
<PreferencesContext.Provider value={preferences}>
|
|
47
|
+
<DropdownAlert ref={notificationRef}/>
|
|
48
|
+
<PreloaderProvider/>
|
|
49
|
+
<DialogProvider responsive/>
|
|
50
|
+
<AlertProvider SimpleSelect={SimpleSelect}/>
|
|
51
|
+
<FormDataDialogProvider/>
|
|
52
|
+
<App theme={theme}/>
|
|
53
|
+
<ErrorBoundaryProvider/>
|
|
54
|
+
<BottomSheetProvider/>
|
|
55
|
+
</PreferencesContext.Provider>
|
|
56
|
+
</ErrorBoundary>
|
|
57
|
+
</Portal.Host>
|
|
58
|
+
</PortalProvider>
|
|
59
|
+
</AuthProvider>
|
|
60
|
+
</SafeAreaProvider>
|
|
61
|
+
</PaperProvider>
|
|
62
|
+
</GestureHandlerRootView>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
AppRegistry.registerComponent(appConfig.name || appConfig.id, () => Main);
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import React from "$react";
|
|
2
|
+
import {isNonNullString,defaultNumber,defaultStr,uniqid,extendObj,isFunction} from "$utils";
|
|
3
|
+
import {navigate} from "$enavigation/utils";
|
|
4
|
+
import FormData from "$ecomponents/Form/FormData/FormData";
|
|
5
|
+
import {getForm} from "$ecomponents/Form/utils";
|
|
6
|
+
import Button from "$ecomponents/Button";
|
|
7
|
+
import notify from "$notify";
|
|
8
|
+
import {StyleSheet} from "react-native";
|
|
9
|
+
import { useAuth } from "$cauth/AuthProvider";
|
|
10
|
+
import Preloader from "$preloader";
|
|
11
|
+
import Dimensions from "$cplatform/dimensions";
|
|
12
|
+
import theme from "$theme";
|
|
13
|
+
import Label from "$ecomponents/Label";
|
|
14
|
+
import View from "$ecomponents/View";
|
|
15
|
+
import Avatar from "$ecomponents/Avatar";
|
|
16
|
+
import Surface from "$ecomponents/Surface";
|
|
17
|
+
import {Provider as DialogProvider} from "$ecomponents/Dialog";
|
|
18
|
+
import Screen from "$escreen";
|
|
19
|
+
import {getTitle} from "$escreens/Auth/utils";
|
|
20
|
+
import {isWeb} from "$cplatform";
|
|
21
|
+
|
|
22
|
+
const WIDTH = 400;
|
|
23
|
+
|
|
24
|
+
export default function LoginComponent(props){
|
|
25
|
+
let {formName,step,appBarProps,onSuccess,withPortal,testID} = props;
|
|
26
|
+
const loginTitle = getTitle();
|
|
27
|
+
testID = defaultStr(testID,"RN_Auth.LoginComponent");
|
|
28
|
+
formName = React.useRef(uniqid(defaultStr(formName,"login-formname"))).current;
|
|
29
|
+
const nextButtonRef = React.useRef(null);
|
|
30
|
+
const dialogProviderRef = React.useRef(null);
|
|
31
|
+
const backgroundColor = theme.colors.surface;
|
|
32
|
+
const Wrapper = withPortal ? Screen : View;
|
|
33
|
+
|
|
34
|
+
const auth = useAuth();
|
|
35
|
+
const notifyUser = (message)=> notify.error({message,position:'top'})
|
|
36
|
+
const [state,setState] = React.useState({
|
|
37
|
+
step : defaultNumber(step,1),
|
|
38
|
+
});
|
|
39
|
+
const _getForm = x=> getForm(formName);
|
|
40
|
+
const getData = ()=>{
|
|
41
|
+
const form = _getForm();
|
|
42
|
+
if(form && form.getData){
|
|
43
|
+
return form.getData();
|
|
44
|
+
}
|
|
45
|
+
return defaultObj(props.data);
|
|
46
|
+
}
|
|
47
|
+
const goToFirstStep = ()=>{
|
|
48
|
+
const data = getData();
|
|
49
|
+
setState({...state,step:1,data});
|
|
50
|
+
}
|
|
51
|
+
const focusField = (fieldName)=>{
|
|
52
|
+
const form = _getForm();
|
|
53
|
+
if(form){
|
|
54
|
+
const field = form.getField(fieldName);
|
|
55
|
+
if(field){
|
|
56
|
+
field.focus();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
React.useEffect(()=>{
|
|
62
|
+
Preloader.closeAll();
|
|
63
|
+
},[]);
|
|
64
|
+
React.useEffect(()=>{
|
|
65
|
+
if(typeof formProps.focusField =='function'){
|
|
66
|
+
return formProps.focusField({...state,focusField,nextButtonRef,data:getData()})
|
|
67
|
+
}
|
|
68
|
+
},[state.step]);
|
|
69
|
+
if(withPortal){
|
|
70
|
+
appBarProps = defaultObj(appBarProps);
|
|
71
|
+
appBarProps.backAction = false;
|
|
72
|
+
}
|
|
73
|
+
React.useEffect(()=>{
|
|
74
|
+
if(withPortal && isWeb() && typeof document !== 'undefined'){
|
|
75
|
+
setTimeout(()=>{
|
|
76
|
+
document.title = loginTitle
|
|
77
|
+
},1000)
|
|
78
|
+
}
|
|
79
|
+
},[withPortal])
|
|
80
|
+
const formProps = defaultObj(LoginComponent.getProps(LoginComponent.getProps({
|
|
81
|
+
...state,
|
|
82
|
+
data : getData(),
|
|
83
|
+
focusField,
|
|
84
|
+
state,
|
|
85
|
+
setState,
|
|
86
|
+
nextButtonRef,
|
|
87
|
+
})));
|
|
88
|
+
/****la fonction à utiliser pour vérifier si l'on peut envoyer les données pour connextion
|
|
89
|
+
* par défaut, on envoie les données lorssqu'on est à l'étappe 2
|
|
90
|
+
* **/
|
|
91
|
+
const canSubmit = typeof formProps.canSubmit =='function'? formProps.canSubmit : ({step})=>step >= 2;
|
|
92
|
+
const goToNext = ()=>{
|
|
93
|
+
let step = state.step;
|
|
94
|
+
let data = getData();
|
|
95
|
+
data.code = defaultStr(data.code, state.code);
|
|
96
|
+
const form = _getForm();
|
|
97
|
+
if(!form){
|
|
98
|
+
notifyUser("Impossible de valider le formulaire car celui-ci semble invalide")
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const args = {data,form,step,nextButtonRef};
|
|
102
|
+
if(typeof formProps.validate =='function'){
|
|
103
|
+
const s = formProps.validate(args);
|
|
104
|
+
if(s === false) return;
|
|
105
|
+
if(isNonNullString(s)){
|
|
106
|
+
notifyUser(s);
|
|
107
|
+
return
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if(canSubmit(args) && step > 1){
|
|
111
|
+
Preloader.open("vérification ...");
|
|
112
|
+
return auth.signIn(data).then((a)=>{
|
|
113
|
+
if(typeof formProps.onSuccess =='function' && formProps.onSuccess(a)=== false) return;
|
|
114
|
+
if(isFunction(onSuccess)){
|
|
115
|
+
onSuccess(true);
|
|
116
|
+
} else {
|
|
117
|
+
navigate("Home");
|
|
118
|
+
}
|
|
119
|
+
}).finally(()=>{
|
|
120
|
+
Preloader.close();
|
|
121
|
+
})
|
|
122
|
+
} else {
|
|
123
|
+
setState({...state,step:step+1,...data})
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const wrapperProps = withPortal ? {appBarProps,authRequired:false,title:loginTitle} : { style:styles.wrapper};
|
|
128
|
+
return <Wrapper testID = {testID+"_Wrapper" }{...wrapperProps}>
|
|
129
|
+
<DialogProvider ref={dialogProviderRef}/>
|
|
130
|
+
<Surface style={[styles.container,{backgroundColor}]} testID={testID}>
|
|
131
|
+
<Surface elevation = {0} mediaQueryUpdateNativeProps = {(a)=>{
|
|
132
|
+
return {style:updateMediaQueryStyle()}
|
|
133
|
+
}} testID={testID+"_Content"} style={[styles.content,updateMediaQueryStyle(),{backgroundColor}]}>
|
|
134
|
+
<FormData
|
|
135
|
+
formName = {formName}
|
|
136
|
+
testID = {testID+"_FormData"}
|
|
137
|
+
style = {[styles.formData,{backgroundColor}]}
|
|
138
|
+
header = {<View style = {[styles.header]}>
|
|
139
|
+
<Avatar testID={testID+"_Avatar"} size={50} secondary icon = 'lock'/>
|
|
140
|
+
<Label testID={testID+"_HeaderText"} bool style={{color:theme.colors.primaryOnSurface,fontSize:18,paddingTop:10}}>Connectez vous SVP</Label>
|
|
141
|
+
</View>}
|
|
142
|
+
responsive = {false}
|
|
143
|
+
{...formProps}
|
|
144
|
+
formProps = {{
|
|
145
|
+
keyboardEvents : {
|
|
146
|
+
...defaultObj(formProps.keyboardEvents),
|
|
147
|
+
enter : ({formInstance})=>{
|
|
148
|
+
goToNext();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}}
|
|
152
|
+
data = {extendObj(props.data,formProps.data)}
|
|
153
|
+
>
|
|
154
|
+
<View testID={testID+"_ButtonsContainer"} style={[styles.buttonWrapper]}>
|
|
155
|
+
<Button
|
|
156
|
+
ref = {nextButtonRef}
|
|
157
|
+
primary
|
|
158
|
+
mode = "contained"
|
|
159
|
+
rounded
|
|
160
|
+
style = {styles.button}
|
|
161
|
+
onPress = {goToNext}
|
|
162
|
+
icon = {state.step == 1? 'arrow-right':'login'}
|
|
163
|
+
surface
|
|
164
|
+
disabled = {!isNonNullString(state.code)}
|
|
165
|
+
>
|
|
166
|
+
{state.step == 1? 'Suivant' : 'Connexion' }
|
|
167
|
+
</Button>
|
|
168
|
+
{state.step>=2 ? <Button
|
|
169
|
+
onPress = {goToFirstStep}
|
|
170
|
+
mode = "contained"
|
|
171
|
+
rounded
|
|
172
|
+
raised
|
|
173
|
+
style = {styles.button}
|
|
174
|
+
secondary
|
|
175
|
+
surface
|
|
176
|
+
icon = {'arrow-left'}
|
|
177
|
+
>
|
|
178
|
+
Précédent
|
|
179
|
+
</Button> : null}
|
|
180
|
+
</View>
|
|
181
|
+
</FormData>
|
|
182
|
+
</Surface>
|
|
183
|
+
</Surface>
|
|
184
|
+
</Wrapper>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**** cette fonction est utilisée, pour modifier dynamiquement les champs et les props de connexion au formulaire */
|
|
188
|
+
LoginComponent.getProps = ({data,step,state,nextButtonRef})=>{
|
|
189
|
+
return {
|
|
190
|
+
///les champ à utiliser pour l'authentification de l'utilisateur
|
|
191
|
+
fields : {
|
|
192
|
+
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const updateMediaQueryStyle = ()=>{
|
|
198
|
+
const isSmallPhone = Dimensions.isSmallPhoneMedia(),isTablet = Dimensions.isTabletMedia(),
|
|
199
|
+
isMobile = Dimensions.isMobileMedia(),isDesktop = Dimensions.isDesktopMedia();
|
|
200
|
+
const {width} = Dimensions.get("window");
|
|
201
|
+
return {
|
|
202
|
+
width : isSmallPhone ? "95%" : isMobile?"90%" : isTablet ? "50%" : Math.min(WIDTH,(35*width)/100),
|
|
203
|
+
minWidth : isTablet || isDesktop ? WIDTH : undefined,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const styles = StyleSheet.create({
|
|
208
|
+
wrapper : {
|
|
209
|
+
flex:1,
|
|
210
|
+
width : '100%',
|
|
211
|
+
height : '100%',
|
|
212
|
+
},
|
|
213
|
+
portalContainer : {
|
|
214
|
+
...StyleSheet.absoluteFillObject,
|
|
215
|
+
flex:1,
|
|
216
|
+
left:0,
|
|
217
|
+
zIndex : 1000,
|
|
218
|
+
top : 0,
|
|
219
|
+
},
|
|
220
|
+
container : {
|
|
221
|
+
justifyContent : 'center',
|
|
222
|
+
alignItems : 'center',
|
|
223
|
+
width : '100%',
|
|
224
|
+
height : '100%',
|
|
225
|
+
paddingVertical : 15,
|
|
226
|
+
flex : 1,
|
|
227
|
+
},
|
|
228
|
+
content : {
|
|
229
|
+
width : 300,
|
|
230
|
+
paddingVertical : 40,
|
|
231
|
+
paddingHorizontal : 20,
|
|
232
|
+
justifyContent : 'center',
|
|
233
|
+
//alignItems : 'center',
|
|
234
|
+
flex : 1,
|
|
235
|
+
},
|
|
236
|
+
button : {
|
|
237
|
+
//maxWidth : 130,
|
|
238
|
+
margin : 10,
|
|
239
|
+
},
|
|
240
|
+
header : {
|
|
241
|
+
flexDirection:'column',
|
|
242
|
+
width : '100%',
|
|
243
|
+
alignItems : 'center',
|
|
244
|
+
},
|
|
245
|
+
formData : {
|
|
246
|
+
justifyContent : 'flex-start',
|
|
247
|
+
width : '100%',
|
|
248
|
+
},
|
|
249
|
+
buttonWrapper : {
|
|
250
|
+
justifyContent : 'center',
|
|
251
|
+
width : '100%'
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from "$react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import {animationsPropTypes,getAnimations} from "./utils";
|
|
4
|
+
import Animated,{useAnimatedStyle,withTiming} from "react-native-reanimated";
|
|
5
|
+
|
|
6
|
+
export const ANIMATION_DURATION = 300;
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const AnimationComponent = React.forwardRef(function AnimationComponent(props,ref) {
|
|
10
|
+
let { animationType,animationPosition,enteringCallback,exitingCallback,animationDuration,...rest} = props;
|
|
11
|
+
const rProps = defaultObj(rest);
|
|
12
|
+
const duration = animationDuration || ANIMATION_DURATION;
|
|
13
|
+
let animations = getAnimations(animationType,animationPosition);
|
|
14
|
+
|
|
15
|
+
const style = useAnimatedStyle(() => {
|
|
16
|
+
return {};
|
|
17
|
+
});
|
|
18
|
+
enteringCallback = enteringCallback || function(e){console.log(e," is entering")};
|
|
19
|
+
exitingCallback = exitingCallback || function(e){console.log(e," is animation exiting")};
|
|
20
|
+
if(animations.entering && animations.exiting){
|
|
21
|
+
animations.entering.duration(duration).withCallback(enteringCallback);
|
|
22
|
+
animations.exiting.duration(duration).withCallback(exitingCallback);
|
|
23
|
+
} else {
|
|
24
|
+
animations = getDefaultAnimation({duration,enteringCallback,exitingCallback,callback});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return <Animated.View
|
|
28
|
+
testID={'RN_AnimationComponentComponent'}
|
|
29
|
+
ref = {ref}
|
|
30
|
+
{...rProps}
|
|
31
|
+
style = {[rest.style,style]}
|
|
32
|
+
{...animations}
|
|
33
|
+
/>
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
AnimationComponent.displayName = "AnimationComponent";
|
|
37
|
+
|
|
38
|
+
export default AnimationComponent;
|
|
39
|
+
|
|
40
|
+
AnimationComponent.propTypes = {
|
|
41
|
+
...animationsPropTypes,
|
|
42
|
+
animationDuration : PropTypes.number,
|
|
43
|
+
children : PropTypes.any,
|
|
44
|
+
enteringCallback : PropTypes.func,
|
|
45
|
+
exitingCallback : PropTypes.func,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
export const getDefaultAnimation = ({enteringCallback,exitingCallback,duration})=>{
|
|
50
|
+
return {
|
|
51
|
+
entering : (targetValues) => {
|
|
52
|
+
'worklet';
|
|
53
|
+
return {
|
|
54
|
+
callback : enteringCallback,
|
|
55
|
+
duration,
|
|
56
|
+
initialValues: {
|
|
57
|
+
transform: [
|
|
58
|
+
{ translateY: targetValues.targetHeight / 2 },
|
|
59
|
+
{ perspective: 500 },
|
|
60
|
+
{ rotateX: '90deg' },
|
|
61
|
+
{ translateY: -targetValues.targetHeight / 2 },
|
|
62
|
+
{ translateY: 300 },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
animations: {
|
|
66
|
+
transform: [
|
|
67
|
+
{ translateY: withTiming(targetValues.targetHeight / 2) },
|
|
68
|
+
{ perspective: withTiming(500) },
|
|
69
|
+
{ rotateX: withTiming('0deg') },
|
|
70
|
+
{ translateY: withTiming(-targetValues.targetHeight / 2) },
|
|
71
|
+
{ translateY: withTiming(0) },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
exiting : (targetValues) => {
|
|
77
|
+
'worklet';
|
|
78
|
+
return {
|
|
79
|
+
callback : exitingCallback,
|
|
80
|
+
duration,
|
|
81
|
+
initialValues: {},
|
|
82
|
+
animations: {
|
|
83
|
+
transform: [
|
|
84
|
+
{ translateY: withTiming(targetValues.currentHeight / 2) },
|
|
85
|
+
{ perspective: withTiming(500) },
|
|
86
|
+
{ rotateX: withTiming('90deg') },
|
|
87
|
+
{ translateY: withTiming(-targetValues.currentHeight / 2) },
|
|
88
|
+
{ translateY: withTiming(300) },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {entering,exiting};
|
|
95
|
+
}
|