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
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Application } from '@hotwired/stimulus'
|
2
|
+
|
3
|
+
let application
|
4
|
+
if (window.Stimulus) {
|
5
|
+
application = window.Stimulus
|
6
|
+
} else {
|
7
|
+
application = Application.start()
|
8
|
+
application.debug = false
|
9
|
+
window.Stimulus = application
|
10
|
+
}
|
11
|
+
|
12
|
+
export { application }
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// application_controller.js
|
2
|
+
import { Controller } from "@hotwired/stimulus"
|
3
|
+
|
4
|
+
export default class ApplicationController extends Controller {
|
5
|
+
connect() {
|
6
|
+
this.element[this.identifier] = this
|
7
|
+
}
|
8
|
+
|
9
|
+
getController(element, identifier) {
|
10
|
+
return this.application.getControllerForElementAndIdentifier(element, identifier)
|
11
|
+
}
|
12
|
+
|
13
|
+
triggerEvent(el, name, data) {
|
14
|
+
let event
|
15
|
+
if (typeof window.CustomEvent === "function") {
|
16
|
+
event = new CustomEvent(name, { detail: data, cancelable: true, bubbles: true })
|
17
|
+
} else {
|
18
|
+
event = document.createEvent("CustomEvent")
|
19
|
+
event.initCustomEvent(name, true, true, data)
|
20
|
+
}
|
21
|
+
el.dispatchEvent(event)
|
22
|
+
}
|
23
|
+
|
24
|
+
elementScrolled(element) {
|
25
|
+
if (element.scrollHeight - Math.round(element.scrollTop) === element.clientHeight) {
|
26
|
+
return true
|
27
|
+
}
|
28
|
+
return false
|
29
|
+
}
|
30
|
+
|
31
|
+
getUserData(key) {
|
32
|
+
return fetch("/satis/user_data/" + key, {
|
33
|
+
method: "GET",
|
34
|
+
headers: {
|
35
|
+
"Content-Type": "application/json",
|
36
|
+
},
|
37
|
+
})
|
38
|
+
.then((res) => {
|
39
|
+
if (res.ok) {
|
40
|
+
return res.json().then((data) => {
|
41
|
+
return data
|
42
|
+
})
|
43
|
+
}
|
44
|
+
})
|
45
|
+
.catch((err) => {
|
46
|
+
console.log(err)
|
47
|
+
})
|
48
|
+
}
|
49
|
+
|
50
|
+
setUserData(key, data) {
|
51
|
+
let csrfToken = document.querySelector("meta[name=csrf-token]").content
|
52
|
+
return fetch("/satis/user_data/" + key, {
|
53
|
+
method: "PUT",
|
54
|
+
headers: {
|
55
|
+
"Content-Type": "application/json",
|
56
|
+
"X-CSRF-Token": csrfToken,
|
57
|
+
},
|
58
|
+
body: JSON.stringify(data),
|
59
|
+
})
|
60
|
+
.then((res) => {
|
61
|
+
if (res.ok) {
|
62
|
+
return res.json().then((data) => {
|
63
|
+
return data
|
64
|
+
})
|
65
|
+
}
|
66
|
+
})
|
67
|
+
.catch((err) => {
|
68
|
+
console.log(err)
|
69
|
+
})
|
70
|
+
}
|
71
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
|
3
|
+
export default class FieldsForController extends ApplicationController {
|
4
|
+
static targets = ["insertionPoint", "template"]
|
5
|
+
|
6
|
+
connect() {
|
7
|
+
super.connect()
|
8
|
+
|
9
|
+
this.boundMonitorChanges = this.monitorChanges.bind(this)
|
10
|
+
this.addNewLine()
|
11
|
+
}
|
12
|
+
|
13
|
+
addAssociation(event) {
|
14
|
+
event.preventDefault()
|
15
|
+
|
16
|
+
// Find template and remove event listeners
|
17
|
+
let templateElement = this.insertionPointTarget.querySelector(".template")
|
18
|
+
templateElement.querySelectorAll("input,select").forEach((input) => {
|
19
|
+
input.removeEventListener("change", this.boundMonitorChanges)
|
20
|
+
})
|
21
|
+
|
22
|
+
let tmpNode = event.target.closest(".nested-fields")
|
23
|
+
tmpNode.classList.remove("template")
|
24
|
+
tmpNode.querySelectorAll(".association").forEach((item) => {
|
25
|
+
if (item.classList.contains("hidden")) {
|
26
|
+
item.classList.remove("hidden")
|
27
|
+
} else {
|
28
|
+
item.remove()
|
29
|
+
}
|
30
|
+
})
|
31
|
+
|
32
|
+
// Simply replace every child node's attributes value, replacing TEMPLATE
|
33
|
+
let id = new Date().valueOf()
|
34
|
+
tmpNode.querySelectorAll("*").forEach((node) => {
|
35
|
+
for (let attribute of node.attributes) {
|
36
|
+
attribute.value = attribute.value.replace(/TEMPLATE/g, id)
|
37
|
+
}
|
38
|
+
})
|
39
|
+
|
40
|
+
tmpNode.querySelectorAll("template").forEach((node) => {
|
41
|
+
node.innerHTML = node.innerHTML.replace(/TEMPLATE/g, id)
|
42
|
+
})
|
43
|
+
|
44
|
+
this.addNewLine()
|
45
|
+
|
46
|
+
window.scrollBy(0, this.element.querySelector(".nested-fields").clientHeight)
|
47
|
+
}
|
48
|
+
|
49
|
+
addNewLine() {
|
50
|
+
this.insertionPointTarget.insertAdjacentHTML("beforeend", this.templateTarget.innerHTML)
|
51
|
+
|
52
|
+
// Find template and add event listeners
|
53
|
+
let templateElement = this.insertionPointTarget.querySelector(".template")
|
54
|
+
templateElement.querySelectorAll("input,select").forEach((input) => {
|
55
|
+
input.addEventListener("change", this.boundMonitorChanges)
|
56
|
+
})
|
57
|
+
}
|
58
|
+
|
59
|
+
monitorChanges(event) {
|
60
|
+
if (event?.detail?.src == "satis-dropdown") {
|
61
|
+
// Skip events caused by the initial load of a satis-dropdown
|
62
|
+
return
|
63
|
+
}
|
64
|
+
|
65
|
+
this.addAssociation(event)
|
66
|
+
}
|
67
|
+
|
68
|
+
removeAssociation(event) {
|
69
|
+
event.preventDefault()
|
70
|
+
let item = event.target.closest(".nested-fields")
|
71
|
+
item.querySelector("input[name*='_destroy']").value = 1
|
72
|
+
item.style.display = "none"
|
73
|
+
}
|
74
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
|
3
|
+
export default class FileController extends ApplicationController {
|
4
|
+
static targets = ["selection", "input"]
|
5
|
+
|
6
|
+
connect() {
|
7
|
+
this.boundUpdate = this.update.bind(this)
|
8
|
+
this.inputTarget.addEventListener("change", this.boundUpdate)
|
9
|
+
this.update()
|
10
|
+
}
|
11
|
+
|
12
|
+
disconnect() {
|
13
|
+
this.inputTarget.removeEventListener("change", this.boundUpdate)
|
14
|
+
}
|
15
|
+
|
16
|
+
update(evt) {
|
17
|
+
this.selectionTarget.innerHTML = ""
|
18
|
+
Array.from(this.inputTarget.files).forEach((file) => {
|
19
|
+
this.selectionTarget.innerHTML += `${file.name}<br>`
|
20
|
+
})
|
21
|
+
}
|
22
|
+
|
23
|
+
toggle(value) {
|
24
|
+
// FIXME: We should capture the current content and update the template it came from.
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
|
3
|
+
export default class FormController extends ApplicationController {
|
4
|
+
static targets = []
|
5
|
+
static values = {
|
6
|
+
noSubmitOnEnter: Boolean,
|
7
|
+
confirmBeforeLeave: Boolean
|
8
|
+
}
|
9
|
+
|
10
|
+
connect() {
|
11
|
+
super.connect()
|
12
|
+
|
13
|
+
this.formSubmitting = false
|
14
|
+
this.boundSetFormSubmitting = this.setFormSubmitting.bind(this)
|
15
|
+
|
16
|
+
this.element.addEventListener('submit', this.boundSetFormSubmitting)
|
17
|
+
|
18
|
+
if (this.noSubmitOnEnterValue) {
|
19
|
+
this.element.addEventListener('keydown', function(event) {
|
20
|
+
if (event.key === 'Enter' && event.target && !(event.target.nodeName === 'TEXTAREA' || event.target.nodeName === 'TRIX-EDITOR')) {
|
21
|
+
event.preventDefault()
|
22
|
+
}
|
23
|
+
})
|
24
|
+
}
|
25
|
+
|
26
|
+
this.boundCheckForChanges = this.checkForChanges.bind(this)
|
27
|
+
this.boundCheckForChangesBeforeUnload = this.checkForChangesBeforeUnload.bind(this)
|
28
|
+
|
29
|
+
if (this.confirmBeforeLeaveValue) {
|
30
|
+
this.originalData = this.getFormData()
|
31
|
+
document.addEventListener('turbo:before-visit', this.boundCheckForChanges)
|
32
|
+
window.addEventListener('beforeunload', this.boundCheckForChangesBeforeUnload)
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
disconnect() {
|
37
|
+
this.element.removeEventListener('submit', this.boundSetFormSubmitting)
|
38
|
+
document.removeEventListener('turbo:before-visit', this.boundCheckForChanges)
|
39
|
+
window.removeEventListener('beforeunload', this.boundCheckForChangesBeforeUnload)
|
40
|
+
}
|
41
|
+
|
42
|
+
checkForChanges(event) {
|
43
|
+
if (this.isDirty() && ! this.formSubmitting && ! window.confirm("Changes you made may not be saved, are you sure you want to leave this page?")) {
|
44
|
+
event.preventDefault()
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
checkForChangesBeforeUnload(event) {
|
49
|
+
if (this.isDirty() && ! this.formSubmitting) {
|
50
|
+
event.preventDefault()
|
51
|
+
return "Changes you made may not be saved, are you sure you want to leave this page?"
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
getFormData() {
|
56
|
+
let elementFormData = new FormData(this.element)
|
57
|
+
let formData = new FormData()
|
58
|
+
for(let pair of elementFormData.entries()) {
|
59
|
+
if(pair[0].indexOf('[TEMPLATE]') == -1 && pair[0] != 'search' && pair[0] != 'tabs') {
|
60
|
+
formData.append(pair[0], pair[1])
|
61
|
+
}
|
62
|
+
}
|
63
|
+
return new URLSearchParams(formData).toString()
|
64
|
+
}
|
65
|
+
|
66
|
+
isDirty() {
|
67
|
+
return this.originalData != this.getFormData()
|
68
|
+
}
|
69
|
+
|
70
|
+
setFormSubmitting(event) {
|
71
|
+
if (this.formSubmitting) {
|
72
|
+
event.preventDefault()
|
73
|
+
}
|
74
|
+
|
75
|
+
this.formSubmitting = true
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { application } from "satis/controllers/application";
|
2
|
+
|
3
|
+
import AppearanceSwitcherComponentController from "satis/components/appearance_switcher/component_controller";
|
4
|
+
application.register("satis-appearance-switcher", AppearanceSwitcherComponentController);
|
5
|
+
|
6
|
+
import DateTimePickerComponentController from "satis/components/date_time_picker/component_controller";
|
7
|
+
application.register("satis-date-time-picker", DateTimePickerComponentController);
|
8
|
+
|
9
|
+
import DropdownComponentController from "satis/components/dropdown/component_controller";
|
10
|
+
application.register("satis-dropdown", DropdownComponentController);
|
11
|
+
|
12
|
+
import InputComponentController from "satis/components/input/component_controller";
|
13
|
+
application.register("satis-input", InputComponentController);
|
14
|
+
|
15
|
+
import InputArrayComponentController from "satis/components/input_array/component_controller";
|
16
|
+
application.register("satis-input-array", InputArrayComponentController);
|
17
|
+
|
18
|
+
import MapComponentController from "satis/components/map/component_controller";
|
19
|
+
application.register("satis-map", MapComponentController);
|
20
|
+
|
21
|
+
import MenuComponentController from "satis/components/menu/component_controller";
|
22
|
+
application.register("satis-menu", MenuComponentController);
|
23
|
+
|
24
|
+
import PageComponentController from "satis/components/page/component_controller";
|
25
|
+
application.register("satis-page", PageComponentController);
|
26
|
+
|
27
|
+
import SidebarMenuComponentController from "satis/components/sidebar_menu/component_controller";
|
28
|
+
application.register("satis-sidebar-menu", SidebarMenuComponentController);
|
29
|
+
|
30
|
+
import SidebarMenuItemComponentController from "satis/components/sidebar_menu_item/component_controller";
|
31
|
+
application.register("satis-sidebar-menu-item", SidebarMenuItemComponentController);
|
32
|
+
|
33
|
+
import SwitchComponentController from "satis/components/switch/component_controller";
|
34
|
+
application.register("satis-switch", SwitchComponentController);
|
35
|
+
|
36
|
+
import TabsComponentController from "satis/components/tabs/component_controller";
|
37
|
+
application.register("satis-tabs", TabsComponentController);
|
38
|
+
|
39
|
+
import EditorComponentController from "satis/components/editor/component_controller";
|
40
|
+
application.register("satis-editor", EditorComponentController);
|
41
|
+
|
42
|
+
import DialogComponentController from "satis/components/dialog/component_controller";
|
43
|
+
application.register("satis-dialog", DialogComponentController);
|
44
|
+
|
45
|
+
// Controllers
|
46
|
+
|
47
|
+
import LinkController from "satis/controllers/link_controller";
|
48
|
+
application.register("satis-link", LinkController);
|
49
|
+
|
50
|
+
import FieldsForController from "satis/controllers/fields_for_controller";
|
51
|
+
application.register("satis-fields-for", FieldsForController);
|
52
|
+
|
53
|
+
import FormController from "satis/controllers/form_controller";
|
54
|
+
application.register("satis-form", FormController);
|
55
|
+
|
56
|
+
import FileController from "satis/controllers/file_controller";
|
57
|
+
application.register("satis-file", FileController);
|
58
|
+
|
59
|
+
import PhoneNumberController from "satis/controllers/phone_number_controller";
|
60
|
+
application.register("phone-number", PhoneNumberController);
|
61
|
+
|
62
|
+
// See: https://github.com/hotwired/stimulus-rails/blob/main/app/assets/javascripts/stimulus-loading.js
|
63
|
+
|
64
|
+
// // Eager load all controllers defined in the import map under controllers/**/*_controller
|
65
|
+
// import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
|
66
|
+
// eagerLoadControllersFrom("controllers", application)
|
67
|
+
|
68
|
+
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
|
69
|
+
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
|
70
|
+
// lazyLoadControllersFrom("controllers", application)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Link controller
|
5
|
+
*
|
6
|
+
* div data-controller="satis-link" href="" data-turbo="false" target="_blank" data-action='click->satis-link#follow'
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
export default class LinkController extends ApplicationController {
|
10
|
+
connect() {
|
11
|
+
super.connect()
|
12
|
+
}
|
13
|
+
|
14
|
+
follow(event) {
|
15
|
+
if (event.target.tagName != this.element.tagName && event.target.closest(this.element.tagName.toLowerCase()) != this.element) {
|
16
|
+
// Don't do this anymore when both tagNames are the same (the one you click and the element with the controller
|
17
|
+
// This is in to make sure row-links using satis-link controller will not trigger when an A or an SVG in that A is triggered.
|
18
|
+
return
|
19
|
+
}
|
20
|
+
|
21
|
+
if (event.target != this.element && event.target.closest('a') != undefined) {
|
22
|
+
// There is an 'a' tag inside the 'satis-link' tag, and we just clicked on it.
|
23
|
+
return
|
24
|
+
}
|
25
|
+
|
26
|
+
if (event.metaKey || event.ctrlKey) {
|
27
|
+
window.open(this.element.getAttribute("href"), "_blank")
|
28
|
+
} else if (this.element.getAttribute("data-turbo") == "false") {
|
29
|
+
window.open(this.element.getAttribute("href"), this.element.getAttribute("target"))
|
30
|
+
} else {
|
31
|
+
Turbo.visit(this.element.getAttribute("href"))
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
import {debounce} from "satis/utils"
|
3
|
+
import * as dummy1 from "intl-tel-input"
|
4
|
+
import * as dummy2 from "intl-tel-input-utils"
|
5
|
+
|
6
|
+
export default class PhoneNumberController extends ApplicationController {
|
7
|
+
static targets = ["input", "hiddenInput"]
|
8
|
+
|
9
|
+
initialize() {
|
10
|
+
super.initialize()
|
11
|
+
this.change = debounce(this.change, 500).bind(this)
|
12
|
+
}
|
13
|
+
|
14
|
+
connect() {
|
15
|
+
super.connect()
|
16
|
+
this.instance = intlTelInput(this.inputTarget, {
|
17
|
+
initialCountry: "nl",
|
18
|
+
formatOnInit: true,
|
19
|
+
preferredCountries: ["nl", "de", "gb", "fr", "us", "es", "be", "se"],
|
20
|
+
nationalMode: false,
|
21
|
+
utilsScript: intlTelInputUtils,
|
22
|
+
dropdownContainer: document.body,
|
23
|
+
})
|
24
|
+
}
|
25
|
+
|
26
|
+
change(event) {
|
27
|
+
this.hiddenInputTarget.value = this.instance.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL)
|
28
|
+
this.inputTarget.value = this.instance.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL)
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import tippy from "tippy.js"
|
2
|
+
|
3
|
+
export default class SatisCopyable extends HTMLElement {
|
4
|
+
constructor() {
|
5
|
+
super()
|
6
|
+
|
7
|
+
const shadow = this.attachShadow({ mode: "open" })
|
8
|
+
|
9
|
+
this.textSpan = document.createElement("span")
|
10
|
+
this.textSpan.textContent = this.textContent
|
11
|
+
shadow.appendChild(this.textSpan)
|
12
|
+
|
13
|
+
this.tippy = tippy(this.textSpan, { content: "Click to copy" })
|
14
|
+
|
15
|
+
this.input = document.createElement("input")
|
16
|
+
this.input.style.position = "fixed"
|
17
|
+
this.input.style.bottom = 0
|
18
|
+
this.input.style.left = 0
|
19
|
+
this.input.style.width = "1px"
|
20
|
+
this.input.style.height = "1px"
|
21
|
+
this.input.style.padding = 0
|
22
|
+
this.input.style.border = "none"
|
23
|
+
this.input.style.outline = "none"
|
24
|
+
this.input.style.boxShadow = "none"
|
25
|
+
this.input.style.background = "transparent"
|
26
|
+
this.input.value = this.textSpan.textContent.replace(this.getAttribute("scrub"), "")
|
27
|
+
|
28
|
+
shadow.appendChild(this.input)
|
29
|
+
|
30
|
+
this.textSpan.addEventListener("click", this.copy.bind(this))
|
31
|
+
}
|
32
|
+
|
33
|
+
copy(event) {
|
34
|
+
this.input.select()
|
35
|
+
|
36
|
+
try {
|
37
|
+
var successful = document.execCommand("copy")
|
38
|
+
var msg = successful ? "Copied!" : "Not copied"
|
39
|
+
this.tippy.setContent(msg)
|
40
|
+
this.tippy.show()
|
41
|
+
} catch (err) {
|
42
|
+
this.tippy.setContent("Oops, unable to copy")
|
43
|
+
this.tippy.show()
|
44
|
+
}
|
45
|
+
setTimeout(() => {
|
46
|
+
this.tippy.hide()
|
47
|
+
}, 700)
|
48
|
+
|
49
|
+
setTimeout(() => {
|
50
|
+
this.tippy.setContent("Click to copy")
|
51
|
+
}, 1000)
|
52
|
+
|
53
|
+
window.getSelection().removeAllRanges()
|
54
|
+
event.preventDefault()
|
55
|
+
return false
|
56
|
+
}
|
57
|
+
}
|
@@ -0,0 +1,144 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
|
3
|
+
import Sortable from "sortablejs"
|
4
|
+
|
5
|
+
/*
|
6
|
+
This Stimulus controller uses sortablejs for drag and drop, it then sends a JSON body with the
|
7
|
+
following items to the designated URL:
|
8
|
+
|
9
|
+
index : the new index
|
10
|
+
item-id : the item's id (if specified)
|
11
|
+
parent-id : the parent id (if specified)
|
12
|
+
|
13
|
+
Example usages:
|
14
|
+
|
15
|
+
<div data-controller="draggable">
|
16
|
+
<div data-draggable-url="/url/to/item1">Item 1</div>
|
17
|
+
<div data-draggable-url="/url/to/item2">Item 2</div>
|
18
|
+
<div data-draggable-url="/url/to/item3">Item 3</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
The above will send a PATCH request with the new index to the items' data-draggable-url
|
22
|
+
|
23
|
+
If you want another request type you can specify it like so:
|
24
|
+
|
25
|
+
<div data-controller="draggable" data-draggable-method="PUT">
|
26
|
+
<div data-draggable-url="/url/to/item1">Item 1</div>
|
27
|
+
<div data-draggable-url="/url/to/item2">Item 2</div>
|
28
|
+
<div data-draggable-url="/url/to/item3">Item 3</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
The above will send PUT requests
|
32
|
+
|
33
|
+
You can also use one URL for all your items:
|
34
|
+
|
35
|
+
<div data-controller="draggable" data-draggable-url="/url/to/items" data-draggable-item-id="true">
|
36
|
+
<div data-draggable-item-id="1">Item 1</div>
|
37
|
+
<div data-draggable-item-id="2">Item 2</div>
|
38
|
+
<div data-draggable-item-id="3">Item 3</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
The above will send a PATCH request with the new index and the item-id to the data-draggable-url. If
|
42
|
+
data-draggable-item-id is true it will not send a request without an item-id
|
43
|
+
|
44
|
+
If you want to use a nested structure you can specify a selector to specify which elements
|
45
|
+
under the controller's element will be activated, specifying the data-draggable-group allows
|
46
|
+
you to drag items between the different lists:
|
47
|
+
|
48
|
+
<div data-controller="draggable" data-draggable-url="/url/to/items" data-draggable-selector="ul" data-draggable-group="nested" data-draggable-item-id="true" data-draggable-parent-id="true">
|
49
|
+
<ul>
|
50
|
+
<li data-draggable-item-id="1">Item 1</li>
|
51
|
+
<li data-draggable-item-id="2">
|
52
|
+
Item 2
|
53
|
+
<ul data-draggable-parent-id="2">
|
54
|
+
<li data-draggable-item-id="3">Item 3</li>
|
55
|
+
</ul>
|
56
|
+
</li>
|
57
|
+
</ul>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
The above will also require a data-draggable-parent-id to drag an item to another list
|
61
|
+
*/
|
62
|
+
export default class extends Controller {
|
63
|
+
connect() {
|
64
|
+
const self = this
|
65
|
+
|
66
|
+
let selector = self.data.get("selector")
|
67
|
+
|
68
|
+
if (selector) {
|
69
|
+
self.element.querySelectorAll(selector).forEach((el) => {
|
70
|
+
self.sortable(el)
|
71
|
+
})
|
72
|
+
} else {
|
73
|
+
self.sortable(self.element)
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
sortable(element) {
|
78
|
+
const self = this
|
79
|
+
|
80
|
+
let options = {
|
81
|
+
animation: 150,
|
82
|
+
fallbackOnBody: true,
|
83
|
+
swapThreshold: 0.65,
|
84
|
+
onEnd: (evt) => {
|
85
|
+
let url = self.data.get("url") || evt.item.getAttribute("data-draggable-url")
|
86
|
+
let method = self.data.get("method") || evt.item.getAttribute("data-draggable-method") || "PATCH"
|
87
|
+
let csrfToken = document.querySelector("meta[name=csrf-token]").content
|
88
|
+
let itemIdSelector = self.data.get("item-id-selector")
|
89
|
+
let itemId = evt.item.getAttribute("data-draggable-item-id")
|
90
|
+
if (!itemId && itemIdSelector) {
|
91
|
+
itemId = evt.item.querySelector(itemIdSelector).getAttribute("data-draggable-item-id")
|
92
|
+
}
|
93
|
+
let parentId = evt.to.getAttribute("data-draggable-parent-id")
|
94
|
+
let newIndex = evt.newIndex
|
95
|
+
|
96
|
+
if (self.data.get("item-id") && !itemId) {
|
97
|
+
return
|
98
|
+
}
|
99
|
+
|
100
|
+
if (self.data.get("parent-id") && !parentId) {
|
101
|
+
return
|
102
|
+
}
|
103
|
+
|
104
|
+
let response = fetch(url, {
|
105
|
+
method: method,
|
106
|
+
headers: {
|
107
|
+
Accept: "application/json, text/javascript",
|
108
|
+
"Content-Type": "application/json",
|
109
|
+
"X-CSRF-Token": csrfToken,
|
110
|
+
},
|
111
|
+
body: JSON.stringify({
|
112
|
+
item_id: itemId,
|
113
|
+
parent_id: parentId,
|
114
|
+
index: newIndex,
|
115
|
+
}),
|
116
|
+
}).then((response) => {
|
117
|
+
var event
|
118
|
+
if (response.ok) {
|
119
|
+
event = new CustomEvent("draggable.success", { detail: { element: self.element } })
|
120
|
+
self.element.dispatchEvent(event)
|
121
|
+
} else if (!response.ok) {
|
122
|
+
event = new CustomEvent("draggable.error", { detail: { element: self.element } })
|
123
|
+
self.element.dispatchEvent(event)
|
124
|
+
window.alert("An unexpected error occured, your drop possibly failed.")
|
125
|
+
}
|
126
|
+
})
|
127
|
+
},
|
128
|
+
}
|
129
|
+
|
130
|
+
if (self.data.get("handle")) {
|
131
|
+
options["handle"] = self.data.get("handle")
|
132
|
+
}
|
133
|
+
|
134
|
+
if (self.data.get("group")) {
|
135
|
+
options["group"] = self.data.get("group")
|
136
|
+
}
|
137
|
+
|
138
|
+
if (self.data.get("item-selector")) {
|
139
|
+
options["draggable"] = self.data.get("item-selector")
|
140
|
+
}
|
141
|
+
|
142
|
+
Sortable.create(element, options)
|
143
|
+
}
|
144
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import tippy from "tippy.js"
|
2
|
+
|
3
|
+
import ApplicationController from "satis/controllers/application_controller"
|
4
|
+
|
5
|
+
export default class extends ApplicationController {
|
6
|
+
static values = { content: String }
|
7
|
+
|
8
|
+
connect() {
|
9
|
+
const self = this
|
10
|
+
tippy(this.element, {
|
11
|
+
content: (reference) => this.contentValue,
|
12
|
+
allowHTML: true,
|
13
|
+
// trigger: "click",
|
14
|
+
interactive: true,
|
15
|
+
appendTo: () => document.body,
|
16
|
+
})
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { application } from "satis/controllers/application"
|
2
|
+
|
3
|
+
import DraggableController from "satis/utility_controllers/draggable_controller";
|
4
|
+
application.register("draggable", DraggableController);
|
5
|
+
|
6
|
+
import HelpController from "satis/utility_controllers/help_controller";
|
7
|
+
application.register("help", HelpController);
|
8
|
+
|
9
|
+
import ShowHideController from "satis/utility_controllers/show_hide_controller";
|
10
|
+
application.register("show-hide", ShowHideController);
|
11
|
+
|
12
|
+
import ToggleController from "satis/utility_controllers/toggle_controller";
|
13
|
+
application.register("toggle", ToggleController);
|
14
|
+
|