@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,21 @@
|
|
|
1
|
+
import PhoneInput from "$ecomponents/PhoneInput";
|
|
2
|
+
import Field from "./Field";
|
|
3
|
+
|
|
4
|
+
export default class FormPhoneInputField extends Field {
|
|
5
|
+
canFocus(){
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
_render(props,setRef){
|
|
9
|
+
props.onChange = (args)=>{
|
|
10
|
+
this.validate(args);
|
|
11
|
+
}
|
|
12
|
+
return <PhoneInput
|
|
13
|
+
{...props}
|
|
14
|
+
setRef = {setRef}
|
|
15
|
+
/>
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
FormPhoneInputField.propTypes = {
|
|
20
|
+
...PhoneInput.PropTypes
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import TextField from "$ecomponents/TextField";
|
|
2
|
+
import {defaultObj,isNonNullString} from "$utils";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import Field from"./Field";
|
|
5
|
+
import React from "react";
|
|
6
|
+
export default class FormTextField extends Field{
|
|
7
|
+
isTextField (){
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
_render(props,setRef){
|
|
11
|
+
props.onChange = (args)=>{
|
|
12
|
+
this.validate(args);
|
|
13
|
+
}
|
|
14
|
+
return <TextField
|
|
15
|
+
{...props}
|
|
16
|
+
setRef = {setRef}
|
|
17
|
+
/>
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
FormTextField.propTypes = {
|
|
23
|
+
...defaultObj(TextField.propTypes),
|
|
24
|
+
...Field.propTypes,
|
|
25
|
+
id : PropTypes.string,
|
|
26
|
+
type : PropTypes.string,
|
|
27
|
+
allowSpace : PropTypes.bool, //les tex
|
|
28
|
+
placeholder:PropTypes.string,//le placeholder du champ
|
|
29
|
+
errorText : PropTypes.string,
|
|
30
|
+
error : PropTypes.bool,
|
|
31
|
+
/*** si la valeur sera toujours en majuscule */
|
|
32
|
+
upper : PropTypes.bool,
|
|
33
|
+
upperCase : PropTypes.bool,
|
|
34
|
+
format : PropTypes.oneOf([
|
|
35
|
+
'currency',
|
|
36
|
+
'money',
|
|
37
|
+
"custom",
|
|
38
|
+
"number",
|
|
39
|
+
'hashtag',
|
|
40
|
+
undefined,
|
|
41
|
+
null,
|
|
42
|
+
"",
|
|
43
|
+
]),
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {Time} from "$ecomponents/Date";
|
|
2
|
+
import {defaultObj} from "$utils";
|
|
3
|
+
import Field from"./Field";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import DateLib from "$lib/date";
|
|
6
|
+
|
|
7
|
+
export default class FormTimeField extends Field{
|
|
8
|
+
getValidValue(){
|
|
9
|
+
const v = super.getValidValue();
|
|
10
|
+
return DateLib.isDateObj(v)? v.toSQLTime() : isNonNullString(v)? v : undefined;
|
|
11
|
+
}
|
|
12
|
+
canFocus(){
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
_render(props){
|
|
16
|
+
props.onChange = (args)=>{
|
|
17
|
+
this.validate(args);
|
|
18
|
+
}
|
|
19
|
+
return <Time
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
FormTimeField.propTypes = {
|
|
27
|
+
...defaultObj(Date.propTypes),
|
|
28
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import Field from "./Field"
|
|
2
|
+
import TextField from "./TextField";
|
|
3
|
+
import SelectField from "./SelectField";
|
|
4
|
+
import Switch from "./Switch";
|
|
5
|
+
import Checkbox from "./Checkbox";
|
|
6
|
+
//import IdField from "./IdField";
|
|
7
|
+
//import PieceField from "./PieceField";
|
|
8
|
+
import Slider from "./Slider";
|
|
9
|
+
import ColorPicker from "./Color";
|
|
10
|
+
//import Date from "./Date";
|
|
11
|
+
//import Time from "./Time";
|
|
12
|
+
import Image from "./Image";
|
|
13
|
+
import Tel from "./Tel";
|
|
14
|
+
import SelectCountry from "./SelectCountry";
|
|
15
|
+
import Html from "./Html";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
Field,
|
|
19
|
+
TextField,
|
|
20
|
+
SelectField,
|
|
21
|
+
SelectCountry
|
|
22
|
+
,Switch
|
|
23
|
+
,Checkbox
|
|
24
|
+
//,IdField
|
|
25
|
+
//,PieceField
|
|
26
|
+
,Slider
|
|
27
|
+
,ColorPicker
|
|
28
|
+
//,Date
|
|
29
|
+
//,Time
|
|
30
|
+
,Image
|
|
31
|
+
,Tel
|
|
32
|
+
,Html
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
Field,
|
|
37
|
+
TextField,
|
|
38
|
+
SelectField,
|
|
39
|
+
SelectCountry
|
|
40
|
+
,Switch
|
|
41
|
+
,Checkbox
|
|
42
|
+
//,IdField
|
|
43
|
+
//,PieceField
|
|
44
|
+
,Slider
|
|
45
|
+
,ColorPicker
|
|
46
|
+
,ColorPicker as Color
|
|
47
|
+
//,Date
|
|
48
|
+
//,Time
|
|
49
|
+
,Image
|
|
50
|
+
,Tel
|
|
51
|
+
,Html
|
|
52
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*** le prompt selector a pour fonction de retourner
|
|
2
|
+
* une form field de type select qui lorsqu'on clique sur le boutton addIcon, affiche une boîte de dialogogue permettant à l'utilisateur
|
|
3
|
+
* d'ajouter un nouvel item
|
|
4
|
+
*/
|
|
5
|
+
export default (_props)=>{
|
|
6
|
+
let {items,onAdd,addItemTitle,yes,no,prompTitle,message,promptMessage,onUnselect,...props} = defaultObj(_props)
|
|
7
|
+
props = defaultObj(props);
|
|
8
|
+
props.type = 'select';
|
|
9
|
+
props.text = defaultStr(props.text,props.label);
|
|
10
|
+
props.showAdd = defaultBool(props.showAdd,true);
|
|
11
|
+
props.addIcon = defaultStr(props.addIcon,'account-multiple-plus');
|
|
12
|
+
props.multiple = defaultBool(props.multiple,true);
|
|
13
|
+
props.display = defaultStr(props.display, props.multiple?"tags":"list");
|
|
14
|
+
props.items = isObjOrArray(items)? items : [];
|
|
15
|
+
props.itemValue = defaultFunc(props.itemValue,({item})=>{
|
|
16
|
+
return item;
|
|
17
|
+
})
|
|
18
|
+
props.onUnselect = (arg)=>{
|
|
19
|
+
let {item,context}= arg;
|
|
20
|
+
if(context && context.state){
|
|
21
|
+
let data = []
|
|
22
|
+
Object.map(context.state.menuItems,(v,i)=>{
|
|
23
|
+
if(isNonNullString(v) && v !== item){
|
|
24
|
+
data.push(v);
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
context.setState({menuItems:data,onKey:!context.state.onKey});
|
|
28
|
+
if(isFunction(onUnselect)){
|
|
29
|
+
onUnselect(arg);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
props.renderItem = defaultFunc(props.renderItem,({item,context})=>{
|
|
34
|
+
return item;
|
|
35
|
+
});
|
|
36
|
+
props.onAdd = (arg)=>{
|
|
37
|
+
let {context}= arg;
|
|
38
|
+
if(context && context.state){
|
|
39
|
+
showPrompt({
|
|
40
|
+
yes : defaultVal(yes,'Enregistrer'),
|
|
41
|
+
no : defaultVal(no,'Annuler'),
|
|
42
|
+
title:defaultStr(prompTitle,addItemTitle,'Ajouter un élément'),
|
|
43
|
+
message:defaultStr(message,promptMessage),
|
|
44
|
+
onSuccess:({value})=>{
|
|
45
|
+
let {menuItems} = context.state;
|
|
46
|
+
let data = defaultArray(menuItems);
|
|
47
|
+
if(isNonNullString(value) && !arrayValueExists(data,value)){
|
|
48
|
+
data.push(value);
|
|
49
|
+
}
|
|
50
|
+
context.setState({menuItems:data,onKey:!context.state.onKey},()=>{
|
|
51
|
+
if(isFunction(onAdd)){
|
|
52
|
+
onAdd(arg);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}})
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return props;
|
|
59
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import selectors from "./sprintfSelectors";
|
|
2
|
+
import {isNonNullString,defaultFunc} from "$utils";
|
|
3
|
+
|
|
4
|
+
export default ({value,val,cb,success})=>{
|
|
5
|
+
val = defaultStr(value,val)
|
|
6
|
+
if(!isNonNullString(val)){
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
cb = defaultFunc(cb,success);
|
|
10
|
+
let keys = [];
|
|
11
|
+
for(let i in selectors){
|
|
12
|
+
if(!isObj(selectors[i])) continue;
|
|
13
|
+
if(val.contains(i)){
|
|
14
|
+
keys.push(i);
|
|
15
|
+
} else if(val.contains(i.toUpperCase())){
|
|
16
|
+
keys.push(i.toUpperCase())
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
let results = {};
|
|
20
|
+
let length = keys.length;
|
|
21
|
+
let index = length;
|
|
22
|
+
let key = undefined
|
|
23
|
+
const next = ()=>{
|
|
24
|
+
index -=1;
|
|
25
|
+
if(index < 0){
|
|
26
|
+
for(let i in results){
|
|
27
|
+
let t = selectors[i.toLowerCase()];
|
|
28
|
+
let replace = results[i];
|
|
29
|
+
let dbName = defaultStr(t.dbName).toLowerCase(), type = defaultStr(t.type).toLowerCase();
|
|
30
|
+
if( dbName !== 'struct_data' && type !== 'field' && type !== 'form'){
|
|
31
|
+
replace = " #"+defaultStr(t.dbName)+"["+i.ltrim("&").rtrim("&")+"-"+replace+"]".toUpperCase();
|
|
32
|
+
}
|
|
33
|
+
val = val.replaceAll(i,replace.toUpperCase());
|
|
34
|
+
}
|
|
35
|
+
cb(val);
|
|
36
|
+
} else {
|
|
37
|
+
key = keys[index];
|
|
38
|
+
if(!isNonNullString(key)) {return next();}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
next();
|
|
42
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import Date from "$lib/date";
|
|
2
|
+
const selectLabel = {
|
|
3
|
+
title : 'Sélectionner un libelé',
|
|
4
|
+
table : 'labels',
|
|
5
|
+
dbName : 'struct_data',
|
|
6
|
+
itemValue : ({item})=>defaultStr(item.label,item.code)
|
|
7
|
+
}
|
|
8
|
+
export default {
|
|
9
|
+
"&libele&" : selectLabel,
|
|
10
|
+
"&vente&" : {
|
|
11
|
+
title : 'Sélectionner une vente',
|
|
12
|
+
table : 'sales',
|
|
13
|
+
},
|
|
14
|
+
"&achat&" : {
|
|
15
|
+
title : 'Sélectionner un achat',
|
|
16
|
+
table : 'purchases',
|
|
17
|
+
},
|
|
18
|
+
"&stock&" : {
|
|
19
|
+
title : 'Sélectionner stock',
|
|
20
|
+
table : 'stocks',
|
|
21
|
+
},
|
|
22
|
+
"&transfert&" : {
|
|
23
|
+
title : 'Sélectionner mouvement de transfert',
|
|
24
|
+
table : 'stocks_transfers',
|
|
25
|
+
},
|
|
26
|
+
"®lement&" : {
|
|
27
|
+
title : 'Sélectionner un règlement',
|
|
28
|
+
table : 'payments',
|
|
29
|
+
},
|
|
30
|
+
"&tiers&" : {
|
|
31
|
+
title : 'Sélectionner un tier',
|
|
32
|
+
table : 'third_parties',
|
|
33
|
+
dbName : 'third_parties',
|
|
34
|
+
},
|
|
35
|
+
"&projet&" : {
|
|
36
|
+
title : 'Sélectionner un projet',
|
|
37
|
+
table : 'projects',
|
|
38
|
+
dbName : 'projects',
|
|
39
|
+
},
|
|
40
|
+
"&tache&" : {
|
|
41
|
+
title : 'Sélectionner une tâche',
|
|
42
|
+
table : 'tasks',
|
|
43
|
+
dbName : 'projects',
|
|
44
|
+
},
|
|
45
|
+
"&commercial&" : {
|
|
46
|
+
title : 'Sélectionner commercial',
|
|
47
|
+
table : 'users',
|
|
48
|
+
dbName : 'users',
|
|
49
|
+
fetchDataOpts:{
|
|
50
|
+
selector : {$and:[{isSeller:1}]}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"&client&" : {
|
|
54
|
+
title : 'Sélectionner client',
|
|
55
|
+
table : 'third_parties',
|
|
56
|
+
dbName : 'third_parties',
|
|
57
|
+
fetchDataOpts:{
|
|
58
|
+
selector : {$and:[{type:{$in:["customer"]}}]}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"&fournisseur&" : {
|
|
62
|
+
title : 'Sélectionner Fournisseur',
|
|
63
|
+
table : 'third_parties',
|
|
64
|
+
dbName : 'third_parties',
|
|
65
|
+
fetchDataOpts:{
|
|
66
|
+
selector : {$and:[{type:{$in:["provider"]}}]}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"&utilisateur&" : {
|
|
70
|
+
title : 'Sélectionner un utilisateur',
|
|
71
|
+
table : 'users',
|
|
72
|
+
dbName : 'users',
|
|
73
|
+
},
|
|
74
|
+
"&caisse&" : {
|
|
75
|
+
title : 'Sélectionner une caisse',
|
|
76
|
+
table : 'checkouts',
|
|
77
|
+
dbName : 'common',
|
|
78
|
+
},
|
|
79
|
+
"&produit&" : {
|
|
80
|
+
title : 'Sélectionner un produit/article',
|
|
81
|
+
table : 'products',
|
|
82
|
+
dbName : 'products',
|
|
83
|
+
},
|
|
84
|
+
"&categorie&" : {
|
|
85
|
+
title : 'Sélectionner une catégorie de produit',
|
|
86
|
+
table : 'products_categories',
|
|
87
|
+
dbName : 'products',
|
|
88
|
+
},
|
|
89
|
+
"&taxe&" : {
|
|
90
|
+
title : 'Sélectionner une taxe',
|
|
91
|
+
table : 'taxes',
|
|
92
|
+
dbName : 'common',
|
|
93
|
+
},
|
|
94
|
+
"&depot&" : {
|
|
95
|
+
title : 'Sélectionner un dépôt',
|
|
96
|
+
table : 'warehouses',
|
|
97
|
+
dbName : 'common',
|
|
98
|
+
},
|
|
99
|
+
"&contact&" : {
|
|
100
|
+
title : 'Sélectionner un contact',
|
|
101
|
+
table : 'contacts',
|
|
102
|
+
dbName : 'common',
|
|
103
|
+
},
|
|
104
|
+
"&sdate&" : {
|
|
105
|
+
title : 'Sélectionner une date',
|
|
106
|
+
type : 'field',
|
|
107
|
+
field : {
|
|
108
|
+
type : 'date',
|
|
109
|
+
text : 'Sélectionner une date',
|
|
110
|
+
format : Date.defaultDateFormat
|
|
111
|
+
},
|
|
112
|
+
desc : "remplace le motif par la date qui sera sélectionnée par l'utilisateur au format jj/mm/aaaa",
|
|
113
|
+
},
|
|
114
|
+
"&date&" : "remplace le motif par la date actuelle au format : jj/mm/aaaa",
|
|
115
|
+
"&heure&" : "remplace le motif par l'heure actuelle au format hh:mm:ss",
|
|
116
|
+
"&dateheure&" : "remplace le motif par la date et l'heure actuelle au format : jj/mm/aaaa hh:mm:ss",
|
|
117
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import Field from "./Fields/Field";
|
|
2
|
+
import React from "$react";
|
|
3
|
+
import {classExtends,isFunction,isNonNullString,defaultStr,defaultObj,defaultVal,extendObj} from "$utils";
|
|
4
|
+
import {warning,Forms} from "./utils";
|
|
5
|
+
import Action from "./Action";
|
|
6
|
+
import View from "$ecomponents/View";
|
|
7
|
+
import KeyboardAvoidingView from "./KeyboardAvoidingView";
|
|
8
|
+
import { StyleSheet } from "react-native";
|
|
9
|
+
import APP from "$capp/instance";
|
|
10
|
+
import PropTypes from "prop-types";
|
|
11
|
+
|
|
12
|
+
const defaultComponentNode = View
|
|
13
|
+
|
|
14
|
+
/**** règles d'utilisation :
|
|
15
|
+
1. les forms doivent toujours avoir un nom : chaine de caractère unique pour l'application et non null
|
|
16
|
+
2. tous les champs (Fields) doivent avoir un name et un formName
|
|
17
|
+
3. le nom de la form est unique pour l'application
|
|
18
|
+
4. Les actions de forms sont les buttons qui lorsqu'ils sont cliqués, envoient les données de la form : ils prennent en
|
|
19
|
+
paramètre la data, le contenu de la form
|
|
20
|
+
5. Les Fields doivent obligatoirement avoir un unique nom
|
|
21
|
+
7. Idems pour les fields, les actions de la form doivent avoir un formName, pour le nom de la form à qui ils font référence
|
|
22
|
+
*/
|
|
23
|
+
export default class FormComponent extends React.AppComponent {
|
|
24
|
+
constructor(props) {
|
|
25
|
+
super(props);
|
|
26
|
+
this.isValid = this.isValid.bind(this);
|
|
27
|
+
this.getFields = this.getFields.bind(this);
|
|
28
|
+
this.getField = this.getField.bind(this);
|
|
29
|
+
this.resetFields = this.resetFields.bind(this);
|
|
30
|
+
this.getData = this.getData.bind(this);
|
|
31
|
+
Forms.trigger("mount",props.name,this);
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
getErrorText(){
|
|
35
|
+
return defaultStr(this.___errorText);
|
|
36
|
+
}
|
|
37
|
+
/*** vérifie si la form est valide */
|
|
38
|
+
isValid () {
|
|
39
|
+
let fields = this.getFields();
|
|
40
|
+
this.___errorText = "";
|
|
41
|
+
if(isObj(fields)){
|
|
42
|
+
for(var j in fields){
|
|
43
|
+
const f = fields[j];
|
|
44
|
+
if(f && !f.isValid() && f.getErrorText){
|
|
45
|
+
this.___errorText = f.getErrorText(true);
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
/*** retourne les données du formulaire
|
|
54
|
+
* on retourne en plus des données initialement passées en paramètre, la liste des données
|
|
55
|
+
* qui ont été modifiées
|
|
56
|
+
*/
|
|
57
|
+
getData(options){
|
|
58
|
+
if(isObj(options) && options.handleChange === false){
|
|
59
|
+
return defaultObj(this.props.data);
|
|
60
|
+
}
|
|
61
|
+
const r = Object.assign({},this.props.data);
|
|
62
|
+
let fields = this.getFields();
|
|
63
|
+
if(!isObj(fields)) return r;
|
|
64
|
+
for(var i in fields){
|
|
65
|
+
let field = fields[i];
|
|
66
|
+
if(!isField(field)) continue;
|
|
67
|
+
const fName = field.getName(),fValue = field.isValid() ? field.getValidValue(r) : field.getInvalidValue();
|
|
68
|
+
r[fName] = fValue;
|
|
69
|
+
if(fValue === undefined && field.isHtml()){
|
|
70
|
+
delete r[fName];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return r;
|
|
74
|
+
}
|
|
75
|
+
componentWillUnmount(){
|
|
76
|
+
super.componentWillUnmount();
|
|
77
|
+
Forms.trigger("unmount",this.props.name);
|
|
78
|
+
}
|
|
79
|
+
componentDidMount(){
|
|
80
|
+
super.componentDidMount();
|
|
81
|
+
Forms.trigger("mount",this.props.name,this,false);
|
|
82
|
+
}
|
|
83
|
+
resetFields(){
|
|
84
|
+
this._fields = {}
|
|
85
|
+
}
|
|
86
|
+
getFields (){
|
|
87
|
+
return this._fields;
|
|
88
|
+
}
|
|
89
|
+
getField (fieldName){
|
|
90
|
+
if(!isNonNullString(fieldName)) return null;
|
|
91
|
+
let fields = defaultObj(this.getFields());
|
|
92
|
+
return fields[fieldName] || null;
|
|
93
|
+
}
|
|
94
|
+
render (){
|
|
95
|
+
let {
|
|
96
|
+
Component,
|
|
97
|
+
onValidate,
|
|
98
|
+
onNoValidate,
|
|
99
|
+
onValidateField,
|
|
100
|
+
onSubmit,
|
|
101
|
+
perm,
|
|
102
|
+
onNoValidateField,
|
|
103
|
+
onKeyEvent,
|
|
104
|
+
keyboardEvents,
|
|
105
|
+
testID,
|
|
106
|
+
...rest
|
|
107
|
+
} = this.props;
|
|
108
|
+
rest = defaultObj(rest);
|
|
109
|
+
const ComponentNode = defaultVal(Component,defaultComponentNode);
|
|
110
|
+
testID = defaultStr(testID,"RN_FormComponent");
|
|
111
|
+
return (<KeyboardAvoidingView testID={testID+"_KeyboardAvoidingView"}>
|
|
112
|
+
<ComponentNode {...rest} testID={testID} style={[styles.container,rest.style]}>
|
|
113
|
+
{this.props.children}
|
|
114
|
+
</ComponentNode>
|
|
115
|
+
</KeyboardAvoidingView>);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const isField = (Component)=>{
|
|
119
|
+
return classExtends(Component,Field);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const isForm = (Component)=>{
|
|
123
|
+
return classExtends(Component,FormComponent);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const getForm = (formName)=>{
|
|
127
|
+
if(!isNonNullString(formName)) return null;
|
|
128
|
+
if(!isObj(Forms) || !isObj(Forms.forms)) return null;
|
|
129
|
+
if(!isForm(Forms.forms[formName])) return null;
|
|
130
|
+
return APP.FormsManager.forms[formName];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if(!isFunction(Forms.get)){
|
|
134
|
+
Object.defineProperties(Forms,{
|
|
135
|
+
get : {
|
|
136
|
+
value : getForm,override:false,writable:false
|
|
137
|
+
},
|
|
138
|
+
getForm : {
|
|
139
|
+
value : getForm,override:false,writable:false
|
|
140
|
+
},
|
|
141
|
+
isForm : {
|
|
142
|
+
value : isForm,override:false,writable:false
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
Object.defineProperties(FormComponent,
|
|
148
|
+
{
|
|
149
|
+
Action : {
|
|
150
|
+
value : Action,
|
|
151
|
+
override : false,
|
|
152
|
+
writable : false,
|
|
153
|
+
},
|
|
154
|
+
isField : {
|
|
155
|
+
value : isField,
|
|
156
|
+
override : false,
|
|
157
|
+
writable : false
|
|
158
|
+
},
|
|
159
|
+
'warning' : {
|
|
160
|
+
value : warning,
|
|
161
|
+
override : false,
|
|
162
|
+
writable : false
|
|
163
|
+
},
|
|
164
|
+
isForm : {
|
|
165
|
+
value : isForm,writable:false,override:false
|
|
166
|
+
},
|
|
167
|
+
getForm : {
|
|
168
|
+
value : getForm,writable:false,override:false
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
FormComponent.propTypes = {
|
|
175
|
+
/*** la permission qu'à l'utilisateur sur le champ
|
|
176
|
+
* chaine de caractère de la forme :
|
|
177
|
+
* resource : action où resource représente la resource en question et action : l'action sur la resource
|
|
178
|
+
*/
|
|
179
|
+
perm : PropTypes.string,
|
|
180
|
+
/**** cette fonction est appelée lorsque les données du formulaire sont appelées
|
|
181
|
+
* elle est appelée à partir du composant Field, lorsque le formulaire est valide et que le bouton Entrée à été cliqué
|
|
182
|
+
* onSubmit ({data,context,currentField})
|
|
183
|
+
* la props currentField : représente le champ qui est à l'origine de l'envoie du formulaire
|
|
184
|
+
*/
|
|
185
|
+
onSubmit : PropTypes.func,
|
|
186
|
+
Component : PropTypes.any,//le composant react qui est utilisée pour monter la form, par défaut, le Fragment React
|
|
187
|
+
name : PropTypes.string, //le nom de la form
|
|
188
|
+
onValidate : PropTypes.func, //lorsque tous les champs de la form sont validés
|
|
189
|
+
/*** Cette fonction est appelée lorsque au moins un champ de la form n'est pas valide :
|
|
190
|
+
* elle prend en paramètre :
|
|
191
|
+
* -name : le nom du champ,
|
|
192
|
+
* -value : la valeur qui n'a pas été validée pour le champ,
|
|
193
|
+
* -msg : Le message d'erreur correspondant
|
|
194
|
+
* -validRule : La règle de validation,
|
|
195
|
+
* -validParams : Les paramètres de validation,
|
|
196
|
+
* -event : L'évènement utilisée qui a déclanché la validation du formulaire
|
|
197
|
+
*/
|
|
198
|
+
onNovalidate : PropTypes.func, //lorsque au moins un champ de la form n'est pas validée,
|
|
199
|
+
onValidateField : PropTypes.func,
|
|
200
|
+
/*** objet de la forme :
|
|
201
|
+
* {
|
|
202
|
+
|
|
203
|
+
* eventName : handler
|
|
204
|
+
avec eventName le nom de l'évènement et hanbler la fonction de rappel à appeler
|
|
205
|
+
* }
|
|
206
|
+
*/
|
|
207
|
+
keyboardEvents : PropTypes.oneOfType([
|
|
208
|
+
PropTypes.object,
|
|
209
|
+
PropTypes.func,
|
|
210
|
+
]),
|
|
211
|
+
onKeyEvent : PropTypes.func/*** l'évènement global appelé lorsqu'on clique sur une champ de la form */,
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const styles = StyleSheet.create({
|
|
215
|
+
container : {
|
|
216
|
+
width : '100%',
|
|
217
|
+
flexDirection : 'row',
|
|
218
|
+
padding : 10,
|
|
219
|
+
flexWrap : 'wrap',
|
|
220
|
+
}
|
|
221
|
+
})
|