@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,664 @@
|
|
|
1
|
+
require("./datagrid.css");
|
|
2
|
+
let Filter = require("$ecomponents/Filter");
|
|
3
|
+
let DatagridActions = require("$wcomponents/Datagrid/DatagridActions");
|
|
4
|
+
let Tooltip = require("$ecomponents/Tooltip")
|
|
5
|
+
import {FooterItem as Footer} from "./Footer";
|
|
6
|
+
let ExportTable = require("$export-table")
|
|
7
|
+
let RenderType = require("./RenderType");
|
|
8
|
+
let LocalFilter = require("./LocalFilter")
|
|
9
|
+
let DBSelector = require("$database/dataFileManager/dbSelector");
|
|
10
|
+
import {isMobileOrTabletMedia} from "$cplatform/dimensions";
|
|
11
|
+
const {
|
|
12
|
+
Checkbox,
|
|
13
|
+
DataTable,
|
|
14
|
+
TableHeader,
|
|
15
|
+
TableBody,
|
|
16
|
+
TableRow,
|
|
17
|
+
Card,
|
|
18
|
+
TableColumn
|
|
19
|
+
} = require("$ui");
|
|
20
|
+
let DatagridTableRow= require("./renderTable/TableRow")
|
|
21
|
+
let Button= require("$ecomponents/Button")
|
|
22
|
+
let Icon = require("$ecomponents/Icon")
|
|
23
|
+
let {DocumentMenu,CheckboxListItem} = require("$ecomponents/Menu")
|
|
24
|
+
/**** tous les évenèments du datagrid sont définies dans la props events qui represente un objet
|
|
25
|
+
contenant les différents évènements
|
|
26
|
+
qu'ils s'agisse des évènements de ligne, de colonne, ....etc
|
|
27
|
+
*/
|
|
28
|
+
let DGrid = require("$ccomponents/Datagrid")
|
|
29
|
+
class DGridTableRendering extends DGrid {
|
|
30
|
+
constructor(props) {
|
|
31
|
+
super(props);
|
|
32
|
+
APP.extend(this._events,{
|
|
33
|
+
RESIZE_PAGE:this.refreshAfterMount.bind(this),
|
|
34
|
+
scroll : this.positioneScrollbar.bind(this),
|
|
35
|
+
})
|
|
36
|
+
APP.on("RESIZE_PAGE",this._events.RESIZE_PAGE)
|
|
37
|
+
this._pagination = this.initPagination(this.props.pagination);
|
|
38
|
+
window.addEventListener("resize",this._events.scroll)
|
|
39
|
+
}
|
|
40
|
+
onDrawerVisibleChanged(){
|
|
41
|
+
setTimeout(()=>{
|
|
42
|
+
this.positioneScrollbar();
|
|
43
|
+
},400);
|
|
44
|
+
}
|
|
45
|
+
isDatagrid(){
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
onScrollDom(e){
|
|
49
|
+
let pDom = document.getElementById(this.datagridDomId+"-scrollable-content-wrapper")
|
|
50
|
+
let dom = document.getElementById(this.datagridDomId)
|
|
51
|
+
if(isDOMElement(pDom) && isDOMElement(dom)){
|
|
52
|
+
let parent = dom.closest(".datagrid.datagrid-tbl");
|
|
53
|
+
if(isDOMElement(parent)){
|
|
54
|
+
parent.scrollLeft = pDom.scrollLeft;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
componentDidMount(){
|
|
59
|
+
super.componentDidMount();
|
|
60
|
+
}
|
|
61
|
+
positioneScrollbar(){
|
|
62
|
+
let dom = document.getElementById(this.datagridDomId)
|
|
63
|
+
let sDom = document.getElementById(this.datagridDomId+"-scrollable-content")
|
|
64
|
+
let pDom = document.getElementById(this.datagridDomId+"-scrollable-content-wrapper")
|
|
65
|
+
if(isDOMElement(dom) && isDOMElement(sDom) && isDOMElement(pDom)){
|
|
66
|
+
pDom.style.height = sDom.style.height = "0px";
|
|
67
|
+
sDom.style.width = "0px";
|
|
68
|
+
let parent = dom.closest(".datagrid.datagrid-tbl");
|
|
69
|
+
if(isDOMElement(parent)){
|
|
70
|
+
let pW = parent.clientWidth;
|
|
71
|
+
let sW = parent.scrollWidth;
|
|
72
|
+
if(parent.hasScrollbar('horizontal') && isDecimal(sW) && isDecimal(pW)){
|
|
73
|
+
sDom.style.width= sW+"px";
|
|
74
|
+
pDom.style.width = pW+"px";
|
|
75
|
+
pDom.style.height = sDom.style.height = "9px";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
componentDidUpdate(){
|
|
81
|
+
super.componentDidUpdate();
|
|
82
|
+
this.__canR = false;
|
|
83
|
+
APP.resizePage();
|
|
84
|
+
if(this.exportDataInstance && typeof this.exportDataInstance.createExportInstance == 'function'){
|
|
85
|
+
this.exportDataInstance.createExportInstance(true);
|
|
86
|
+
}
|
|
87
|
+
this.__canR = true;
|
|
88
|
+
this.positioneScrollbar();
|
|
89
|
+
}
|
|
90
|
+
refreshAfterMount(){
|
|
91
|
+
if(this._isMounted() && this.__canR) this.refresh(false);
|
|
92
|
+
this.positioneScrollbar();
|
|
93
|
+
}
|
|
94
|
+
canExportAskDisplayMainContent(){
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
componentWillUnmount(){
|
|
98
|
+
super.componentWillUnmount();
|
|
99
|
+
APP.off("RESIZE_PAGE",this._events.RESIZE_PAGE);
|
|
100
|
+
window.removeEventListener("resize",this._events.scroll);
|
|
101
|
+
this.clearEvents();
|
|
102
|
+
}
|
|
103
|
+
canPaginateData(){
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*** retourne le rendu d'une cellule de la ligne du tableau
|
|
108
|
+
@parm, rowData, object, la ligne à afficher le rendu du contenu
|
|
109
|
+
@param , rowInidex, l'indice de la ligne dont on affiche le rendu en cours
|
|
110
|
+
@param, columnDef, l'objet colonne dont on veut afficher le rendu pour la ligne
|
|
111
|
+
@param, columnField, le nom du champ correspondant à la cellule,
|
|
112
|
+
//l'objet data peut être un tableau de type string si et seulement si, le tableau dispose d'une seule colonnne
|
|
113
|
+
//le formatteur de cellule, peut être :
|
|
114
|
+
soit une fonction, soit une promesse.
|
|
115
|
+
qu'il s'agisse d'une fonction où d'une promesse, la valeur retournée est un composant react
|
|
116
|
+
quant il s'agit d'une fonction, celle-ci se doit de retourner toujours un composant react
|
|
117
|
+
différent du td d'un table et ne doit pas être un TableColumn de md
|
|
118
|
+
*/
|
|
119
|
+
renderRowCell (arg){
|
|
120
|
+
let {columnDef} = arg;
|
|
121
|
+
let {render,extra,key,className} = super.renderRowCell(arg);
|
|
122
|
+
if(render===null) return null;
|
|
123
|
+
return <TableColumn key={key} className = {classNames(extra.className,columnDef.visible?"":'hidden',"datagrid-cell datagrid-row-cell selectable-content")}>
|
|
124
|
+
<div className={classNames("datagrid-rendered-cell",className)}>{render}</div>
|
|
125
|
+
</TableColumn>
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/*** chaque colonnne de la datagrid est un objet de type :
|
|
130
|
+
{
|
|
131
|
+
field : le nom du champ,
|
|
132
|
+
text || title : le texte à afficher sur la colonne
|
|
133
|
+
...props : la liste des props à passer au composant TableColumn de react-md
|
|
134
|
+
}
|
|
135
|
+
//la variable header du datagrid prend tous les props à passer au composant TableHeader de react-md
|
|
136
|
+
*/
|
|
137
|
+
render (){
|
|
138
|
+
let {
|
|
139
|
+
printOptions,
|
|
140
|
+
rowKey,
|
|
141
|
+
printButton,
|
|
142
|
+
printText,
|
|
143
|
+
printIcon,
|
|
144
|
+
printable,
|
|
145
|
+
print,
|
|
146
|
+
archive,
|
|
147
|
+
archivable,
|
|
148
|
+
progressbar,
|
|
149
|
+
header,
|
|
150
|
+
getRowKey,
|
|
151
|
+
body,
|
|
152
|
+
accordionProps,
|
|
153
|
+
footer,
|
|
154
|
+
row,
|
|
155
|
+
cell,
|
|
156
|
+
table,
|
|
157
|
+
filters,
|
|
158
|
+
filter,
|
|
159
|
+
data,
|
|
160
|
+
tableName,
|
|
161
|
+
dbName,
|
|
162
|
+
selectable,
|
|
163
|
+
selectableMultiple, //si plusieurs lignes peuvent être sélectionnées
|
|
164
|
+
columns,
|
|
165
|
+
fetchData,
|
|
166
|
+
fetchDataOpts, //les options supplémentaires à passer à la fonction fetchData, ces options doivent correspondre à ceux supportées par les requêtes mongo query du plugin pouchdb-find
|
|
167
|
+
/*** Les actions de boutons de la barre d'outil */
|
|
168
|
+
actions,
|
|
169
|
+
selectedRowsActions,
|
|
170
|
+
showPagination,
|
|
171
|
+
pagin,
|
|
172
|
+
showPaginationOnTop,
|
|
173
|
+
sortable,
|
|
174
|
+
exportable,
|
|
175
|
+
filterOrOperator,
|
|
176
|
+
filterAndOperator,
|
|
177
|
+
onRowSelected, //lorsqu'une ligne est sélectionnée
|
|
178
|
+
onRowsSelected, // lorsque toutes les lignes sont sélectionnées
|
|
179
|
+
onRowDeselected, //lorsqu'une ligne est désélectionnée
|
|
180
|
+
onRowsDeselected, //lorsque toutes les lignes sont désélectionnées
|
|
181
|
+
progressBar,
|
|
182
|
+
onRowDoubleClick,
|
|
183
|
+
onRowClick,
|
|
184
|
+
toggleFilters,
|
|
185
|
+
sessionName,
|
|
186
|
+
onMount,
|
|
187
|
+
onUnmount,
|
|
188
|
+
onFetchData,
|
|
189
|
+
dbSelector,
|
|
190
|
+
dbSelectorProps,
|
|
191
|
+
queryLimit,
|
|
192
|
+
accordion, //pour le rendu du header en accordion
|
|
193
|
+
...datagridProps
|
|
194
|
+
} = defaultObj(this.getComponentProps({...this.props}))
|
|
195
|
+
let showDBSelector = false;
|
|
196
|
+
if(dbSelector === true){
|
|
197
|
+
showDBSelector = true;
|
|
198
|
+
}
|
|
199
|
+
dbSelectorProps = defaultObj(dbSelectorProps);
|
|
200
|
+
exportable = defaultBool(exportable,true);
|
|
201
|
+
sortable = defaultVal(sortable,true);
|
|
202
|
+
let isMobile = isMobileOrTabletMedia();
|
|
203
|
+
const rowsPerPageLabel = ''
|
|
204
|
+
datagridProps = defaultObj(datagridProps);
|
|
205
|
+
let exportTableProps = this.getExportableProps();
|
|
206
|
+
delete datagridProps.exportTableProps;
|
|
207
|
+
delete datagridProps.showFilters;
|
|
208
|
+
delete datagridProps.showFooter;
|
|
209
|
+
header = defaultObj(header);
|
|
210
|
+
body = defaultObj(body);
|
|
211
|
+
row = defaultObj(row);
|
|
212
|
+
let _headerProps = {...header, className :classNames(header.className,"datagrid-header")};
|
|
213
|
+
let _bodyProps = {...body,className : classNames(body.className,"datagrid-body")};
|
|
214
|
+
_bodyProps.id = isNonNullString(_bodyProps.id)? _bodyProps.id : uniqid("body-id");
|
|
215
|
+
this._bodyDomId = _bodyProps.id;
|
|
216
|
+
datagridProps.className = classNames("datagrid datagrid-render-table datagrid-tbl",datagridProps.className);
|
|
217
|
+
selectable = defaultVal(selectable,true);
|
|
218
|
+
selectableMultiple = defaultBool(selectableMultiple,true);
|
|
219
|
+
datagridProps.selectableRows = false;
|
|
220
|
+
datagridProps.fixedHeader = false//defaultBool(datagridProps.fixedHeader,false);
|
|
221
|
+
datagridProps.fixedFooter = defaultBool(datagridProps.fixedFooter,true);
|
|
222
|
+
|
|
223
|
+
pagin = defaultVal(pagin,true)
|
|
224
|
+
showPagination = defaultVal(showPagination,true);
|
|
225
|
+
showPaginationOnTop = defaultVal(showPaginationOnTop,true);
|
|
226
|
+
|
|
227
|
+
let colSpan = (Object.size(this.state.columns)+((selectable?1:0)))
|
|
228
|
+
this.visibleColsMenu = [];//la liste des colonnes visible pour le menu
|
|
229
|
+
let pPos = showPaginationOnTop?'top':'bottom';
|
|
230
|
+
let pagination = this._pagination;
|
|
231
|
+
pagination.rowsPerPageItems = defaultArray(pagination.rowsPerPageItems,this.getDefaultPaginationRowsPerPageItems())
|
|
232
|
+
pagination.className = classNames(pagination.className,"pagination"," pagination-pos-"+pPos,pPos)
|
|
233
|
+
let countPages = this.countPages.call(this);
|
|
234
|
+
let paginationLabel = defaultFunc(pagination.label,({start, last, total}) => `${start}-${last} / ${total}`);
|
|
235
|
+
let pagLast = Math.min(pagination.rows, pagination.start + pagination.limit);
|
|
236
|
+
|
|
237
|
+
paginationLabel = paginationLabel({
|
|
238
|
+
start:pagination.start + 1,
|
|
239
|
+
last:pagLast,
|
|
240
|
+
total:pagination.rows,pages:countPages
|
|
241
|
+
})
|
|
242
|
+
let headerFilters = [];
|
|
243
|
+
filters = defaultVal(filters,true);
|
|
244
|
+
if(toggleFilters === false){
|
|
245
|
+
filters = false;
|
|
246
|
+
}
|
|
247
|
+
let {showFilters,showFooter} = this.state;
|
|
248
|
+
let isAllRowsSelected = this.isAllRowsSelected();
|
|
249
|
+
let _progressBar = this.state.progressBar;
|
|
250
|
+
datagridProps.id = defaultStr(datagridProps.id, this.datagridDomId,uniqid("datagrid-id"));
|
|
251
|
+
this.datagridDomId = datagridProps.id;
|
|
252
|
+
let rowCounterIndex = 0;
|
|
253
|
+
let datagridBody = undefined;
|
|
254
|
+
if(isArray(this.state.data) && this.state.data.length){
|
|
255
|
+
datagridBody = []
|
|
256
|
+
pagination.limit = defaultDecimal(pagination.limit);
|
|
257
|
+
let pLength = this.state.data.length;
|
|
258
|
+
for(let rowIndex = 0; rowIndex < pLength; rowIndex ++){
|
|
259
|
+
let row = this.state.data[rowIndex];
|
|
260
|
+
if(!isObj(row)) continue;
|
|
261
|
+
rowCounterIndex++;
|
|
262
|
+
datagridBody.push(<DatagridTableRow
|
|
263
|
+
key={this.getRowKey(row,rowIndex)}
|
|
264
|
+
row = {row}
|
|
265
|
+
cell = {cell}
|
|
266
|
+
rowCounterIndex = {rowCounterIndex}
|
|
267
|
+
context = {this}
|
|
268
|
+
selectable = {this.props.selectable}
|
|
269
|
+
rowIndex = {rowIndex}
|
|
270
|
+
filterArgs = {this.getActionsArgs()}
|
|
271
|
+
/>)
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
let datagridHeaderContent = [null]
|
|
275
|
+
Object.mapToArray(this.state.columns,(header,headerIndex) => {
|
|
276
|
+
let {
|
|
277
|
+
field,
|
|
278
|
+
render,
|
|
279
|
+
readOnly,
|
|
280
|
+
disabled,
|
|
281
|
+
visible,
|
|
282
|
+
defaultValue,
|
|
283
|
+
className,
|
|
284
|
+
id,
|
|
285
|
+
colIndex,
|
|
286
|
+
key,
|
|
287
|
+
...restCol
|
|
288
|
+
} = header;
|
|
289
|
+
restCol = defaultObj(restCol);
|
|
290
|
+
let colFilter = defaultVal(restCol.filter,true);
|
|
291
|
+
delete restCol.filter;
|
|
292
|
+
let colProps = {id,key}
|
|
293
|
+
colProps.key = isNonNullString(key)?key : (header.field||("datagrid-column-header-"+headerIndex))
|
|
294
|
+
colProps.className = classNames(visible?'':'hidden',className,"datagrid-cell datagrid-column datagrid-column-cell");
|
|
295
|
+
this.visibleColsMenu.push(
|
|
296
|
+
<CheckboxListItem
|
|
297
|
+
name = {uniqid("checkbox-name-l")}
|
|
298
|
+
id = {uniqid("checked-l-boxed")}
|
|
299
|
+
key={header.field}
|
|
300
|
+
onClick = {()=>{this.toggleColumnVisibility(header.field)}}
|
|
301
|
+
primaryText = {header.text||header.title||header.field}
|
|
302
|
+
checked = {visible}
|
|
303
|
+
uncheckedIcon = {null}
|
|
304
|
+
/>
|
|
305
|
+
);
|
|
306
|
+
let headerFilter = null;
|
|
307
|
+
restCol.field = header.field;
|
|
308
|
+
restCol.label = defaultStr(header.text,header.label) ;
|
|
309
|
+
restCol.orOperator = defaultBool(restCol.orOperator,filterOrOperator,true);
|
|
310
|
+
restCol.andOperator = defaultBool(restCol.andOperator,filterAndOperator,true)
|
|
311
|
+
delete restCol.sortable;
|
|
312
|
+
let hasFilterClassName = "has-not-filter";
|
|
313
|
+
if(colFilter && filters !== false){
|
|
314
|
+
hasFilterClassName = "has-filter";
|
|
315
|
+
this.filters[header.field] = {...defaultObj(this.filters[header.field])}
|
|
316
|
+
headerFilter = <Filter
|
|
317
|
+
{...restCol}
|
|
318
|
+
searchIconTooltip = 'Filtre'
|
|
319
|
+
searchIcon = 'filter_list'
|
|
320
|
+
name = {header.field}
|
|
321
|
+
defaultValue = {defaultVal(this.filters[header.field].originalValue,this.filters[header.field].originValue)}
|
|
322
|
+
key = {header.field}
|
|
323
|
+
onClearFilter = {this.onClearFilter.bind(this)}
|
|
324
|
+
onChange = {this.onFilterChange.bind(this)}
|
|
325
|
+
operator = {this.filters[header.field].operator}
|
|
326
|
+
action = {defaultStr(this.filters[header.field].originAction,this.filters[header.field].action)}
|
|
327
|
+
/>
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
headerFilters.push(
|
|
332
|
+
<TableColumn
|
|
333
|
+
key = {header.field}
|
|
334
|
+
className={classNames("tableexport-ignore",hasFilterClassName,'datagrid-column',visible?'':'hidden',"datagrid-filter datagrid-filter-column filter-column-"+header.field,'column-'+header.field)}
|
|
335
|
+
>
|
|
336
|
+
{headerFilter}
|
|
337
|
+
</TableColumn>
|
|
338
|
+
)
|
|
339
|
+
colProps.sorted = undefined;
|
|
340
|
+
colProps.sortIcon = <Icon name={"arrow_upward"} className="tableexport-ignore"></Icon>
|
|
341
|
+
let canSort = sortable && header.sortable !== false
|
|
342
|
+
if(canSort){
|
|
343
|
+
colProps.role = "button";
|
|
344
|
+
if(this.state.sort.column ==field){
|
|
345
|
+
colProps.sorted = this.state.sort.dir == 'asc'? true : false;
|
|
346
|
+
}
|
|
347
|
+
colProps.onClick = (event) =>{React.stopEventPropagation(event);this.sort(header.field,null,header);}
|
|
348
|
+
}
|
|
349
|
+
datagridHeaderContent.push(
|
|
350
|
+
<TableColumn
|
|
351
|
+
{ ...colProps}
|
|
352
|
+
className = {classNames(colProps.className,canSort?"datagrid-column-header-sortable cursor-pointer":"datagrid-column-header-not-sortable cursor-not-allowed")}
|
|
353
|
+
>
|
|
354
|
+
<span className={("no-padding no-margin")} onMouseOver={()=>{}} onMouseLeave={()=>{}}>
|
|
355
|
+
{header.text||header.title||header.field}
|
|
356
|
+
</span>
|
|
357
|
+
</TableColumn>
|
|
358
|
+
)
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
let datagridHeader = <React.Fragment>
|
|
362
|
+
<TableRow className="datagrid-table-header-row">
|
|
363
|
+
{datagridHeaderContent}
|
|
364
|
+
</TableRow>
|
|
365
|
+
{
|
|
366
|
+
showFilters && filters !== false && (
|
|
367
|
+
<TableRow className="filters-row datagrid-filters-row tableexport-ignore">
|
|
368
|
+
{selectable?
|
|
369
|
+
<TableColumn className="header-filter-wrap select-rows tableexport-ignore"/>
|
|
370
|
+
:null}
|
|
371
|
+
{headerFilters}
|
|
372
|
+
</TableRow>
|
|
373
|
+
)
|
|
374
|
+
}
|
|
375
|
+
</React.Fragment>
|
|
376
|
+
let selectAllRowsToggleTitle = isAllRowsSelected?"Tout Déselec":"Tout Select"
|
|
377
|
+
let restItems = [];
|
|
378
|
+
let max = this.getMaxSelectableRows();
|
|
379
|
+
if(selectableMultiple && max && defaultBool(this.props.selectableMultiple,true)){
|
|
380
|
+
max = max.formatNumber();
|
|
381
|
+
restItems = [
|
|
382
|
+
{
|
|
383
|
+
primaryText : "Sélect "+max,
|
|
384
|
+
leftIcon : <Icon name="select-all"></Icon>,
|
|
385
|
+
onClick : (x,event)=>{
|
|
386
|
+
this.__isAllRowsSelected = false;
|
|
387
|
+
this.handleAllRowsToggle();
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
primaryText : "Tout désélec",
|
|
392
|
+
onClick : (x,event)=>{
|
|
393
|
+
this.__isAllRowsSelected = true;
|
|
394
|
+
this.handleAllRowsToggle();
|
|
395
|
+
},
|
|
396
|
+
leftIcon : <Icon name="select"></Icon>
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
if(selectable){
|
|
401
|
+
datagridHeaderContent[0] = <TableColumn key="toggle-rows-selection" className="tableexport-ignore toggle-rows-selection datagrid-column">
|
|
402
|
+
<Tooltip Component = {Checkbox}
|
|
403
|
+
aria-label = {selectAllRowsToggleTitle}
|
|
404
|
+
name = {uniqid("checkbox-name")}
|
|
405
|
+
id = {uniqid("checked-boxed")}
|
|
406
|
+
title = {selectAllRowsToggleTitle}
|
|
407
|
+
checkedIcon = {<Icon name="check_box"></Icon>}
|
|
408
|
+
checked = {isAllRowsSelected}
|
|
409
|
+
uncheckedIcon = {<Icon name="check_box_outline_blank"></Icon>}
|
|
410
|
+
onChange = {(x,event)=>{
|
|
411
|
+
this.handleAllRowsToggle();
|
|
412
|
+
}}
|
|
413
|
+
/>
|
|
414
|
+
</TableColumn>
|
|
415
|
+
}
|
|
416
|
+
let Pagination = null;
|
|
417
|
+
this.searchPassIconId = this._datagridId+"-options-icon"
|
|
418
|
+
if(showPagination) Pagination = <div className="pagination-table-wrapper"><table className={classNames("pagination-wrapper no-padding no-marging datagrid-toolbar",pPos)}>
|
|
419
|
+
<tbody className="toolbar pagination-toolbar">
|
|
420
|
+
<tr>
|
|
421
|
+
{!isMobile && (
|
|
422
|
+
<React.Fragment>
|
|
423
|
+
<td className="refresh-td">
|
|
424
|
+
<Button
|
|
425
|
+
raised
|
|
426
|
+
iconEl = {<Icon name="refresh"/>}
|
|
427
|
+
onClick = {this.refresh.bind(this)}
|
|
428
|
+
>
|
|
429
|
+
Rafraichir
|
|
430
|
+
</Button>
|
|
431
|
+
</td>
|
|
432
|
+
{filters !== false && (<td className="">
|
|
433
|
+
<Button
|
|
434
|
+
raised
|
|
435
|
+
className={"toggle-filters-visibility"}
|
|
436
|
+
onClick = {()=>{showFilters?this.hideFilters():this.showFilters()} }
|
|
437
|
+
iconEl = {
|
|
438
|
+
<Icon name ={showFilters?'visibility_off':'visibility'}></Icon>}
|
|
439
|
+
>
|
|
440
|
+
{showFilters?'Masquer/Filtres':'Afficher/Filtres'}
|
|
441
|
+
</Button>
|
|
442
|
+
</td>)}
|
|
443
|
+
<td className="">
|
|
444
|
+
<Button
|
|
445
|
+
raised
|
|
446
|
+
className={"toggle-footer-visibility"}
|
|
447
|
+
onClick = {()=>{showFooter?this.hideFooter():this.showFooter()} }
|
|
448
|
+
iconEl = {
|
|
449
|
+
<Icon name ={showFooter?'view_column':'view_module'}></Icon>}
|
|
450
|
+
>
|
|
451
|
+
{showFooter?'Masquer/Pied de page':'Afficher/Pied de page'}
|
|
452
|
+
</Button>
|
|
453
|
+
</td>
|
|
454
|
+
{selectableMultiple && (
|
|
455
|
+
<td>
|
|
456
|
+
{restItems.map((item,index)=>{
|
|
457
|
+
return <Button
|
|
458
|
+
raised
|
|
459
|
+
key = {index}
|
|
460
|
+
iconEl = {item.leftIcon}
|
|
461
|
+
onClick = {item.onClick}
|
|
462
|
+
>
|
|
463
|
+
{item.primaryText}
|
|
464
|
+
</Button>
|
|
465
|
+
})}
|
|
466
|
+
</td>
|
|
467
|
+
)}
|
|
468
|
+
</React.Fragment>
|
|
469
|
+
)}
|
|
470
|
+
{exportable && (
|
|
471
|
+
<td className={classNames('datagrid-export-buttons')}>
|
|
472
|
+
<ExportTable
|
|
473
|
+
{...exportTableProps}
|
|
474
|
+
selector = {this.datagridDomId}
|
|
475
|
+
ref = {(el)=>{
|
|
476
|
+
if(el){
|
|
477
|
+
this.exportDataInstance = el;
|
|
478
|
+
}
|
|
479
|
+
}}
|
|
480
|
+
getAllData = {()=>{
|
|
481
|
+
return this.INITIAL_STATE.data;
|
|
482
|
+
}}
|
|
483
|
+
/>
|
|
484
|
+
</td>
|
|
485
|
+
)
|
|
486
|
+
}
|
|
487
|
+
<td className={"toggle-column-visibility"}>
|
|
488
|
+
<DocumentMenu id={uniqid("doc-menu-datagrid")} text={<Icon title={isMobile?"Actions":"Colonnes"} name={isMobile?"menu":'view_column'}></Icon>} menuItems={
|
|
489
|
+
isMobile ? [
|
|
490
|
+
isMobile?
|
|
491
|
+
{
|
|
492
|
+
primaryText : 'Rafraichir',
|
|
493
|
+
leftIcon : <Icon name="refresh"></Icon>,
|
|
494
|
+
onClick : this.refresh.bind(this)
|
|
495
|
+
} : null,
|
|
496
|
+
{
|
|
497
|
+
primaryText : 'colonnes',
|
|
498
|
+
leftIcon : <Icon name="view_column"></Icon>,
|
|
499
|
+
nestedItems : this.visibleColsMenu
|
|
500
|
+
},
|
|
501
|
+
isMobile && filters !== false?{
|
|
502
|
+
className:"toggle-filters-visibility",
|
|
503
|
+
onClick : ()=>{showFilters?this.hideFilters():this.showFilters()}
|
|
504
|
+
,leftIcon : <Icon name={showFilters?'visibility_off':'visibility'}></Icon>
|
|
505
|
+
,primaryText : (showFilters?'Masquer/Filtres':'Afficher/Filtres')
|
|
506
|
+
} : null,
|
|
507
|
+
isMobile?{
|
|
508
|
+
className:"toggle-footer-visibility",
|
|
509
|
+
onClick : ()=>{showFooter?this.hideFooter():this.showFooter()}
|
|
510
|
+
,leftIcon : <Icon name={showFooter?'view_column':'view_module'}></Icon>
|
|
511
|
+
,primaryText : (showFooter?'Masquer/Pied de page':'Afficher/Pied de page')
|
|
512
|
+
} : null,
|
|
513
|
+
...(isMobile && selectableMultiple ? restItems : [])
|
|
514
|
+
] : this.visibleColsMenu
|
|
515
|
+
} />
|
|
516
|
+
</td>
|
|
517
|
+
{pagin && (
|
|
518
|
+
<React.Fragment>
|
|
519
|
+
<td className={classNames('pagination-item-td')}>
|
|
520
|
+
<span className="pagination-label">
|
|
521
|
+
{rowsPerPageLabel}
|
|
522
|
+
</span>
|
|
523
|
+
</td>
|
|
524
|
+
<td className="pagination-item-td">
|
|
525
|
+
<select
|
|
526
|
+
id={uniqid("pagination-select-field")}
|
|
527
|
+
className={'pagination-select-field md-select-field--pagination pagination-select-field'}
|
|
528
|
+
onChange={this._setRowsPerPage.bind(this)}
|
|
529
|
+
defaultValue = {pagination.limit}
|
|
530
|
+
>
|
|
531
|
+
{
|
|
532
|
+
Object.map(pagination.rowsPerPageItems,(val,i)=>{
|
|
533
|
+
return <option defaultValue={val == pagination.limit ? 'selected' : undefined} key={i}>{val}</option>
|
|
534
|
+
})
|
|
535
|
+
}
|
|
536
|
+
</select>
|
|
537
|
+
</td>
|
|
538
|
+
<td className="pagination-item-td">
|
|
539
|
+
<Button
|
|
540
|
+
flat
|
|
541
|
+
id={uniqid("go-to-first-page-id")}
|
|
542
|
+
onClick={this._goToFirstPage.bind(this)}
|
|
543
|
+
disabled={countPages <=0 || pagination.page == 1}
|
|
544
|
+
iconEl={<Icon name="first_page"></Icon>}
|
|
545
|
+
/>
|
|
546
|
+
</td>
|
|
547
|
+
<td className="pagination-item-td">
|
|
548
|
+
<Button
|
|
549
|
+
id={uniqid("decrement-id")}
|
|
550
|
+
onClick={this._decrement.bind(this)}
|
|
551
|
+
disabled={pagination.start === 0}
|
|
552
|
+
iconEl={<Icon name="keyboard_arrow_left"></Icon>}
|
|
553
|
+
/>
|
|
554
|
+
</td>
|
|
555
|
+
<td className="pagination-item-td">
|
|
556
|
+
{this.renderQueryLimit(<span className="pagination-label">{paginationLabel}</span>)}
|
|
557
|
+
</td>
|
|
558
|
+
<td className="pagination-td">
|
|
559
|
+
<Button
|
|
560
|
+
flat
|
|
561
|
+
id={uniqid('increment-id')}
|
|
562
|
+
onClick={this._increment.bind(this)}
|
|
563
|
+
disabled={(pagination.start + pagination.limit) >= pagination.rows}
|
|
564
|
+
iconEl={<Icon name="keyboard_arrow_right"></Icon>}
|
|
565
|
+
/>
|
|
566
|
+
</td>
|
|
567
|
+
<td className="pagination-item-td">
|
|
568
|
+
<Button
|
|
569
|
+
flat
|
|
570
|
+
id={uniqid("go-to-last-page-id")}
|
|
571
|
+
onClick={this._goToLastPage.bind(this)}
|
|
572
|
+
disabled={countPages <=1 || pagination.page == countPages}
|
|
573
|
+
iconEl={<Icon name="last_page"></Icon>}
|
|
574
|
+
/>
|
|
575
|
+
</td>
|
|
576
|
+
</React.Fragment>
|
|
577
|
+
)}
|
|
578
|
+
{filters !== false && <td className="datagrid-local-filter-wrapper" ><LocalFilter title = {this.props.title} fields ={this.state.columns} onChange={this.onLocalFiltersChange.bind(this)}/></td>}
|
|
579
|
+
<td className="datagrid-render-type"><RenderType key={uniqid("render-type")}/></td>
|
|
580
|
+
</tr>
|
|
581
|
+
</tbody>
|
|
582
|
+
</table>
|
|
583
|
+
</div>
|
|
584
|
+
datagridProps.baseId = defaultStr(datagridProps.baseId,uniqid("datagrid-pros-base-id"))
|
|
585
|
+
let title = this.props.title;
|
|
586
|
+
let clx = title ? "has-title ml1":"has-not-title"
|
|
587
|
+
let _dbSelector = showDBSelector ? <div className={"datagrid-db-selector-wrapper "+clx}>
|
|
588
|
+
<DBSelector
|
|
589
|
+
{...dbSelectorProps}
|
|
590
|
+
onChange = {this.onChangeDatabases.bind(this)}
|
|
591
|
+
/>
|
|
592
|
+
</div> : null;
|
|
593
|
+
if(!title){
|
|
594
|
+
title = _dbSelector;
|
|
595
|
+
_dbSelector = null;
|
|
596
|
+
}
|
|
597
|
+
let footers = this.getFooterValues();
|
|
598
|
+
return <Card tableCard className={classNames("datagrid-wrapper datagrid-table-wrapper",this.state.startLoadingData && !this.state.stopLoadingData?'loading user-select-none':'',isAllRowsSelected ? "all-rows-selected":'all-rows-not-selelected')}>
|
|
599
|
+
<DatagridActions
|
|
600
|
+
title = {title}
|
|
601
|
+
context = {this}
|
|
602
|
+
selectedRows = {this.selectedRows}
|
|
603
|
+
contextualTitleId = {this._datagridId+"contextual-id"}
|
|
604
|
+
childrenActions = {actions}
|
|
605
|
+
/>
|
|
606
|
+
{_dbSelector}
|
|
607
|
+
{showPaginationOnTop ?Pagination:null}
|
|
608
|
+
{_progressBar}
|
|
609
|
+
{
|
|
610
|
+
!_progressBar && (
|
|
611
|
+
<React.Fragment>
|
|
612
|
+
<div id={this.datagridDomId+"-scrollable-content-wrapper"} className={classNames("scrollable-top-content-wrapper",showPagination?'pagination-visible':'pagination-hidden')} onScroll={this.onScrollDom.bind(this)}>
|
|
613
|
+
<div id={this.datagridDomId+"-scrollable-content"} className="scrollable-top-content"></div>
|
|
614
|
+
</div>
|
|
615
|
+
<DataTable {...datagridProps}>
|
|
616
|
+
<TableHeader {..._headerProps}>
|
|
617
|
+
{datagridHeader}
|
|
618
|
+
</TableHeader>
|
|
619
|
+
<TableBody {..._bodyProps}>
|
|
620
|
+
{datagridBody}
|
|
621
|
+
</TableBody>
|
|
622
|
+
<tfoot className="md-table-footer">
|
|
623
|
+
{!showPaginationOnTop? <tr className="pagination-on-bottom-tr w100">
|
|
624
|
+
<td className={classNames("pagination-on-bottom-td")} colSpan={colSpan}>
|
|
625
|
+
{Pagination}
|
|
626
|
+
</td>
|
|
627
|
+
</tr>:null}
|
|
628
|
+
{showFooter && (
|
|
629
|
+
<tr className="datagrid-footer-wrapper">
|
|
630
|
+
<td className="footer-toggle-row-selection tableexport-ignore"></td>
|
|
631
|
+
{
|
|
632
|
+
Object.mapToArray(this.state.columns,(column,field,_index)=>{
|
|
633
|
+
if(!isObj(column) || !column.visible) return null;
|
|
634
|
+
if(!isObj(footers[field])) return <td key={field}></td>
|
|
635
|
+
let footer = footers[field];
|
|
636
|
+
return <td key={field} className={classNames("datagrid-footer-col md-table-column",footer.visible === false ? 'hidden':'')}>
|
|
637
|
+
<Footer
|
|
638
|
+
{...footer}
|
|
639
|
+
displayLabel = {false}
|
|
640
|
+
className = "footer-toggle-row-selection tableexport-ignore"
|
|
641
|
+
/>
|
|
642
|
+
</td>
|
|
643
|
+
})
|
|
644
|
+
}
|
|
645
|
+
</tr>
|
|
646
|
+
)}
|
|
647
|
+
</tfoot>
|
|
648
|
+
</DataTable>
|
|
649
|
+
</React.Fragment>
|
|
650
|
+
)
|
|
651
|
+
}
|
|
652
|
+
</Card>
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
///cette fonction permet de retourner le nom de la base de données à utiliser pour la récupération des données
|
|
658
|
+
DGridTableRendering.getDBName = DGrid.getDBName;
|
|
659
|
+
|
|
660
|
+
DGridTableRendering.propTypes = {
|
|
661
|
+
...DGrid.propTypes,
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
export default DGridTableRendering;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import CommonDatagrid from "./Common/Common";
|
|
2
|
+
import TableDatagrid from "./Common/TableData"
|
|
3
|
+
import {defaultStr} from "$utils";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export default function Factory(type) {
|
|
7
|
+
type = defaultStr(type).toLowerCase();
|
|
8
|
+
if(type.contains('table')){
|
|
9
|
+
TableDatagrid;
|
|
10
|
+
}
|
|
11
|
+
return CommonDatagrid;
|
|
12
|
+
}
|