@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,58 @@
|
|
|
1
|
+
import SimpleSelect from "$ecomponents/SimpleSelect";
|
|
2
|
+
import {flatMode} from "$ecomponents/TextField";
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
|
+
import React from "$react";
|
|
5
|
+
import {defaultObj} from "$utils";
|
|
6
|
+
|
|
7
|
+
const InlineIndicatorSelectComponent = React.forwardRef((props,ref)=>{
|
|
8
|
+
let {inputProps,style,...rest} = props;
|
|
9
|
+
rest = defaultObj(rest);
|
|
10
|
+
inputProps = Object.assign({},inputProps);
|
|
11
|
+
inputProps.style = [styles.inputProps,inputProps.style];
|
|
12
|
+
inputProps.containerProps = Object.assign({},inputProps.containerProps);
|
|
13
|
+
inputProps.contentContainerProps = Object.assign({},inputProps.contentContainerProps);
|
|
14
|
+
inputProps.contentContainerProps.style = [inputProps.contentContainerProps.style,styles.contentContainer];
|
|
15
|
+
inputProps.outlined = false;
|
|
16
|
+
inputProps.containerProps.style = [styles.inputContainer,inputProps.containerProps.style]
|
|
17
|
+
inputProps.enableCopy = typeof inputProps.enableCopy =='boolean'? inputProps.enableCopy : false;
|
|
18
|
+
return <SimpleSelect
|
|
19
|
+
mode = {flatMode}
|
|
20
|
+
underlineColor = {"transparent"}
|
|
21
|
+
label = {""}
|
|
22
|
+
showSearch = {false}
|
|
23
|
+
{...rest}
|
|
24
|
+
ref = {ref}
|
|
25
|
+
inputProps = {inputProps}
|
|
26
|
+
style = {[style]}
|
|
27
|
+
/>
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
InlineIndicatorSelectComponent.propTypes = {
|
|
31
|
+
...SimpleSelect.propTypes
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
InlineIndicatorSelectComponent.displayName = "InlineIndicatorSelectComponent";
|
|
35
|
+
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
inputProps : {
|
|
38
|
+
maxWidth : 80,
|
|
39
|
+
alignSelf : "flex-end",
|
|
40
|
+
justifyContent : 'flex-end',
|
|
41
|
+
backgroundColor : "transparent",
|
|
42
|
+
},
|
|
43
|
+
inputContainer : {
|
|
44
|
+
paddingVertical : 0,
|
|
45
|
+
marginVertical : 0,
|
|
46
|
+
backgroundColor : 'transparent',
|
|
47
|
+
},
|
|
48
|
+
contentContainer : {
|
|
49
|
+
backgroundColor : 'transparent',
|
|
50
|
+
},
|
|
51
|
+
right : {
|
|
52
|
+
alignSelf : 'flex-end',
|
|
53
|
+
justifyContent : 'flex-end',
|
|
54
|
+
alignItems : 'flex-end'
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
export default InlineIndicatorSelectComponent;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import Select from "./Select";
|
|
2
|
+
import LabelComponent from "$ecomponents/Label";
|
|
3
|
+
import React from "$react";
|
|
4
|
+
import {defaultObj,defaultVal} from "$utils";
|
|
5
|
+
import {isMobileMedia} from "$cplatform/dimensions";
|
|
6
|
+
import TextFieldComponent from "$ecomponents/TextField";
|
|
7
|
+
import { StyleSheet } from "react-native";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export {Select};
|
|
11
|
+
|
|
12
|
+
export const PriceType = React.forwardRef((props,ref)=>{
|
|
13
|
+
let {dialogProps,inputProps,defaultValue,...rest} = props;
|
|
14
|
+
dialogProps = Object.assign({},dialogProps);
|
|
15
|
+
dialogProps.title = defaultVal(dialogProps.title,"Type de prix : HT/TTC")
|
|
16
|
+
inputProps = Object.assign({},inputProps);
|
|
17
|
+
const isMob = isMobileMedia();
|
|
18
|
+
inputProps.style = [styles.priceType,inputProps.style];
|
|
19
|
+
rest = defaultObj(rest);
|
|
20
|
+
return <Select
|
|
21
|
+
withCheckedIcon = {isMob}
|
|
22
|
+
{...rest}
|
|
23
|
+
inputProps = {inputProps}
|
|
24
|
+
compare = {(a,b)=>a && b && a.toLowerCase() === b.toLowerCase()}
|
|
25
|
+
dialogProps = {dialogProps}
|
|
26
|
+
defaultValue = {defaultVal(defaultValue,PriceType.defaultValue)}
|
|
27
|
+
ref = {ref}
|
|
28
|
+
/>
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
PriceType.defaultValue = "ttc";
|
|
32
|
+
|
|
33
|
+
PriceType.displayName = "PriceTypeComponent";
|
|
34
|
+
|
|
35
|
+
PriceType.propTypes = {
|
|
36
|
+
...Select.propTypes
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const MetricUnit = React.forwardRef((props,ref)=>{
|
|
40
|
+
let {dialogProps,inputProps,...rest} = props;
|
|
41
|
+
dialogProps = Object.assign({},dialogProps);
|
|
42
|
+
dialogProps.title = defaultVal(dialogProps.title,"Unité de mésure")
|
|
43
|
+
inputProps = Object.assign({},inputProps);
|
|
44
|
+
const isMob = isMobileMedia();
|
|
45
|
+
inputProps.style = [styles.metricUnit,inputProps.style];
|
|
46
|
+
rest = defaultObj(rest);
|
|
47
|
+
return <Select
|
|
48
|
+
items = {PRODUCTS_CONSTANTS.METRICS_UNITS}
|
|
49
|
+
withCheckedIcon = {isMob}
|
|
50
|
+
{...rest}
|
|
51
|
+
inputProps = {inputProps}
|
|
52
|
+
dialogProps = {dialogProps}
|
|
53
|
+
ref = {ref}
|
|
54
|
+
/>
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
MetricUnit.defaultValue = "m";
|
|
58
|
+
|
|
59
|
+
MetricUnit.displayName = "MetricUnitInlineIndicatorComponent";
|
|
60
|
+
|
|
61
|
+
export const WeightUnit = React.forwardRef((props,ref)=>{
|
|
62
|
+
let {dialogProps,inputProps,...rest} = props;
|
|
63
|
+
dialogProps = Object.assign({},dialogProps);
|
|
64
|
+
dialogProps.title = defaultVal(dialogProps.title,"Unité de poids")
|
|
65
|
+
inputProps = Object.assign({},inputProps);
|
|
66
|
+
const isMob = isMobileMedia();
|
|
67
|
+
inputProps.style = [styles.weightUnit,inputProps.style];
|
|
68
|
+
rest = defaultObj(rest);
|
|
69
|
+
return <Select
|
|
70
|
+
items = {PRODUCTS_CONSTANTS.WEIGHTS_UNITS}
|
|
71
|
+
renderItem = {({item,index})=>index}
|
|
72
|
+
withCheckedIcon = {isMob}
|
|
73
|
+
{...rest}
|
|
74
|
+
inputProps = {inputProps}
|
|
75
|
+
dialogProps = {dialogProps}
|
|
76
|
+
ref = {ref}
|
|
77
|
+
/>
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
WeightUnit.defaultValue = "kg";
|
|
81
|
+
|
|
82
|
+
export const TextInput = React.forwardRef((props,ref)=>{
|
|
83
|
+
let {containerProps,contentContainerProps,...rest} = props;
|
|
84
|
+
containerProps = Object.assign({},containerProps);
|
|
85
|
+
contentContainerProps = Object.assign({},contentContainerProps);
|
|
86
|
+
containerProps.style = [styles.container,containerProps.style]
|
|
87
|
+
contentContainerProps.style = [styles.container,contentContainerProps.style];
|
|
88
|
+
return <TextFieldComponent
|
|
89
|
+
outlined = {false}
|
|
90
|
+
label = ""
|
|
91
|
+
{...rest}
|
|
92
|
+
containerProps = {containerProps}
|
|
93
|
+
contentContainerProps = {contentContainerProps}
|
|
94
|
+
ref = {ref}
|
|
95
|
+
/>
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
export const TextField = TextInput;
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
WeightUnit.displayName = "WeightUnitInlineIndicatorComponent";
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
export const Text = React.forwardRef((props,ref)=>{
|
|
107
|
+
const [state,setState] = React.useStateIfMounted({
|
|
108
|
+
children : props.children,
|
|
109
|
+
});
|
|
110
|
+
const context = {
|
|
111
|
+
update : (props)=>{
|
|
112
|
+
if(React.isValidElement(props,true)){
|
|
113
|
+
return setState({...state,children:props})
|
|
114
|
+
} else if(isObj(props)){
|
|
115
|
+
return setState({...state,...props})
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
React.useEffect(()=>{
|
|
120
|
+
setState({...state,children:props.children})
|
|
121
|
+
},[props.children]);
|
|
122
|
+
React.setRef(ref,context);
|
|
123
|
+
React.useEffect(()=>{
|
|
124
|
+
return ()=>{
|
|
125
|
+
React.setRef(ref,null);
|
|
126
|
+
}
|
|
127
|
+
},[]);
|
|
128
|
+
return <LabelComponent {...props} {...state} style={[styles.text,props.style,state.style]}/>
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
export const Label = Text;
|
|
132
|
+
|
|
133
|
+
Text.propTypes = LabelComponent.propTypes;
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
const styles = StyleSheet.create({
|
|
137
|
+
container : {
|
|
138
|
+
paddingVertical : 0,
|
|
139
|
+
flex : 1,
|
|
140
|
+
backgroundColor : 'transparent',
|
|
141
|
+
},
|
|
142
|
+
metricUnit : {
|
|
143
|
+
width : 30,
|
|
144
|
+
textAlign : 'right'
|
|
145
|
+
},
|
|
146
|
+
priceType : {
|
|
147
|
+
width:32
|
|
148
|
+
},
|
|
149
|
+
weightUnit : {
|
|
150
|
+
width : 30,
|
|
151
|
+
textAlign : 'right',
|
|
152
|
+
},
|
|
153
|
+
text : {
|
|
154
|
+
paddingHorizontal : 10,
|
|
155
|
+
}
|
|
156
|
+
})
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import {defaultVal,defaultStr,defaultBool,isDecimal,isObj,defaultObj,isNonNullString} from "$utils";
|
|
3
|
+
import View from "$ecomponents/View";
|
|
4
|
+
import {Text} from "react-native-paper";
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
import theme,{Colors,DISABLED_OPACITY,ALPHA,styles} from "$theme";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import {canTextBeSelectable} from "$cplatform/utils";
|
|
9
|
+
const defaultSelectable = canTextBeSelectable();
|
|
10
|
+
|
|
11
|
+
export const EllipsizeMode = {'head':'head','middle':'middle', 'tail':'tail' , 'clip':'clip'}
|
|
12
|
+
|
|
13
|
+
const LabelComponent = React.forwardRef(({ children,upperCase,testID,wrap,nativeID,wrapText,error,underlined,splitText,secondary,primary,bold,textBold,disabled,text,style,...rest},ref)=> {
|
|
14
|
+
children = defaultVal(children,text);
|
|
15
|
+
let isText = false;
|
|
16
|
+
if(!React.isValidElement(children) && Array.isArray(children) && children.length){
|
|
17
|
+
for(let i in children){
|
|
18
|
+
if(typeof children[i] =='string' || typeof children =='number'){
|
|
19
|
+
isText = true;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
wrap = typeof wrap ==='boolean'? wrap : typeof wrapText ==='boolean' ? wrapText : false;
|
|
25
|
+
|
|
26
|
+
if(!children || typeof children =='number'){
|
|
27
|
+
children = isDecimal(children)? children+"" : isDecimal(text)? text+"" : undefined;
|
|
28
|
+
}
|
|
29
|
+
if(!children) return null;
|
|
30
|
+
rest = defaultObj(rest);
|
|
31
|
+
const r1 = {},r2={};
|
|
32
|
+
bold = defaultBool(bold,textBold,false);
|
|
33
|
+
r2.color = Colors.setAlpha(theme.colors.text,theme.ALPHA);
|
|
34
|
+
if(disabled){
|
|
35
|
+
r1.opacity = DISABLED_OPACITY;
|
|
36
|
+
}
|
|
37
|
+
if(underlined){
|
|
38
|
+
r1.textDecorationLine = 'underline';
|
|
39
|
+
}
|
|
40
|
+
style = Object.assign({},StyleSheet.flatten(style));
|
|
41
|
+
testID = defaultStr(testID,"RN_LabelComponent");
|
|
42
|
+
const restProps = {nativeID};
|
|
43
|
+
if(splitText){
|
|
44
|
+
restProps.numberOfLines = defaultNumber(restProps.numberOfLines,1);
|
|
45
|
+
restProps.ellipsizeMode = defaultStr(restProps.ellipsizeMode,'tail');
|
|
46
|
+
if(restProps.numberOfLines > 1 && typeof wrap !=='boolean'){
|
|
47
|
+
wrap = true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if(wrap){
|
|
51
|
+
r1.flexWrap = "wrap";
|
|
52
|
+
}
|
|
53
|
+
if(isNonNullString(children) || isText || typeof children ==='number'){
|
|
54
|
+
if(!isText){
|
|
55
|
+
children +="";
|
|
56
|
+
if(upperCase){
|
|
57
|
+
children = children.toUpperCase();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return (<Text allowFontScaling = {true} ref = {ref} selectable={defaultSelectable} {...rest} {...restProps} testID={testID} disabled={disabled} style={[styles.label,splitText?styles.wrap:null,splitText?styles.w100:null,bold?styles.bold:null,r2,style,r1,styles.webFontFamilly]}>{children}</Text>)
|
|
61
|
+
}
|
|
62
|
+
let hasP = false;
|
|
63
|
+
if(isObj(rest)){
|
|
64
|
+
for(let i in rest){
|
|
65
|
+
if(rest[i]!== undefined) {
|
|
66
|
+
hasP = true;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if(children == undefined){
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
if(React.isValidElement(children)){
|
|
75
|
+
if(!hasP) {
|
|
76
|
+
if(nativeID || ref){
|
|
77
|
+
return <View ref = {ref} testID = {testID} nativeID={nativeID}>{children}</View>
|
|
78
|
+
}
|
|
79
|
+
return <>{children}</>
|
|
80
|
+
}
|
|
81
|
+
return <View ref = {ref} selectable={defaultSelectable} {...rest} {...restProps} testID = {testID} style={[bold?styles.bold:null,r2,style,r1]} disabled={disabled} pointerEvents={disabled?'none':'auto'}>{children}</View>
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
})
|
|
85
|
+
LabelComponent.displayName = 'LabelComponent';
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
const LabelComponentExported = theme.withStyles(LabelComponent);
|
|
89
|
+
|
|
90
|
+
LabelComponentExported.propTypes = {
|
|
91
|
+
children : PropTypes.any,
|
|
92
|
+
upperCase: PropTypes.bool,///si la transformation sera en majuscule
|
|
93
|
+
text : PropTypes.any,
|
|
94
|
+
wrap : PropTypes.bool, //si le texte sera splité vers la ligne suivantes
|
|
95
|
+
wrapText : PropTypes.bool,///alias à wrap
|
|
96
|
+
primary : PropTypes.bool,
|
|
97
|
+
error : PropTypes.bool,///si le label est liée à une text field sur laquelle il y a erreur
|
|
98
|
+
secondary : PropTypes.bool,
|
|
99
|
+
selectable : PropTypes.bool, //si le texte est sélectionnable
|
|
100
|
+
underlined : PropTypes.bool,//si le style underlined sera appliqué au label
|
|
101
|
+
splitText : PropTypes.bool,///si le texte lorsqu'il est long sera splité
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export default LabelComponentExported;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isValidUrl, isNonNullString,uniqid,defaultObj,defaultStr} from "$utils";
|
|
2
|
+
import getCallbackUrl from "./getUrlCallback";
|
|
3
|
+
import { getQueryParams,setQueryParams} from "$utils/uri";
|
|
4
|
+
const BROWSERS_EVENTS = {};
|
|
5
|
+
const callbackURIID = "callbackURIIDDD";
|
|
6
|
+
|
|
7
|
+
const Browser = {
|
|
8
|
+
open : (opts)=>{
|
|
9
|
+
if((isNonNullString(opts) && opts.startsWith("/")) || isValidUrl(opts)){
|
|
10
|
+
opts = {url:opts};
|
|
11
|
+
}
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export default Browser;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultStr } from "$utils";
|
|
2
|
+
import { getCurrentURI,getNativeMobileAppURI } from "$utils/uri";
|
|
3
|
+
export default function getCallbackUrl (url){
|
|
4
|
+
let cUrl = undefined;
|
|
5
|
+
if (typeof window !== 'undefined' && window) {
|
|
6
|
+
cUrl = getCurrentURI();
|
|
7
|
+
} else {}
|
|
8
|
+
url = defaultStr(url,cUrl);
|
|
9
|
+
return getNativeMobileAppURI(url);
|
|
10
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Pressable } from "react-native";
|
|
2
|
+
import { navigate } from "$enavigation/utils";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import {defaultStr} from "$utils";
|
|
5
|
+
import React from "$react";
|
|
6
|
+
const LinkComponent= React.forwardRef((props,ref)=>{
|
|
7
|
+
let {Component,navigation,children,params,stopEventPropagation,source,onPress,routeParams,routeName,routeSource,routeType, ...rest} = props;
|
|
8
|
+
const onRoutePress = (e)=>{
|
|
9
|
+
if(stopEventPropagation !== false){
|
|
10
|
+
React.stopEventPropagation(e);
|
|
11
|
+
}
|
|
12
|
+
if(onPress && onPress(e) === false){
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
navigate({routeName,previousRoute:undefined,routeParams,params,type:routeType,source:defaultStr(routeSource,source)},navigation);
|
|
16
|
+
};
|
|
17
|
+
if(typeof children =='function'){
|
|
18
|
+
return children ({...rest,onPress:onRoutePress},ref);
|
|
19
|
+
}
|
|
20
|
+
Component = React.isComponent(Component)? Component : Pressable;
|
|
21
|
+
return <Component ref={ref} {...rest} onPress = {onRoutePress}>
|
|
22
|
+
{children}
|
|
23
|
+
</Component>
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
LinkComponent.propTypes = {
|
|
27
|
+
stopEventPropagation : PropTypes.bool, //si la propagation d'évènement sera effective une fois qu'on ait cliqué sur le lien
|
|
28
|
+
onPress : PropTypes.func,
|
|
29
|
+
routeName : PropTypes.string.isRequired,
|
|
30
|
+
routeParams : PropTypes.object, //les paramètres à passer à la route
|
|
31
|
+
routeType : PropTypes.string, //le type de route : stack ou drawer
|
|
32
|
+
routeFrom : PropTypes.string, //le type de route source : stack ou drawer
|
|
33
|
+
Component : PropTypes.any
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
LinkComponent.displayName = "LinkComponent";
|
|
37
|
+
|
|
38
|
+
export default LinkComponent;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import CommonListComponent from "./Common";
|
|
2
|
+
import {defaultObj,defaultDecimal} from "$utils";
|
|
3
|
+
import React from "$react";
|
|
4
|
+
import {ActivityIndicator} from "react-native-paper";
|
|
5
|
+
import BigList from "react-native-big-list";
|
|
6
|
+
|
|
7
|
+
const ListComponent = React.forwardRef((props,ref)=>{
|
|
8
|
+
let {getItemLayout,itemHeight,...rest} = props;
|
|
9
|
+
rest = defaultObj(rest);
|
|
10
|
+
if(typeof itemHeight !== 'function'){
|
|
11
|
+
getItemLayout = typeof getItemLayout ==='function'? getItemLayout :
|
|
12
|
+
typeof itemHeight ==='number' && itemHeight ? ({data, index}) =>
|
|
13
|
+
({length: itemHeight, offset: rest.itemHeight * index, index}) : undefined
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return <CommonListComponent
|
|
17
|
+
placeholder
|
|
18
|
+
placeholderComponent = {ActivityIndicator}
|
|
19
|
+
defaultItemHeight = {50}
|
|
20
|
+
{...rest}
|
|
21
|
+
ref = {ref}
|
|
22
|
+
renderScrollViewWrapper = {(children)=>{
|
|
23
|
+
if(typeof renderScrollViewWrapper =="function"){
|
|
24
|
+
return renderScrollViewWrapper({children});
|
|
25
|
+
}
|
|
26
|
+
return children;
|
|
27
|
+
}}
|
|
28
|
+
getItemLayout = {getItemLayout}
|
|
29
|
+
itemHeight = {itemHeight}
|
|
30
|
+
Component = {BigList}
|
|
31
|
+
/>
|
|
32
|
+
})
|
|
33
|
+
ListComponent.prototypes = {
|
|
34
|
+
...defaultObj(BigList.propTypes),
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default ListComponent;
|
|
39
|
+
|
|
40
|
+
ListComponent.propTypes = {
|
|
41
|
+
...CommonListComponent.propTypes
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ListComponent.displayName = "BigListComponent";
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
|
|
2
|
+
import React from "$react";
|
|
3
|
+
import { prepareItems as customPrepareItems,getBToTopRef } from "./utils";
|
|
4
|
+
import {grid,StylePropTypes} from "$theme";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import {defaultObj,defaultDecimal,defaultArray,defaultFunc} from "$utils";
|
|
7
|
+
import {isMobileMedia} from "$cplatform/dimensions";
|
|
8
|
+
import BackToTop from "$ecomponents/BackToTop";
|
|
9
|
+
import {FlatList,StyleSheet,View} from "react-native";
|
|
10
|
+
import Label from "$ecomponents/Label";
|
|
11
|
+
import { useWindowDimensions,Dimensions } from "react-native";
|
|
12
|
+
|
|
13
|
+
const CommonListComponent = React.forwardRef((props,ref)=>{
|
|
14
|
+
let {responsive,defaultItemHeight,itemHeight,windowWidth,componentProps,columnWrapperStyle,onViewableItemsChanged,withFlatListItem,Component,withBackToTop,backToTopRef:customBackToTopRef,withBackToTopButton,onScroll,onScrollEnd,onMount,onUnmount,renderScrollViewWrapper,prepareItems,getItemKey,getKey,keyExtractor,items,filter,renderItem,numColumns,containerProps,bindResizeEvents,...rest} = props;
|
|
15
|
+
withBackToTopButton = withBackToTop === true || withBackToTopButton == true || isMobileMedia()? true : false;
|
|
16
|
+
rest = defaultObj(rest);
|
|
17
|
+
containerProps = defaultObj(containerProps);
|
|
18
|
+
responsive = defaultBool(responsive,false);
|
|
19
|
+
const dimensions = responsive ? useWindowDimensions() : Dimensions.get("window");
|
|
20
|
+
if(responsive){
|
|
21
|
+
numColumns = grid.numColumns(windowWidth);
|
|
22
|
+
} else {
|
|
23
|
+
numColumns = defaultDecimal(numColumns,1);
|
|
24
|
+
}
|
|
25
|
+
const itemWindowWidth = dimensions.width/numColumns;
|
|
26
|
+
let scrollEndTimeout = React.useRef(null);
|
|
27
|
+
const listRef = React.useRef(null);
|
|
28
|
+
const hasCustomBackToTop = typeof customBackToTopRef == 'function'? true : false;
|
|
29
|
+
const backToTopRef = React.useRef(null);
|
|
30
|
+
const isFlatList = Component === FlatList;
|
|
31
|
+
|
|
32
|
+
const context = {
|
|
33
|
+
itemsRefs : [],
|
|
34
|
+
prepareItems : defaultFunc((prepareItems === false ? (items)=> items:null),prepareItems,customPrepareItems),
|
|
35
|
+
getKey : typeof keyExtractor =='function'? keyExtractor : typeof getItemKey =='function'? getItemKey : typeof getKey =='function'? getKey : undefined,
|
|
36
|
+
addItemsRefs : function(ref, itemRef){
|
|
37
|
+
context.itemsRefs[itemRef.index] = {
|
|
38
|
+
ref,
|
|
39
|
+
item: itemRef.item,
|
|
40
|
+
index: itemRef.index,
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
renderItem : function({item,index,section,...rest}){
|
|
44
|
+
rest = rest ? rest : {};
|
|
45
|
+
let ret = renderItem({item,numColumns,index,section,numColumns,itemContainerWidth:itemWindowWidth,itemWindowWidth,...rest,isScrolling:listRef.current?.isScrolling?true:false,items:defaultArray(context.items)});
|
|
46
|
+
if(typeof ret =='string' || typeof ret =='number'){
|
|
47
|
+
return <Label children = {ret}/>
|
|
48
|
+
}
|
|
49
|
+
return (React.isValidElement(ret)) ? ret : null;
|
|
50
|
+
},
|
|
51
|
+
/*** @params : {animated?: ?boolean,index: number,viewOffset?: number,viewPosition?: number,} */
|
|
52
|
+
scrollToIndex : function(params) {
|
|
53
|
+
if (listRef.current && typeof listRef.current.scrollToIndex =='function') {
|
|
54
|
+
listRef.current.scrollToIndex(params);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
scrollToTop : function(params){
|
|
58
|
+
return context.scrollToIndex({animated:true,...defaultObj(params),index:0});
|
|
59
|
+
},
|
|
60
|
+
/** params?: ?{animated?: ?boolean} */
|
|
61
|
+
scrollToEnd : function(params) {
|
|
62
|
+
if (listRef.current && listRef.current.scrollToEnd) {
|
|
63
|
+
listRef.current.scrollToEnd(params);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
/*** @params : {animated?: ?boolean,item: ItemT,viewPosition?: number} */
|
|
67
|
+
scrollToItem : function(params) {
|
|
68
|
+
if (listRef.current) {
|
|
69
|
+
listRef.current.scrollToItem(params);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
/*** @params : {animated?: ?boolean, offset: number} */
|
|
73
|
+
scrollToOffset : function(params) {
|
|
74
|
+
if (listRef.current) {
|
|
75
|
+
listRef.current.scrollToOffset(params);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
handleOnScroll : (event)=>{
|
|
79
|
+
if(customBackToTopRef === false) {
|
|
80
|
+
if(onScroll){
|
|
81
|
+
onScroll(event);
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const bToTopRef = getBToTopRef(hasCustomBackToTop ? customBackToTopRef() : backToTopRef);
|
|
86
|
+
if (withBackToTopButton && bToTopRef) {
|
|
87
|
+
bToTopRef.toggleVisibility(event);
|
|
88
|
+
}
|
|
89
|
+
if(listRef.current){
|
|
90
|
+
listRef.current.isScrolling = true;
|
|
91
|
+
context.isScrolling = true;
|
|
92
|
+
}
|
|
93
|
+
clearTimeout(scrollEndTimeout.current);
|
|
94
|
+
scrollEndTimeout.current = setTimeout(()=>{
|
|
95
|
+
if(listRef.current){
|
|
96
|
+
listRef.current.isScrolling = false;
|
|
97
|
+
context.isScrolling = false;
|
|
98
|
+
}
|
|
99
|
+
clearTimeout(scrollEndTimeout.current);
|
|
100
|
+
if(onScrollEnd){
|
|
101
|
+
onScrollEnd(event);
|
|
102
|
+
}
|
|
103
|
+
},1000);
|
|
104
|
+
if(onScroll){
|
|
105
|
+
onScroll(event);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
onScroll : function(event){
|
|
109
|
+
context.handleOnScroll(event);
|
|
110
|
+
},
|
|
111
|
+
keyExtractor : function(item,index){
|
|
112
|
+
if(context.getKey){
|
|
113
|
+
return context.getKey(item,index);
|
|
114
|
+
}
|
|
115
|
+
return React.key(item,index);
|
|
116
|
+
},
|
|
117
|
+
itemHeight : typeof itemHeight =='number' && itemHeight ? itemHeight : function(section,index){
|
|
118
|
+
if(typeof index ==='undefined') return 0;
|
|
119
|
+
if(!Array.isArray(context.items)){
|
|
120
|
+
context.items = [];
|
|
121
|
+
}
|
|
122
|
+
if(typeof itemHeight ==='function'){
|
|
123
|
+
return itemHeight({section,numColumns,itemContainerWidth:itemWindowWidth,itemWindowWidth,index,context,item:context.items[index],items:context.items});
|
|
124
|
+
}
|
|
125
|
+
return defaultItemHeight
|
|
126
|
+
},
|
|
127
|
+
onBackActionPress : !hasCustomBackToTop ? function(){
|
|
128
|
+
return context?.scrollToTop()
|
|
129
|
+
}: undefined,
|
|
130
|
+
};
|
|
131
|
+
const contextRef = React.useRef({}).current;
|
|
132
|
+
contextRef.prevItems = React.usePrevious(items);
|
|
133
|
+
const getItems = React.useCallback(()=>{
|
|
134
|
+
if(items === contextRef.prevItems && contextRef.items) {
|
|
135
|
+
return contextRef.items;
|
|
136
|
+
}
|
|
137
|
+
return context.prepareItems(items,filter);
|
|
138
|
+
},[items]);
|
|
139
|
+
context.listRef = listRef.current;
|
|
140
|
+
context.items = contextRef.items = prepareItems === false ? items : getItems();
|
|
141
|
+
if(!Array.isArray(context.items)){
|
|
142
|
+
console.error(context.items," is not valid list data array",props);
|
|
143
|
+
context.items = [];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
React.setRef(ref,context);
|
|
147
|
+
React.useEffect(()=>{
|
|
148
|
+
React.setRef(ref,context);
|
|
149
|
+
if(typeof onMount =='function'){
|
|
150
|
+
onMount(context);
|
|
151
|
+
}
|
|
152
|
+
return ()=>{
|
|
153
|
+
React.setRef(ref,null);
|
|
154
|
+
if(typeof onUnmount ==='function'){
|
|
155
|
+
onUnmount();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},[]);
|
|
159
|
+
const restP = numColumns > 1 && isFlatList ? {
|
|
160
|
+
columnWrapperStyle : [styles.columnWrapperStyle,props.columnWrapperStyle]
|
|
161
|
+
} : {};
|
|
162
|
+
return <View {...containerProps} style={[styles.container,containerProps.style]}>
|
|
163
|
+
<Component
|
|
164
|
+
onEndReachedThreshold={0}
|
|
165
|
+
scrollEventThrottle={16}
|
|
166
|
+
{...rest}
|
|
167
|
+
{...restP}
|
|
168
|
+
ref = {listRef}
|
|
169
|
+
onScroll={context.onScroll}
|
|
170
|
+
data = {context.items}
|
|
171
|
+
//key = {isFlatList ? 'common-list-'+numColumns:"normal-list"}
|
|
172
|
+
numColumns={numColumns}
|
|
173
|
+
keyExtractor = {context.keyExtractor}
|
|
174
|
+
renderItem = {context.renderItem}
|
|
175
|
+
itemHeight = {itemHeight === false ? undefined : context.itemHeight}
|
|
176
|
+
onViewableItemsChanged={onViewableItemsChanged}
|
|
177
|
+
{...defaultObj(componentProps)}
|
|
178
|
+
/>
|
|
179
|
+
{!hasCustomBackToTop && customBackToTopRef !== false ? <BackToTop ref={backToTopRef} onPress={context.onBackActionPress} /> : null}
|
|
180
|
+
</View>
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
CommonListComponent.propTypes = {
|
|
185
|
+
onViewableItemsChanged : PropTypes.func,
|
|
186
|
+
...defaultObj(FlatList.propTypes),
|
|
187
|
+
defaultItemHeight : PropTypes.number,///la valeur de la hauteur des items par défaut
|
|
188
|
+
backToTopRef : PropTypes.oneOfType([
|
|
189
|
+
PropTypes.func,
|
|
190
|
+
PropTypes.bool,
|
|
191
|
+
]),
|
|
192
|
+
Component : PropTypes.oneOfType([
|
|
193
|
+
PropTypes.element,
|
|
194
|
+
PropTypes.node,
|
|
195
|
+
PropTypes.elementType
|
|
196
|
+
]),
|
|
197
|
+
withBackToTopButton : PropTypes.bool,
|
|
198
|
+
withBackToTop : PropTypes.bool,
|
|
199
|
+
onScroll : PropTypes.func,
|
|
200
|
+
onScrollEnd : PropTypes.func,
|
|
201
|
+
/**** les props de la scrollView, qui wrapp le composant ScrollView dans le rendu BigList */
|
|
202
|
+
contentContainerStyle: StylePropTypes,
|
|
203
|
+
prepareItems : PropTypes.oneOfType([
|
|
204
|
+
PropTypes.bool,///si la fonction permettant de faire un travail préparaoire des données de la liste sera appelée
|
|
205
|
+
PropTypes.func,
|
|
206
|
+
]),
|
|
207
|
+
items : PropTypes.oneOfType([
|
|
208
|
+
PropTypes.array,
|
|
209
|
+
PropTypes.object,
|
|
210
|
+
]),
|
|
211
|
+
responsive : PropTypes.bool,//si le nombre de columns de la big list sera déterminées dynamiquement
|
|
212
|
+
//si la liste prendra en compte le redimessionnement de la page, ce qui poussera à mettre à jour le nombre de colonnes lorsque la liste est rédimensionnée
|
|
213
|
+
bindResizeEvents : PropTypes.bool,
|
|
214
|
+
renderItem : PropTypes.func,
|
|
215
|
+
containerProps : PropTypes.object,///les props du container à la big list
|
|
216
|
+
filter : PropTypes.func, //la fonction utilisée pour le filtre des éléments à rendre pour la liste
|
|
217
|
+
onMount : PropTypes.func,
|
|
218
|
+
onUnmount : PropTypes.func,
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
const styles = StyleSheet.create({
|
|
223
|
+
container: {
|
|
224
|
+
flex: 1,
|
|
225
|
+
minHeight : 300,
|
|
226
|
+
},
|
|
227
|
+
columnWrapperStyle : {
|
|
228
|
+
flex : 1,
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
export default CommonListComponent;
|
|
232
|
+
|
|
233
|
+
CommonListComponent.displayName = "CommonListComponent";
|