@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,64 @@
|
|
|
1
|
+
import {defaultStr,parseDecimal as NParseDecimal,defaultDecimal} from "$utils";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const flatMode = 'flat';
|
|
5
|
+
export const outlinedMode = 'outlined';
|
|
6
|
+
export const normalMode = "normal";
|
|
7
|
+
export const shadowMode = "shadow";
|
|
8
|
+
|
|
9
|
+
export const defaultMode = outlinedMode;
|
|
10
|
+
|
|
11
|
+
export const modes = {flat:flatMode,shadow:shadowMode,outlined:outlinedMode,normal:normalMode};
|
|
12
|
+
|
|
13
|
+
export const modesObject = {
|
|
14
|
+
flat : {
|
|
15
|
+
code : flatMode,
|
|
16
|
+
label : 'Flottant',
|
|
17
|
+
},
|
|
18
|
+
shadow : {
|
|
19
|
+
code : shadowMode,
|
|
20
|
+
label : 'Ombre',
|
|
21
|
+
},
|
|
22
|
+
normal : {
|
|
23
|
+
code : normalMode,
|
|
24
|
+
label : 'Normal',
|
|
25
|
+
},
|
|
26
|
+
outlined : {
|
|
27
|
+
code : outlinedMode,
|
|
28
|
+
label : 'Décrit',
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export const HEIGHT = 56;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export const AutoCapitalizeTypes = {
|
|
37
|
+
characters : "characters", ///all characters.
|
|
38
|
+
words : "words", //first letter of each word.
|
|
39
|
+
sentences :"sentences", //first letter of each sentence (default).
|
|
40
|
+
none : "none", ///don't auto capitalize anything.
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const keyboardTypes = {
|
|
44
|
+
default : 'default',
|
|
45
|
+
number : "number-pad",
|
|
46
|
+
numberPad : "number-pad",
|
|
47
|
+
decimal : "decimal-pad",
|
|
48
|
+
numeric : "numeric",
|
|
49
|
+
email : "email-address",
|
|
50
|
+
tel : "phone-pad",
|
|
51
|
+
phone : "phone-pad",
|
|
52
|
+
}
|
|
53
|
+
export const FONT_SIZE = 16;
|
|
54
|
+
|
|
55
|
+
export const parseDecimal = (v,type,preserveDecimalLength)=>{
|
|
56
|
+
type = defaultStr(type).trim().toLowerCase();
|
|
57
|
+
if((type =='number' || type =='decimal') && !isDecimal(v)){
|
|
58
|
+
if(v == undefined || v == null){
|
|
59
|
+
v = '';
|
|
60
|
+
}
|
|
61
|
+
v = defaultDecimal(NParseDecimal(v,preserveDecimalLength),0);
|
|
62
|
+
}
|
|
63
|
+
return v;
|
|
64
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/***@see : https://github.com/alimek/react-native-tooltip-menu */
|
|
2
|
+
import React, {useRef, useMemo, useState } from 'react';
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import theme,{ StyleProps} from '$theme';
|
|
5
|
+
import {defaultObj} from "$utils";
|
|
6
|
+
import Label from "$ecomponents/Label";
|
|
7
|
+
import View from "$ecomponents/View";
|
|
8
|
+
import {
|
|
9
|
+
Modal,
|
|
10
|
+
Animated,
|
|
11
|
+
TouchableOpacity,
|
|
12
|
+
StyleSheet,
|
|
13
|
+
Pressable,
|
|
14
|
+
Dimensions,
|
|
15
|
+
} from 'react-native';
|
|
16
|
+
|
|
17
|
+
const INDENT = 30;
|
|
18
|
+
const PADDING = 5;
|
|
19
|
+
const ARROW_SIZE = 10;
|
|
20
|
+
|
|
21
|
+
const TooltipPopoverComponent = React.forwardRef(({
|
|
22
|
+
children,
|
|
23
|
+
content,
|
|
24
|
+
//style,
|
|
25
|
+
overlayStyle,
|
|
26
|
+
widthType,
|
|
27
|
+
modalButtonStyle,
|
|
28
|
+
onRequestClose,
|
|
29
|
+
onLayout,
|
|
30
|
+
trianglePosition,
|
|
31
|
+
...rest
|
|
32
|
+
},ref) => {
|
|
33
|
+
const buttonRef = useRef(null);
|
|
34
|
+
const innerRef = React.useMergeRefs(ref,buttonRef);
|
|
35
|
+
const [state,setState] = useState({
|
|
36
|
+
componentPosition : null,
|
|
37
|
+
isModalOpen : false,
|
|
38
|
+
})
|
|
39
|
+
const opacity = useMemo(() => new Animated.Value(0), []);
|
|
40
|
+
const {isModalOpen,componentPosition,innerContentLayout} = state;
|
|
41
|
+
const { width: windowWidth, height: windowHeight } = Dimensions.get("window");
|
|
42
|
+
const toggleModal = () => {
|
|
43
|
+
if(!isModalOpen){
|
|
44
|
+
if(!buttonRef.current || !buttonRef.current.measureInWindow) return;
|
|
45
|
+
return buttonRef.current.measureInWindow((x, y,width,height,pageX,pageY) => {
|
|
46
|
+
if(typeof x !=='number' || typeof y !=='number') return;
|
|
47
|
+
setState({...state,
|
|
48
|
+
isModalOpen : true,
|
|
49
|
+
componentPosition:{
|
|
50
|
+
x,
|
|
51
|
+
y,
|
|
52
|
+
width,
|
|
53
|
+
height,
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
setState({...state,isModalOpen:false});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const openModal = () => {
|
|
62
|
+
Animated.timing(opacity, {
|
|
63
|
+
toValue: 1,
|
|
64
|
+
duration: 300,
|
|
65
|
+
useNativeDriver: true,
|
|
66
|
+
}).start(toggleModal);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const hideModal = () => {
|
|
70
|
+
Animated.timing(opacity, {
|
|
71
|
+
toValue: 0,
|
|
72
|
+
duration: 300,
|
|
73
|
+
useNativeDriver: true,
|
|
74
|
+
}).start(toggleModal);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const handleClick = (onClickItem) => {
|
|
78
|
+
const method = isModalOpen ? hideModal : openModal;
|
|
79
|
+
method();
|
|
80
|
+
|
|
81
|
+
onClickItem();
|
|
82
|
+
};
|
|
83
|
+
trianglePosition = 'center';
|
|
84
|
+
const arrowStyle = {color:theme.colors.primary};
|
|
85
|
+
const containerStyle = {};
|
|
86
|
+
if(componentPosition){
|
|
87
|
+
containerStyle.top = componentPosition.y;
|
|
88
|
+
containerStyle.left = componentPosition.x;
|
|
89
|
+
}
|
|
90
|
+
let left, top ;
|
|
91
|
+
if(innerContentLayout && componentPosition){
|
|
92
|
+
const {width:contentWidth,height:contentHeight} = innerContentLayout;
|
|
93
|
+
const {width:componentWidth,height:componentHeight,x:componentLeft,y:componentTop} = componentPosition;
|
|
94
|
+
let spaceTop = componentTop, spaceBottom = windowHeight - componentHeight - componentTop,
|
|
95
|
+
spaceLeft = componentLeft, spaceRight = windowWidth - componentWidth - componentLeft;
|
|
96
|
+
///on évalue la position du tooltip :
|
|
97
|
+
if(spaceBottom - contentHeight >= INDENT){
|
|
98
|
+
///on va positionner le tooltip dans l'espace bas , le triangle va regarder en haut
|
|
99
|
+
arrowStyle.top = componentTop + componentHeight;
|
|
100
|
+
top = arrowStyle.top + ARROW_SIZE;
|
|
101
|
+
arrowStyle.borderTopWidth = 0;
|
|
102
|
+
arrowStyle.borderBottomColor = theme.colors.primary;
|
|
103
|
+
} else if(spaceTop - contentHeight >= INDENT) {
|
|
104
|
+
///peut positionner le tooltip en haut du bouton, le triangle va regarder le bas
|
|
105
|
+
arrowStyle.top = componentTop - componentHeight;
|
|
106
|
+
top = arrowStyle.top - ARROW_SIZE;
|
|
107
|
+
arrowStyle.borderBottomWidth = 0;
|
|
108
|
+
arrowStyle.borderTopColor = theme.colors.primary;
|
|
109
|
+
} else {
|
|
110
|
+
top = 0;
|
|
111
|
+
arrowStyle.display = "none";
|
|
112
|
+
left = 0;
|
|
113
|
+
}
|
|
114
|
+
if(arrowStyle.display != "none"){
|
|
115
|
+
arrowStyle.left = componentLeft + componentWidth/2 - ARROW_SIZE/2;
|
|
116
|
+
if(componentWidth >= contentWidth){
|
|
117
|
+
left = arrowStyle.left - contentWidth/2+ ARROW_SIZE;
|
|
118
|
+
} else {
|
|
119
|
+
if(spaceLeft - contentWidth > INDENT){
|
|
120
|
+
left = componentLeft - contentWidth;
|
|
121
|
+
} else if(spaceRight - contentWidth > INDENT){
|
|
122
|
+
left = componentLeft;
|
|
123
|
+
} else {
|
|
124
|
+
left = 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
//on peut positionner le tooltip en bas du bouton, on vérifie la position du triangle
|
|
130
|
+
}
|
|
131
|
+
if(typeof top =='number'){
|
|
132
|
+
containerStyle.top = top;
|
|
133
|
+
}
|
|
134
|
+
if(typeof left ==='number'){
|
|
135
|
+
containerStyle.left = left;
|
|
136
|
+
}
|
|
137
|
+
const onInnerContentLayout = ({nativeEvent:{layout}}) => {
|
|
138
|
+
if (layout.width === 0 || layout.height === 0) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
setState({...state,innerContentLayout:layout});
|
|
142
|
+
}
|
|
143
|
+
const cProps = {
|
|
144
|
+
...defaultObj(rest),
|
|
145
|
+
onLongPress : openModal,
|
|
146
|
+
onLayout,
|
|
147
|
+
}
|
|
148
|
+
const modalContent = <Modal visible={isModalOpen} transparent onRequestClose={(a)=>{
|
|
149
|
+
if(onRequestClose && onRequestClose(a)=== false) return;
|
|
150
|
+
hideModal();
|
|
151
|
+
}}>
|
|
152
|
+
<View style={[styles.overlay, overlayStyle]} />
|
|
153
|
+
<TouchableOpacity
|
|
154
|
+
activeOpacity={1}
|
|
155
|
+
style={[{ flex: 1 }, modalButtonStyle]}
|
|
156
|
+
onPress={hideModal}
|
|
157
|
+
>
|
|
158
|
+
<View
|
|
159
|
+
style={[
|
|
160
|
+
styles.component,
|
|
161
|
+
{width:'100%',height:'100%'},
|
|
162
|
+
containerStyle,
|
|
163
|
+
]}
|
|
164
|
+
>
|
|
165
|
+
<TouchableOpacity onPress={isModalOpen ? hideModal : openModal}>
|
|
166
|
+
<View
|
|
167
|
+
style={[styles.innerContainer]}
|
|
168
|
+
>
|
|
169
|
+
<Label
|
|
170
|
+
onLayout={onInnerContentLayout}
|
|
171
|
+
style={[{color:theme.colors.primaryText,backgroundColor:theme.colors.primary,padding:10,borderRadius:5}]}>{content}</Label>
|
|
172
|
+
</View>
|
|
173
|
+
</TouchableOpacity>
|
|
174
|
+
</View>
|
|
175
|
+
<Animated.View
|
|
176
|
+
style={[
|
|
177
|
+
styles.triangle,
|
|
178
|
+
{ opacity },
|
|
179
|
+
arrowStyle,
|
|
180
|
+
]}
|
|
181
|
+
/>
|
|
182
|
+
</TouchableOpacity>
|
|
183
|
+
</Modal>;
|
|
184
|
+
if(typeof children =='function'){
|
|
185
|
+
return <>
|
|
186
|
+
{<Label>{children(cProps,innerRef)}</Label>}
|
|
187
|
+
{modalContent}
|
|
188
|
+
</>
|
|
189
|
+
}
|
|
190
|
+
return <Pressable
|
|
191
|
+
{...cProps}
|
|
192
|
+
ref={innerRef}
|
|
193
|
+
>
|
|
194
|
+
<Label>{children}</Label>
|
|
195
|
+
{modalContent}
|
|
196
|
+
</Pressable>
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
TooltipPopoverComponent.defaultProps = {
|
|
200
|
+
widthType: 'auto',
|
|
201
|
+
onRequestClose: undefined,
|
|
202
|
+
trianglePosition: 'center',
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const styles = StyleSheet.create({
|
|
206
|
+
overlay: {
|
|
207
|
+
...StyleSheet.absoluteFillObject,
|
|
208
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
209
|
+
},
|
|
210
|
+
tooltipMargin: {
|
|
211
|
+
borderBottomWidth: 1,
|
|
212
|
+
borderBottomColor: '#E1E1E1',
|
|
213
|
+
},
|
|
214
|
+
innerContainer: {
|
|
215
|
+
backgroundColor: 'transparent',
|
|
216
|
+
flexGrow : 0,
|
|
217
|
+
flexShrink : 0,
|
|
218
|
+
alignItems: 'flex-start'
|
|
219
|
+
},
|
|
220
|
+
component: {
|
|
221
|
+
position: 'absolute',
|
|
222
|
+
},
|
|
223
|
+
triangle: {
|
|
224
|
+
position: 'absolute',
|
|
225
|
+
width: ARROW_SIZE,
|
|
226
|
+
height: ARROW_SIZE,
|
|
227
|
+
backgroundColor: 'transparent',
|
|
228
|
+
borderStyle: 'solid',
|
|
229
|
+
borderTopWidth: ARROW_SIZE,
|
|
230
|
+
borderRightWidth: ARROW_SIZE,
|
|
231
|
+
borderBottomWidth: ARROW_SIZE,
|
|
232
|
+
borderLeftWidth: ARROW_SIZE,
|
|
233
|
+
borderTopColor: 'transparent',
|
|
234
|
+
borderRightColor: 'transparent',
|
|
235
|
+
borderBottomColor: 'transparent',
|
|
236
|
+
borderLeftColor: 'transparent',
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
TooltipPopoverComponent.propTypes = {
|
|
241
|
+
children: PropTypes.oneOfType([
|
|
242
|
+
PropTypes.node,
|
|
243
|
+
/*** si children est une fonction alors elle doit retourner un composant de type Pressable */
|
|
244
|
+
PropTypes.func,
|
|
245
|
+
]),
|
|
246
|
+
style : StyleProps,
|
|
247
|
+
overlayStyle: StyleProps,
|
|
248
|
+
labelContainerStyle: StyleProps,
|
|
249
|
+
modalButtonStyle: StyleProps,
|
|
250
|
+
labelStyle: StyleProps,
|
|
251
|
+
onRequestClose : PropTypes.func,
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export default TooltipPopoverComponent;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import tippy from 'tippy.js';
|
|
2
|
+
import 'tippy.js/dist/tippy.css';
|
|
3
|
+
import React from "$react";
|
|
4
|
+
import {getMaxZindex} from "$utils/dom";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import Label from "$ecomponents/Label";
|
|
7
|
+
import { TIPPY_THEME } from '$theme/updateNative/utils';
|
|
8
|
+
import {isDOMElement} from "$utils/dom";
|
|
9
|
+
import {uniqid,defaultStr,defaultObj} from "$utils";
|
|
10
|
+
|
|
11
|
+
const TippyTooltipComponent = React.forwardRef((props,ref)=>{
|
|
12
|
+
let {children,content,...rest} = props;
|
|
13
|
+
const instanceIdRef = React.useRef(uniqid("tippy-instance-id"));
|
|
14
|
+
const buttonRef = React.useRef(null);
|
|
15
|
+
const innerRef = React.useMergeRefs(ref,buttonRef);
|
|
16
|
+
const selector = "#"+instanceIdRef.current;
|
|
17
|
+
React.useEffect(()=>{
|
|
18
|
+
content = React.getTextContent(content);
|
|
19
|
+
if(typeof content =='string'){
|
|
20
|
+
content = content.replaceAll("\n","<br/>");
|
|
21
|
+
}
|
|
22
|
+
if(!content) return;
|
|
23
|
+
const tpI = tippy(isDOMElement(buttonRef.current)? buttonRef.current:selector,{
|
|
24
|
+
content,
|
|
25
|
+
allowHTML : true,
|
|
26
|
+
theme : TIPPY_THEME,
|
|
27
|
+
onShow : (instance)=>{
|
|
28
|
+
if(instance && typeof(instance.setProps) ==="function"){
|
|
29
|
+
instance.setProps({
|
|
30
|
+
zIndex:getMaxZindex()
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const instance = Array.isArray(tpI) ? tpI[0] : tpI;
|
|
36
|
+
//React.setRef(ref,instance);
|
|
37
|
+
return ()=>{
|
|
38
|
+
React.setRef(ref,null);
|
|
39
|
+
if(instance && instance.destroy){
|
|
40
|
+
instance.destroy();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},[content])
|
|
44
|
+
const cProps = {
|
|
45
|
+
...defaultObj(rest),
|
|
46
|
+
nativeID:instanceIdRef.current,
|
|
47
|
+
}
|
|
48
|
+
if(typeof children =='function'){
|
|
49
|
+
return children(cProps,innerRef);
|
|
50
|
+
}
|
|
51
|
+
return <Label {...cProps} ref={innerRef}>
|
|
52
|
+
{children}
|
|
53
|
+
</Label>
|
|
54
|
+
});
|
|
55
|
+
TippyTooltipComponent.propTypes = {
|
|
56
|
+
content: PropTypes.any, //le contenu du tooltip
|
|
57
|
+
title : PropTypes.string, //le contenu du tooltip
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default TippyTooltipComponent;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Popover from "./Popover";
|
|
2
|
+
import {defaultObj,defaultVal} from "$utils";
|
|
3
|
+
import View from "$ecomponents/View";
|
|
4
|
+
import Label from "$ecomponents/Label";
|
|
5
|
+
import React from "$react";
|
|
6
|
+
export const actions = {press:'press',longpress:'longpress',hover:'hover'};
|
|
7
|
+
|
|
8
|
+
export const positions = {top:"top",right:"right",bottom:"bottom",left:"left"}
|
|
9
|
+
|
|
10
|
+
/***
|
|
11
|
+
* for more documentation @see : https://github.com/eveningkid/react-native-popable#popable.children
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const TooltipComponent = React.forwardRef((props,ref)=>{
|
|
15
|
+
let {tooltipProps,position,Component,children,strictPosition,...rest} = props;
|
|
16
|
+
rest = defaultObj(rest);
|
|
17
|
+
tooltipProps = defaultObj(tooltipProps);
|
|
18
|
+
Component = React.isComponent(tooltipProps.Component) ? tooltipProps.Component : React.isComponent(Component) ? Component : Label;
|
|
19
|
+
delete tooltipProps.position;
|
|
20
|
+
const content = defaultVal(rest.content,rest.tooltip,rest.title,rest.label,rest.accessibilityLabel);
|
|
21
|
+
if(typeof children !=='function'){
|
|
22
|
+
rest.children = children;
|
|
23
|
+
}
|
|
24
|
+
const ct = <Component {...rest}/>
|
|
25
|
+
if(!content || rest.disabled === true || rest.readOnly === true || rest.editable === false){
|
|
26
|
+
return typeof children =='function'? children(rest,ref) : ct;
|
|
27
|
+
}
|
|
28
|
+
return <Popover
|
|
29
|
+
{...tooltipProps}
|
|
30
|
+
content = {content}
|
|
31
|
+
onLongPress = {rest.onLongPress}
|
|
32
|
+
onPressIn = {rest.onPressIn}
|
|
33
|
+
onPressOut = {rest.onPressOut}
|
|
34
|
+
onPress = {rest.onPress}
|
|
35
|
+
ref = {ref}
|
|
36
|
+
>
|
|
37
|
+
{typeof children =='function'? children : ct}
|
|
38
|
+
</Popover>
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
export default TooltipComponent;
|
|
42
|
+
TooltipComponent.displayName = "TooltipComponent";
|
|
File without changes
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {View} from "react-native";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React from "$react";
|
|
4
|
+
import {isMobileNative} from "$cplatform";
|
|
5
|
+
import {debounce,isNumber} from "$utils";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const ViewComponent = React.forwardRef(({mediaQueryUpdateNativeProps,onLayoutTimeout,onLayout,autoHeight,autoWidth,elevation,...props},ref)=>{
|
|
9
|
+
const style = React.useMediaQueryUpdateStyle(props);
|
|
10
|
+
const autoSize = autoHeight||autoWidth ? true : false;
|
|
11
|
+
const [state,setState] = autoSize ? React.useState({}) : [{}];
|
|
12
|
+
const {width,height} = state;
|
|
13
|
+
const onL = (e)=>{
|
|
14
|
+
if(!e || !e.nativeEvent || !e.nativeEvent.layout) return;
|
|
15
|
+
const h = e.nativeEvent.layout.height,w = e.nativeEvent.layout.width;
|
|
16
|
+
if(onLayout && onLayout(e) === false) return;
|
|
17
|
+
if(autoSize && typeof h =='number' && typeof w ==='number'){
|
|
18
|
+
if(isObj(state)){
|
|
19
|
+
if(autoWidth && typeof state.width == 'number' && Math.abs(state.width-w) < 50) return;
|
|
20
|
+
if(autoHeight && typeof state.height =='number' && Math.abs(state.height-h) < 50) return;
|
|
21
|
+
}
|
|
22
|
+
setState({height:h,width:w});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return <View
|
|
26
|
+
{...props}
|
|
27
|
+
style = {[style,
|
|
28
|
+
autoSize && [
|
|
29
|
+
autoHeight && isNumber(height) && height > 10 && {height},
|
|
30
|
+
autoWidth && isNumber(width) && width > 10 && {width}
|
|
31
|
+
]
|
|
32
|
+
]}
|
|
33
|
+
onLayout = {isMobileNative()? onL : debounce(onL,typeof onLayoutTimeout =='number'? onLayoutTimeout : 100)}
|
|
34
|
+
ref={typeof mediaQueryUpdateNativeProps =='function' ? React.useMediaQueryUpdateNativeProps(mediaQueryUpdateNativeProps,ref) : ref}
|
|
35
|
+
/>
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export default ViewComponent;
|
|
39
|
+
|
|
40
|
+
ViewComponent.displayName = "ViewComponent";
|
|
41
|
+
|
|
42
|
+
ViewComponent.propTypes = {
|
|
43
|
+
mediaQueryUpdateNativeProps : PropTypes.func,
|
|
44
|
+
mediaQueryUpdateStyle : PropTypes.func,
|
|
45
|
+
autoWidth : PropTypes.bool,//si la taille de la vue est calculée automatiquement
|
|
46
|
+
autoHeight : PropTypes.bool,//si la taille de
|
|
47
|
+
onLayout : PropTypes.func,
|
|
48
|
+
///si useCurrentMedia est à true, alors la mise à jour sera opérée uniquement lorsque le current media change
|
|
49
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**@see : https://github.com/react-native-web-community/react-native-web-webview */
|
|
2
|
+
import Qs from 'qs';
|
|
3
|
+
import React, { Component } from 'react';
|
|
4
|
+
import { StyleSheet, View, ActivityIndicator, unstable_createElement as createElement } from 'react-native';
|
|
5
|
+
|
|
6
|
+
export class WebView extends Component {
|
|
7
|
+
static defaultProps = {
|
|
8
|
+
scrollEnabled: true,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
state = { html: null };
|
|
12
|
+
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
this.handleSource(props.source, props.newWindow);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
setRef = (ref) => (this.frameRef = ref);
|
|
19
|
+
|
|
20
|
+
handleSource = (source, newWindow) => {
|
|
21
|
+
if (!source.method) return;
|
|
22
|
+
|
|
23
|
+
if (newWindow) {
|
|
24
|
+
this.handleSourceInNewWindow(source, newWindow);
|
|
25
|
+
} else {
|
|
26
|
+
this.handleSourceInIFrame(source);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
handleSourceInIFrame = (source) => {
|
|
31
|
+
const { uri, ...options } = source;
|
|
32
|
+
const baseUrl = uri.substr(0, uri.lastIndexOf('/') + 1);
|
|
33
|
+
fetch(uri, options)
|
|
34
|
+
.then((response) => response.text())
|
|
35
|
+
.then((html) => this.setState({ html: `<base href="${baseUrl}" />` + html }));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
handleSourceInNewWindow = (source, newWindow) => {
|
|
39
|
+
if (source.method === 'POST') {
|
|
40
|
+
const contentType = source.headers['Content-Type'];
|
|
41
|
+
let body = '';
|
|
42
|
+
if (contentType && contentType.includes('application/x-www-form-urlencoded')) {
|
|
43
|
+
body = Qs.parse(source.body);
|
|
44
|
+
} else {
|
|
45
|
+
console.warn(
|
|
46
|
+
'[WebView] When opening a new window, this content-type is not supported yet, please make a PR!',
|
|
47
|
+
contentType
|
|
48
|
+
);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
window.open(
|
|
53
|
+
require('./postMock.html') +
|
|
54
|
+
'?' +
|
|
55
|
+
Qs.stringify({
|
|
56
|
+
uri: source.uri,
|
|
57
|
+
body: JSON.stringify(body),
|
|
58
|
+
}),
|
|
59
|
+
newWindow.name || 'webview',
|
|
60
|
+
newWindow.features || undefined
|
|
61
|
+
);
|
|
62
|
+
} else {
|
|
63
|
+
console.warn(
|
|
64
|
+
'[WebView] When opening a new window, this method is not supported yet, please make a PR!',
|
|
65
|
+
source.method
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
componentDidMount() {
|
|
71
|
+
if (this.props.onMessage) {
|
|
72
|
+
window.addEventListener('message', this.onMessage, true);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
componentWillReceiveProps(nextProps) {
|
|
77
|
+
if (
|
|
78
|
+
this.props.source.uri !== nextProps.source.uri ||
|
|
79
|
+
this.props.source.method !== nextProps.source.method ||
|
|
80
|
+
this.props.source.body !== nextProps.source.body
|
|
81
|
+
) {
|
|
82
|
+
this.handleSource(nextProps.source, nextProps.newWindow);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
componentWillUnmount() {
|
|
87
|
+
if (this.props.onMessage) {
|
|
88
|
+
window.removeEventListener('message', this.onMessage, true);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onMessage = (nativeEvent) => this.props.onMessage({ nativeEvent });
|
|
93
|
+
|
|
94
|
+
postMessage = (message, origin) => {
|
|
95
|
+
this.frameRef.contentWindow.postMessage(message, origin);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
handleInjectedJavaScript = (html) => {
|
|
99
|
+
if (this.props.injectedJavaScript) {
|
|
100
|
+
if (html) {
|
|
101
|
+
return html.replace('</body>', `<script>${this.props.injectedJavaScript}</script></body>`);
|
|
102
|
+
} else {
|
|
103
|
+
return html;
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
return html;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
render() {
|
|
111
|
+
if (this.props.newWindow) {
|
|
112
|
+
return (
|
|
113
|
+
<View style={styles.loadingContainer}>
|
|
114
|
+
<ActivityIndicator />
|
|
115
|
+
</View>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const { title, source, onLoad, scrollEnabled } = this.props;
|
|
120
|
+
const styleObj = StyleSheet.flatten(this.props.style);
|
|
121
|
+
return createElement('iframe', {
|
|
122
|
+
title,
|
|
123
|
+
ref: this.setRef,
|
|
124
|
+
src: !source.method ? source.uri : undefined,
|
|
125
|
+
srcDoc: this.handleInjectedJavaScript(this.state.html || source.html),
|
|
126
|
+
width: styleObj && styleObj.width,
|
|
127
|
+
height: styleObj && styleObj.height,
|
|
128
|
+
style: StyleSheet.flatten([styles.iframe, scrollEnabled && styles.noScroll, this.props.style]),
|
|
129
|
+
allowFullScreen: true,
|
|
130
|
+
allowpaymentrequest: 'true',
|
|
131
|
+
frameBorder: '0',
|
|
132
|
+
seamless: true,
|
|
133
|
+
onLoad,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export default WebView;
|
|
139
|
+
|
|
140
|
+
const styles = StyleSheet.create({
|
|
141
|
+
loadingContainer: {
|
|
142
|
+
flex: 1,
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
justifyContent: 'center',
|
|
145
|
+
},
|
|
146
|
+
iframe: {
|
|
147
|
+
width: '100%',
|
|
148
|
+
height: '100%',
|
|
149
|
+
borderWidth: 0,
|
|
150
|
+
},
|
|
151
|
+
noScroll: {
|
|
152
|
+
overflow: 'hidden',
|
|
153
|
+
},
|
|
154
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<body>
|
|
3
|
+
<div id="content" style="display: none;"></div>
|
|
4
|
+
</body>
|
|
5
|
+
<script>
|
|
6
|
+
const source = new URLSearchParams(window.location.search);
|
|
7
|
+
|
|
8
|
+
let html = `<form method="POST" action="${source.get('uri')}">`;
|
|
9
|
+
|
|
10
|
+
const params = JSON.parse(source.get('body'));
|
|
11
|
+
|
|
12
|
+
Object.entries(params).forEach(([name, value]) => (html += `<input name="${name}" value="${value}" />`));
|
|
13
|
+
|
|
14
|
+
html += "<input id='submit' type='submit' />" + '</form>';
|
|
15
|
+
|
|
16
|
+
const div = document.createElement('div');
|
|
17
|
+
div.innerHTML = html;
|
|
18
|
+
document.getElementById('content').appendChild(div);
|
|
19
|
+
document.getElementById('submit').click();
|
|
20
|
+
</script>
|
|
21
|
+
</html>
|