satis 1.0.75 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +11 -0
- data/.gitignore +15 -0
- data/.nvmrc +1 -0
- data/.rubocop.yml +18 -0
- data/Gemfile +27 -0
- data/Procfile +2 -0
- data/README.md +47 -25
- data/TODO.md +26 -0
- data/app/assets/config/satis_manifest.js +8 -1
- data/app/assets/fontawesome/brands.js +6 -0
- data/app/assets/fontawesome/fontawesome.js +6 -0
- data/app/assets/fontawesome/solid.js +6 -0
- data/app/assets/images/satis/flags/1x1/ac.svg +81 -0
- data/app/assets/images/satis/flags/1x1/ad.svg +148 -0
- data/app/assets/images/satis/flags/1x1/ae.svg +6 -0
- data/app/assets/images/satis/flags/1x1/af.svg +81 -0
- data/app/assets/images/satis/flags/1x1/ag.svg +14 -0
- data/app/assets/images/satis/flags/1x1/ai.svg +763 -0
- data/app/assets/images/satis/flags/1x1/al.svg +5 -0
- data/app/assets/images/satis/flags/1x1/am.svg +5 -0
- data/app/assets/images/satis/flags/1x1/ao.svg +13 -0
- data/app/assets/images/satis/flags/1x1/aq.svg +5 -0
- data/app/assets/images/satis/flags/1x1/ar.svg +31 -0
- data/app/assets/images/satis/flags/1x1/as.svg +33 -0
- data/app/assets/images/satis/flags/1x1/at.svg +6 -0
- data/app/assets/images/satis/flags/1x1/au.svg +11 -0
- data/app/assets/images/satis/flags/1x1/aw.svg +186 -0
- data/app/assets/images/satis/flags/1x1/ax.svg +18 -0
- data/app/assets/images/satis/flags/1x1/az.svg +8 -0
- data/app/assets/images/satis/flags/1x1/ba.svg +12 -0
- data/app/assets/images/satis/flags/1x1/bb.svg +6 -0
- data/app/assets/images/satis/flags/1x1/bd.svg +4 -0
- data/app/assets/images/satis/flags/1x1/be.svg +7 -0
- data/app/assets/images/satis/flags/1x1/bf.svg +7 -0
- data/app/assets/images/satis/flags/1x1/bg.svg +7 -0
- data/app/assets/images/satis/flags/1x1/bh.svg +9 -0
- data/app/assets/images/satis/flags/1x1/bi.svg +15 -0
- data/app/assets/images/satis/flags/1x1/bj.svg +14 -0
- data/app/assets/images/satis/flags/1x1/bl.svg +7 -0
- data/app/assets/images/satis/flags/1x1/bm.svg +99 -0
- data/app/assets/images/satis/flags/1x1/bn.svg +36 -0
- data/app/assets/images/satis/flags/1x1/bo.svg +678 -0
- data/app/assets/images/satis/flags/1x1/bq.svg +5 -0
- data/app/assets/images/satis/flags/1x1/br.svg +45 -0
- data/app/assets/images/satis/flags/1x1/bs.svg +13 -0
- data/app/assets/images/satis/flags/1x1/bt.svg +89 -0
- data/app/assets/images/satis/flags/1x1/bv.svg +13 -0
- data/app/assets/images/satis/flags/1x1/bw.svg +7 -0
- data/app/assets/images/satis/flags/1x1/by.svg +22 -0
- data/app/assets/images/satis/flags/1x1/bz.svg +145 -0
- data/app/assets/images/satis/flags/1x1/ca.svg +4 -0
- data/app/assets/images/satis/flags/1x1/cc.svg +19 -0
- data/app/assets/images/satis/flags/1x1/cd.svg +12 -0
- data/app/assets/images/satis/flags/1x1/cf.svg +15 -0
- data/app/assets/images/satis/flags/1x1/cg.svg +12 -0
- data/app/assets/images/satis/flags/1x1/ch.svg +9 -0
- data/app/assets/images/satis/flags/1x1/ci.svg +7 -0
- data/app/assets/images/satis/flags/1x1/ck.svg +11 -0
- data/app/assets/images/satis/flags/1x1/cl.svg +13 -0
- data/app/assets/images/satis/flags/1x1/cm.svg +15 -0
- data/app/assets/images/satis/flags/1x1/cn.svg +11 -0
- data/app/assets/images/satis/flags/1x1/co.svg +7 -0
- data/app/assets/images/satis/flags/1x1/cp.svg +7 -0
- data/app/assets/images/satis/flags/1x1/cr.svg +7 -0
- data/app/assets/images/satis/flags/1x1/cu.svg +13 -0
- data/app/assets/images/satis/flags/1x1/cv.svg +13 -0
- data/app/assets/images/satis/flags/1x1/cw.svg +14 -0
- data/app/assets/images/satis/flags/1x1/cx.svg +15 -0
- data/app/assets/images/satis/flags/1x1/cy.svg +6 -0
- data/app/assets/images/satis/flags/1x1/cz.svg +5 -0
- data/app/assets/images/satis/flags/1x1/de.svg +5 -0
- data/app/assets/images/satis/flags/1x1/dg.svg +140 -0
- data/app/assets/images/satis/flags/1x1/dj.svg +13 -0
- data/app/assets/images/satis/flags/1x1/dk.svg +5 -0
- data/app/assets/images/satis/flags/1x1/dm.svg +152 -0
- data/app/assets/images/satis/flags/1x1/do.svg +6745 -0
- data/app/assets/images/satis/flags/1x1/dz.svg +5 -0
- data/app/assets/images/satis/flags/1x1/ea.svg +547 -0
- data/app/assets/images/satis/flags/1x1/ec.svg +138 -0
- data/app/assets/images/satis/flags/1x1/ee.svg +7 -0
- data/app/assets/images/satis/flags/1x1/eg.svg +38 -0
- data/app/assets/images/satis/flags/1x1/eh.svg +16 -0
- data/app/assets/images/satis/flags/1x1/er.svg +13 -0
- data/app/assets/images/satis/flags/1x1/es-ct.svg +4 -0
- data/app/assets/images/satis/flags/1x1/es-ga.svg +189 -0
- data/app/assets/images/satis/flags/1x1/es.svg +547 -0
- data/app/assets/images/satis/flags/1x1/et.svg +14 -0
- data/app/assets/images/satis/flags/1x1/eu.svg +28 -0
- data/app/assets/images/satis/flags/1x1/fi.svg +5 -0
- data/app/assets/images/satis/flags/1x1/fj.svg +125 -0
- data/app/assets/images/satis/flags/1x1/fk.svg +93 -0
- data/app/assets/images/satis/flags/1x1/fm.svg +11 -0
- data/app/assets/images/satis/flags/1x1/fo.svg +12 -0
- data/app/assets/images/satis/flags/1x1/fr.svg +7 -0
- data/app/assets/images/satis/flags/1x1/ga.svg +7 -0
- data/app/assets/images/satis/flags/1x1/gb-eng.svg +5 -0
- data/app/assets/images/satis/flags/1x1/gb-nir.svg +131 -0
- data/app/assets/images/satis/flags/1x1/gb-sct.svg +4 -0
- data/app/assets/images/satis/flags/1x1/gb-wls.svg +9 -0
- data/app/assets/images/satis/flags/1x1/gb.svg +7 -0
- data/app/assets/images/satis/flags/1x1/gd.svg +27 -0
- data/app/assets/images/satis/flags/1x1/ge.svg +6 -0
- data/app/assets/images/satis/flags/1x1/gf.svg +7 -0
- data/app/assets/images/satis/flags/1x1/gg.svg +9 -0
- data/app/assets/images/satis/flags/1x1/gh.svg +6 -0
- data/app/assets/images/satis/flags/1x1/gi.svg +32 -0
- data/app/assets/images/satis/flags/1x1/gl.svg +4 -0
- data/app/assets/images/satis/flags/1x1/gm.svg +9 -0
- data/app/assets/images/satis/flags/1x1/gn.svg +7 -0
- data/app/assets/images/satis/flags/1x1/gp.svg +7 -0
- data/app/assets/images/satis/flags/1x1/gq.svg +23 -0
- data/app/assets/images/satis/flags/1x1/gr.svg +16 -0
- data/app/assets/images/satis/flags/1x1/gs.svg +245 -0
- data/app/assets/images/satis/flags/1x1/gt.svg +204 -0
- data/app/assets/images/satis/flags/1x1/gu.svg +39 -0
- data/app/assets/images/satis/flags/1x1/gw.svg +15 -0
- data/app/assets/images/satis/flags/1x1/gy.svg +9 -0
- data/app/assets/images/satis/flags/1x1/hk.svg +30 -0
- data/app/assets/images/satis/flags/1x1/hm.svg +11 -0
- data/app/assets/images/satis/flags/1x1/hn.svg +18 -0
- data/app/assets/images/satis/flags/1x1/hr.svg +56 -0
- data/app/assets/images/satis/flags/1x1/ht.svg +116 -0
- data/app/assets/images/satis/flags/1x1/hu.svg +7 -0
- data/app/assets/images/satis/flags/1x1/ic.svg +7 -0
- data/app/assets/images/satis/flags/1x1/id.svg +6 -0
- data/app/assets/images/satis/flags/1x1/ie.svg +7 -0
- data/app/assets/images/satis/flags/1x1/il.svg +14 -0
- data/app/assets/images/satis/flags/1x1/im.svg +36 -0
- data/app/assets/images/satis/flags/1x1/in.svg +25 -0
- data/app/assets/images/satis/flags/1x1/io.svg +140 -0
- data/app/assets/images/satis/flags/1x1/iq.svg +10 -0
- data/app/assets/images/satis/flags/1x1/ir.svg +219 -0
- data/app/assets/images/satis/flags/1x1/is.svg +12 -0
- data/app/assets/images/satis/flags/1x1/it.svg +7 -0
- data/app/assets/images/satis/flags/1x1/je.svg +47 -0
- data/app/assets/images/satis/flags/1x1/jm.svg +8 -0
- data/app/assets/images/satis/flags/1x1/jo.svg +16 -0
- data/app/assets/images/satis/flags/1x1/jp.svg +11 -0
- data/app/assets/images/satis/flags/1x1/ke.svg +23 -0
- data/app/assets/images/satis/flags/1x1/kg.svg +15 -0
- data/app/assets/images/satis/flags/1x1/kh.svg +61 -0
- data/app/assets/images/satis/flags/1x1/ki.svg +36 -0
- data/app/assets/images/satis/flags/1x1/km.svg +16 -0
- data/app/assets/images/satis/flags/1x1/kn.svg +14 -0
- data/app/assets/images/satis/flags/1x1/kp.svg +15 -0
- data/app/assets/images/satis/flags/1x1/kr.svg +24 -0
- data/app/assets/images/satis/flags/1x1/kw.svg +13 -0
- data/app/assets/images/satis/flags/1x1/ky.svg +225 -0
- data/app/assets/images/satis/flags/1x1/kz.svg +23 -0
- data/app/assets/images/satis/flags/1x1/la.svg +12 -0
- data/app/assets/images/satis/flags/1x1/lb.svg +15 -0
- data/app/assets/images/satis/flags/1x1/lc.svg +8 -0
- data/app/assets/images/satis/flags/1x1/li.svg +43 -0
- data/app/assets/images/satis/flags/1x1/lk.svg +22 -0
- data/app/assets/images/satis/flags/1x1/lr.svg +14 -0
- data/app/assets/images/satis/flags/1x1/ls.svg +8 -0
- data/app/assets/images/satis/flags/1x1/lt.svg +7 -0
- data/app/assets/images/satis/flags/1x1/lu.svg +5 -0
- data/app/assets/images/satis/flags/1x1/lv.svg +6 -0
- data/app/assets/images/satis/flags/1x1/ly.svg +13 -0
- data/app/assets/images/satis/flags/1x1/ma.svg +4 -0
- data/app/assets/images/satis/flags/1x1/mc.svg +6 -0
- data/app/assets/images/satis/flags/1x1/md.svg +71 -0
- data/app/assets/images/satis/flags/1x1/me.svg +118 -0
- data/app/assets/images/satis/flags/1x1/mf.svg +7 -0
- data/app/assets/images/satis/flags/1x1/mg.svg +7 -0
- data/app/assets/images/satis/flags/1x1/mh.svg +8 -0
- data/app/assets/images/satis/flags/1x1/mk.svg +5 -0
- data/app/assets/images/satis/flags/1x1/ml.svg +7 -0
- data/app/assets/images/satis/flags/1x1/mm.svg +16 -0
- data/app/assets/images/satis/flags/1x1/mn.svg +13 -0
- data/app/assets/images/satis/flags/1x1/mo.svg +9 -0
- data/app/assets/images/satis/flags/1x1/mp.svg +86 -0
- data/app/assets/images/satis/flags/1x1/mq.svg +7 -0
- data/app/assets/images/satis/flags/1x1/mr.svg +6 -0
- data/app/assets/images/satis/flags/1x1/ms.svg +70 -0
- data/app/assets/images/satis/flags/1x1/mt.svg +50 -0
- data/app/assets/images/satis/flags/1x1/mu.svg +8 -0
- data/app/assets/images/satis/flags/1x1/mv.svg +6 -0
- data/app/assets/images/satis/flags/1x1/mw.svg +15 -0
- data/app/assets/images/satis/flags/1x1/mx.svg +378 -0
- data/app/assets/images/satis/flags/1x1/my.svg +11 -0
- data/app/assets/images/satis/flags/1x1/mz.svg +21 -0
- data/app/assets/images/satis/flags/1x1/na.svg +16 -0
- data/app/assets/images/satis/flags/1x1/nc.svg +14 -0
- data/app/assets/images/satis/flags/1x1/ne.svg +6 -0
- data/app/assets/images/satis/flags/1x1/nf.svg +11 -0
- data/app/assets/images/satis/flags/1x1/ng.svg +6 -0
- data/app/assets/images/satis/flags/1x1/ni.svg +129 -0
- data/app/assets/images/satis/flags/1x1/nl.svg +5 -0
- data/app/assets/images/satis/flags/1x1/no.svg +7 -0
- data/app/assets/images/satis/flags/1x1/np.svg +19 -0
- data/app/assets/images/satis/flags/1x1/nr.svg +12 -0
- data/app/assets/images/satis/flags/1x1/nu.svg +26 -0
- data/app/assets/images/satis/flags/1x1/nz.svg +42 -0
- data/app/assets/images/satis/flags/1x1/om.svg +115 -0
- data/app/assets/images/satis/flags/1x1/pa.svg +13 -0
- data/app/assets/images/satis/flags/1x1/pe.svg +244 -0
- data/app/assets/images/satis/flags/1x1/pf.svg +18 -0
- data/app/assets/images/satis/flags/1x1/pg.svg +16 -0
- data/app/assets/images/satis/flags/1x1/ph.svg +9 -0
- data/app/assets/images/satis/flags/1x1/pk.svg +15 -0
- data/app/assets/images/satis/flags/1x1/pl.svg +6 -0
- data/app/assets/images/satis/flags/1x1/pm.svg +7 -0
- data/app/assets/images/satis/flags/1x1/pn.svg +100 -0
- data/app/assets/images/satis/flags/1x1/pr.svg +13 -0
- data/app/assets/images/satis/flags/1x1/ps.svg +15 -0
- data/app/assets/images/satis/flags/1x1/pt.svg +57 -0
- data/app/assets/images/satis/flags/1x1/pw.svg +11 -0
- data/app/assets/images/satis/flags/1x1/py.svg +156 -0
- data/app/assets/images/satis/flags/1x1/qa.svg +4 -0
- data/app/assets/images/satis/flags/1x1/re.svg +7 -0
- data/app/assets/images/satis/flags/1x1/ro.svg +7 -0
- data/app/assets/images/satis/flags/1x1/rs.svg +296 -0
- data/app/assets/images/satis/flags/1x1/ru.svg +7 -0
- data/app/assets/images/satis/flags/1x1/rw.svg +13 -0
- data/app/assets/images/satis/flags/1x1/sa.svg +26 -0
- data/app/assets/images/satis/flags/1x1/sb.svg +13 -0
- data/app/assets/images/satis/flags/1x1/sc.svg +14 -0
- data/app/assets/images/satis/flags/1x1/sd.svg +13 -0
- data/app/assets/images/satis/flags/1x1/se.svg +5 -0
- data/app/assets/images/satis/flags/1x1/sg.svg +13 -0
- data/app/assets/images/satis/flags/1x1/sh.svg +81 -0
- data/app/assets/images/satis/flags/1x1/si.svg +18 -0
- data/app/assets/images/satis/flags/1x1/sj.svg +7 -0
- data/app/assets/images/satis/flags/1x1/sk.svg +9 -0
- data/app/assets/images/satis/flags/1x1/sl.svg +12 -0
- data/app/assets/images/satis/flags/1x1/sm.svg +89 -0
- data/app/assets/images/satis/flags/1x1/sn.svg +8 -0
- data/app/assets/images/satis/flags/1x1/so.svg +11 -0
- data/app/assets/images/satis/flags/1x1/sr.svg +6 -0
- data/app/assets/images/satis/flags/1x1/ss.svg +8 -0
- data/app/assets/images/satis/flags/1x1/st.svg +16 -0
- data/app/assets/images/satis/flags/1x1/sv.svg +594 -0
- data/app/assets/images/satis/flags/1x1/sx.svg +56 -0
- data/app/assets/images/satis/flags/1x1/sy.svg +6 -0
- data/app/assets/images/satis/flags/1x1/sz.svg +45 -0
- data/app/assets/images/satis/flags/1x1/ta.svg +81 -0
- data/app/assets/images/satis/flags/1x1/tc.svg +52 -0
- data/app/assets/images/satis/flags/1x1/td.svg +7 -0
- data/app/assets/images/satis/flags/1x1/tf.svg +15 -0
- data/app/assets/images/satis/flags/1x1/tg.svg +14 -0
- data/app/assets/images/satis/flags/1x1/th.svg +7 -0
- data/app/assets/images/satis/flags/1x1/tj.svg +26 -0
- data/app/assets/images/satis/flags/1x1/tk.svg +5 -0
- data/app/assets/images/satis/flags/1x1/tl.svg +13 -0
- data/app/assets/images/satis/flags/1x1/tm.svg +203 -0
- data/app/assets/images/satis/flags/1x1/tn.svg +13 -0
- data/app/assets/images/satis/flags/1x1/to.svg +10 -0
- data/app/assets/images/satis/flags/1x1/tr.svg +8 -0
- data/app/assets/images/satis/flags/1x1/tt.svg +7 -0
- data/app/assets/images/satis/flags/1x1/tv.svg +16 -0
- data/app/assets/images/satis/flags/1x1/tw.svg +32 -0
- data/app/assets/images/satis/flags/1x1/tz.svg +15 -0
- data/app/assets/images/satis/flags/1x1/ua.svg +6 -0
- data/app/assets/images/satis/flags/1x1/ug.svg +30 -0
- data/app/assets/images/satis/flags/1x1/um.svg +15 -0
- data/app/assets/images/satis/flags/1x1/un.svg +16 -0
- data/app/assets/images/satis/flags/1x1/us.svg +10 -0
- data/app/assets/images/satis/flags/1x1/uy.svg +28 -0
- data/app/assets/images/satis/flags/1x1/uz.svg +30 -0
- data/app/assets/images/satis/flags/1x1/va.svg +479 -0
- data/app/assets/images/satis/flags/1x1/vc.svg +8 -0
- data/app/assets/images/satis/flags/1x1/ve.svg +26 -0
- data/app/assets/images/satis/flags/1x1/vg.svg +127 -0
- data/app/assets/images/satis/flags/1x1/vi.svg +28 -0
- data/app/assets/images/satis/flags/1x1/vn.svg +11 -0
- data/app/assets/images/satis/flags/1x1/vu.svg +18 -0
- data/app/assets/images/satis/flags/1x1/wf.svg +7 -0
- data/app/assets/images/satis/flags/1x1/ws.svg +7 -0
- data/app/assets/images/satis/flags/1x1/xk.svg +16 -0
- data/app/assets/images/satis/flags/1x1/xx.svg +5 -0
- data/app/assets/images/satis/flags/1x1/ye.svg +7 -0
- data/app/assets/images/satis/flags/1x1/yt.svg +7 -0
- data/app/assets/images/satis/flags/1x1/za.svg +17 -0
- data/app/assets/images/satis/flags/1x1/zm.svg +27 -0
- data/app/assets/images/satis/flags/1x1/zw.svg +21 -0
- data/app/assets/images/satis/flags/4x3/ac.svg +76 -0
- data/app/assets/images/satis/flags/4x3/ad.svg +150 -0
- data/app/assets/images/satis/flags/4x3/ae.svg +6 -0
- data/app/assets/images/satis/flags/4x3/af.svg +81 -0
- data/app/assets/images/satis/flags/4x3/ag.svg +14 -0
- data/app/assets/images/satis/flags/4x3/ai.svg +763 -0
- data/app/assets/images/satis/flags/4x3/al.svg +5 -0
- data/app/assets/images/satis/flags/4x3/am.svg +5 -0
- data/app/assets/images/satis/flags/4x3/ao.svg +13 -0
- data/app/assets/images/satis/flags/4x3/aq.svg +5 -0
- data/app/assets/images/satis/flags/4x3/ar.svg +31 -0
- data/app/assets/images/satis/flags/4x3/as.svg +33 -0
- data/app/assets/images/satis/flags/4x3/at.svg +6 -0
- data/app/assets/images/satis/flags/4x3/au.svg +9 -0
- data/app/assets/images/satis/flags/4x3/aw.svg +186 -0
- data/app/assets/images/satis/flags/4x3/ax.svg +18 -0
- data/app/assets/images/satis/flags/4x3/az.svg +8 -0
- data/app/assets/images/satis/flags/4x3/ba.svg +12 -0
- data/app/assets/images/satis/flags/4x3/bb.svg +6 -0
- data/app/assets/images/satis/flags/4x3/bd.svg +4 -0
- data/app/assets/images/satis/flags/4x3/be.svg +7 -0
- data/app/assets/images/satis/flags/4x3/bf.svg +7 -0
- data/app/assets/images/satis/flags/4x3/bg.svg +7 -0
- data/app/assets/images/satis/flags/4x3/bh.svg +9 -0
- data/app/assets/images/satis/flags/4x3/bi.svg +15 -0
- data/app/assets/images/satis/flags/4x3/bj.svg +14 -0
- data/app/assets/images/satis/flags/4x3/bl.svg +7 -0
- data/app/assets/images/satis/flags/4x3/bm.svg +99 -0
- data/app/assets/images/satis/flags/4x3/bn.svg +36 -0
- data/app/assets/images/satis/flags/4x3/bo.svg +676 -0
- data/app/assets/images/satis/flags/4x3/bq.svg +5 -0
- data/app/assets/images/satis/flags/4x3/br.svg +45 -0
- data/app/assets/images/satis/flags/4x3/bs.svg +13 -0
- data/app/assets/images/satis/flags/4x3/bt.svg +89 -0
- data/app/assets/images/satis/flags/4x3/bv.svg +13 -0
- data/app/assets/images/satis/flags/4x3/bw.svg +7 -0
- data/app/assets/images/satis/flags/4x3/by.svg +20 -0
- data/app/assets/images/satis/flags/4x3/bz.svg +145 -0
- data/app/assets/images/satis/flags/4x3/ca.svg +4 -0
- data/app/assets/images/satis/flags/4x3/cc.svg +19 -0
- data/app/assets/images/satis/flags/4x3/cd.svg +5 -0
- data/app/assets/images/satis/flags/4x3/cf.svg +15 -0
- data/app/assets/images/satis/flags/4x3/cg.svg +12 -0
- data/app/assets/images/satis/flags/4x3/ch.svg +9 -0
- data/app/assets/images/satis/flags/4x3/ci.svg +7 -0
- data/app/assets/images/satis/flags/4x3/ck.svg +9 -0
- data/app/assets/images/satis/flags/4x3/cl.svg +13 -0
- data/app/assets/images/satis/flags/4x3/cm.svg +15 -0
- data/app/assets/images/satis/flags/4x3/cn.svg +11 -0
- data/app/assets/images/satis/flags/4x3/co.svg +7 -0
- data/app/assets/images/satis/flags/4x3/cp.svg +7 -0
- data/app/assets/images/satis/flags/4x3/cr.svg +7 -0
- data/app/assets/images/satis/flags/4x3/cu.svg +13 -0
- data/app/assets/images/satis/flags/4x3/cv.svg +13 -0
- data/app/assets/images/satis/flags/4x3/cw.svg +14 -0
- data/app/assets/images/satis/flags/4x3/cx.svg +15 -0
- data/app/assets/images/satis/flags/4x3/cy.svg +6 -0
- data/app/assets/images/satis/flags/4x3/cz.svg +5 -0
- data/app/assets/images/satis/flags/4x3/de.svg +5 -0
- data/app/assets/images/satis/flags/4x3/dg.svg +138 -0
- data/app/assets/images/satis/flags/4x3/dj.svg +13 -0
- data/app/assets/images/satis/flags/4x3/dk.svg +5 -0
- data/app/assets/images/satis/flags/4x3/dm.svg +152 -0
- data/app/assets/images/satis/flags/4x3/do.svg +6745 -0
- data/app/assets/images/satis/flags/4x3/dz.svg +5 -0
- data/app/assets/images/satis/flags/4x3/ea.svg +544 -0
- data/app/assets/images/satis/flags/4x3/ec.svg +138 -0
- data/app/assets/images/satis/flags/4x3/ee.svg +7 -0
- data/app/assets/images/satis/flags/4x3/eg.svg +38 -0
- data/app/assets/images/satis/flags/4x3/eh.svg +16 -0
- data/app/assets/images/satis/flags/4x3/er.svg +8 -0
- data/app/assets/images/satis/flags/4x3/es-ct.svg +4 -0
- data/app/assets/images/satis/flags/4x3/es-ga.svg +189 -0
- data/app/assets/images/satis/flags/4x3/es.svg +544 -0
- data/app/assets/images/satis/flags/4x3/et.svg +14 -0
- data/app/assets/images/satis/flags/4x3/eu.svg +28 -0
- data/app/assets/images/satis/flags/4x3/fi.svg +5 -0
- data/app/assets/images/satis/flags/4x3/fj.svg +122 -0
- data/app/assets/images/satis/flags/4x3/fk.svg +90 -0
- data/app/assets/images/satis/flags/4x3/fm.svg +11 -0
- data/app/assets/images/satis/flags/4x3/fo.svg +12 -0
- data/app/assets/images/satis/flags/4x3/fr.svg +7 -0
- data/app/assets/images/satis/flags/4x3/ga.svg +7 -0
- data/app/assets/images/satis/flags/4x3/gb-eng.svg +5 -0
- data/app/assets/images/satis/flags/4x3/gb-nir.svg +132 -0
- data/app/assets/images/satis/flags/4x3/gb-sct.svg +4 -0
- data/app/assets/images/satis/flags/4x3/gb-wls.svg +9 -0
- data/app/assets/images/satis/flags/4x3/gb.svg +7 -0
- data/app/assets/images/satis/flags/4x3/gd.svg +27 -0
- data/app/assets/images/satis/flags/4x3/ge.svg +6 -0
- data/app/assets/images/satis/flags/4x3/gf.svg +7 -0
- data/app/assets/images/satis/flags/4x3/gg.svg +9 -0
- data/app/assets/images/satis/flags/4x3/gh.svg +6 -0
- data/app/assets/images/satis/flags/4x3/gi.svg +32 -0
- data/app/assets/images/satis/flags/4x3/gl.svg +4 -0
- data/app/assets/images/satis/flags/4x3/gm.svg +14 -0
- data/app/assets/images/satis/flags/4x3/gn.svg +7 -0
- data/app/assets/images/satis/flags/4x3/gp.svg +7 -0
- data/app/assets/images/satis/flags/4x3/gq.svg +23 -0
- data/app/assets/images/satis/flags/4x3/gr.svg +16 -0
- data/app/assets/images/satis/flags/4x3/gs.svg +242 -0
- data/app/assets/images/satis/flags/4x3/gt.svg +204 -0
- data/app/assets/images/satis/flags/4x3/gu.svg +39 -0
- data/app/assets/images/satis/flags/4x3/gw.svg +13 -0
- data/app/assets/images/satis/flags/4x3/gy.svg +9 -0
- data/app/assets/images/satis/flags/4x3/hk.svg +30 -0
- data/app/assets/images/satis/flags/4x3/hm.svg +9 -0
- data/app/assets/images/satis/flags/4x3/hn.svg +18 -0
- data/app/assets/images/satis/flags/4x3/hr.svg +58 -0
- data/app/assets/images/satis/flags/4x3/ht.svg +116 -0
- data/app/assets/images/satis/flags/4x3/hu.svg +7 -0
- data/app/assets/images/satis/flags/4x3/ic.svg +7 -0
- data/app/assets/images/satis/flags/4x3/id.svg +6 -0
- data/app/assets/images/satis/flags/4x3/ie.svg +7 -0
- data/app/assets/images/satis/flags/4x3/il.svg +14 -0
- data/app/assets/images/satis/flags/4x3/im.svg +36 -0
- data/app/assets/images/satis/flags/4x3/in.svg +25 -0
- data/app/assets/images/satis/flags/4x3/io.svg +138 -0
- data/app/assets/images/satis/flags/4x3/iq.svg +10 -0
- data/app/assets/images/satis/flags/4x3/ir.svg +219 -0
- data/app/assets/images/satis/flags/4x3/is.svg +12 -0
- data/app/assets/images/satis/flags/4x3/it.svg +7 -0
- data/app/assets/images/satis/flags/4x3/je.svg +47 -0
- data/app/assets/images/satis/flags/4x3/jm.svg +8 -0
- data/app/assets/images/satis/flags/4x3/jo.svg +16 -0
- data/app/assets/images/satis/flags/4x3/jp.svg +11 -0
- data/app/assets/images/satis/flags/4x3/ke.svg +23 -0
- data/app/assets/images/satis/flags/4x3/kg.svg +15 -0
- data/app/assets/images/satis/flags/4x3/kh.svg +61 -0
- data/app/assets/images/satis/flags/4x3/ki.svg +36 -0
- data/app/assets/images/satis/flags/4x3/km.svg +16 -0
- data/app/assets/images/satis/flags/4x3/kn.svg +14 -0
- data/app/assets/images/satis/flags/4x3/kp.svg +15 -0
- data/app/assets/images/satis/flags/4x3/kr.svg +24 -0
- data/app/assets/images/satis/flags/4x3/kw.svg +13 -0
- data/app/assets/images/satis/flags/4x3/ky.svg +225 -0
- data/app/assets/images/satis/flags/4x3/kz.svg +23 -0
- data/app/assets/images/satis/flags/4x3/la.svg +12 -0
- data/app/assets/images/satis/flags/4x3/lb.svg +15 -0
- data/app/assets/images/satis/flags/4x3/lc.svg +8 -0
- data/app/assets/images/satis/flags/4x3/li.svg +43 -0
- data/app/assets/images/satis/flags/4x3/lk.svg +22 -0
- data/app/assets/images/satis/flags/4x3/lr.svg +14 -0
- data/app/assets/images/satis/flags/4x3/ls.svg +8 -0
- data/app/assets/images/satis/flags/4x3/lt.svg +7 -0
- data/app/assets/images/satis/flags/4x3/lu.svg +5 -0
- data/app/assets/images/satis/flags/4x3/lv.svg +6 -0
- data/app/assets/images/satis/flags/4x3/ly.svg +13 -0
- data/app/assets/images/satis/flags/4x3/ma.svg +4 -0
- data/app/assets/images/satis/flags/4x3/mc.svg +6 -0
- data/app/assets/images/satis/flags/4x3/md.svg +70 -0
- data/app/assets/images/satis/flags/4x3/me.svg +116 -0
- data/app/assets/images/satis/flags/4x3/mf.svg +7 -0
- data/app/assets/images/satis/flags/4x3/mg.svg +7 -0
- data/app/assets/images/satis/flags/4x3/mh.svg +7 -0
- data/app/assets/images/satis/flags/4x3/mk.svg +5 -0
- data/app/assets/images/satis/flags/4x3/ml.svg +7 -0
- data/app/assets/images/satis/flags/4x3/mm.svg +16 -0
- data/app/assets/images/satis/flags/4x3/mn.svg +13 -0
- data/app/assets/images/satis/flags/4x3/mo.svg +9 -0
- data/app/assets/images/satis/flags/4x3/mp.svg +86 -0
- data/app/assets/images/satis/flags/4x3/mq.svg +7 -0
- data/app/assets/images/satis/flags/4x3/mr.svg +6 -0
- data/app/assets/images/satis/flags/4x3/ms.svg +78 -0
- data/app/assets/images/satis/flags/4x3/mt.svg +49 -0
- data/app/assets/images/satis/flags/4x3/mu.svg +8 -0
- data/app/assets/images/satis/flags/4x3/mv.svg +6 -0
- data/app/assets/images/satis/flags/4x3/mw.svg +10 -0
- data/app/assets/images/satis/flags/4x3/mx.svg +382 -0
- data/app/assets/images/satis/flags/4x3/my.svg +11 -0
- data/app/assets/images/satis/flags/4x3/mz.svg +21 -0
- data/app/assets/images/satis/flags/4x3/na.svg +16 -0
- data/app/assets/images/satis/flags/4x3/nc.svg +14 -0
- data/app/assets/images/satis/flags/4x3/ne.svg +6 -0
- data/app/assets/images/satis/flags/4x3/nf.svg +9 -0
- data/app/assets/images/satis/flags/4x3/ng.svg +6 -0
- data/app/assets/images/satis/flags/4x3/ni.svg +129 -0
- data/app/assets/images/satis/flags/4x3/nl.svg +5 -0
- data/app/assets/images/satis/flags/4x3/no.svg +7 -0
- data/app/assets/images/satis/flags/4x3/np.svg +14 -0
- data/app/assets/images/satis/flags/4x3/nr.svg +12 -0
- data/app/assets/images/satis/flags/4x3/nu.svg +26 -0
- data/app/assets/images/satis/flags/4x3/nz.svg +42 -0
- data/app/assets/images/satis/flags/4x3/om.svg +115 -0
- data/app/assets/images/satis/flags/4x3/pa.svg +14 -0
- data/app/assets/images/satis/flags/4x3/pe.svg +244 -0
- data/app/assets/images/satis/flags/4x3/pf.svg +19 -0
- data/app/assets/images/satis/flags/4x3/pg.svg +9 -0
- data/app/assets/images/satis/flags/4x3/ph.svg +9 -0
- data/app/assets/images/satis/flags/4x3/pk.svg +15 -0
- data/app/assets/images/satis/flags/4x3/pl.svg +6 -0
- data/app/assets/images/satis/flags/4x3/pm.svg +7 -0
- data/app/assets/images/satis/flags/4x3/pn.svg +97 -0
- data/app/assets/images/satis/flags/4x3/pr.svg +13 -0
- data/app/assets/images/satis/flags/4x3/ps.svg +15 -0
- data/app/assets/images/satis/flags/4x3/pt.svg +57 -0
- data/app/assets/images/satis/flags/4x3/pw.svg +11 -0
- data/app/assets/images/satis/flags/4x3/py.svg +157 -0
- data/app/assets/images/satis/flags/4x3/qa.svg +4 -0
- data/app/assets/images/satis/flags/4x3/re.svg +7 -0
- data/app/assets/images/satis/flags/4x3/ro.svg +7 -0
- data/app/assets/images/satis/flags/4x3/rs.svg +292 -0
- data/app/assets/images/satis/flags/4x3/ru.svg +7 -0
- data/app/assets/images/satis/flags/4x3/rw.svg +13 -0
- data/app/assets/images/satis/flags/4x3/sa.svg +26 -0
- data/app/assets/images/satis/flags/4x3/sb.svg +13 -0
- data/app/assets/images/satis/flags/4x3/sc.svg +14 -0
- data/app/assets/images/satis/flags/4x3/sd.svg +13 -0
- data/app/assets/images/satis/flags/4x3/se.svg +5 -0
- data/app/assets/images/satis/flags/4x3/sg.svg +13 -0
- data/app/assets/images/satis/flags/4x3/sh.svg +76 -0
- data/app/assets/images/satis/flags/4x3/si.svg +18 -0
- data/app/assets/images/satis/flags/4x3/sj.svg +7 -0
- data/app/assets/images/satis/flags/4x3/sk.svg +9 -0
- data/app/assets/images/satis/flags/4x3/sl.svg +7 -0
- data/app/assets/images/satis/flags/4x3/sm.svg +91 -0
- data/app/assets/images/satis/flags/4x3/sn.svg +8 -0
- data/app/assets/images/satis/flags/4x3/so.svg +11 -0
- data/app/assets/images/satis/flags/4x3/sr.svg +6 -0
- data/app/assets/images/satis/flags/4x3/ss.svg +8 -0
- data/app/assets/images/satis/flags/4x3/st.svg +16 -0
- data/app/assets/images/satis/flags/4x3/sv.svg +594 -0
- data/app/assets/images/satis/flags/4x3/sx.svg +56 -0
- data/app/assets/images/satis/flags/4x3/sy.svg +6 -0
- data/app/assets/images/satis/flags/4x3/sz.svg +45 -0
- data/app/assets/images/satis/flags/4x3/ta.svg +76 -0
- data/app/assets/images/satis/flags/4x3/tc.svg +52 -0
- data/app/assets/images/satis/flags/4x3/td.svg +7 -0
- data/app/assets/images/satis/flags/4x3/tf.svg +15 -0
- data/app/assets/images/satis/flags/4x3/tg.svg +14 -0
- data/app/assets/images/satis/flags/4x3/th.svg +7 -0
- data/app/assets/images/satis/flags/4x3/tj.svg +22 -0
- data/app/assets/images/satis/flags/4x3/tk.svg +5 -0
- data/app/assets/images/satis/flags/4x3/tl.svg +13 -0
- data/app/assets/images/satis/flags/4x3/tm.svg +206 -0
- data/app/assets/images/satis/flags/4x3/tn.svg +13 -0
- data/app/assets/images/satis/flags/4x3/to.svg +10 -0
- data/app/assets/images/satis/flags/4x3/tr.svg +8 -0
- data/app/assets/images/satis/flags/4x3/tt.svg +5 -0
- data/app/assets/images/satis/flags/4x3/tv.svg +16 -0
- data/app/assets/images/satis/flags/4x3/tw.svg +34 -0
- data/app/assets/images/satis/flags/4x3/tz.svg +13 -0
- data/app/assets/images/satis/flags/4x3/ua.svg +6 -0
- data/app/assets/images/satis/flags/4x3/ug.svg +30 -0
- data/app/assets/images/satis/flags/4x3/um.svg +15 -0
- data/app/assets/images/satis/flags/4x3/un.svg +16 -0
- data/app/assets/images/satis/flags/4x3/us.svg +10 -0
- data/app/assets/images/satis/flags/4x3/uy.svg +28 -0
- data/app/assets/images/satis/flags/4x3/uz.svg +30 -0
- data/app/assets/images/satis/flags/4x3/va.svg +479 -0
- data/app/assets/images/satis/flags/4x3/vc.svg +8 -0
- data/app/assets/images/satis/flags/4x3/ve.svg +26 -0
- data/app/assets/images/satis/flags/4x3/vg.svg +127 -0
- data/app/assets/images/satis/flags/4x3/vi.svg +28 -0
- data/app/assets/images/satis/flags/4x3/vn.svg +11 -0
- data/app/assets/images/satis/flags/4x3/vu.svg +18 -0
- data/app/assets/images/satis/flags/4x3/wf.svg +7 -0
- data/app/assets/images/satis/flags/4x3/ws.svg +7 -0
- data/app/assets/images/satis/flags/4x3/xk.svg +16 -0
- data/app/assets/images/satis/flags/4x3/xx.svg +5 -0
- data/app/assets/images/satis/flags/4x3/ye.svg +7 -0
- data/app/assets/images/satis/flags/4x3/yt.svg +7 -0
- data/app/assets/images/satis/flags/4x3/za.svg +17 -0
- data/app/assets/images/satis/flags/4x3/zm.svg +27 -0
- data/app/assets/images/satis/flags/4x3/zw.svg +21 -0
- data/app/assets/images/satis/intl-tel-input/flags.png +0 -0
- data/app/assets/images/satis/intl-tel-input/flags@2x.png +0 -0
- data/app/assets/images/satis/leaflet/layers-2x.png +0 -0
- data/app/assets/images/satis/leaflet/layers.png +0 -0
- data/app/assets/images/satis/leaflet/marker-icon-2x.png +0 -0
- data/app/assets/images/satis/leaflet/marker-icon.png +0 -0
- data/app/assets/images/satis/leaflet/marker-shadow.png +0 -0
- data/app/assets/stylesheets/satis/application.css +68 -15
- data/app/assets/stylesheets/satis/components/diffy.css +74 -0
- data/app/assets/stylesheets/satis/components/flag-icons.min.css +1 -0
- data/app/assets/stylesheets/satis/components/form.css +158 -0
- data/app/assets/stylesheets/satis/components/intlTelInput.min.css +1 -0
- data/app/assets/stylesheets/satis/components/leaflet.css +661 -0
- data/app/assets/stylesheets/satis/components/phone-number.css +30 -0
- data/app/assets/stylesheets/satis/components/tippyjs.css +8 -0
- data/app/assets/stylesheets/satis/components/trix.css +412 -0
- data/app/components/satis/appearance_switcher/{component.scss → component.css} +1 -1
- data/app/components/satis/appearance_switcher/component.html.slim +1 -1
- data/app/components/satis/appearance_switcher/component_controller.js +3 -4
- data/app/components/satis/application_component.rb +8 -42
- data/app/components/satis/avatar/component.rb +3 -1
- data/app/components/satis/calendar_month/component.html.slim +522 -0
- data/app/components/satis/calendar_month/component.rb +9 -0
- data/app/components/satis/card/component.css +19 -0
- data/app/components/satis/card/component.html.slim +8 -32
- data/app/components/satis/card/component.rb +35 -8
- data/app/components/satis/date_time_picker/component.rb +10 -10
- data/app/components/satis/date_time_picker/component_controller.js +61 -45
- data/app/components/satis/dialog/component.css +0 -0
- data/app/components/satis/dialog/component.html.slim +26 -0
- data/app/components/satis/dialog/component.rb +22 -0
- data/app/components/satis/dialog/component_controller.js +16 -0
- data/app/components/satis/dropdown/{component.scss → component.css} +5 -1
- data/app/components/satis/dropdown/component.html.slim +28 -14
- data/app/components/satis/dropdown/component.rb +44 -7
- data/app/components/satis/dropdown/component_controller.js +568 -172
- data/app/components/satis/editor/component.css +3 -0
- data/app/components/satis/editor/component.html.slim +5 -0
- data/app/components/satis/editor/component.rb +45 -0
- data/app/components/satis/editor/component_controller.js +90 -0
- data/app/components/satis/flash_messages/{component.scss → component.css} +5 -4
- data/app/components/satis/info_item/component.html.slim +2 -2
- data/app/components/satis/info_item/component.rb +10 -2
- data/app/components/satis/input/component_controller.js +20 -0
- data/app/components/satis/input_array/component.css +3 -0
- data/app/components/satis/input_array/component.html.slim +33 -0
- data/app/components/satis/input_array/component.rb +18 -0
- data/app/components/satis/input_array/component_controller.js +54 -0
- data/app/components/satis/map/{component.scss → component.css} +1 -1
- data/app/components/satis/map/component.html.slim +1 -1
- data/app/components/satis/map/component_controller.js +14 -12
- data/app/components/satis/menu/component.html.slim +4 -5
- data/app/components/satis/menu/component.rb +8 -3
- data/app/components/satis/menu/component_controller.js +139 -17
- data/app/components/satis/menu_item/component.html.slim +13 -8
- data/app/components/satis/menu_item/component.rb +1 -0
- data/app/components/satis/page/component.html.slim +30 -12
- data/app/components/satis/page/component_controller.js +2 -2
- data/app/components/satis/progress_bar/component.html.slim +4 -0
- data/app/components/satis/progress_bar/component.rb +57 -0
- data/app/components/satis/sidebar_menu/component.css +0 -0
- data/app/components/satis/sidebar_menu/component.html.slim +2 -3
- data/app/components/satis/sidebar_menu/component_controller.js +3 -4
- data/app/components/satis/sidebar_menu/mobile/component.html.slim +1 -2
- data/app/components/satis/sidebar_menu_item/component.html.slim +8 -5
- data/app/components/satis/sidebar_menu_item/component.rb +1 -0
- data/app/components/satis/sidebar_menu_item/component_controller.js +13 -4
- data/app/components/satis/switch/component_controller.js +3 -4
- data/app/components/satis/tab/component.rb +41 -17
- data/app/components/satis/tabs/{component.scss → component.css} +17 -1
- data/app/components/satis/tabs/component.html.slim +23 -9
- data/app/components/satis/tabs/component.rb +9 -2
- data/app/components/satis/tabs/component_controller.js +34 -19
- data/app/controllers/satis/dialogs_controller.rb +20 -0
- data/app/controllers/satis/documentation/avatars_controller.rb +7 -0
- data/app/controllers/satis/documentation/cards_controller.rb +6 -0
- data/app/controllers/satis/documentation/editors_controller.rb +12 -0
- data/app/controllers/satis/documentation/forms_controller.rb +14 -0
- data/app/controllers/satis/documentation/tabs_controller.rb +7 -0
- data/app/controllers/satis/documentation_controller.rb +6 -0
- data/app/controllers/satis/user_data_controller.rb +5 -4
- data/app/helpers/satis/showcases/avatars_helper.rb +4 -0
- data/app/javascript/satis/application.js +8 -0
- data/app/javascript/satis/controllers/application.js +12 -0
- data/app/javascript/satis/controllers/application_controller.js +71 -0
- data/app/javascript/satis/controllers/fields_for_controller.js +74 -0
- data/app/javascript/satis/controllers/file_controller.js +26 -0
- data/app/javascript/satis/controllers/form_controller.js +77 -0
- data/app/javascript/satis/controllers/index.js +70 -0
- data/app/javascript/satis/controllers/link_controller.js +34 -0
- data/app/javascript/satis/controllers/phone_number_controller.js +30 -0
- data/app/javascript/satis/elements/copyable_element.js +57 -0
- data/app/javascript/satis/utility_controllers/draggable_controller.js +144 -0
- data/app/javascript/satis/utility_controllers/help_controller.js +18 -0
- data/app/javascript/satis/utility_controllers/index.js +14 -0
- data/app/javascript/satis/utility_controllers/show_hide_controller.js +71 -0
- data/app/javascript/satis/utility_controllers/toggle_controller.js +100 -0
- data/app/javascript/satis/utils.js +41 -0
- data/app/models/satis/user_data.rb +3 -1
- data/app/views/satis/documentation/avatars/index.html.slim +39 -0
- data/app/views/satis/documentation/cards/index.html.slim +72 -0
- data/app/views/satis/documentation/editors/index.html.slim +44 -0
- data/app/views/satis/documentation/forms/index.html.slim +109 -0
- data/app/views/satis/documentation/forms/select.html.slim +7 -0
- data/app/views/satis/documentation/index.html.slim +6 -0
- data/app/views/satis/documentation/tabs/index.html.slim +31 -0
- data/app/views/shared/_fields_for.html.slim +3 -3
- data/bin/importmap +4 -0
- data/bin/rails +14 -0
- data/config/importmap.rb +49 -0
- data/config/locales/en.yml +9 -0
- data/config/routes.rb +14 -0
- data/db/migrate/20221212083110_change_satis_user_data.rb +2 -2
- data/db/migrate/20230918115448_add_type_to_satis_user_data.rb +10 -0
- data/lib/generators/satis/install_generator.rb +22 -0
- data/lib/generators/satis/tailwind_config_generator.rb +24 -0
- data/lib/generators/satis/templates/config/initializers/satis.rb +13 -0
- data/lib/satis/concerns/contextual_translations.rb +58 -0
- data/lib/satis/configuration.rb +51 -30
- data/lib/satis/engine.rb +25 -10
- data/lib/satis/forms/builder.rb +130 -87
- data/lib/satis/forms/concerns/buttons.rb +2 -2
- data/lib/satis/forms/concerns/file.rb +1 -1
- data/lib/satis/helpers/container.rb +9 -7
- data/lib/satis/menus/item.rb +1 -1
- data/lib/satis/menus/menu.rb +3 -2
- data/lib/satis/version.rb +1 -1
- data/lib/satis.rb +2 -10
- data/lib/tasks/satis_tasks.rake +13 -4
- data/package.json +9 -0
- data/satis.gemspec +39 -0
- data/vendor/javascript/@codemirror--autocomplete.js +2 -0
- data/vendor/javascript/@codemirror--commands.js +2 -0
- data/vendor/javascript/@codemirror--lang-css.js +2 -0
- data/vendor/javascript/@codemirror--lang-html.js +2 -0
- data/vendor/javascript/@codemirror--lang-javascript.js +2 -0
- data/vendor/javascript/@codemirror--lang-json.js +2 -0
- data/vendor/javascript/@codemirror--lang-liquid.js +2 -0
- data/vendor/javascript/@codemirror--lang-markdown.js +2 -0
- data/vendor/javascript/@codemirror--lang-yaml.js +2 -0
- data/vendor/javascript/@codemirror--language.js +2 -0
- data/vendor/javascript/@codemirror--lint.js +2 -0
- data/vendor/javascript/@codemirror--search.js +2 -0
- data/vendor/javascript/@codemirror--state.js +2 -0
- data/vendor/javascript/@codemirror--view.js +2 -0
- data/vendor/javascript/@lezer--common.js +2 -0
- data/vendor/javascript/@lezer--css.js +2 -0
- data/vendor/javascript/@lezer--highlight.js +2 -0
- data/vendor/javascript/@lezer--html.js +2 -0
- data/vendor/javascript/@lezer--javascript.js +2 -0
- data/vendor/javascript/@lezer--json.js +2 -0
- data/vendor/javascript/@lezer--lr.js +2 -0
- data/vendor/javascript/@lezer--markdown.js +2 -0
- data/vendor/javascript/@lezer--yaml.js +2 -0
- data/vendor/javascript/@rails--actiontext.js +2 -0
- data/vendor/javascript/codemirror.js +2 -0
- data/vendor/javascript/crelt.js +2 -0
- data/vendor/javascript/data.min.js +7 -0
- data/vendor/javascript/intl-tel-input-utils.js +520 -0
- data/vendor/javascript/intl-tel-input.js +1782 -0
- data/vendor/javascript/leaflet.js +6 -0
- data/vendor/javascript/popper.js.js +1805 -0
- data/vendor/javascript/sortablejs.js +134 -0
- data/vendor/javascript/style-mod.js +2 -0
- data/vendor/javascript/tippy.js.js +2 -0
- data/vendor/javascript/trix.js +2 -0
- data/vendor/javascript/w3c-keyname.js +2 -0
- data/yarn.lock +821 -0
- metadata +755 -20
- data/app/components/satis/card/component.md +0 -14
- data/app/components/satis/card/component.scss +0 -15
- /data/app/{components/satis/sidebar_menu/component.scss → assets/images/satis/.keep} +0 -0
- /data/app/components/satis/breadcrumbs/{component.scss → component.css} +0 -0
- /data/app/components/satis/date_time_picker/{component.scss → component.css} +0 -0
- /data/app/components/satis/input/{component.scss → component.css} +0 -0
- /data/app/components/satis/menu/{component.scss → component.css} +0 -0
- /data/app/components/satis/sidebar_menu_item/{component.scss → component.css} +0 -0
@@ -7,9 +7,11 @@ module Satis
|
|
7
7
|
renders_many :tabs, Tab::Component
|
8
8
|
renders_one :footer
|
9
9
|
|
10
|
-
attr_reader :
|
10
|
+
attr_reader :identifier, :icon, :description, :menu, :content_padding, :header_background_color, :initial_actions, :persist, :key
|
11
|
+
attr_writer :scope
|
11
12
|
|
12
|
-
def initialize(
|
13
|
+
def initialize(identifier = nil,
|
14
|
+
icon: nil,
|
13
15
|
title: nil,
|
14
16
|
description: nil,
|
15
17
|
menu: nil,
|
@@ -17,9 +19,18 @@ module Satis
|
|
17
19
|
header_background_color: {
|
18
20
|
dark: 'bg-gray-800', light: 'bg-white'
|
19
21
|
},
|
22
|
+
custom_tabs_link: nil,
|
23
|
+
scope: [],
|
20
24
|
actions: [],
|
21
|
-
key: nil
|
25
|
+
key: nil,
|
26
|
+
persist: true)
|
22
27
|
super
|
28
|
+
|
29
|
+
if identifier.blank?
|
30
|
+
ActiveSupport::Deprecation.warn('Calling sts.card with the id parameter will become mandatory')
|
31
|
+
end
|
32
|
+
|
33
|
+
@identifier = identifier
|
23
34
|
@title = title
|
24
35
|
@title = @title.reject(&:blank?).compact.join(' ') if @title.is_a?(Array)
|
25
36
|
@description = description
|
@@ -28,16 +39,32 @@ module Satis
|
|
28
39
|
@content_padding = content_padding
|
29
40
|
@header_background_color = header_background_color
|
30
41
|
@initial_actions = actions
|
42
|
+
@persist = persist
|
31
43
|
@key = key
|
44
|
+
@custom_tabs_link = custom_tabs_link
|
45
|
+
@scope = scope.present? ? scope : identifier
|
32
46
|
end
|
33
47
|
|
34
|
-
def
|
35
|
-
|
36
|
-
|
48
|
+
# def key
|
49
|
+
# return unless @persist
|
50
|
+
#
|
51
|
+
# @key ||= identifier.to_s.parameterize.underscore if identifier.present?
|
52
|
+
# @key ||= strip_tags(@title)&.parameterize&.underscore
|
53
|
+
#
|
54
|
+
# [controller_name, action_name, params[:id], @key, 'tab'].compact.join('_')
|
55
|
+
# end
|
56
|
+
|
57
|
+
def title
|
58
|
+
return @title if @title
|
59
|
+
|
60
|
+
@title ||= ct('.title')
|
37
61
|
end
|
38
62
|
|
39
|
-
def
|
40
|
-
|
63
|
+
def custom_tabs_link(&block)
|
64
|
+
return @custom_tabs_link unless block_given?
|
65
|
+
|
66
|
+
@custom_tabs_link = block.call
|
67
|
+
# @custom_tabs_link_html = block.call.html_safe
|
41
68
|
end
|
42
69
|
|
43
70
|
def header?
|
@@ -20,22 +20,22 @@ module Satis
|
|
20
20
|
@range = options.key?(:range) ? options[:range] : false
|
21
21
|
|
22
22
|
@format = if options.key?(:format)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
options[:format]
|
24
|
+
else
|
25
|
+
{weekday: "long", month: "short", year: "numeric", day: "numeric",
|
26
|
+
hour: "numeric", minute: "numeric", hour12: false}
|
27
|
+
end
|
28
28
|
|
29
|
-
options[:input_html].merge!(
|
29
|
+
options[:input_html].merge!("data-satis-date-time-picker-target" => "hiddenInput", "data-action" => "change->satis-date-time-picker#hiddenInputChanged")
|
30
30
|
|
31
31
|
# FIXME: deal with ranges and multiples
|
32
32
|
hidden_value = options[:input_html][:value]
|
33
33
|
hidden_value ||= @form.object.send(attribute)
|
34
34
|
hidden_value = if hidden_value.is_a?(String)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
hidden_value&.split(" - ")&.map { |d| Time.parse(d).iso8601 }&.join(" - ")
|
36
|
+
else
|
37
|
+
hidden_value&.iso8601
|
38
|
+
end
|
39
39
|
|
40
40
|
options[:input_html][:value] = hidden_value
|
41
41
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import ApplicationController from "
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
2
|
import { createPopper } from "@popperjs/core"
|
3
|
-
import { debounce } from "
|
3
|
+
import { debounce } from "satis/utils"
|
4
4
|
|
5
|
-
export default class extends ApplicationController {
|
5
|
+
export default class DateTimePickerComponentController extends ApplicationController {
|
6
6
|
static targets = [
|
7
7
|
"input",
|
8
8
|
"hiddenInput",
|
@@ -46,29 +46,7 @@ export default class extends ApplicationController {
|
|
46
46
|
this.multipleValue = false
|
47
47
|
}
|
48
48
|
|
49
|
-
this.
|
50
|
-
let startDate = new Date()
|
51
|
-
if (this.hiddenInputTarget.value) {
|
52
|
-
this.hiddenInputTarget.value.split(/;| - |\s/).forEach((value) => {
|
53
|
-
this.selectedValue.push(new Date(Date.parse(value)))
|
54
|
-
})
|
55
|
-
}
|
56
|
-
|
57
|
-
if (this.selectedValue.length == 0) {
|
58
|
-
this.selectedValue.push(
|
59
|
-
new Date(
|
60
|
-
startDate.getFullYear(),
|
61
|
-
startDate.getMonth(),
|
62
|
-
startDate.getDate(),
|
63
|
-
startDate.getHours(),
|
64
|
-
startDate.getMinutes(),
|
65
|
-
0
|
66
|
-
)
|
67
|
-
)
|
68
|
-
}
|
69
|
-
|
70
|
-
this.displayValue = new Date(this.selectedValue[0].getFullYear(), this.selectedValue[0].getMonth(), 1)
|
71
|
-
this.currentSelectNr = this.selectedValue.length
|
49
|
+
this.prepareSelection()
|
72
50
|
|
73
51
|
if (!this.inlineValue) {
|
74
52
|
this.popperInstance = createPopper(this.element, this.calendarViewTarget, {
|
@@ -79,7 +57,7 @@ export default class extends ApplicationController {
|
|
79
57
|
name: "flip",
|
80
58
|
enabled: true,
|
81
59
|
options: {
|
82
|
-
boundary: this.element.closest(".
|
60
|
+
boundary: this.element.closest(".sts-card"),
|
83
61
|
},
|
84
62
|
},
|
85
63
|
{
|
@@ -88,6 +66,7 @@ export default class extends ApplicationController {
|
|
88
66
|
},
|
89
67
|
],
|
90
68
|
})
|
69
|
+
this.popperInstance.state.elements.popper.popperInstance = () => this.popperInstance
|
91
70
|
}
|
92
71
|
|
93
72
|
this.boundClickedOutside = this.clickedOutside.bind(this)
|
@@ -112,6 +91,32 @@ export default class extends ApplicationController {
|
|
112
91
|
}
|
113
92
|
}
|
114
93
|
|
94
|
+
prepareSelection() {
|
95
|
+
this.selectedValue = []
|
96
|
+
let startDate = new Date()
|
97
|
+
if (this.hiddenInputTarget.value) {
|
98
|
+
this.hiddenInputTarget.value.split(/;| - |\s/).forEach((value) => {
|
99
|
+
this.selectedValue.push(new Date(Date.parse(value)))
|
100
|
+
})
|
101
|
+
}
|
102
|
+
|
103
|
+
if (this.selectedValue.length == 0) {
|
104
|
+
this.selectedValue.push(
|
105
|
+
new Date(
|
106
|
+
startDate.getFullYear(),
|
107
|
+
startDate.getMonth(),
|
108
|
+
startDate.getDate(),
|
109
|
+
startDate.getHours(),
|
110
|
+
startDate.getMinutes(),
|
111
|
+
0
|
112
|
+
)
|
113
|
+
)
|
114
|
+
}
|
115
|
+
|
116
|
+
this.displayValue = new Date(this.selectedValue[0].getFullYear(), this.selectedValue[0].getMonth(), 1)
|
117
|
+
this.currentSelectNr = this.selectedValue.length
|
118
|
+
}
|
119
|
+
|
115
120
|
disconnect() {
|
116
121
|
window.removeEventListener("click", this.boundClickedOutside)
|
117
122
|
window.removeEventListener("keyup", this.boundKeyUp)
|
@@ -128,11 +133,10 @@ export default class extends ApplicationController {
|
|
128
133
|
this.currentSelectNr = 1
|
129
134
|
|
130
135
|
let today = new Date()
|
131
|
-
|
136
|
+
this.displayValue = new Date(today.getFullYear(), today.getMonth(), 1)
|
132
137
|
this.hiddenInputTarget.value = ""
|
133
|
-
this.hiddenInputTarget.dispatchEvent(new Event("change"))
|
134
|
-
this.refreshCalendar()
|
135
138
|
this.inputTarget.value = ""
|
139
|
+
this.hiddenInputTarget.dispatchEvent(new CustomEvent("change",{ detail: { src: "satis-date-time-picker" } }))
|
136
140
|
}
|
137
141
|
event.preventDefault()
|
138
142
|
}
|
@@ -152,12 +156,12 @@ export default class extends ApplicationController {
|
|
152
156
|
|
153
157
|
previousMonth(event) {
|
154
158
|
this.displayValue = new Date(new Date(this.displayValue).setMonth(this.displayValue.getMonth() - 1))
|
155
|
-
this.refreshCalendar()
|
159
|
+
this.refreshCalendar(false)
|
156
160
|
}
|
157
161
|
|
158
162
|
nextMonth(event) {
|
159
163
|
this.displayValue = new Date(new Date(this.displayValue).setMonth(this.displayValue.getMonth() + 1))
|
160
|
-
this.refreshCalendar()
|
164
|
+
this.refreshCalendar(false)
|
161
165
|
}
|
162
166
|
|
163
167
|
clickedOutside(event) {
|
@@ -219,18 +223,24 @@ export default class extends ApplicationController {
|
|
219
223
|
}
|
220
224
|
}
|
221
225
|
|
222
|
-
|
223
|
-
|
226
|
+
hiddenInputChanged(event) {
|
227
|
+
this.prepareSelection()
|
228
|
+
this.refreshCalendar(false)
|
229
|
+
if(event?.detail?.src !== "satis-date-time-picker") {
|
230
|
+
this.refreshInputs(false)
|
231
|
+
}
|
232
|
+
}
|
224
233
|
|
234
|
+
dateTimeEntered(event) {
|
225
235
|
// FIXME: This doesn't work properly yet
|
226
|
-
let newValue
|
227
|
-
try {
|
228
|
-
|
229
|
-
} catch (error) {}
|
230
|
-
if (!isNaN(newValue.getTime())) {
|
231
|
-
|
232
|
-
|
233
|
-
}
|
236
|
+
// let newValue
|
237
|
+
// try {
|
238
|
+
// newValue = new Date(this.inputTarget.value)
|
239
|
+
// } catch (error) {}
|
240
|
+
// if (!isNaN(newValue.getTime())) {
|
241
|
+
// this.selectedValue = [newValue]
|
242
|
+
// this.refreshCalendar()
|
243
|
+
// }
|
234
244
|
}
|
235
245
|
|
236
246
|
selectDay(event) {
|
@@ -284,7 +294,7 @@ export default class extends ApplicationController {
|
|
284
294
|
}
|
285
295
|
|
286
296
|
// Refreshes the hidden and visible input values
|
287
|
-
refreshInputs() {
|
297
|
+
refreshInputs(dispatchEvent = true) {
|
288
298
|
let joinChar = ";"
|
289
299
|
if (this.rangeValue) {
|
290
300
|
joinChar = " - "
|
@@ -300,7 +310,9 @@ export default class extends ApplicationController {
|
|
300
310
|
|
301
311
|
if (inputValue.split(joinChar).length >= this.maxSelectNr) {
|
302
312
|
this.hiddenInputTarget.value = inputValue
|
303
|
-
|
313
|
+
if (dispatchEvent) {
|
314
|
+
this.hiddenInputTarget.dispatchEvent(new Event("change"))
|
315
|
+
}
|
304
316
|
}
|
305
317
|
|
306
318
|
let format = this.formatValue
|
@@ -389,7 +401,11 @@ export default class extends ApplicationController {
|
|
389
401
|
})
|
390
402
|
|
391
403
|
if (refreshInputs != false) {
|
392
|
-
this.
|
404
|
+
if (this.rangeValue && this.selectedValue.length == 2) {
|
405
|
+
this.refreshInputs()
|
406
|
+
} else {
|
407
|
+
this.refreshInputs(false)
|
408
|
+
}
|
393
409
|
}
|
394
410
|
}
|
395
411
|
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
= turbo_frame_tag "dialog" do
|
2
|
+
.relative.z-50 data-controller="satis-dialog" aria-labelledby="modal-title" role="dialog" aria-modal="true"
|
3
|
+
.fixed.inset-0.bg-gray-500.bg-opacity-75.transition-opacity
|
4
|
+
.fixed.inset-0.z-50.w-screen.overflow-y-auto
|
5
|
+
.flex.min-h-full.items-end.justify-center.p-4.text-center.sm:items-center.sm:p-0
|
6
|
+
.relative.transform.overflow-hidden.rounded-lg.bg-white.px-4.pb-4.pt-5.text-left.shadow-xl.transition-all.sm:my-8.sm:w-full.sm:max-w-lg.sm:p-6
|
7
|
+
.absolute.right-0.top-0.hidden.pr-4.pt-4.sm:block
|
8
|
+
button.rounded-md.bg-white.text-gray-400.hover:text-gray-500.focus:outline-none.focus:ring-2.focus:ring-indigo-500.focus:ring-offset-2 type="button" data-action="satis-dialog#close"
|
9
|
+
span.sr-only
|
10
|
+
| Close
|
11
|
+
.fas.fa-xmark.h-6.w-6
|
12
|
+
.sm:flex.sm:items-start
|
13
|
+
- if icon?
|
14
|
+
.mx-auto.flex.h-12.w-12.flex-shrink-0.items-center.justify-center.sm:mx-0.sm:h-10.sm:w-10
|
15
|
+
i.h-6.w-6.-mt-1 class=icon
|
16
|
+
.mt-3.text-center.sm:mt-0.sm:text-left class=(icon? ? "sm:ml-4" : "")
|
17
|
+
h3#modal-title.text-base.font-semibold.leading-6.text-gray-900
|
18
|
+
= title
|
19
|
+
.mt-2
|
20
|
+
p.text-sm.text-gray-500
|
21
|
+
= content
|
22
|
+
- if actions.present?
|
23
|
+
.mt-5.sm:mt-4.sm:flex.sm:flex-row-reverse
|
24
|
+
.grid.grid-flow-row.gap-1.sm:grid-flow-col
|
25
|
+
- actions.each do |action|
|
26
|
+
= action
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Allows you to add dialogs to your page.
|
4
|
+
# Depends on `= turbo_frame_tag "dialog"` being present in the page, satis' page component has this by default.
|
5
|
+
#
|
6
|
+
module Satis
|
7
|
+
module Dialog
|
8
|
+
class Component < Satis::ApplicationComponent
|
9
|
+
renders_many :actions
|
10
|
+
|
11
|
+
attr_reader :title, :icon
|
12
|
+
def initialize(title:, icon: nil)
|
13
|
+
@title = title
|
14
|
+
@icon = icon
|
15
|
+
end
|
16
|
+
|
17
|
+
def icon?
|
18
|
+
icon.present?
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
|
3
|
+
export default class DialogComponentController extends ApplicationController {
|
4
|
+
connect () {
|
5
|
+
super.connect()
|
6
|
+
}
|
7
|
+
|
8
|
+
disconnect () {
|
9
|
+
|
10
|
+
}
|
11
|
+
|
12
|
+
close() {
|
13
|
+
this.element.parentElement.removeAttribute("src")
|
14
|
+
this.element.remove()
|
15
|
+
}
|
16
|
+
}
|
@@ -1,26 +1,34 @@
|
|
1
|
-
div.satis-dropdown data-action="keydown->satis-dropdown#dispatch" data-controller="satis-dropdown" data-satis-dropdown-page-size-value=@page_size data-satis-dropdown-url-value=url data-satis-dropdown-url-params-value=(options[:url_params]||{}).to_json data-satis-dropdown-chain-to-value=@chain_to data-satis-dropdown-free-text-value=@free_text data-satis-dropdown-needs-exact-match-value="#{@needs_exact_match ? 'true' : 'false'}"
|
2
|
-
|
3
|
-
|
1
|
+
div.satis-dropdown data-action="keydown->satis-dropdown#dispatch" data-controller="satis-dropdown" data-satis-dropdown-page-size-value=@page_size data-satis-dropdown-url-value=url data-satis-dropdown-url-params-value=(options[:url_params]||{}).to_json data-satis-dropdown-chain-to-value=@chain_to data-satis-dropdown-free-text-value=@free_text data-satis-dropdown-needs-exact-match-value="#{@needs_exact_match ? 'true' : 'false'}" data-satis-dropdown-is-multiple-value="#{options[:input_html][:multiple] || false}"
|
2
|
+
- selection = [nil]
|
3
|
+
- if options[:input_html][:value].present?
|
4
|
+
- selection = options_for_select(options_array(options[:input_html][:value]))
|
5
|
+
|
6
|
+
= form.select(attribute, selection, {}, options[:input_html].except(:multiple).reverse_merge(class: 'hidden', multiple: options[:input_html][:multiple] || false))
|
7
|
+
|
4
8
|
.flex.flex-col
|
9
|
+
div.hidden.py-1 data-satis-dropdown-target="pills"
|
5
10
|
.flex.flex-col.items-center
|
6
11
|
.w-full
|
7
|
-
.h-12.p-1.bg-white.dark:bg-gray-
|
12
|
+
.h-12.p-1.bg-white.dark:bg-gray-900.opacity-25.flex.border.border-gray-200.opacity-25.dark:border-gray-600.rounded.opacity-75
|
8
13
|
.flex.flex-auto.flex-wrap
|
9
14
|
/ Input where you can search
|
10
|
-
input.p-1.px-2.appearance-none.outline-none.w-full.text-gray-800.dark:bg-gray-800 data-action="input->satis-dropdown#search" data-satis-dropdown-target="searchInput" placeholder=placeholder autofocus=options[:autofocus]
|
15
|
+
input.p-1.px-2.appearance-none.outline-none.w-full.text-gray-800.dark:bg-gray-800.dark:text-gray-300 data-action="input->satis-dropdown#search" data-satis-dropdown-target="searchInput" placeholder=placeholder autofocus=options[:autofocus]
|
11
16
|
div
|
12
17
|
/ Reset button
|
13
18
|
- unless @reset_button == false
|
14
|
-
button.cursor-pointer.w-6.h-full.flex.items-center.text-gray-400.outline-none.focus:outline-none data-satis-dropdown-target="resetButton" data-action="click->satis-dropdown#reset" tabindex="-1"
|
19
|
+
button.cursor-pointer.w-6.h-full.flex.items-center.text-gray-400.outline-none.focus:outline-none type="button" data-satis-dropdown-target="resetButton" data-action="click->satis-dropdown#reset focus->satis-dropdown#focus" tabindex="-1"
|
15
20
|
i.fas.fa-xmark
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
- unless @toggle_button == false
|
22
|
+
.text-gray-300.w-8.py-1.pl-2.pr-1.border-l.flex.items-center.border-gray-200.dark:border-gray-700
|
23
|
+
/ Up/down chevrons
|
24
|
+
button.cursor-pointer.w-6.h-6.text-gray-600.outline-none.focus:outline-none type="button" data-action="click->satis-dropdown#toggleResultsList focus->satis-dropdown#focus" data-satis-dropdown-target="toggleButton" tabindex="-1"
|
25
|
+
i.hidden.fas.fa-chevron-up
|
26
|
+
i.fas.fa-chevron-down
|
27
|
+
|
28
|
+
template data-satis-dropdown-target="selectedItemsTemplate"
|
21
29
|
|
22
30
|
/ Container for results
|
23
|
-
.hidden.container.shadow.bg-white.border.border-gray-300.dark:bg-gray-800.dark:border-gray-700.z-10.rounded.max-h-select.overflow-y-auto.w-full data-satis-dropdown-target="results" data-action="scroll->satis-dropdown#scroll" tabindex="-1"
|
31
|
+
.hidden.container.shadow.bg-white.border.border-gray-300.dark:text-gray-300.dark:bg-gray-800.dark:border-gray-700.z-10.rounded.max-h-select.overflow-y-auto.w-full data-satis-dropdown-target="results" data-action="scroll->satis-dropdown#scroll" tabindex="-1"
|
24
32
|
.flex.flex-col.w-full data-satis-dropdown-target="items"
|
25
33
|
- options[:collection]&.each do |item|
|
26
34
|
- data_attrs = item.try(:third) ? item.third : {}
|
@@ -28,9 +36,15 @@ div.satis-dropdown data-action="keydown->satis-dropdown#dispatch" data-controlle
|
|
28
36
|
- if custom_item_html?
|
29
37
|
= item_html(item)
|
30
38
|
- else
|
31
|
-
.cursor-pointer.w-full.dark:border-gray-700.border-
|
32
|
-
.flex.w-full.items-center.p-2.pl-2.border-transparent.border-l-2.hover:border-teal-
|
39
|
+
.cursor-pointer.w-full.dark:border-gray-700.border-b.hover:bg-primary-200
|
40
|
+
.flex.w-full.items-center.p-2.pl-2.border-transparent.border-l-2.hover:border-teal-2100
|
33
41
|
.w-full.items-center.flex
|
34
42
|
.mx-2.-mt-1
|
35
43
|
span = item.send(text_method)
|
36
44
|
|
45
|
+
|
46
|
+
template data-satis-dropdown-target="pillTemplate"
|
47
|
+
span.inline-flex.items-center.rounded.bg-primary-200.px-2.py-1.text-xs.font-medium.text-gray-600.mr-1.mt-1 data-satis-dropdown-target="pill"
|
48
|
+
button.inline-flex.items-center.justify-center.w-5.h-5.ml-1 data-action="click->satis-dropdown#removePill"
|
49
|
+
svg.w-3.h-3 xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" fill="currentColor"
|
50
|
+
path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"
|
@@ -17,24 +17,28 @@ module Satis
|
|
17
17
|
@free_text = options[:free_text]
|
18
18
|
@needs_exact_match = options[:needs_exact_match]
|
19
19
|
@reset_button = options[:reset_button] || options[:include_blank]
|
20
|
+
@toggle_button = options[:toggle_button] != false
|
20
21
|
|
21
22
|
options[:input_html] ||= {}
|
23
|
+
|
22
24
|
options[:input_html][:value] = hidden_value
|
23
25
|
|
24
26
|
options[:input_html][:autofocus] ||= false
|
25
27
|
if options[:input_html][:autofocus]
|
26
|
-
options[:autofocus] =
|
28
|
+
options[:autofocus] = "autofocus"
|
27
29
|
options[:input_html].delete(:autofocus)
|
28
30
|
end
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
+
unless options[:input_html]["data-reflex"]
|
33
|
+
actions = [options[:input_html]["data-action"], "change->satis-dropdown#display",
|
34
|
+
"focus->satis-dropdown#focus"].join(" ")
|
35
|
+
end
|
32
36
|
|
33
|
-
options[:input_html].merge!(
|
34
|
-
|
37
|
+
options[:input_html].merge!("data-satis-dropdown-target" => "hiddenSelect",
|
38
|
+
"data-action" => actions)
|
35
39
|
|
36
40
|
@block = block
|
37
|
-
@page_size = options[:page_size] ||
|
41
|
+
@page_size = options[:page_size] || 25
|
38
42
|
end
|
39
43
|
|
40
44
|
# Deal with context
|
@@ -42,11 +46,44 @@ module Satis
|
|
42
46
|
value = @options[:selected]
|
43
47
|
value ||= @options.dig(:input_html, :value)
|
44
48
|
value ||= form.object&.send(attribute)
|
45
|
-
|
49
|
+
|
50
|
+
value = value.id if value.respond_to?(:id)
|
51
|
+
|
46
52
|
value = value.second if value.is_a?(Array) && value.size == 2 && value.first.casecmp?(value.second)
|
47
53
|
value
|
48
54
|
end
|
49
55
|
|
56
|
+
def options_array(obj)
|
57
|
+
return [[]] unless obj
|
58
|
+
|
59
|
+
if obj.is_a?(Array)
|
60
|
+
obj.filter_map {|item| option_value(item) }
|
61
|
+
else
|
62
|
+
[option_value(obj)]
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def option_value(item)
|
67
|
+
text = value = ""
|
68
|
+
|
69
|
+
if item.respond_to?(:id)
|
70
|
+
value = item.send(:id)
|
71
|
+
text = if item.respond_to?(:name)
|
72
|
+
item.send(:name)
|
73
|
+
else
|
74
|
+
""
|
75
|
+
end
|
76
|
+
elsif item.is_a?(Array)
|
77
|
+
value = item.first
|
78
|
+
text = item.second
|
79
|
+
elsif item.is_a?(String)
|
80
|
+
text = value = item
|
81
|
+
end
|
82
|
+
|
83
|
+
return nil if value.blank?
|
84
|
+
[text, item, {selected: true}]
|
85
|
+
end
|
86
|
+
|
50
87
|
def placeholder
|
51
88
|
return title if title.present?
|
52
89
|
|