@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,719 @@
|
|
|
1
|
+
import DatagridAccordionRow from "./Row";
|
|
2
|
+
const INFINITE_SCROLL_PAGE_SIZE = 10;
|
|
3
|
+
import DatagridActions from "../Actions";
|
|
4
|
+
import View from "$ecomponents/View";
|
|
5
|
+
//let ExportTable = require("$export-table")
|
|
6
|
+
import {StyleSheet,ScrollView,Dimensions} from "react-native";
|
|
7
|
+
import Divider from "$ecomponents/Divider";
|
|
8
|
+
import Paragraph from "$ecomponents/Paragraph";
|
|
9
|
+
import Label,{EllipsizeMode} from "$ecomponents/Label";
|
|
10
|
+
import Menu from "$ecomponents/BottomSheet/Menu";
|
|
11
|
+
import BottomSheet from "$ecomponents/BottomSheet/Provider";
|
|
12
|
+
import {isMobileMedia} from "$cplatform/dimensions";
|
|
13
|
+
import {isNativeMobile} from "$cplatform";
|
|
14
|
+
import Icon,{MENU_ICON} from "$ecomponents/Icon";
|
|
15
|
+
import SimpleSelect from "$ecomponents/SimpleSelect";
|
|
16
|
+
import Dropdown from "$ecomponents/Dropdown";
|
|
17
|
+
import React from "$react";
|
|
18
|
+
import Footer from "../Footer/Footer";
|
|
19
|
+
import CommonDatagrid from "../Common";
|
|
20
|
+
import CommonTableDatagrid from "../Common/TableData";
|
|
21
|
+
import BackToTop from "$ecomponents/BackToTop";
|
|
22
|
+
import FiltersAccordionComponent from "./Filters";
|
|
23
|
+
import RenderType from "../RenderType";
|
|
24
|
+
import { flatMode,HEIGHT} from "$ecomponents/TextField";
|
|
25
|
+
import List,{FlatList,FlashList} from "$ecomponents/List";
|
|
26
|
+
import theme,{Colors} from "$theme";
|
|
27
|
+
import {getRowStyle,styles as rStyles} from "../utils";
|
|
28
|
+
import Avatar from "$ecomponents/Avatar";
|
|
29
|
+
import {defaultObj,isOb,isNonNullString} from "$utils";
|
|
30
|
+
import PropTypes from "prop-types";
|
|
31
|
+
import ActivityIndicator from "$ecomponents/ActivityIndicator";
|
|
32
|
+
|
|
33
|
+
const DatagridFactory = (Factory)=>{
|
|
34
|
+
Factory = Factory || CommonDatagrid;
|
|
35
|
+
const clx = class DGridAccordionRenderingCls extends Factory {
|
|
36
|
+
constructor(props) {
|
|
37
|
+
super(props);
|
|
38
|
+
this.autobind();
|
|
39
|
+
this.frozenItems = 0;
|
|
40
|
+
this.listRef = React.createRef(null);
|
|
41
|
+
this.state.refreshing = false;
|
|
42
|
+
this.state.isReady = !this.bindResizeEvents();
|
|
43
|
+
this.updateLayout = this.updateLayout.bind(this);
|
|
44
|
+
this.backToTopRef = React.createRef(null);
|
|
45
|
+
}
|
|
46
|
+
isDatagrid(){
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
canHandleIndexColumn(){
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
canPaginateData(){
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
isAccordion(){
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
renderRowCell (arg){
|
|
59
|
+
const {columnDef,columnField} = arg;
|
|
60
|
+
if(!columnDef.visible || columnDef.accordion === false || this.isSelectableColumn(columnDef,columnField)) return null;
|
|
61
|
+
let {render,key,style} = super.renderRowCell(arg);
|
|
62
|
+
if(render===null || !React.isValidElement(render)) return null;
|
|
63
|
+
return <Label style={style} key={key}>
|
|
64
|
+
{render}
|
|
65
|
+
</Label>
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
rangeChanged(state){
|
|
69
|
+
if(this.startEndIndexCounterElt && this.startEndIndexCounterElt.update){
|
|
70
|
+
this.startEndIndexCounterElt.update(state);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
isScrolling(){
|
|
75
|
+
if(this.listRef.current && typeof this.listRef.current.isScrolling =='boolean'){
|
|
76
|
+
return this.listRef.current.isScrolling;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
onAllRowsToggle(selected){
|
|
80
|
+
if(!selected){
|
|
81
|
+
this.scrollToIndex(this.getMaxSelectedRows());
|
|
82
|
+
//this.scrollToIndex(0);
|
|
83
|
+
} else {
|
|
84
|
+
this.scrollToIndex(selected?Math.max(this.getMaxSelectedRows()-1,0):0)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
getItemCallArgs({item,index}){
|
|
88
|
+
const rowIndexCount = index+1;
|
|
89
|
+
return {...this.getActionsArgs(),row:item,items:this.state.data,item,rowData:item,index,rowIndex:index,rowCounterIndex:rowIndexCount,rowIndexCount};
|
|
90
|
+
}
|
|
91
|
+
getRenderingItemProps ({item,rowKey,numColumns,index}){
|
|
92
|
+
const rKey = rowKey;
|
|
93
|
+
this.renderingItemsProps = isObj(this.renderingItemsProps)? this.renderingItemsProps : {};
|
|
94
|
+
const wrapperStyle = getRowStyle({row:item,index,numColumns,isAccordion:true,rowIndex:index});
|
|
95
|
+
if(isObj(this.renderingItemsProps) && isObj(this.renderingItemsProps[rKey]) && this.renderingItemsProps[rKey].title){
|
|
96
|
+
const it = this.renderingItemsProps[rKey];
|
|
97
|
+
it.numColumns = numColumns;
|
|
98
|
+
it.wrapperStyle = wrapperStyle;
|
|
99
|
+
return it;
|
|
100
|
+
}
|
|
101
|
+
const callArgs = this.getItemCallArgs({item,index});
|
|
102
|
+
const accordion = this.props.accordion;
|
|
103
|
+
const accordionProps = defaultObj(this.props.accordionProps);
|
|
104
|
+
const testID = "RN_DatagridAccordionRow_"+rKey;
|
|
105
|
+
let renderedContent = isFunction(accordion) ? accordion(callArgs) : isFunction(accordionProps.accordion) ? accordionProps.accordion(callArgs) : isObj(accordion) && accordion ? accordion : isObj(accordionProps.accordion) ? accordionProps.accordion : undefined;;
|
|
106
|
+
let title = null, avatarContent = null,right = null,rightProps={},description = null,rowProps = {},avatarProps = {};
|
|
107
|
+
let descriptionProps = Object.assign({},this.accordionDescriptionProps)
|
|
108
|
+
let color = undefined;
|
|
109
|
+
let titleProps = Object.assign({},this.accordionTitleProps);
|
|
110
|
+
if(React.isValidElement(renderedContent) || isNonNullString(renderedContent)){
|
|
111
|
+
title = renderedContent;
|
|
112
|
+
} else if(isObj(renderedContent)){
|
|
113
|
+
title = renderedContent.title
|
|
114
|
+
if(isObj(renderedContent.titleProps)){
|
|
115
|
+
titleProps = {...titleProps,...renderedContent.titleProps,style:[titleProps.style,renderedContent.titleProps.style]};
|
|
116
|
+
}
|
|
117
|
+
right = renderedContent.right
|
|
118
|
+
rightProps = Object.assign({},renderedContent.rightProps);
|
|
119
|
+
description = defaultVal(renderedContent.description,renderedContent.content);
|
|
120
|
+
avatarContent = renderedContent.avatar;
|
|
121
|
+
avatarProps = Object.assign({},renderedContent.avatarProps);
|
|
122
|
+
color = Colors.isValid(renderedContent.avatarColor)?renderedContent.avatarColor:Colors.isValid(renderedContent.color)? renderedContent.color:undefined;
|
|
123
|
+
if(isObj(renderedContent.descriptionProps)){
|
|
124
|
+
descriptionProps = {...descriptionProps,...renderedContent.descriptionProps,style:[descriptionProps.style,renderedContent.descriptionProps.style]}
|
|
125
|
+
} else if(isObj(renderedContent.contentProps)){
|
|
126
|
+
descriptionProps = {...descriptionProps,...renderedContent.contentProps,style:[descriptionProps.style,renderedContent.contentProps.style]}
|
|
127
|
+
}
|
|
128
|
+
rowProps = defaultObj(renderedContent.rowProps);
|
|
129
|
+
avatarProps.color = color;
|
|
130
|
+
if(isNonNullString(avatarContent)){
|
|
131
|
+
let src = undefined;
|
|
132
|
+
let avatarSuffix = index;
|
|
133
|
+
if(isValidUrl(avatarContent) || isDataURL(avatarContent)){
|
|
134
|
+
avatarSuffix = undefined;
|
|
135
|
+
src = avatarContent;
|
|
136
|
+
avatarContent = undefined;
|
|
137
|
+
}
|
|
138
|
+
avatarContent = <Avatar
|
|
139
|
+
src = {src}
|
|
140
|
+
testID={testID+"_Avatar"}
|
|
141
|
+
color = {color}
|
|
142
|
+
image = {src?true :false}
|
|
143
|
+
suffix = {avatarSuffix}
|
|
144
|
+
>{avatarContent}</Avatar>
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if(typeof description === 'function'){
|
|
148
|
+
description = description(descriptionProps);
|
|
149
|
+
}
|
|
150
|
+
if(typeof description ==='string' || typeof description =='number'){
|
|
151
|
+
description = <Paragraph ellipsizeMode="tail" numberOfLines={2} {...descriptionProps} >{description+""}</Paragraph>
|
|
152
|
+
} else if(!React.isValidElement(description)){
|
|
153
|
+
description = null;
|
|
154
|
+
}
|
|
155
|
+
if(typeof title === 'function'){
|
|
156
|
+
title = title(titleProps);
|
|
157
|
+
}
|
|
158
|
+
if(typeof title =='string' || typeof title =='number'){
|
|
159
|
+
title = <Paragraph testID={testID+"_Title"} ellipsizeMode="tail" numberOfLines={1} {...titleProps}>{title+""}</Paragraph>
|
|
160
|
+
} else if(!React.isValidElement(title)){
|
|
161
|
+
title = null;
|
|
162
|
+
}
|
|
163
|
+
this.renderingItemsProps[rKey] = {
|
|
164
|
+
testID,
|
|
165
|
+
numColumns,
|
|
166
|
+
wrapperStyle,title,right,rightProps,description,avatarContent,rowProps,avatarProps,
|
|
167
|
+
bottomSheetTitlePrefix : defaultStr(renderedContent?.bottomSheetTitlePrefix,accordionProps.bottomSheetTitlePrefix,accordion?.bottomSheetTitlePrefix)
|
|
168
|
+
}
|
|
169
|
+
return this.renderingItemsProps[rKey];
|
|
170
|
+
}
|
|
171
|
+
renderItem(args){
|
|
172
|
+
const {index,numColumns,item,isScrolling:_isScrolling,style,setSize} = args;
|
|
173
|
+
if(!(item) || typeof item !== 'object') return null;
|
|
174
|
+
const rowKey = this.getRowKey(item,index);
|
|
175
|
+
return <DatagridAccordionRow
|
|
176
|
+
item = {item}
|
|
177
|
+
index = {index}
|
|
178
|
+
context = {this}
|
|
179
|
+
rowKey = {rowKey}
|
|
180
|
+
isScrolling = {defaultBool(this.isScrolling(),_isScrolling)}
|
|
181
|
+
selectable = {this.props.selectable}
|
|
182
|
+
isRowSelected = {this.isRowSelected.bind(this)}
|
|
183
|
+
{...defaultObj(this.props.accordionProps)}
|
|
184
|
+
{...this.getRenderingItemProps({item,numColumns,index,rowKey})}
|
|
185
|
+
key = {rowKey}
|
|
186
|
+
ref = {(el)=>{
|
|
187
|
+
if(isObj(this.renderingItemsProps) && isObj(this.renderingItemsProps[rowKey]) ){
|
|
188
|
+
this.renderingItemsProps[rowKey].ref = el;
|
|
189
|
+
}
|
|
190
|
+
}}
|
|
191
|
+
style = {style}
|
|
192
|
+
callArgs = {this.getItemCallArgs({item,index})}
|
|
193
|
+
onRowPress = {this.props.onRowPress}
|
|
194
|
+
onRowLongPress = {this.props.onRowLongPress}
|
|
195
|
+
onToggleExpand = {this.onToggleExpandItem.bind(this)}
|
|
196
|
+
/>
|
|
197
|
+
}
|
|
198
|
+
hasScrollViewParent(){
|
|
199
|
+
return this.props.hasScrollViewParent ? true : false;
|
|
200
|
+
}
|
|
201
|
+
updateLayout(a){
|
|
202
|
+
if(!this.bindResizeEvents()) return;
|
|
203
|
+
return super.updateLayout(a);
|
|
204
|
+
}
|
|
205
|
+
bindResizeEvents(){
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
onResizePage(){
|
|
209
|
+
this.updateLayout();
|
|
210
|
+
}
|
|
211
|
+
getPageSize (){
|
|
212
|
+
return INFINITE_SCROLL_PAGE_SIZE;
|
|
213
|
+
}
|
|
214
|
+
scrollToEnd(){
|
|
215
|
+
if(!this._isMounted()) return;
|
|
216
|
+
if(this.listRef.current && this.listRef.current.scrollToEnd){
|
|
217
|
+
this.listRef.current.scrollToEnd();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
scrollToTop(opts){
|
|
221
|
+
if(!this._isMounted()) return;
|
|
222
|
+
if(this.listRef.current && this.listRef.current.scrollToTop){
|
|
223
|
+
this.listRef.current.scrollToTop(defaultObj(opts));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
scrollToIndex(index){
|
|
227
|
+
if(!this._isMounted()) return;
|
|
228
|
+
index = typeof index =='number'? index : 0;
|
|
229
|
+
if(this.listRef.current && this.listRef.current.scrollToIndex){
|
|
230
|
+
this.listRef.current.scrollToIndex({index});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
getVirtualListContext(){
|
|
234
|
+
if(isObj(this.listRef) && isObj(this.listRef.current)){
|
|
235
|
+
return this.listRef.current;
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
getItem(index){
|
|
240
|
+
if(typeof index !=='number') return null;
|
|
241
|
+
return isObj(this.state.data[index])? this.state.data[index] : null;
|
|
242
|
+
}
|
|
243
|
+
getMaxSelectedRows(){
|
|
244
|
+
return isMobileMedia()? 30 : 50;
|
|
245
|
+
}
|
|
246
|
+
renderFilter(props,headerFilters){
|
|
247
|
+
return headerFilters.push(props);
|
|
248
|
+
}
|
|
249
|
+
showFilters(){
|
|
250
|
+
if(!this._isMounted()) {
|
|
251
|
+
this.isUpdating = false;
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
this.setSessionData({showFilter:true});
|
|
255
|
+
}
|
|
256
|
+
hideFilters (){
|
|
257
|
+
if(!this._isMounted()) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
this.setSessionData({showFilter:false});
|
|
261
|
+
}
|
|
262
|
+
toggleFilterColumnVisibility(field,visible){
|
|
263
|
+
if(!isNonNullString(field)) return;
|
|
264
|
+
let filteredColumns = {...this.state.filteredColumns};
|
|
265
|
+
filteredColumns[field] = visible;
|
|
266
|
+
this.setSessionData("filteredColumns"+this.getSessionNameKey(),filteredColumns);
|
|
267
|
+
}
|
|
268
|
+
/*** affiche les infos de l'item */
|
|
269
|
+
onToggleExpandItem({item,index,rowIndex,rowKey,...rest}){
|
|
270
|
+
if(!isObj(this.bottomSheetContext) || typeof this.bottomSheetContext.open !=='function') return;
|
|
271
|
+
const callArgs = this.getItemCallArgs({item,index})
|
|
272
|
+
return this.bottomSheetContext.open({
|
|
273
|
+
...rest,
|
|
274
|
+
children : <View style={[styles.expandedItemContent]} testID={'RN_DatagridAccordionExpanded'}>
|
|
275
|
+
{Object.mapToArray(this.state.columns,(columnDef,columnField,index)=>{
|
|
276
|
+
callArgs.columnDef = columnDef;
|
|
277
|
+
callArgs.columnField = columnField;
|
|
278
|
+
let ret = this.renderRowCell(callArgs);
|
|
279
|
+
if(isNonNullString(ret)){
|
|
280
|
+
ret = ret.trim();
|
|
281
|
+
}
|
|
282
|
+
if(ret !== null && ret !== ""){
|
|
283
|
+
let text = defaultStr(columnDef.text,columnDef.label,columnField);
|
|
284
|
+
return <React.Fragment key={rowKey+defaultStr(columnField,index)}>
|
|
285
|
+
<View style={styles.expandedItemRowCell}>
|
|
286
|
+
<Label style={[styles.expandedItemRowCellLabel,styles.bold]}>{text.rtrim(":")+" : "}</Label>
|
|
287
|
+
<Label style={[styles.expandedItemRowCellLabel]}>{ret}</Label>
|
|
288
|
+
</View>
|
|
289
|
+
<Divider/>
|
|
290
|
+
</React.Fragment>
|
|
291
|
+
}
|
|
292
|
+
return null;
|
|
293
|
+
})}
|
|
294
|
+
</View>
|
|
295
|
+
})
|
|
296
|
+
}
|
|
297
|
+
render (){
|
|
298
|
+
let {
|
|
299
|
+
filters,
|
|
300
|
+
filter,
|
|
301
|
+
actions,
|
|
302
|
+
sortable,
|
|
303
|
+
exportable,
|
|
304
|
+
filterOrOperator,
|
|
305
|
+
filterAndOperator,
|
|
306
|
+
accordionProps,
|
|
307
|
+
responsive,
|
|
308
|
+
isLoading:customIsLoading,
|
|
309
|
+
cacheHeight,
|
|
310
|
+
toggleFilters,
|
|
311
|
+
dbSelector,
|
|
312
|
+
dbSelectorProps,
|
|
313
|
+
progressBarProps,
|
|
314
|
+
accordion,
|
|
315
|
+
preloaderProps,
|
|
316
|
+
backToTopRef,
|
|
317
|
+
backToTopProps,
|
|
318
|
+
testID,
|
|
319
|
+
renderEmpty,
|
|
320
|
+
} = this.props
|
|
321
|
+
testID = defaultStr(testID,"RN_DatagridAccordion");
|
|
322
|
+
backToTopProps = defaultObj(backToTopProps);
|
|
323
|
+
accordionProps = defaultObj(accordionProps);
|
|
324
|
+
this.renderingItemsProps = {};
|
|
325
|
+
this.cachedItemsHeights = {};
|
|
326
|
+
if(isObj(accordion)){
|
|
327
|
+
accordionProps = {...accordion,...accordionProps};
|
|
328
|
+
}
|
|
329
|
+
backToTopRef = defaultVal(backToTopRef,accordionProps.backToTopRef,true);
|
|
330
|
+
|
|
331
|
+
let descOrContentProps = isObj(accordionProps.descriptionProps)? Object.assign({},accordionProps.descriptionProps) : isObj(accordionProps.contentProps)? Object.assign({},accordionProps.contentProps) : {};
|
|
332
|
+
const descriptionStyle = Object.assign({},StyleSheet.flatten(descOrContentProps.style));
|
|
333
|
+
const descriptionColor = Colors.isValid(descriptionStyle.color) ? descriptionStyle.color : Colors.isValid(descOrContentProps.color)? descOrContentProps.color : Colors.setAlpha(theme.colors.text,theme.ALPHA);
|
|
334
|
+
this.accordionDescriptionProps = {
|
|
335
|
+
ellipsizeMode: EllipsizeMode.tail,
|
|
336
|
+
numberOfLines : 2,
|
|
337
|
+
...descOrContentProps,
|
|
338
|
+
color : descriptionColor,
|
|
339
|
+
style : [styles.description,rStyles.lineHeight,descriptionStyle],
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const titleProps = isObj(accordionProps.titleProps)? Object.assign({},accordionProps.titleProps) : {};
|
|
343
|
+
const titleStyle = Object.assign({},StyleSheet.flatten(titleProps.style));
|
|
344
|
+
const titleColor = Colors.isValid(titleStyle.color)? titleStyle.color : Colors.isValid(titleProps.color)? titleProps.color : Colors.setAlpha(theme.colors.text,0.87);
|
|
345
|
+
this.accordionTitleProps = {
|
|
346
|
+
selectable: true,
|
|
347
|
+
ellipsizeMode: EllipsizeMode.tail,
|
|
348
|
+
numberOfLines : 1,
|
|
349
|
+
...titleProps,
|
|
350
|
+
color: titleColor,
|
|
351
|
+
style : [styles.title,rStyles.lineHeight,titleProps.style]
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
let showDBSelector = false;
|
|
355
|
+
if(dbSelector === true){
|
|
356
|
+
showDBSelector = true;
|
|
357
|
+
}
|
|
358
|
+
dbSelectorProps = defaultObj(dbSelectorProps);
|
|
359
|
+
let title = this.props.title;
|
|
360
|
+
let _dbSelector = undefined;/* showDBSelector ? <div>
|
|
361
|
+
<DBSelector
|
|
362
|
+
{...dbSelectorProps}
|
|
363
|
+
onChange = {this.onChangeDatabases.bind(this)}
|
|
364
|
+
/>
|
|
365
|
+
</div> : null;*/
|
|
366
|
+
if(!title){
|
|
367
|
+
title = _dbSelector;
|
|
368
|
+
_dbSelector = null;
|
|
369
|
+
}
|
|
370
|
+
exportable = defaultBool(exportable,true);
|
|
371
|
+
let exportTableProps = this.getExportableProps();
|
|
372
|
+
|
|
373
|
+
filter = defaultFunc(filter,x=>true);
|
|
374
|
+
filters = defaultVal(filters,true);
|
|
375
|
+
if(toggleFilters === false){
|
|
376
|
+
filters = false;
|
|
377
|
+
}
|
|
378
|
+
let {showFilters,showFooter} = this.state;
|
|
379
|
+
let max = this.getMaxSelectableRows();
|
|
380
|
+
let restItems = [];
|
|
381
|
+
|
|
382
|
+
/*if(max && this.isSelectableMultiple()){
|
|
383
|
+
max = max.formatNumber();
|
|
384
|
+
restItems = [
|
|
385
|
+
{
|
|
386
|
+
text : "Sélectionner "+max,
|
|
387
|
+
icon : "select-all",
|
|
388
|
+
onPress : ()=>{
|
|
389
|
+
this.handleAllRowsToggle(true);
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
text : "Tout désélectionner",
|
|
394
|
+
onPress : ()=>{
|
|
395
|
+
this.handleAllRowsToggle(false);
|
|
396
|
+
},
|
|
397
|
+
icon :"select"
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}*/
|
|
401
|
+
const {y} = this.state.layout;
|
|
402
|
+
const {height:winheight,width:winWidth} = Dimensions.get("window");
|
|
403
|
+
const containerHeight = winheight - y;
|
|
404
|
+
this.renderedListHeight = Math.max(300,containerHeight - (this.hasScrollViewParent() ? 50:0));
|
|
405
|
+
const isLoading = this.isLoading();
|
|
406
|
+
const _progressBar = this.getProgressBar(!this.state.isReady);
|
|
407
|
+
const pointerEvents = isLoading || _progressBar ? "none":"auto";
|
|
408
|
+
|
|
409
|
+
const {
|
|
410
|
+
sortedColumns:sortColumns,
|
|
411
|
+
sortedColumnsLength,
|
|
412
|
+
sortedColumn,
|
|
413
|
+
visibleColumns,
|
|
414
|
+
visibleColumnsNames,
|
|
415
|
+
filteredColumns,
|
|
416
|
+
filters :headerFilters,
|
|
417
|
+
} = this.preparedColumns;
|
|
418
|
+
const hasFooterFields = this.hasFooterFields();
|
|
419
|
+
const datagridHeader = <View testID={testID+"_HeaderContainer"} pointerEvents={pointerEvents} style={[styles.datagridHeader]}>
|
|
420
|
+
<ScrollView testID={testID+"_HeaderScrollView"} horizontal contentContainerStyle={StyleSheet.flatten([styles.contentContainerStyle,styles.minW100])}>
|
|
421
|
+
<View testID={testID+"_HeaderContentCntainer"} style={[styles.table,styles.pullRight]}>
|
|
422
|
+
{dbSelector}
|
|
423
|
+
<View testID={testID+"_HeaderQueryLimit"} style={[styles.paginationItem]}>
|
|
424
|
+
{this.renderQueryLimit(this.state.data.length.formatNumber())}
|
|
425
|
+
</View>
|
|
426
|
+
{sortedColumnsLength ? <View testID={testID+"_HeaderSortedColumns"} style={[styles.sortableItems,styles.paginationItem,{paddingRight:10}]}>
|
|
427
|
+
<Icon
|
|
428
|
+
testID={testID+"_HeaderSortIcon"}
|
|
429
|
+
{...sortedColumn}
|
|
430
|
+
name={defaultVal(sortedColumn.icon,"sort")}
|
|
431
|
+
primary = {!!sortedColumn.field}
|
|
432
|
+
onPress = {sortedColumn.field?(event) =>{React.stopEventPropagation(event);this.sort(sortedColumn.field);}:undefined}
|
|
433
|
+
/>
|
|
434
|
+
<Dropdown
|
|
435
|
+
testID={testID+"_HeaderSortableColumns"}
|
|
436
|
+
withBottomSheet
|
|
437
|
+
dialogProps = {{title:'Trier par le champ'}}
|
|
438
|
+
mode = {flatMode}
|
|
439
|
+
inputProps = {{
|
|
440
|
+
enableCopy : false,
|
|
441
|
+
outlined : false,
|
|
442
|
+
autoHeight : false,
|
|
443
|
+
contentContainerProps : {style : {backgroundColor:'transparent'}},
|
|
444
|
+
containerProps : {
|
|
445
|
+
style : {width : 100,marginLeft:5,paddingVertical:0}
|
|
446
|
+
},
|
|
447
|
+
labelProps : {
|
|
448
|
+
style : {top:0}
|
|
449
|
+
}
|
|
450
|
+
}}
|
|
451
|
+
label = {"Trier par"}
|
|
452
|
+
items = {sortColumns}
|
|
453
|
+
defaultValue = {sortedColumn.field}
|
|
454
|
+
onChange = {({value})=>{
|
|
455
|
+
setTimeout(()=>{
|
|
456
|
+
if(isNonNullString(value)){
|
|
457
|
+
this.sort(value,"asc");
|
|
458
|
+
}
|
|
459
|
+
},100)
|
|
460
|
+
}}
|
|
461
|
+
/>
|
|
462
|
+
</View> : null}
|
|
463
|
+
{filters !== false ? <View>
|
|
464
|
+
<FiltersAccordionComponent
|
|
465
|
+
testID={testID+"_HeaderFilters"}
|
|
466
|
+
isLoading = {isLoading}
|
|
467
|
+
filters = {headerFilters}
|
|
468
|
+
visibleColumns = {visibleColumnsNames}
|
|
469
|
+
orOperator = {filterOrOperator}
|
|
470
|
+
andOperator = {filterAndOperator}
|
|
471
|
+
filteredColumns = {filteredColumns}
|
|
472
|
+
context = {this}
|
|
473
|
+
/>
|
|
474
|
+
</View> : null}
|
|
475
|
+
<View testID={testID+"_HeaderPagination"} style = {styles.paginationItem}>
|
|
476
|
+
<Menu
|
|
477
|
+
testID={testID+"_HeaderMenus"}
|
|
478
|
+
anchor={(props)=>(<Icon {...props} icon={MENU_ICON}/>)}
|
|
479
|
+
items = {[
|
|
480
|
+
{
|
|
481
|
+
text : 'Rafraichir',
|
|
482
|
+
icon : "refresh",
|
|
483
|
+
onPress : this.refresh.bind(this)
|
|
484
|
+
},
|
|
485
|
+
visibleColumns.length ? {
|
|
486
|
+
text : 'colonnes',
|
|
487
|
+
icon : "view-column",
|
|
488
|
+
items : visibleColumns,
|
|
489
|
+
closeOnPress : false,
|
|
490
|
+
} : null,
|
|
491
|
+
hasFooterFields ? {
|
|
492
|
+
onPress : ()=>{showFooter?this.hideFooter():this.showFooter()}
|
|
493
|
+
,icon : showFooter?'view-column':'view-module'
|
|
494
|
+
,text : (showFooter?'Masquer/Ligne des totaux':'Afficher/Ligne des totaux')
|
|
495
|
+
}:null,
|
|
496
|
+
...restItems,
|
|
497
|
+
{
|
|
498
|
+
text : 'Retour en haut',
|
|
499
|
+
icon : "arrow-up-bold",
|
|
500
|
+
onPress : this.scrollToTop.bind(this)
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
text : 'Aller à la dernière ligne',
|
|
504
|
+
icon : "arrow-down-bold",
|
|
505
|
+
onPress : this.scrollToEnd.bind(this)
|
|
506
|
+
},
|
|
507
|
+
]}
|
|
508
|
+
/>
|
|
509
|
+
</View>
|
|
510
|
+
<View>
|
|
511
|
+
<RenderType />
|
|
512
|
+
</View>
|
|
513
|
+
|
|
514
|
+
{/*exportable && exportTableProps.pdf && (exportTableProps.pdf.footer) ? (
|
|
515
|
+
<td width="40px">
|
|
516
|
+
<ExportTable
|
|
517
|
+
{...exportTableProps}
|
|
518
|
+
excel = {false}
|
|
519
|
+
ref = {(el)=>{
|
|
520
|
+
if(el){
|
|
521
|
+
this.exportDataInstance = el;
|
|
522
|
+
}
|
|
523
|
+
}}
|
|
524
|
+
selector = {this.exportableDomId}
|
|
525
|
+
getAllData = {()=>{
|
|
526
|
+
return this.INITIAL_STATE.data;
|
|
527
|
+
}}
|
|
528
|
+
/>
|
|
529
|
+
</td>
|
|
530
|
+
) : null
|
|
531
|
+
*/}
|
|
532
|
+
{/*filters !== false && <td ><LocalFilter title = {this.props.title} fields ={this.state.columns} onChange={this.onLocalFiltersChange.bind(this)}/></td>*/}
|
|
533
|
+
</View>
|
|
534
|
+
</ScrollView>
|
|
535
|
+
</View>
|
|
536
|
+
const hasData = this.state.data.length ? true : false;
|
|
537
|
+
renderEmpty = defaultFunc(accordionProps.renderEmpty,renderEmpty,x=>null)
|
|
538
|
+
return <View testID={testID+"_Container"} pointerEvents={pointerEvents} style={[styles.container]} collapsable={false}>
|
|
539
|
+
{ <View testID={testID+"_ContentContainer"} style={[this.bindResizeEvents()?{height:this.renderedListHeight}:undefined]}>
|
|
540
|
+
<View testID={testID+"_AccordionHeader"} style={[styles.accordionHeader]} ref={this.layoutRef} onLayout={this.updateLayout.bind(this)}>
|
|
541
|
+
<DatagridActions
|
|
542
|
+
testID={testID+"_Actions"}
|
|
543
|
+
pointerEvents = {pointerEvents}
|
|
544
|
+
title = {title}
|
|
545
|
+
context = {this}
|
|
546
|
+
selectedRows = {Object.assign({},this.selectedRows)}
|
|
547
|
+
selectedRowsActions = {this.renderSelectedRowsActions.bind(this)}
|
|
548
|
+
actions = {actions}
|
|
549
|
+
/>
|
|
550
|
+
{datagridHeader}
|
|
551
|
+
{_progressBar}
|
|
552
|
+
{showFooter ? (
|
|
553
|
+
<View testID={testID+"_FooterContainer"} pointerEvents={pointerEvents} style={[{justifyContent:'center'}]}>
|
|
554
|
+
<View testID={testID+"_FooterContentContainer"} style={[styles.footersContainer]}>
|
|
555
|
+
<ScrollView testID={testID+"_FooterScrollView"} horizontal contentContainerStyle={[styles.contentContainerStyle]}>
|
|
556
|
+
<View testID={testID+"_FooterContent"} style={[styles.table]}>
|
|
557
|
+
{Object.mapToArray(this.getFooterValues(),(footer,field)=>{
|
|
558
|
+
return <Footer
|
|
559
|
+
key = {field}
|
|
560
|
+
testID={testID+"_FooterItem_"+field}
|
|
561
|
+
{...footer}
|
|
562
|
+
/>
|
|
563
|
+
})}
|
|
564
|
+
</View>
|
|
565
|
+
</ScrollView>
|
|
566
|
+
</View>
|
|
567
|
+
</View>
|
|
568
|
+
) : null}
|
|
569
|
+
</View>
|
|
570
|
+
{hasData ? <FlashList
|
|
571
|
+
estimatedItemSize = {150}
|
|
572
|
+
prepareItems = {false}
|
|
573
|
+
{...accordionProps}
|
|
574
|
+
testID = {testID}
|
|
575
|
+
extraData = {this.state.refresh}
|
|
576
|
+
contentInset={{ right: 10, top: 10, left: 10, bottom: 10 }}
|
|
577
|
+
itemHeight = {undefined}
|
|
578
|
+
responsive = {defaultBool(responsive,accordionProps.responsive,true)}
|
|
579
|
+
filter = {filter}
|
|
580
|
+
renderItem = {this.renderItem.bind(this)}
|
|
581
|
+
items = {this.state.data}
|
|
582
|
+
isLoading = {isLoading}
|
|
583
|
+
ref = {this.listRef}
|
|
584
|
+
backToTopRef = {backToTopRef?(e)=>{
|
|
585
|
+
return this.backToTopRef.current;
|
|
586
|
+
}:false}
|
|
587
|
+
keyExtractor = {this.getRowKey.bind(this)}
|
|
588
|
+
/> : <View style={styles.hasNotData}>
|
|
589
|
+
{renderEmpty()}
|
|
590
|
+
</View>}
|
|
591
|
+
</View>}
|
|
592
|
+
{backToTopRef ? <BackToTop testID={testID+"_BackToTop"} {...backToTopProps} ref={this.backToTopRef} style={[styles.backToTop,backToTopProps.style]} onPress={this.scrollToTop.bind(this)}/>:null}
|
|
593
|
+
<BottomSheet
|
|
594
|
+
testID = {testID+"_BottomSheet"}
|
|
595
|
+
renderMenuContent = {false}
|
|
596
|
+
ref = {(el)=>{
|
|
597
|
+
this.bottomSheetContext = el;
|
|
598
|
+
}}
|
|
599
|
+
/>
|
|
600
|
+
</View>
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
}
|
|
604
|
+
clx.propTypes = {
|
|
605
|
+
...Factory.propTypes,
|
|
606
|
+
hasScrollViewParent : PropTypes.bool,//si la liste est rendu dans un ScrollView ie a un parent de type scrollView
|
|
607
|
+
}
|
|
608
|
+
return clx;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
const styles = StyleSheet.create({
|
|
612
|
+
datagridHeader : {
|
|
613
|
+
width : '100%',
|
|
614
|
+
justifyContent :'flex-start'
|
|
615
|
+
},
|
|
616
|
+
filter : {
|
|
617
|
+
minWidth : 250,
|
|
618
|
+
},
|
|
619
|
+
backToTop : {
|
|
620
|
+
marginBottom : 0,
|
|
621
|
+
marginLeft:isNativeMobile() ? 10 : 0,
|
|
622
|
+
bottom : 15,
|
|
623
|
+
},
|
|
624
|
+
minW100 : {
|
|
625
|
+
minWidth : '100%'
|
|
626
|
+
},
|
|
627
|
+
contentContainerStyle : {
|
|
628
|
+
alignItems : 'flex-start',
|
|
629
|
+
justifyContent : 'flex-start'
|
|
630
|
+
},
|
|
631
|
+
sortableItems : {
|
|
632
|
+
flexDirection : 'row',
|
|
633
|
+
alignItems : 'center',
|
|
634
|
+
maxHeight : 60
|
|
635
|
+
},
|
|
636
|
+
container : {
|
|
637
|
+
position : 'relative',
|
|
638
|
+
flexDirection :'column',
|
|
639
|
+
justifyContent : 'flex-start',
|
|
640
|
+
width : '100%',
|
|
641
|
+
paddingHorizontal : isNativeMobile()? 5:1,
|
|
642
|
+
},
|
|
643
|
+
accordionHeader : {
|
|
644
|
+
paddingTop : 0,
|
|
645
|
+
justifyContent : 'flex-start',
|
|
646
|
+
width : '100%',
|
|
647
|
+
},
|
|
648
|
+
footersContainer : {
|
|
649
|
+
paddingVertical : 0,
|
|
650
|
+
},
|
|
651
|
+
table : {
|
|
652
|
+
flexDirection:'row',
|
|
653
|
+
alignItems : 'center',
|
|
654
|
+
flex:1,
|
|
655
|
+
paddingHorizontal : 10,
|
|
656
|
+
paddingVertical : 0,
|
|
657
|
+
},
|
|
658
|
+
pullRight : {
|
|
659
|
+
flexDirection : 'row',
|
|
660
|
+
justifyContent : 'flex-end',
|
|
661
|
+
alignItems : 'center',
|
|
662
|
+
flex : 1,
|
|
663
|
+
width : '100%',
|
|
664
|
+
},
|
|
665
|
+
paginationItem : {
|
|
666
|
+
marginHorizontal:0,
|
|
667
|
+
},
|
|
668
|
+
headerMenu : {
|
|
669
|
+
width : 30,
|
|
670
|
+
},
|
|
671
|
+
headerFilters : {
|
|
672
|
+
marginBottom : 5,
|
|
673
|
+
},
|
|
674
|
+
title : {
|
|
675
|
+
margin:0,
|
|
676
|
+
marginRight : 5,
|
|
677
|
+
fontSize:16,
|
|
678
|
+
alignSelf: 'flex-start'
|
|
679
|
+
},
|
|
680
|
+
description: {
|
|
681
|
+
fontSize: 14,
|
|
682
|
+
},
|
|
683
|
+
expandedItemContent : {
|
|
684
|
+
margin : 0,
|
|
685
|
+
paddingBottom : 30,
|
|
686
|
+
},
|
|
687
|
+
expandedItemRowCell : {
|
|
688
|
+
paddingVertical : 7,
|
|
689
|
+
flexDirection : 'row',
|
|
690
|
+
flexWrap : 'wrap',
|
|
691
|
+
justifyContent : 'flex-start',
|
|
692
|
+
alignItems : 'center',
|
|
693
|
+
paddingLeft : 10
|
|
694
|
+
},
|
|
695
|
+
expandedItemRowCellLabel : {
|
|
696
|
+
fontSize : 13,
|
|
697
|
+
},
|
|
698
|
+
bold : {
|
|
699
|
+
fontWeight : 'bold',
|
|
700
|
+
},
|
|
701
|
+
contentContainer : {paddingBottom: 10, paddingTop: 8},
|
|
702
|
+
hasNotData : {
|
|
703
|
+
flexDirection : 'column',
|
|
704
|
+
width : '100%',
|
|
705
|
+
justifyContent : 'center',
|
|
706
|
+
alignItems : 'center'
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
const DatagridAccordionComponent = DatagridFactory();
|
|
712
|
+
|
|
713
|
+
export default DatagridAccordionComponent;
|
|
714
|
+
|
|
715
|
+
DatagridAccordionComponent.displayName ="DatagridAccordionComponent";
|
|
716
|
+
|
|
717
|
+
export const TableData = DatagridFactory(CommonTableDatagrid);
|
|
718
|
+
|
|
719
|
+
TableData.displayName = "DatagridTableDataAccordion";
|