@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,14 @@
|
|
|
1
|
+
export * from "./FormData";
|
|
2
|
+
|
|
3
|
+
export * from "./Form";
|
|
4
|
+
|
|
5
|
+
export {default as List} from "./List";
|
|
6
|
+
|
|
7
|
+
export {default as Form} from "./Form";
|
|
8
|
+
|
|
9
|
+
export {default as Action} from "./Action";
|
|
10
|
+
|
|
11
|
+
export {default as KeyboardAvoidingView} from "./KeyboardAvoidingView";
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export * from "./utils";
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {isObj,isNonNullString,isFunction,defaultObj,extendObj,defaultBool} from "$utils";
|
|
2
|
+
import APP from "$capp/instance";
|
|
3
|
+
import {observable,addObserver,isObservable} from "$observable";
|
|
4
|
+
|
|
5
|
+
let MANAGER = {
|
|
6
|
+
forms : {
|
|
7
|
+
|
|
8
|
+
},///les actions de formulaire
|
|
9
|
+
actions : {
|
|
10
|
+
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
if(!isObj(APP.FormsManager)){
|
|
14
|
+
Object.defineProperties(APP,{
|
|
15
|
+
FormsManager : {
|
|
16
|
+
value : MANAGER,
|
|
17
|
+
writable:false,
|
|
18
|
+
override : false
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
observable(APP.FormsManager);
|
|
22
|
+
addObserver(APP.FormsManager);
|
|
23
|
+
APP.FormsManager.on("mount",(formName,formObject)=>{
|
|
24
|
+
formObject._fields = defaultObj(formObject._fields);
|
|
25
|
+
formObject._actions= defaultObj(formObject._actions);
|
|
26
|
+
APP.FormsManager.forms[formName] = formObject;
|
|
27
|
+
}).on("unmount",(formName)=>{
|
|
28
|
+
delete APP.FormsManager.forms[formName];
|
|
29
|
+
}).on("registerField",(fieldName,formName,fieldObj)=>{
|
|
30
|
+
if(fieldObj && isObservable(fieldObj)){
|
|
31
|
+
APP.FormsManager.forms[formName] = defaultObj(APP.FormsManager.forms[formName]);
|
|
32
|
+
APP.FormsManager.forms[formName]._fields = defaultObj(APP.FormsManager.forms[formName]._fields);
|
|
33
|
+
APP.FormsManager.forms[formName]._fields[fieldName] = fieldObj;
|
|
34
|
+
let form = APP.FormsManager.forms[formName];
|
|
35
|
+
let formField = form._fields[fieldName];
|
|
36
|
+
if(isFunction(formField.onRegister)) formField.onRegister(fieldName,fieldObj);
|
|
37
|
+
}
|
|
38
|
+
}).on("unregisterField",(fieldName,formName)=>{
|
|
39
|
+
if(isNonNullString(fieldName) && isNonNullString(formName)){
|
|
40
|
+
APP.FormsManager.forms[formName] = defaultObj(APP.FormsManager.forms[formName]);
|
|
41
|
+
APP.FormsManager.forms[formName]._fields = defaultObj(APP.FormsManager.forms[formName]._fields);
|
|
42
|
+
delete APP.FormsManager.forms[formName]._fields[fieldName];
|
|
43
|
+
}
|
|
44
|
+
}).on("mountAction",(formName,actionObj)=>{
|
|
45
|
+
if(!isNonNullString(formName) || !isObj(actionObj)) {
|
|
46
|
+
console.error("MSForm Action, l'action, nom du formulaire non définit ",formName,actionObj)
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
APP.FormsManager.actions = defaultObj(APP.FormsManager.actions);
|
|
50
|
+
APP.FormsManager.actions[formName] = defaultObj(APP.FormsManager.actions[formName]);
|
|
51
|
+
APP.FormsManager.actions[formName][actionObj.getId()] = actionObj;
|
|
52
|
+
}).on("unmountAction",(formName,actionId)=>{
|
|
53
|
+
if(!isNonNullString(formName) || !isNonNullString(actionId)) return;
|
|
54
|
+
if(!isObj(APP.FormsManager.actions) || !isObj(APP.FormsManager.actions[formName])) return;
|
|
55
|
+
delete APP.FormsManager.actions[formName][actionId]
|
|
56
|
+
})
|
|
57
|
+
} else {
|
|
58
|
+
MANAGER = APP.FormsManager;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default MANAGER;
|
|
62
|
+
|
|
63
|
+
export const getFormInstance = (formName) =>{
|
|
64
|
+
return MANAGER.forms[formName];
|
|
65
|
+
}
|
|
66
|
+
export const getForm = getFormInstance;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
export const getFormFields = (formName)=>{
|
|
70
|
+
if(!isNonNullString(formName)) return {};
|
|
71
|
+
if(!isObj(APP.FormsManager.forms[formName]) || !isObj(APP.FormsManager.forms[formName]._fields))return {};
|
|
72
|
+
return APP.FormsManager.forms[formName]._fields;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*** retourne l'instance d'un champ à partir du nom du formulaire et celui du champ en question
|
|
76
|
+
* @param : formName : le nom de la form dans lequel est définit le cham
|
|
77
|
+
* @parm f: string field name : le nom du champ à récupérer
|
|
78
|
+
*/
|
|
79
|
+
export const getFormField = (formName,fieldName)=>{
|
|
80
|
+
if(!isNonNullString(formName)||!isNonNullString(fieldName)) return null;
|
|
81
|
+
let fields = getFormFields(formName);
|
|
82
|
+
if(isObj(fields)){
|
|
83
|
+
return fields[fieldName];
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
export const getFormData = (formName)=>{
|
|
88
|
+
const instance = getForm(formName);
|
|
89
|
+
if(instance) return instance.getData();
|
|
90
|
+
return {};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const getActions = (formName) =>{
|
|
94
|
+
if(!isNonNullString(formName)) return {};
|
|
95
|
+
if(!isObj(APP.FormsManager.actions)) return {} ;
|
|
96
|
+
return defaultObj(APP.FormsManager.actions[formName]);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const warning = (payload,msg) => {if(!isNonNullString(msg)) msg = "⚠ Forms, Missing field name";else msg = "⚠ Forms, "+msg;console.warn(`⚠ Forms, Missing field name: ${payload}`);}
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'esc' : {
|
|
3
|
+
action : 'esc',
|
|
4
|
+
text : 'Annuler',
|
|
5
|
+
desc : 'Ferme la fenêtre et annule l\'opération en cours'
|
|
6
|
+
},
|
|
7
|
+
'ctrl+alt+s': {
|
|
8
|
+
action : 'save',
|
|
9
|
+
text : 'Enregistrer',
|
|
10
|
+
desc : 'Enregistrer le document en cours'
|
|
11
|
+
},
|
|
12
|
+
'ctrl+alt+n' : {
|
|
13
|
+
action : 'save2new',
|
|
14
|
+
text : 'Enregistrer + Nouveau',
|
|
15
|
+
desc : 'Enregistre le document en cours puis ouvre la page d\'édition d\'un nouveau document'
|
|
16
|
+
},
|
|
17
|
+
'ctrl+alt+c' : {
|
|
18
|
+
action : 'save2close',
|
|
19
|
+
text : 'Enregistrer + Fermer',
|
|
20
|
+
desc : 'Enregistre le document en cours, puis ferme la fenêtre en cours'
|
|
21
|
+
},
|
|
22
|
+
'ctrl+alt+p' : {
|
|
23
|
+
action : 'print',
|
|
24
|
+
text : 'Imprimer',
|
|
25
|
+
desc : 'Imprime le document en cours',
|
|
26
|
+
},
|
|
27
|
+
'ctrl+alt+i' : {
|
|
28
|
+
action : 'save2print',
|
|
29
|
+
text : 'Enregistrer + Imprimer',
|
|
30
|
+
desc : 'Enregistre puis exécute la fonction permettant d\'imprimer le document enregistré'
|
|
31
|
+
},
|
|
32
|
+
'ctrl+alt+d' : {
|
|
33
|
+
action : 'clone',
|
|
34
|
+
text : 'Dupliquer',
|
|
35
|
+
desc : 'Duplique le document en cours',
|
|
36
|
+
},
|
|
37
|
+
'ctrl+alt+a' : {
|
|
38
|
+
action : 'archive',
|
|
39
|
+
text : 'Archiver',
|
|
40
|
+
desc : 'Archive le document ouvert'
|
|
41
|
+
},
|
|
42
|
+
'ctrl+alt+left' : {
|
|
43
|
+
action : 'previous',
|
|
44
|
+
text : 'Précédent',
|
|
45
|
+
desc : 'Se positionne au document précédent dans la liste'
|
|
46
|
+
},
|
|
47
|
+
'ctrl+alt+right' : {
|
|
48
|
+
action : 'next',
|
|
49
|
+
text : 'Suivant',
|
|
50
|
+
desc : 'Se positionne au document suivant dans la liste'
|
|
51
|
+
},
|
|
52
|
+
'ctrl+alt+x' : {
|
|
53
|
+
action : 'copy',
|
|
54
|
+
text : 'Copier',
|
|
55
|
+
desc : 'Copier le document'
|
|
56
|
+
},
|
|
57
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import React from '$react';
|
|
4
|
+
import {TouchableOpacity, StyleSheet} from 'react-native';
|
|
5
|
+
import Dimensions from "$cplatform/dimensions";
|
|
6
|
+
import View from "$ecomponents/View";
|
|
7
|
+
import {defaultStr} from "$utils";
|
|
8
|
+
import PropTypes from "prop-types";
|
|
9
|
+
import {medias} from "$theme/grid";
|
|
10
|
+
import theme from "$theme";
|
|
11
|
+
import {Elevations} from "$ecomponents/Surface";
|
|
12
|
+
|
|
13
|
+
export const totalSize = 12;
|
|
14
|
+
|
|
15
|
+
export const defaultMobileSize = 12;
|
|
16
|
+
|
|
17
|
+
export const defaultTabletSize = 6;
|
|
18
|
+
|
|
19
|
+
export const defaultDesktopSize = 4;
|
|
20
|
+
|
|
21
|
+
const isV = x=> typeof x =='number' && x && x <= totalSize ? true : false;
|
|
22
|
+
export const getSizeStyle = (props)=>{
|
|
23
|
+
let {size,smallPhoneSize,paddingMultiplicator,phoneSize,marginMultiplicator,mobileSize,tabletSize,gutter,desktopSize} = defaultObj(props);
|
|
24
|
+
gutter = gutter === false ? 0 : typeof gutter =='number'? gutter : undefined;
|
|
25
|
+
if(Dimensions.isSmallPhoneMedia()){
|
|
26
|
+
size = isV(smallPhoneSize) ? smallPhoneSize : size || defaultMobileSize;
|
|
27
|
+
gutter = gutter !== undefined ? gutter : medias.sp;
|
|
28
|
+
} else if(Dimensions.isPhoneMedia()){
|
|
29
|
+
size = isV(phoneSize) ? phoneSize : size || defaultMobileSize;
|
|
30
|
+
gutter = gutter !== undefined ? gutter : medias.mp;
|
|
31
|
+
} else if(Dimensions.isMobileMedia()){
|
|
32
|
+
size = isV(mobileSize) ? mobileSize : size || defaultMobileSize;
|
|
33
|
+
gutter = gutter !== undefined ? gutter : medias.xs;
|
|
34
|
+
} else if(Dimensions.isTabletMedia()){
|
|
35
|
+
size = isV(tabletSize) ? tabletSize : size || defaultTabletSize;
|
|
36
|
+
gutter = gutter !== undefined ? gutter : medias.sm;
|
|
37
|
+
} else {
|
|
38
|
+
size = isV(desktopSize)? desktopSize : size || defaultDesktopSize;
|
|
39
|
+
gutter = gutter !== undefined ? gutter : medias.md;
|
|
40
|
+
}
|
|
41
|
+
if(!isV(size)){
|
|
42
|
+
size = totalSize;
|
|
43
|
+
}
|
|
44
|
+
if(!gutter){
|
|
45
|
+
gutter = 0;
|
|
46
|
+
}
|
|
47
|
+
paddingMultiplicator = typeof paddingMultiplicator =='number'? paddingMultiplicator : 1.8;
|
|
48
|
+
marginMultiplicator = typeof marginMultiplicator =="number"? marginMultiplicator : 0;
|
|
49
|
+
const marginRight = marginMultiplicator*gutter;
|
|
50
|
+
return {
|
|
51
|
+
style : {paddingRight:gutter*paddingMultiplicator,marginVertical:gutter,width : (((size)/totalSize)*100)+"%"}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const GridCellComponent = React.forwardRef((p,ref)=>{
|
|
56
|
+
const {style,size,children,phoneSize,withSurface,elevation:cElev,mediaQueryUpdateNativeProps,contentProps:cProps,tabletSize,desktopSize,smallPhoneSize,onPress,activeOpacity,onLongPress,flex:customFlex,onPressIn,onPressOut,...props} = p;
|
|
57
|
+
const testID = defaultStr(props.testID,"RN_Grid.CellComponent");
|
|
58
|
+
const contentProps = defaultObj(cProps);
|
|
59
|
+
const C = onPress || onLongPress || onPressIn || onPressOut ? TouchableOpacity : View;
|
|
60
|
+
const elevation = typeof elevation == "number"? elevation : withSurface ? 5 : undefined;
|
|
61
|
+
const elevStyle = typeof elevation =="number" ? Elevations[elevation] || null : null;
|
|
62
|
+
return <View
|
|
63
|
+
{...props}
|
|
64
|
+
testID={testID}
|
|
65
|
+
mediaQueryUpdateNativeProps = {(args)=>{
|
|
66
|
+
if(typeof mediaQueryUpdateNativeProps =='function' && mediaQueryUpdateNativeProps(args) === false) return;
|
|
67
|
+
return getSizeStyle(p);
|
|
68
|
+
}}
|
|
69
|
+
ref={ref}
|
|
70
|
+
style = {[styles.container,getSizeStyle(p).style,style]}
|
|
71
|
+
>
|
|
72
|
+
<C testID={testID+"_Content"} activeOpacity={activeOpacity} {...contentProps}
|
|
73
|
+
|
|
74
|
+
onLongPress={onLongPress} onPressIn={onPressIn} onPressOut={onPressOut} onPress={onPress}
|
|
75
|
+
style = {[styles.content,withSurface && {backgroundColor:theme.colors.surface},contentProps.style,elevStyle]}
|
|
76
|
+
children = {children}
|
|
77
|
+
/>
|
|
78
|
+
</View>
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
GridCellComponent.displayName = "Grid.Col";
|
|
82
|
+
GridCellComponent.propTypes = {
|
|
83
|
+
flex : PropTypes.number,
|
|
84
|
+
size : PropTypes.number,
|
|
85
|
+
smallPhoneSize : PropTypes.number,
|
|
86
|
+
phoneSize : PropTypes.number,
|
|
87
|
+
tabletSize : PropTypes.number,
|
|
88
|
+
desktopSize : PropTypes.number,
|
|
89
|
+
gutter : PropTypes.oneOfType([
|
|
90
|
+
PropTypes.bool,
|
|
91
|
+
PropTypes.number,
|
|
92
|
+
]),
|
|
93
|
+
withSurface : PropTypes.bool,
|
|
94
|
+
elevation : PropTypes.number,///l'elévation pour le box shadow
|
|
95
|
+
contentProps : PropTypes.object,
|
|
96
|
+
}
|
|
97
|
+
const styles = StyleSheet.create({
|
|
98
|
+
container : {
|
|
99
|
+
flexDirection: 'column',
|
|
100
|
+
justifyContent : 'flex-start',
|
|
101
|
+
alignItems : 'flex-start',
|
|
102
|
+
},
|
|
103
|
+
content : {
|
|
104
|
+
width : '100%'
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export default GridCellComponent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import React from '$react';
|
|
4
|
+
import {TouchableOpacity, StyleSheet} from 'react-native';
|
|
5
|
+
import {defaultStr} from "$utils";
|
|
6
|
+
import PropTypes from "prop-types";
|
|
7
|
+
import View from "$ecomponents/View";
|
|
8
|
+
|
|
9
|
+
const GridColComponent = React.forwardRef((p,ref)=>{
|
|
10
|
+
const {style,size,onPress,activeOpacity,onLongPress,flex:customFlex,onPressIn,onPressOut,...props} = p;
|
|
11
|
+
const flattenedStyle = StyleSheet.flatten(style);
|
|
12
|
+
const testID = defaultStr(props.testID,"RN_Grid.ColComponent");
|
|
13
|
+
const flex = customFlex !== undefined ? customFlex : (flattenedStyle && flattenedStyle.width) ? 0 : 1;
|
|
14
|
+
const C = onPress || onLongPress || onPressIn || onPressOut ? TouchableOpacity : View;
|
|
15
|
+
return <C {...props} activeOpacity={activeOpacity} onLongPress={onLongPress} onPressIn={onPressIn} onPressOut={onPressOut}
|
|
16
|
+
testID={testID} style={[styles.container,flattenedStyle,{flex}]} ref={ref} onPress={onPress}
|
|
17
|
+
/>
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
GridColComponent.displayName = "Grid.Col";
|
|
21
|
+
GridColComponent.propTypes = {
|
|
22
|
+
flex : PropTypes.number,
|
|
23
|
+
}
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
container : {
|
|
26
|
+
flexDirection: 'column'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export default GridColComponent;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from '$react';
|
|
2
|
+
import {TouchableOpacity,StyleSheet} from 'react-native';
|
|
3
|
+
import {grid} from "$theme";
|
|
4
|
+
import {defaultStr} from "$utils";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import { StyleProp } from '$theme';
|
|
7
|
+
import View from "$ecomponents/View";
|
|
8
|
+
|
|
9
|
+
const GridComponent = React.forwardRef((p,ref)=>{
|
|
10
|
+
const {onPress,responsive,activeOpacity,onLongPress,flexGrow =1,flex:customFlex,style,onPressIn,col,onPressOut,...props} = p;
|
|
11
|
+
const testID = defaultStr(props.testID,"RN_GridComponent");
|
|
12
|
+
const flattenedStyle = StyleSheet.flatten(style);
|
|
13
|
+
const flex = customFlex !== undefined ? customFlex : (flattenedStyle && (col && flattenedStyle.width || !col && flattenedStyle.height)) ? 0 : 1;
|
|
14
|
+
const C = onPress || onLongPress || onPressIn || onPressOut ? TouchableOpacity : View;
|
|
15
|
+
return <C {...props} activeOpacity={activeOpacity} onLongPress={onLongPress} onPressIn={onPressIn} onPressOut={onPressOut}
|
|
16
|
+
testID={testID+"_Container"} onPress={onPress}
|
|
17
|
+
style={[styles.container,{flexGrow},col && {flexDirection:'column'},responsive!== false && !col && grid.row(false),style,{flex}]} ref={ref}
|
|
18
|
+
/>
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const styles = StyleSheet.create({
|
|
22
|
+
container : {
|
|
23
|
+
flexDirection: 'row'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
GridComponent.displayName = "GridComponent";
|
|
28
|
+
GridComponent.propTypes = {
|
|
29
|
+
col : PropTypes.bool,///si le rendu sera en colonne
|
|
30
|
+
style : StyleProp,
|
|
31
|
+
flexGrow : PropTypes.number,
|
|
32
|
+
responsive : PropTypes.bool,///si le contenu de la grille sera responsive, dans ce cas, ses enfants seront les Cell
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default GridComponent;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import React from '$react';
|
|
4
|
+
import {TouchableOpacity, StyleSheet} from 'react-native';
|
|
5
|
+
import View from "$ecomponents/View";
|
|
6
|
+
import {defaultStr} from "$utils";
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
|
|
9
|
+
const GridRowComponent = React.forwardRef((p,ref)=>{
|
|
10
|
+
const {style,size,onPress,activeOpacity,onLongPress,flex:customFlex,onPressIn,onPressOut,...props} = p;
|
|
11
|
+
const flattenedStyle = StyleSheet.flatten(style);
|
|
12
|
+
const testID = defaultStr(props.testID,"RN_Grid.RowComponent");
|
|
13
|
+
const flex = customFlex !== undefined ? customFlex : (flattenedStyle && flattenedStyle.height) ? 0 : 1;
|
|
14
|
+
const C = onPress || onLongPress || onPressIn || onPressOut ? TouchableOpacity : View;
|
|
15
|
+
return <C {...props} activeOpacity={activeOpacity} onLongPress={onLongPress} onPressIn={onPressIn} onPressOut={onPressOut}
|
|
16
|
+
onPress={onPress} testID={testID} style={[styles.container,flattenedStyle,{flex}]} ref={ref}
|
|
17
|
+
/>
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
GridRowComponent.displayName = "Grid.Row";
|
|
21
|
+
GridRowComponent.propTypes = {
|
|
22
|
+
flex : PropTypes.number,
|
|
23
|
+
}
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
container : {
|
|
26
|
+
flexDirection: 'row'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export default GridRowComponent;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {isNonNullString,defaultObj} from "$utils";
|
|
2
|
+
//import dataFileManager from "$database/dataFileManager";
|
|
3
|
+
import {open as showPreloader,close as hidePreloader} from "$preloader";
|
|
4
|
+
import Label from "$ecomponents/Label";
|
|
5
|
+
import templates from "$ecomponents/Form/Fields/sprintfSelectors";
|
|
6
|
+
import Tooltip from "$ecomponents/Tooltip";
|
|
7
|
+
import { Pressable } from "react-native";
|
|
8
|
+
|
|
9
|
+
/***
|
|
10
|
+
* API The component ReactHashtag is actually pretty generic. Is not something that someone can't do in half an hour. But, this one has some generic API that could make you turn.
|
|
11
|
+
Name Type Description
|
|
12
|
+
renderHashtag(value: String, onPress: Function) function Returns the custom element to be renderer instead of a <span>. You can go wild here.
|
|
13
|
+
onHashtagPress(value: String, e: Event) function The click handler for each hashtags. This will be called with the hashtag value that got clicked
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
const rule = /([#|#][^\s]+)/g;
|
|
18
|
+
const parse = (value, renderer,props) => {
|
|
19
|
+
if(!isNonNullString(value)){
|
|
20
|
+
return React.isValidElement(value)? value: null;
|
|
21
|
+
}
|
|
22
|
+
return value.split(rule).map((chunk,i) => {
|
|
23
|
+
if (chunk.match(rule)) {
|
|
24
|
+
return renderer(chunk,props);
|
|
25
|
+
}
|
|
26
|
+
return <Label {...props} key={i}>{chunk}</Label>
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const onHashtagPress = ({dbName,code,table})=>{
|
|
30
|
+
if(isNonNullString(table) && isNonNullString(code)){
|
|
31
|
+
code = code.toUpperCase().trim()
|
|
32
|
+
const run = (cb)=>{
|
|
33
|
+
if(!isNonNullString(dbName)){
|
|
34
|
+
cb(dbName);
|
|
35
|
+
} else if(false) {
|
|
36
|
+
dbName = dataFileManager.sanitizeName(dbName,table);
|
|
37
|
+
table = table.toUpperCase();
|
|
38
|
+
let hasFound = false;
|
|
39
|
+
let user = defaultObj(Auth.getLoggedUser());
|
|
40
|
+
dataFileManager.getAll((dF,code)=>{
|
|
41
|
+
if(dF.code == dbName){
|
|
42
|
+
if(dF.type !== 'seller' || (dF.type == 'seller' && arrayValueExists(dF.users,user.code))){
|
|
43
|
+
hasFound = true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
if(hasFound){
|
|
48
|
+
cb(dbName)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
run((dbName)=>{
|
|
53
|
+
showPreloader("traitement de la requête ...");
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const defaultRenderText = ({text,code,value,dbName,table,hashtag})=>{
|
|
59
|
+
let title = "";
|
|
60
|
+
text = defaultStr(text);
|
|
61
|
+
if(code){
|
|
62
|
+
title +=( (title)? "\n":"") +" Code : [" + code+"]";
|
|
63
|
+
}
|
|
64
|
+
if(isNonNullString(table)){
|
|
65
|
+
title +=( (title)? "\n":"") +" Table : [" + table.toUpperCase()+"]";
|
|
66
|
+
}
|
|
67
|
+
if(dbName){
|
|
68
|
+
title +=( (title)? "\n":"") + dataFileManager.dataFileText +" : ["+dbName+"]";
|
|
69
|
+
}
|
|
70
|
+
return <Tooltip Component={Label} cursorPointer primary style={[{textDecorationLine:'underline'}]} title={title}>
|
|
71
|
+
{"#"+text}
|
|
72
|
+
</Tooltip>
|
|
73
|
+
}
|
|
74
|
+
const defaultHashtagRenderer = x => (hashtag,hasTagProps) =>{
|
|
75
|
+
const {Component:CustomComponent,renderText,...props} = defaultObj(hasTagProps);
|
|
76
|
+
if(!isNonNullString(hashtag)) return null;
|
|
77
|
+
let val = hashtag;
|
|
78
|
+
if(!isNonNullString(val)) return;
|
|
79
|
+
let split = val.split("#");
|
|
80
|
+
let dbName = '';
|
|
81
|
+
let code = "";
|
|
82
|
+
let table = ""
|
|
83
|
+
if(split[1]){
|
|
84
|
+
dbName = split[1].trim().split("[")[0];
|
|
85
|
+
val = split[1].trim();
|
|
86
|
+
split=val.match(/\[([^)]+)\]/);
|
|
87
|
+
if(split && split[1] && val.indexOf("-")){
|
|
88
|
+
val = split[1];
|
|
89
|
+
let index = val.indexOf('-');
|
|
90
|
+
table = val.substring(0,index);
|
|
91
|
+
code = val.substring(index+1,val.length);
|
|
92
|
+
let ob = defaultObj(templates["&"+table.toLowerCase().trim().ltrim("&").rtrim("&")+"&"])
|
|
93
|
+
table = defaultStr(ob.table,table);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const p = {...props,table,value:code||hashtag,code,dbName,text:code||hashtag,hashtag};
|
|
97
|
+
const text = typeof renderText =="function"? renderText(p) : defaultRenderText(p);
|
|
98
|
+
if(!React.isValidElement(text,true)) return null;
|
|
99
|
+
let Component = React.isComponent(Component) ? Component : Pressable;
|
|
100
|
+
props.style = [{textDecorationLine : 'underline'},props.style]
|
|
101
|
+
return <Component key={hashtag} {...defaultObj(props)} onPress={(e)=>{
|
|
102
|
+
React.stopEventPropagation(e);
|
|
103
|
+
if(props.disabled) return;
|
|
104
|
+
onHashtagPress({...p,event:e});
|
|
105
|
+
}}>{text}</Component>
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const HashTagComponent = props => {
|
|
109
|
+
const contents =
|
|
110
|
+
typeof props.children === "object" && props.children && props.children.length
|
|
111
|
+
? !isNaN(props.children.length)
|
|
112
|
+
? props.children[0]
|
|
113
|
+
: props.children
|
|
114
|
+
: props.children;
|
|
115
|
+
const hashtagRenderer = props.renderHashtag || defaultHashtagRenderer();
|
|
116
|
+
return parse(contents, hashtagRenderer,props);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export default HashTagComponent;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from '$react';
|
|
2
|
+
import {useAfterInteractions } from "./utils";
|
|
3
|
+
import { Transition, Transitioning } from 'react-native-reanimated'
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import { StylePropTypes } from '$theme';
|
|
6
|
+
import {isNumber,defaultStr} from "$utils";
|
|
7
|
+
|
|
8
|
+
const OptimizedHeavyScreen = React.forwardRef(({
|
|
9
|
+
transition = (
|
|
10
|
+
<Transition.Together>
|
|
11
|
+
<Transition.Change interpolation="easeInOut" />
|
|
12
|
+
<Transition.In type="fade" />
|
|
13
|
+
</Transition.Together>
|
|
14
|
+
),
|
|
15
|
+
style,
|
|
16
|
+
children,
|
|
17
|
+
timeout,
|
|
18
|
+
testID,
|
|
19
|
+
transitionTimeout,
|
|
20
|
+
placeholder,
|
|
21
|
+
},ref) => {
|
|
22
|
+
timeout = isNumber(timeout)? timeout : isNumber(transitionTimeout)? transitionTimeout : undefined;
|
|
23
|
+
const { transitionRef, areInteractionsComplete } = useAfterInteractions(timeout);
|
|
24
|
+
let Placeholder = placeholder;
|
|
25
|
+
placeholder = React.isComponent(Placeholder)? <Placeholder /> : React.isValidElement(Placeholder)? Placeholder : null;
|
|
26
|
+
return (
|
|
27
|
+
<Transitioning.View
|
|
28
|
+
testID={defaultStr(testID,'RN_OptimizedHeavyScreen')}
|
|
29
|
+
transition={transition}
|
|
30
|
+
style={[{flex:1},style]}
|
|
31
|
+
ref={React.useMergeRefs(transitionRef,ref)}
|
|
32
|
+
>
|
|
33
|
+
{areInteractionsComplete ? (children) : placeholder}
|
|
34
|
+
</Transitioning.View>
|
|
35
|
+
)
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export default OptimizedHeavyScreen;
|
|
39
|
+
|
|
40
|
+
OptimizedHeavyScreen.propTypes = {
|
|
41
|
+
transition: PropTypes.any,
|
|
42
|
+
children : PropTypes.node,
|
|
43
|
+
style: StylePropTypes,
|
|
44
|
+
timeout : PropTypes.number,
|
|
45
|
+
transitionTimeout : PropTypes.number,
|
|
46
|
+
placeholder : PropTypes.oneOfType([
|
|
47
|
+
PropTypes.node,
|
|
48
|
+
PropTypes.element,
|
|
49
|
+
])
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
OptimizedHeavyScreen.displayName = "OptimizedHeavyScreenComponent";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "$react";
|
|
2
|
+
import {InteractionManager} from "react-native";
|
|
3
|
+
/**** options, les options lié à la transition */
|
|
4
|
+
export const useAfterInteractions = (options) => {
|
|
5
|
+
const [areInteractionsComplete, setInteractionsComplete] = React.useState(false)
|
|
6
|
+
if(isNumber(options)){
|
|
7
|
+
options = {timeout:options};
|
|
8
|
+
}
|
|
9
|
+
options = defaultObj(options);
|
|
10
|
+
let timeout = isNumber(options.timeout)? options.timeout : defaultNumber(options.timeout,options.transitionTimeout,AFTER_INTERACTIONS_TIMEOUT);
|
|
11
|
+
|
|
12
|
+
const subscriptionRef = React.useRef(null)
|
|
13
|
+
|
|
14
|
+
const transitionRef = React.useRef(null)
|
|
15
|
+
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
subscriptionRef.current = InteractionManager.runAfterInteractions(
|
|
18
|
+
() => {
|
|
19
|
+
setTimeout(()=>{
|
|
20
|
+
//transitionRef.current?.animateNextTransition()
|
|
21
|
+
setInteractionsComplete(true)
|
|
22
|
+
subscriptionRef.current = null
|
|
23
|
+
},timeout)
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
return () => {
|
|
27
|
+
subscriptionRef.current?.cancel()
|
|
28
|
+
}
|
|
29
|
+
}, [])
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
areInteractionsComplete,
|
|
33
|
+
completed : areInteractionsComplete,
|
|
34
|
+
transitionRef,
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HelperText} from 'react-native-paper';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import {defaultBool,defaultObj,isNonNullString} from "$utils";
|
|
5
|
+
import React from "$react";
|
|
6
|
+
export const TYPES = {info:'info',error:'error'};
|
|
7
|
+
import theme,{DISABLED_OPACITY} from "$theme";
|
|
8
|
+
|
|
9
|
+
export default function HelperTextComponent (props){
|
|
10
|
+
let {type,visible,style,children,error,...rest} = props;
|
|
11
|
+
if(!isNonNullString(children)) return React.isValidElement(children)?children:null;
|
|
12
|
+
rest = defaultObj(rest);
|
|
13
|
+
type = defaultStr(type,'info').toLowerCase();
|
|
14
|
+
const _style = {};
|
|
15
|
+
if(!TYPES[type]) {
|
|
16
|
+
type = TYPES.info;
|
|
17
|
+
}
|
|
18
|
+
if(error){
|
|
19
|
+
type = TYPES.error;
|
|
20
|
+
_style.color = theme.colors.error;
|
|
21
|
+
}
|
|
22
|
+
return <HelperText {...rest} style={[styles.padding,_style,style,rest.disabled?{opacity:DISABLED_OPACITY}:undefined]} padding={'none'} type={type} children={children} visible={defaultBool(visible,true)} />
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
HelperTextComponent.propTypes = {
|
|
26
|
+
...defaultObj(HelperText.propTypes),
|
|
27
|
+
error : PropTypes.bool,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
padding: {
|
|
32
|
+
paddingHorizontal: 0,
|
|
33
|
+
paddingTop:0,
|
|
34
|
+
paddingBottom : 5,
|
|
35
|
+
},
|
|
36
|
+
});
|