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
@@ -1,11 +1,24 @@
|
|
1
|
-
import ApplicationController from "
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
2
|
|
3
|
-
|
4
|
-
import { debounce, popperSameWidth } from "../../../../frontend/utils"
|
3
|
+
import { debounce, popperSameWidth } from "satis/utils"
|
5
4
|
import { createPopper } from "@popperjs/core"
|
6
5
|
|
7
|
-
export default class extends ApplicationController {
|
8
|
-
|
6
|
+
export default class DropdownComponentController extends ApplicationController {
|
7
|
+
|
8
|
+
static targets = [
|
9
|
+
"results",
|
10
|
+
"items",
|
11
|
+
"item",
|
12
|
+
"searchInput",
|
13
|
+
"resetButton",
|
14
|
+
"toggleButton",
|
15
|
+
"hiddenSelect",
|
16
|
+
"pills",
|
17
|
+
"pillTemplate",
|
18
|
+
"pill",
|
19
|
+
"selectedItemsTemplate"
|
20
|
+
]
|
21
|
+
|
9
22
|
static values = {
|
10
23
|
chainTo: String,
|
11
24
|
freeText: Boolean,
|
@@ -13,19 +26,19 @@ export default class extends ApplicationController {
|
|
13
26
|
pageSize: Number,
|
14
27
|
url: String,
|
15
28
|
urlParams: Object,
|
29
|
+
isMultiple: Boolean
|
16
30
|
}
|
17
31
|
|
18
32
|
connect() {
|
19
33
|
super.connect()
|
20
|
-
|
21
34
|
this.debouncedFetchResults = debounce(this.fetchResults.bind(this), 250)
|
22
35
|
this.debouncedLocalResults = debounce(this.localResults.bind(this), 250)
|
23
36
|
this.selectedIndex = -1
|
24
37
|
|
25
38
|
this.boundClickedOutside = this.clickedOutside.bind(this)
|
26
39
|
this.boundResetSearchInput = this.resetSearchInput.bind(this)
|
27
|
-
this.
|
28
|
-
this.
|
40
|
+
this.boundBlur = this.blur.bind(this)
|
41
|
+
this.boundChainToChanged = this.chainToChanged.bind(this)
|
29
42
|
|
30
43
|
// To remember what the current page and last page were, we queried
|
31
44
|
this.currentPage = 1
|
@@ -33,42 +46,102 @@ export default class extends ApplicationController {
|
|
33
46
|
this.endPage = null
|
34
47
|
|
35
48
|
// To remember what the last search was we did
|
49
|
+
this.searchQueryValue = null
|
36
50
|
this.lastSearch = null
|
51
|
+
this.minSearchQueryLength = 2
|
37
52
|
|
38
|
-
|
53
|
+
// To remember what the last options were we got from the server to prevent unnecessary refreshes
|
54
|
+
// and unexpected events
|
55
|
+
this.lastServerRefreshOptions = new Set()
|
39
56
|
|
40
57
|
this.popperInstance = createPopper(this.element, this.resultsTarget, {
|
41
|
-
offset: [-20, 2],
|
42
58
|
placement: "bottom-start",
|
59
|
+
strategy: "fixed",
|
43
60
|
modifiers: [
|
61
|
+
{ name: "offset", options: { offset: [0, 1] } },
|
44
62
|
{
|
45
63
|
name: "flip",
|
46
|
-
enabled: true,
|
47
64
|
options: {
|
48
|
-
|
65
|
+
fallbackPlacements: ["bottom"],
|
66
|
+
boundary: this.element.closest(".sts-card"),
|
49
67
|
},
|
50
68
|
},
|
51
69
|
{
|
52
70
|
name: "preventOverflow",
|
53
|
-
|
71
|
+
options: {
|
72
|
+
boundary: this.element.closest(".sts-card"),
|
73
|
+
},
|
54
74
|
},
|
55
75
|
popperSameWidth,
|
56
76
|
],
|
57
77
|
})
|
78
|
+
this.popperInstance.state.elements.popper.popperInstance = () => this.popperInstance
|
58
79
|
|
80
|
+
if (this.hasToggleButtonTarget) this.toggleButtonTarget.addEventListener("blur", this.boundBlur)
|
59
81
|
this.searchInputTarget.addEventListener("blur", this.boundBlur)
|
60
|
-
this.toggleButtonTarget.addEventListener("blur", this.boundBlur)
|
61
82
|
this.resultsTarget.addEventListener("blur", this.boundBlur)
|
62
83
|
|
63
84
|
window.addEventListener("click", this.boundClickedOutside)
|
64
85
|
|
65
|
-
|
86
|
+
setTimeout(() => {
|
87
|
+
this.getScrollParent(this.element)?.addEventListener("scroll", this.boundBlur)
|
88
|
+
}, 500)
|
89
|
+
|
90
|
+
if (this.chainToValue) {
|
91
|
+
this.getChainToElement()?.addEventListener("change", this.boundChainToChanged)
|
92
|
+
}
|
93
|
+
|
94
|
+
if (this.hiddenSelectTarget.selectedOptions.length > 0 && this.hiddenSelectTarget.selectedOptions[0].value) {
|
95
|
+
this.refreshSelectionFromServer().then((changed) => {
|
96
|
+
this.filterResultsChainTo()
|
97
|
+
this.setHiddenSelect()
|
98
|
+
|
99
|
+
if (!this.hiddenSelectTarget.getAttribute("data-reflex")) {
|
100
|
+
let event = new Event("change")
|
101
|
+
event.detail = { src: "satis-dropdown" }
|
102
|
+
this.hiddenSelectTarget.dispatchEvent(event)
|
103
|
+
}
|
104
|
+
})
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
getScrollParent(node) {
|
109
|
+
if (node == null) {
|
110
|
+
return null
|
111
|
+
}
|
112
|
+
|
113
|
+
let isScrollable = false
|
114
|
+
|
115
|
+
if (node instanceof Element) {
|
116
|
+
const vScrollValue = window.getComputedStyle(node).getPropertyValue("overflow-y")
|
117
|
+
|
118
|
+
isScrollable = vScrollValue == "auto" || vScrollValue == "scroll"
|
119
|
+
}
|
120
|
+
|
121
|
+
if (isScrollable) {
|
122
|
+
return node
|
123
|
+
} else {
|
124
|
+
return node.parentNode == null ? node : this.getScrollParent(node.parentNode)
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
chainToChanged(event) {
|
129
|
+
// Ignore if we triggered this change event
|
130
|
+
if (event?.detail?.src == "satis-dropdown") {
|
131
|
+
return
|
132
|
+
}
|
133
|
+
|
134
|
+
this.reset(event)
|
66
135
|
}
|
67
136
|
|
68
137
|
disconnect() {
|
69
138
|
this.debouncedFetchResults = null
|
70
139
|
this.debouncedLocalResults = null
|
71
140
|
window.removeEventListener("click", this.boundClickedOutside)
|
141
|
+
this.getChainToElement()?.removeEventListener("change", this.boundChainToChanged)
|
142
|
+
if (this.hasToggleButtonTarget) this.toggleButtonTarget.removeEventListener("blur", this.boundBlur)
|
143
|
+
this.resultsTarget.removeEventListener("blur", this.boundBlur)
|
144
|
+
this.searchInputTarget.removeEventListener("blur", this.boundBlur)
|
72
145
|
}
|
73
146
|
|
74
147
|
focus(event) {
|
@@ -76,27 +149,15 @@ export default class extends ApplicationController {
|
|
76
149
|
}
|
77
150
|
|
78
151
|
blur(event) {
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
handleBlur(event) {
|
83
|
-
if (!this.element.contains(event.relatedTarget) && this.resultsShown) {
|
84
|
-
this.hideResultsList()
|
85
|
-
if (event.target == this.searchInputTarget) {
|
86
|
-
this.boundResetSearchInput(event)
|
87
|
-
}
|
152
|
+
let target = event.relatedTarget
|
153
|
+
if (target == null) {
|
154
|
+
target = document.target
|
88
155
|
}
|
89
|
-
}
|
90
156
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
if (this.hiddenInputTarget.value == "") {
|
97
|
-
this.searchInputTarget.value = null
|
98
|
-
} else {
|
99
|
-
this.resetSearchInput()
|
157
|
+
if (event.type != "scroll" && !this.element.contains(target)) {
|
158
|
+
if (this.resultsShown)
|
159
|
+
this.hideResultsList()
|
160
|
+
this.boundResetSearchInput(event)
|
100
161
|
}
|
101
162
|
}
|
102
163
|
|
@@ -108,25 +169,19 @@ export default class extends ApplicationController {
|
|
108
169
|
return
|
109
170
|
}
|
110
171
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
let ourUrl = this.normalizedUrl
|
115
|
-
ourUrl.searchParams.append("id", this.hiddenInputTarget.value)
|
116
|
-
ourUrl.searchParams.append("page", this.currentPage)
|
117
|
-
ourUrl.searchParams.append("page_size", this.pageSizeValue)
|
172
|
+
this.refreshSelectionFromServer().then(() => {
|
173
|
+
// resolved
|
174
|
+
this.setHiddenSelect()
|
118
175
|
|
119
|
-
|
120
|
-
|
121
|
-
})
|
122
|
-
} else {
|
123
|
-
this.setHiddenInput()
|
176
|
+
if (!this.searchInputTarget.value && this.freeTextValue && this.hiddenSelectTarget.options.length > 0) {
|
177
|
+
this.searchInputTarget.value = this.hiddenSelectTarget.options[0].value
|
124
178
|
}
|
125
179
|
|
126
|
-
if (!this.
|
127
|
-
this.
|
128
|
-
|
129
|
-
|
180
|
+
if (!this.hiddenSelectTarget.getAttribute("data-reflex"))
|
181
|
+
this.hiddenSelectTarget.dispatchEvent(new CustomEvent("change", { detail: { src: "satis-dropdown" } }))
|
182
|
+
|
183
|
+
this.validateSearchQuery()
|
184
|
+
})
|
130
185
|
}
|
131
186
|
|
132
187
|
// Called when scrolling in the resultsTarget
|
@@ -142,24 +197,29 @@ export default class extends ApplicationController {
|
|
142
197
|
return
|
143
198
|
}
|
144
199
|
|
145
|
-
this.filterResultsChainTo()
|
146
|
-
|
147
200
|
switch (event.key) {
|
148
201
|
case "ArrowDown":
|
149
202
|
if (this.hasResults) {
|
150
|
-
this.
|
151
|
-
|
203
|
+
if (!this.resultsShown)
|
204
|
+
this.showResultsList(event)
|
152
205
|
this.moveDown()
|
153
206
|
}
|
207
|
+
// prevent the cursor from jumping to the beginning of the input and scrolling in some cases
|
208
|
+
event.preventDefault()
|
154
209
|
break
|
155
210
|
case "ArrowUp":
|
156
211
|
if (this.hasResults) {
|
157
212
|
this.moveUp()
|
158
213
|
}
|
214
|
+
// prevent the cursor from jumping to the beginning of the input and scrolling in some cases
|
215
|
+
event.preventDefault()
|
159
216
|
break
|
160
217
|
case "Enter":
|
161
218
|
event.preventDefault()
|
162
219
|
this.select(event)
|
220
|
+
// expect the dropdown to hide when its a freetext value
|
221
|
+
if (this.selectedIndex === -1 && this.freeTextValue)
|
222
|
+
this.hideResultsList(event)
|
163
223
|
|
164
224
|
break
|
165
225
|
case "Escape":
|
@@ -179,48 +239,68 @@ export default class extends ApplicationController {
|
|
179
239
|
|
180
240
|
// User enters text in the search field
|
181
241
|
search(event) {
|
242
|
+
this.searchQueryValue = this.searchInputTarget.value
|
243
|
+
|
244
|
+
if(this.searchInputTarget.value.length === 0 && !this.isMultipleValue){
|
245
|
+
if(this.nrOfItems === 1) this.lowLightSelected();
|
246
|
+
this.hiddenSelectTarget.innerHTML = ""
|
247
|
+
this.hiddenSelectTarget.add(this.createOption())
|
248
|
+
}
|
249
|
+
|
182
250
|
if (this.hasUrlValue) {
|
183
251
|
this.debouncedFetchResults(event)
|
184
252
|
} else {
|
185
253
|
this.debouncedLocalResults(event)
|
186
254
|
}
|
187
255
|
|
188
|
-
if (this.
|
189
|
-
|
190
|
-
|
191
|
-
|
256
|
+
if (!this.isMultipleValue) {
|
257
|
+
// set the freetext value as the selected value
|
258
|
+
if (this.freeTextValue && this.searchInputTarget.value) {
|
259
|
+
this.hiddenSelectTarget.innerHTML = ""
|
260
|
+
var option = this.createOption({ text: this.searchInputTarget.value, value: this.searchInputTarget.value })
|
261
|
+
this.hiddenSelectTarget.add(option)
|
262
|
+
}
|
192
263
|
}
|
193
264
|
}
|
194
265
|
|
195
266
|
// User presses reset button
|
196
267
|
reset(event) {
|
197
|
-
this.
|
198
|
-
|
199
|
-
|
268
|
+
if (!this.isMultipleValue) {
|
269
|
+
this.hiddenSelectTarget.innerHTML = ""
|
270
|
+
this.lastServerRefreshOptions.clear()
|
271
|
+
this.selectedItemsTemplateTarget.innerHTML = ""
|
272
|
+
this.hiddenSelectTarget.options.add(this.createOption())
|
273
|
+
}
|
274
|
+
|
275
|
+
this.searchInputTarget.value = ""
|
276
|
+
this.searchQueryValue = null
|
277
|
+
this.currentPage = 1
|
200
278
|
this.lastSearch = null
|
201
279
|
this.lastPage = null
|
202
280
|
this.endPage = null
|
203
281
|
|
204
|
-
|
205
|
-
this.selectedItem.classList.remove("bg-primary-200")
|
206
|
-
}
|
282
|
+
this.lowLightSelected();
|
207
283
|
this.selectedIndex = -1
|
284
|
+
|
208
285
|
if (this.hasUrlValue) {
|
209
286
|
this.itemsTarget.innerHTML = ""
|
210
287
|
}
|
211
|
-
|
288
|
+
|
212
289
|
this.itemTargets.forEach((item) => {
|
213
290
|
item.classList.remove("hidden")
|
214
291
|
})
|
292
|
+
this.filterResultsChainTo()
|
293
|
+
|
294
|
+
// hide all results and reset
|
295
|
+
this.hideResultsList()
|
296
|
+
|
297
|
+
this.validateSearchQuery()
|
215
298
|
|
216
299
|
if (event) {
|
217
300
|
event.preventDefault()
|
218
301
|
}
|
219
302
|
|
220
|
-
|
221
|
-
this.searchInputTarget.closest(".bg-white").classList.remove("warning")
|
222
|
-
}
|
223
|
-
|
303
|
+
this.hiddenSelectTarget.dispatchEvent(new Event("change"))
|
224
304
|
return false
|
225
305
|
}
|
226
306
|
|
@@ -230,59 +310,106 @@ export default class extends ApplicationController {
|
|
230
310
|
if (dataDiv == null) {
|
231
311
|
dataDiv = this.selectedItem
|
232
312
|
}
|
313
|
+
if (dataDiv == null) return
|
233
314
|
|
234
|
-
|
235
|
-
return
|
236
|
-
}
|
237
|
-
|
238
|
-
this.selectItem(dataDiv)
|
315
|
+
this.selectItem(dataDiv, true)
|
239
316
|
|
240
317
|
event.preventDefault()
|
241
318
|
}
|
242
319
|
|
243
|
-
selectItem(dataDiv) {
|
244
|
-
|
320
|
+
selectItem(dataDiv, force = false) {
|
321
|
+
const selectedValue = dataDiv.getAttribute("data-satis-dropdown-item-value") || ""
|
322
|
+
const selectedValueText = dataDiv.getAttribute("data-satis-dropdown-item-text") || ""
|
323
|
+
this.copyItemAttributes(dataDiv, this.hiddenSelectTarget) // FIXME: we are now supporting multiple values; is this needed? We copy the attributes to options
|
245
324
|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
325
|
+
const option = this.createOption({ text: selectedValueText, value: selectedValue })
|
326
|
+
this.copyItemAttributes(dataDiv, option)
|
327
|
+
const optionExists = Array.from(this.hiddenSelectTarget.options).some(
|
328
|
+
(opt) => opt.value === option.value && this.dataAttributesAreEqual(opt, option)
|
329
|
+
)
|
330
|
+
|
331
|
+
// we dont select items that already have been selected, open list
|
332
|
+
if (!force) {
|
333
|
+
if (optionExists) {
|
334
|
+
if (!this.resultsShown) this.showResultsList()
|
335
|
+
return
|
250
336
|
}
|
251
|
-
}
|
337
|
+
}
|
252
338
|
|
253
|
-
|
254
|
-
this.
|
255
|
-
|
339
|
+
// clear the search input if we are not in multi select mode
|
340
|
+
if (!this.isMultipleValue) {
|
341
|
+
this.lastServerRefreshOptions.clear()
|
342
|
+
this.hiddenSelectTarget.innerHTML = ""
|
343
|
+
this.selectedItemsTemplateTarget.innerHTML = ""
|
344
|
+
this.searchInputTarget.value = selectedValueText
|
345
|
+
} else
|
346
|
+
this.selectedItemsTemplateTarget.content.querySelector(`[data-satis-dropdown-item-value="${selectedValue}"]`)?.remove()
|
256
347
|
|
257
|
-
this.
|
348
|
+
this.hiddenSelectTarget.add(option)
|
349
|
+
this.lastServerRefreshOptions.add(selectedValue)
|
350
|
+
this.selectedItemsTemplateTarget.content.appendChild(dataDiv.cloneNode(true))
|
258
351
|
|
259
|
-
|
260
|
-
|
352
|
+
this.hiddenSelectTarget.dispatchEvent(new Event("change"))
|
353
|
+
this.setSelectedItem(selectedValue)
|
354
|
+
this.hideResultsList()
|
355
|
+
this.validateSearchQuery()
|
356
|
+
}
|
357
|
+
|
358
|
+
setHiddenSelect() {
|
359
|
+
if (this.hiddenSelectTarget.options.length === 0) {
|
360
|
+
this.searchInputTarget.value = ""
|
361
|
+
this.pillsTarget.innerHTML = ""
|
362
|
+
this.pillsTarget.classList.add("hidden")
|
363
|
+
return true
|
364
|
+
}
|
365
|
+
|
366
|
+
if (this.isMultipleValue) {
|
367
|
+
Array.from(this.hiddenSelectTarget.options).forEach((opt) => {
|
368
|
+
if (!opt.value) return
|
369
|
+
const pillExists = this.pillsTarget.querySelector(
|
370
|
+
`[data-satis-dropdown-target="pill"] > button[data-satis-dropdown-id-param="${opt.value}"]`
|
371
|
+
)
|
372
|
+
if (!pillExists) {
|
373
|
+
// Add pill to selection
|
374
|
+
const pillTemplate = this.pillTemplateTarget.content.firstElementChild.cloneNode(true)
|
375
|
+
pillTemplate.prepend(opt.text || opt.value)
|
376
|
+
pillTemplate.querySelector("button").setAttribute("data-satis-dropdown-id-param", opt.value)
|
377
|
+
this.pillsTarget.appendChild(pillTemplate)
|
378
|
+
}
|
379
|
+
})
|
380
|
+
|
381
|
+
this.searchInputTarget.value = ""
|
382
|
+
this.pillsTarget.classList.remove("hidden")
|
383
|
+
} else if (this.hiddenSelectTarget.options.length == 1) {
|
384
|
+
const opt = this.hiddenSelectTarget.options[0]
|
385
|
+
this.searchInputTarget.value = opt.text
|
261
386
|
}
|
262
387
|
}
|
263
388
|
|
264
389
|
// --- Helpers
|
265
390
|
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
391
|
+
recordLastSearch() {
|
392
|
+
this.lastSearch = this.searchInputTarget.value ? this.searchInputTarget.value : ""
|
393
|
+
}
|
394
|
+
|
395
|
+
get searchQueryChanged() {
|
396
|
+
const searchQueryValue = this.filteredSearchQuery ? this.filteredSearchQuery : ""
|
397
|
+
const lastSearch = this.lastSearch ? this.lastSearch : ""
|
398
|
+
return searchQueryValue.length !== lastSearch.length ||
|
399
|
+
searchQueryValue.localeCompare(lastSearch, undefined, { sensitivity: "base" }) !== 0
|
400
|
+
}
|
401
|
+
|
402
|
+
removePill(event) {
|
403
|
+
event.preventDefault()
|
404
|
+
|
405
|
+
this.hiddenSelectTarget.removeChild(this.hiddenSelectTarget.querySelector(`option[value="${event.params.id}"]`))
|
406
|
+
this.lastServerRefreshOptions.delete(event.params.id)
|
407
|
+
|
408
|
+
this.pillTargets
|
409
|
+
.find((pill) => pill.querySelector("button").getAttribute("data-satis-dropdown-id-param") == event.params.id)
|
410
|
+
?.remove()
|
411
|
+
|
412
|
+
//this.hiddenSelectTarget.dispatchEvent(new Event("change"))
|
286
413
|
}
|
287
414
|
|
288
415
|
toggleResultsList(event) {
|
@@ -293,14 +420,16 @@ export default class extends ApplicationController {
|
|
293
420
|
// } else if (this.element.contains(document.activeElement)) {
|
294
421
|
} else {
|
295
422
|
this.filterResultsChainTo()
|
296
|
-
|
423
|
+
|
424
|
+
if(this.hasResults && !this.searchQueryChanged){
|
297
425
|
this.showResultsList(event)
|
298
|
-
}
|
299
|
-
this.
|
426
|
+
}else {
|
427
|
+
if (this.hasUrlValue)
|
428
|
+
this.fetchResults(event)
|
429
|
+
else
|
430
|
+
this.localResults(event)
|
300
431
|
}
|
301
432
|
}
|
302
|
-
|
303
|
-
event.preventDefault()
|
304
433
|
return false
|
305
434
|
}
|
306
435
|
|
@@ -308,15 +437,23 @@ export default class extends ApplicationController {
|
|
308
437
|
this.resultsTarget.classList.remove("hidden")
|
309
438
|
this.resultsTarget.setAttribute("data-show", "")
|
310
439
|
this.popperInstance.update()
|
311
|
-
this.
|
312
|
-
|
440
|
+
if (this.hasToggleButtonTarget) {
|
441
|
+
this.toggleButtonTarget.querySelector(".fa-chevron-up").classList.remove("hidden")
|
442
|
+
this.toggleButtonTarget.querySelector(".fa-chevron-down").classList.add("hidden")
|
443
|
+
}
|
313
444
|
}
|
314
445
|
|
315
446
|
hideResultsList(event) {
|
316
447
|
this.resultsTarget.classList.add("hidden")
|
317
448
|
this.resultsTarget.removeAttribute("data-show")
|
318
|
-
this.
|
319
|
-
|
449
|
+
if (this.hasToggleButtonTarget) {
|
450
|
+
this.toggleButtonTarget.querySelector(".fa-chevron-up").classList.add("hidden")
|
451
|
+
this.toggleButtonTarget.querySelector(".fa-chevron-down").classList.remove("hidden")
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
getChainToElement() {
|
456
|
+
return this.hiddenSelectTarget?.form?.querySelector(`[name="${this.chainToValue}"]`)
|
320
457
|
}
|
321
458
|
|
322
459
|
filterResultsChainTo() {
|
@@ -325,11 +462,12 @@ export default class extends ApplicationController {
|
|
325
462
|
}
|
326
463
|
|
327
464
|
let chainToValue
|
328
|
-
let chainTo = this.
|
465
|
+
let chainTo = this.getChainToElement()
|
329
466
|
if (chainTo) {
|
330
467
|
chainToValue = chainTo.value
|
331
468
|
}
|
332
469
|
|
470
|
+
let listItems = 0
|
333
471
|
this.itemTargets.forEach((item) => {
|
334
472
|
let itemChainToValue = item.getAttribute("data-chain")
|
335
473
|
let chainMatch = true
|
@@ -338,84 +476,125 @@ export default class extends ApplicationController {
|
|
338
476
|
}
|
339
477
|
|
340
478
|
if (chainMatch) {
|
479
|
+
listItems += 1
|
341
480
|
item.classList.remove("hidden")
|
342
481
|
} else {
|
343
482
|
item.classList.add("hidden")
|
483
|
+
item.classList.remove("highlighted")
|
344
484
|
}
|
345
485
|
})
|
486
|
+
if (listItems == 1) {
|
487
|
+
this.selectItem(this.itemTargets.filter((item) => {
|
488
|
+
return item.classList != 'hidden'
|
489
|
+
})[0])
|
490
|
+
}
|
346
491
|
}
|
347
492
|
|
348
493
|
localResults(event) {
|
349
|
-
if (this.
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
494
|
+
if (!this.searchQueryChanged) {
|
495
|
+
if(!this.resultsShown) {
|
496
|
+
if (this.hasResults)
|
497
|
+
this.showResultsList(event)
|
498
|
+
else this.showSelectedItem()
|
499
|
+
}
|
500
|
+
this.validateSearchQuery()
|
354
501
|
return
|
355
502
|
}
|
356
503
|
|
357
|
-
this.
|
504
|
+
this.recordLastSearch()
|
358
505
|
|
506
|
+
// show all items again and count those that were already visible (previously matched)
|
507
|
+
let previouslyVisibleItemsCount = 0
|
359
508
|
this.itemTargets.forEach((item) => {
|
360
|
-
item.classList.
|
361
|
-
|
509
|
+
if (item.classList.contains('hidden')) {
|
510
|
+
item.classList.remove('hidden')
|
511
|
+
} else {
|
512
|
+
previouslyVisibleItemsCount++
|
513
|
+
}
|
514
|
+
});
|
362
515
|
|
363
516
|
this.filterResultsChainTo()
|
364
517
|
|
518
|
+
// hide all items that don't match the search query
|
519
|
+
const searchValue = this.searchQueryValue
|
365
520
|
let matches = []
|
366
521
|
this.itemTargets.forEach((item) => {
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
522
|
+
const text = item.getAttribute("data-satis-dropdown-item-text")
|
523
|
+
const matched = this.needsExactMatchValue ?
|
524
|
+
searchValue.localeCompare(text, undefined, {sensitivity: 'base'}) === 0:
|
525
|
+
new RegExp(searchValue, "i").test(text)
|
526
|
+
|
527
|
+
const isHidden = item.classList.contains("hidden")
|
528
|
+
if (!isHidden) {
|
529
|
+
if (matched) {
|
530
|
+
matches.push(item)
|
375
531
|
} else {
|
376
|
-
item.classList.
|
532
|
+
item.classList.toggle("hidden", true)
|
377
533
|
}
|
378
534
|
}
|
379
535
|
})
|
380
536
|
|
381
|
-
|
382
|
-
|
383
|
-
}
|
384
|
-
|
385
|
-
if (
|
386
|
-
matches.length == 1 &&
|
387
|
-
matches[0].getAttribute("data-satis-dropdown-item-text").toLowerCase().indexOf(this.lastSearch.toLowerCase()) >= 0
|
388
|
-
) {
|
389
|
-
this.selectItem(matches[0].closest('[data-satis-dropdown-target="item"]'))
|
390
|
-
} else if (matches.length > 1) {
|
537
|
+
// don't show results
|
538
|
+
if (matches.length > 0) {
|
391
539
|
this.showResultsList(event)
|
540
|
+
} else {
|
541
|
+
if (!this.showSelectedItem())
|
542
|
+
this.hideResultsList(event)
|
543
|
+
}
|
544
|
+
|
545
|
+
// auto select if there is only one match and we are not in freetext mode
|
546
|
+
if(!this.freeTextValue) {
|
547
|
+
if (matches.length === 1) {
|
548
|
+
if (this.filteredSearchQuery.length >= this.minSearchQueryLength &&
|
549
|
+
matches[0].getAttribute("data-satis-dropdown-item-text").toLowerCase().indexOf(this.lastSearch.toLowerCase()) >= 0) {
|
550
|
+
const dataDiv = matches[0].closest('[data-satis-dropdown-target="item"]')
|
551
|
+
this.selectItem(dataDiv)
|
552
|
+
this.setSelectedItem(dataDiv.getAttribute("data-satis-dropdown-item-value"))
|
553
|
+
this.searchQueryValue = ""
|
554
|
+
} else {
|
555
|
+
this.showSelectedItem()
|
556
|
+
}
|
557
|
+
// the selected item if there was only 1 item visible before
|
558
|
+
} else if(previouslyVisibleItemsCount === 1 && matches.length > 1) {
|
559
|
+
this.setSelectedItem()
|
560
|
+
}
|
392
561
|
}
|
562
|
+
|
563
|
+
this.validateSearchQuery()
|
393
564
|
}
|
394
565
|
|
395
566
|
// Remote search
|
396
567
|
fetchResults(event) {
|
397
568
|
const promise = new Promise((resolve, reject) => {
|
398
569
|
if (
|
399
|
-
(this.
|
570
|
+
(!this.searchQueryChanged &&
|
400
571
|
(this.currentPage == this.lastPage || this.currentPage == this.endPage)) ||
|
401
572
|
!this.hasUrlValue
|
402
573
|
) {
|
574
|
+
if(!this.resultsShown) {
|
575
|
+
if (this.hasResults)
|
576
|
+
this.showResultsList(event)
|
577
|
+
else this.showSelectedItem()
|
578
|
+
}
|
403
579
|
return
|
404
580
|
}
|
405
581
|
|
406
|
-
if (this.
|
582
|
+
if (this.searchQueryChanged) {
|
407
583
|
this.currentPage = 1
|
408
584
|
this.endPage = null
|
585
|
+
this.recordLastSearch()
|
409
586
|
}
|
410
587
|
|
411
|
-
this.lastSearch = this.searchInputTarget.value
|
412
588
|
this.lastPage = this.currentPage
|
413
589
|
|
414
|
-
let ourUrl = this.normalizedUrl
|
590
|
+
let ourUrl = this.normalizedUrl()
|
415
591
|
let pageSize = this.pageSizeValue
|
416
|
-
|
417
|
-
|
592
|
+
|
593
|
+
if (event != null && (this.filteredSearchQuery >= 2 || this.lastSearch)) {
|
594
|
+
ourUrl.searchParams.append("term", this.searchQueryValue)
|
418
595
|
}
|
596
|
+
|
597
|
+
|
419
598
|
ourUrl.searchParams.append("page", this.currentPage)
|
420
599
|
ourUrl.searchParams.append("page_size", pageSize)
|
421
600
|
if (this.needsExactMatchValue) {
|
@@ -425,30 +604,34 @@ export default class extends ApplicationController {
|
|
425
604
|
this.fetchResultsWith(ourUrl).then((itemCount) => {
|
426
605
|
if (this.hasResults) {
|
427
606
|
this.filterResultsChainTo()
|
428
|
-
|
429
|
-
this.
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
this.
|
439
|
-
} else if (this.nrOfItems == 1) {
|
440
|
-
this.moveDown()
|
607
|
+
|
608
|
+
if (!this.resultsShown && !this.chainToValue) {
|
609
|
+
this.showResultsList()
|
610
|
+
}
|
611
|
+
|
612
|
+
// auto select when there is only 1 value
|
613
|
+
if (this.filteredSearchQuery.length >= this.minSearchQueryLength && this.nrOfItems === 1 && !this.freeTextValue) {
|
614
|
+
const dataDiv = this.itemTargets[0].closest('[data-satis-dropdown-target="item"]')
|
615
|
+
this.selectItem(dataDiv)
|
616
|
+
this.setSelectedItem(dataDiv.getAttribute("data-satis-dropdown-item-value"))
|
617
|
+
this.searchQueryValue = ""
|
441
618
|
}
|
442
619
|
|
443
620
|
if (itemCount > 0) {
|
444
621
|
this.currentPage += 1
|
445
622
|
}
|
446
|
-
|
623
|
+
|
624
|
+
// when the count < page_size we assume we reached the end of the list (count can be 0)
|
625
|
+
if (itemCount != pageSize) {
|
447
626
|
this.endPage = this.currentPage
|
448
627
|
}
|
449
628
|
|
450
629
|
resolve()
|
630
|
+
} else {
|
631
|
+
this.showSelectedItem()
|
451
632
|
}
|
633
|
+
|
634
|
+
this.validateSearchQuery()
|
452
635
|
})
|
453
636
|
})
|
454
637
|
return promise
|
@@ -482,7 +665,95 @@ export default class extends ApplicationController {
|
|
482
665
|
return promise
|
483
666
|
}
|
484
667
|
|
485
|
-
get
|
668
|
+
get filteredSearchQuery(){
|
669
|
+
if(this.searchQueryValue < this.minSearchQueryLength) return ""
|
670
|
+
return this.searchQueryValue
|
671
|
+
}
|
672
|
+
|
673
|
+
get selectionChangedSinceLastRefresh() {
|
674
|
+
return (
|
675
|
+
this.hiddenSelectTarget.options.length !== this.lastServerRefreshOptions.size ||
|
676
|
+
!Array.from(this.hiddenSelectTarget.options).every((option) => this.lastServerRefreshOptions.has(option.value))
|
677
|
+
)
|
678
|
+
}
|
679
|
+
|
680
|
+
refreshSelectionFromServer() {
|
681
|
+
if (!this.selectionChangedSinceLastRefresh) return Promise.resolve()
|
682
|
+
|
683
|
+
let updated = 0
|
684
|
+
Array.from(this.hiddenSelectTarget.options).forEach((opt) => {
|
685
|
+
// try to find the items locally
|
686
|
+
let item = this.itemsTarget.querySelector('[data-satis-dropdown-item-value="' + opt.value + '"]')
|
687
|
+
if (item) {
|
688
|
+
opt.text = item.getAttribute("data-satis-dropdown-item-text")
|
689
|
+
|
690
|
+
// Copy over data attributes on the item div to the option
|
691
|
+
this.copyItemAttributes(item, opt)
|
692
|
+
this.selectedItemsTemplateTarget.content.appendChild(item.cloneNode(true))
|
693
|
+
updated++
|
694
|
+
}
|
695
|
+
|
696
|
+
this.lastServerRefreshOptions.add(opt.value)
|
697
|
+
})
|
698
|
+
|
699
|
+
if (!this.hasUrlValue || this.hiddenSelectTarget.options.length === updated) return Promise.resolve()
|
700
|
+
|
701
|
+
const promise = new Promise((resolve, reject) => {
|
702
|
+
if (!this.hasUrlValue) return
|
703
|
+
|
704
|
+
const ourUrl = this.normalizedUrl()
|
705
|
+
|
706
|
+
let selectedIds = Array.from(this.hiddenSelectTarget.options).map((opt) => opt.value)
|
707
|
+
|
708
|
+
// make sure we get all selected items
|
709
|
+
//ourUrl.searchParams.append("page", 1)
|
710
|
+
//ourUrl.searchParams.append("page_size", selectedIds.length)
|
711
|
+
// parameters with [] will be converted to an array
|
712
|
+
if (selectedIds.length > 0)
|
713
|
+
selectedIds.forEach((id) => ourUrl.searchParams.append(selectedIds.length === 1 ? "id" : "id[]", id))
|
714
|
+
|
715
|
+
fetch(ourUrl.href, {}).then((response) => {
|
716
|
+
if (response.ok)
|
717
|
+
response.text().then((data) => {
|
718
|
+
let tmpDiv = document.createElement("div")
|
719
|
+
tmpDiv.innerHTML = data
|
720
|
+
|
721
|
+
for (let i = 0; i < this.hiddenSelectTarget.options.length; i++) {
|
722
|
+
let opt = this.hiddenSelectTarget.options[i]
|
723
|
+
let item = tmpDiv.querySelector('[data-satis-dropdown-item-value="' + opt.value + '"]')
|
724
|
+
if (!item && !this.freeTextValue) {
|
725
|
+
this.selectedItemsTemplateTarget.content.querySelector(`[data-satis-dropdown-item-value="${opt.value}"]`)?.remove()
|
726
|
+
opt.remove()
|
727
|
+
this.lastServerRefreshOptions.delete(opt.value)
|
728
|
+
} else {
|
729
|
+
let text = item.getAttribute("data-satis-dropdown-item-text")
|
730
|
+
|
731
|
+
if (opt.text != text) {
|
732
|
+
if (text === "") opt.text = opt.id
|
733
|
+
else opt.text = text
|
734
|
+
}
|
735
|
+
|
736
|
+
// Copy over data attributes on the item div to the option
|
737
|
+
this.copyItemAttributes(item, opt)
|
738
|
+
this.selectedItemsTemplateTarget.content.appendChild(item.cloneNode(true))
|
739
|
+
}
|
740
|
+
}
|
741
|
+
|
742
|
+
// blank option
|
743
|
+
if (this.hiddenSelectTarget.options.length === 0) {
|
744
|
+
let option = this.createOption()
|
745
|
+
this.hiddenSelectTarget.options.add(option)
|
746
|
+
this.lastServerRefreshOptions.add(option.value)
|
747
|
+
}
|
748
|
+
|
749
|
+
resolve()
|
750
|
+
})
|
751
|
+
})
|
752
|
+
})
|
753
|
+
return promise
|
754
|
+
}
|
755
|
+
|
756
|
+
normalizedUrl() {
|
486
757
|
let ourUrl
|
487
758
|
try {
|
488
759
|
ourUrl = new URL(this.urlValue)
|
@@ -494,6 +765,7 @@ export default class extends ApplicationController {
|
|
494
765
|
const form = this.element.closest("form")
|
495
766
|
Object.entries(this.urlParamsValue).forEach((item) => {
|
496
767
|
let elm = form.querySelector(`[name='${item[1]}']`)
|
768
|
+
|
497
769
|
if (elm) {
|
498
770
|
ourUrl.searchParams.append(item[0], elm.value)
|
499
771
|
} else {
|
@@ -501,6 +773,14 @@ export default class extends ApplicationController {
|
|
501
773
|
}
|
502
774
|
})
|
503
775
|
|
776
|
+
let chainTo = this.getChainToElement()
|
777
|
+
if (chainTo) {
|
778
|
+
let chainToParam = chainTo
|
779
|
+
.getAttribute("name")
|
780
|
+
.substring(chainTo.getAttribute("name").lastIndexOf("[") + 1, chainTo.getAttribute("name").lastIndexOf("]"))
|
781
|
+
ourUrl.searchParams.append(chainToParam, chainTo.value)
|
782
|
+
}
|
783
|
+
|
504
784
|
return ourUrl
|
505
785
|
}
|
506
786
|
|
@@ -533,24 +813,42 @@ export default class extends ApplicationController {
|
|
533
813
|
}
|
534
814
|
|
535
815
|
get selectedItem() {
|
816
|
+
if (this.selectedIndex === -1) return
|
536
817
|
return this.itemTargets.filter((item) => {
|
537
818
|
return !item.classList.contains("hidden")
|
538
819
|
})[this.selectedIndex]
|
539
820
|
}
|
540
821
|
|
541
822
|
lowLightSelected() {
|
542
|
-
|
543
|
-
|
544
|
-
}
|
823
|
+
this.itemsTarget.querySelectorAll('.highlighted[data-satis-dropdown-target="item"]').forEach((item) => {
|
824
|
+
item.classList.toggle("highlighted")
|
825
|
+
})
|
545
826
|
}
|
546
827
|
|
547
828
|
highLightSelected() {
|
548
|
-
|
549
|
-
|
550
|
-
|
829
|
+
const selectedItem = this.selectedItem
|
830
|
+
if (selectedItem) {
|
831
|
+
selectedItem.classList.toggle("highlighted", true)
|
832
|
+
selectedItem.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" })
|
551
833
|
}
|
552
834
|
}
|
553
835
|
|
836
|
+
/*
|
837
|
+
* Set the selected item base on an the items 'data-satis-dropdown-item-value' attribute
|
838
|
+
* @param {string} value - The value to match the item against
|
839
|
+
*/
|
840
|
+
setSelectedItem(value) {
|
841
|
+
this.lowLightSelected()
|
842
|
+
if (!value) {
|
843
|
+
this.selectedIndex = -1
|
844
|
+
return
|
845
|
+
}
|
846
|
+
const itemTargets = this.itemTargets;
|
847
|
+
const visibleItems = itemTargets.filter(item => !item.classList.contains("hidden"));
|
848
|
+
this.selectedIndex = visibleItems.findIndex(item => item.getAttribute("data-satis-dropdown-item-value") === value);
|
849
|
+
this.highLightSelected()
|
850
|
+
}
|
851
|
+
|
554
852
|
moveDown() {
|
555
853
|
this.lowLightSelected()
|
556
854
|
this.increaseSelectedIndex()
|
@@ -562,9 +860,33 @@ export default class extends ApplicationController {
|
|
562
860
|
this.decreaseSelectedIndex()
|
563
861
|
this.highLightSelected()
|
564
862
|
}
|
863
|
+
validateSearchQuery() {
|
864
|
+
const trimmedValue = this.searchInputTarget.value.trim();
|
865
|
+
const elements = this.selectedItemsTemplateTarget.content.querySelectorAll(`[data-satis-dropdown-item-text*="${trimmedValue}"]`);
|
866
|
+
const selected = Array.from(elements).find(element => element.getAttribute('data-satis-dropdown-item-text').trim() === trimmedValue);
|
867
|
+
if (!selected && this.searchInputTarget.value.length > 0 && !this.freeTextValue) {
|
868
|
+
this.searchInputTarget.closest(".bg-white").classList.toggle("warning", true)
|
869
|
+
} else {
|
870
|
+
this.searchInputTarget.closest(".bg-white").classList.toggle("warning", false)
|
871
|
+
}
|
872
|
+
}
|
565
873
|
|
874
|
+
// clear search input and hide results
|
566
875
|
resetSearchInput(event) {
|
567
|
-
this.
|
876
|
+
if (this.multiSelectValue) {
|
877
|
+
this.searchInputTarget.value = ""
|
878
|
+
} else {
|
879
|
+
if (this.hiddenSelectTarget.options.length > 0) {
|
880
|
+
const option = this.hiddenSelectTarget.options[0]
|
881
|
+
this.searchInputTarget.value = option.text
|
882
|
+
}
|
883
|
+
}
|
884
|
+
|
885
|
+
if (this.resultsShown) {
|
886
|
+
this.hideResultsList(event)
|
887
|
+
}
|
888
|
+
|
889
|
+
this.validateSearchQuery()
|
568
890
|
}
|
569
891
|
|
570
892
|
clickedOutside(event) {
|
@@ -577,4 +899,78 @@ export default class extends ApplicationController {
|
|
577
899
|
}
|
578
900
|
}
|
579
901
|
}
|
902
|
+
|
903
|
+
copyItemAttributes(item, dest) {
|
904
|
+
Array.prototype.slice.call(item.attributes).forEach((attr) => {
|
905
|
+
if (attr.name.startsWith("data") && !attr.name.startsWith("data-satis") && !attr.name.startsWith("data-action")) {
|
906
|
+
dest.setAttribute(attr.name, attr.value)
|
907
|
+
}
|
908
|
+
})
|
909
|
+
}
|
910
|
+
|
911
|
+
createOption(options) {
|
912
|
+
options = Object.assign({ text: "", value: "", selected: true }, options)
|
913
|
+
|
914
|
+
let option = document.createElement("option")
|
915
|
+
option.text = options.text
|
916
|
+
option.value = options.value
|
917
|
+
option.setAttribute("selected", options.selected)
|
918
|
+
return option
|
919
|
+
}
|
920
|
+
|
921
|
+
dataAttributesAreEqual(el1, el2) {
|
922
|
+
const keys1 = Object.keys(el1.dataset)
|
923
|
+
const keys2 = Object.keys(el2.dataset)
|
924
|
+
if (keys1.length !== keys2.length) return false
|
925
|
+
|
926
|
+
for (const key of keys1) {
|
927
|
+
if (el1.dataset[key] !== el2.dataset[key]) {
|
928
|
+
return false
|
929
|
+
}
|
930
|
+
}
|
931
|
+
return true
|
932
|
+
}
|
933
|
+
|
934
|
+
get hasFocus() {
|
935
|
+
const activeElement = document.activeElement;
|
936
|
+
if (activeElement === this.element ||
|
937
|
+
this.element.contains(activeElement) ||
|
938
|
+
this.element.querySelector(':focus') !== null) {
|
939
|
+
return true;
|
940
|
+
}
|
941
|
+
return false;
|
942
|
+
}
|
943
|
+
|
944
|
+
// Selected items are being cached in selectItemsTemplate. Sometimes we want to show the selected item in the results list
|
945
|
+
// As the selected item may not be in the results list, we cache the item in the template and re-add it when needed.
|
946
|
+
showSelectedItem() {
|
947
|
+
if (this.isMultipleValue
|
948
|
+
|| this.freeTextValue
|
949
|
+
|| this.hiddenSelectTarget.options.length === 0
|
950
|
+
|| !this.hasFocus
|
951
|
+
) return false;
|
952
|
+
|
953
|
+
const option = this.hiddenSelectTarget.options[0]
|
954
|
+
let item = this.itemsTarget.querySelector(`[data-satis-dropdown-item-value="${option.value}"]`)
|
955
|
+
if (item) {
|
956
|
+
item.classList.remove("hidden")
|
957
|
+
} else {
|
958
|
+
item = this.selectedItemsTemplateTarget.content.querySelector(`[data-satis-dropdown-item-value="${option.value}"]`)
|
959
|
+
if (item) {
|
960
|
+
item = item.cloneNode(true)
|
961
|
+
item.classList.remove("hidden")
|
962
|
+
item.setAttribute("data-satis-dropdown-target", "item")
|
963
|
+
item.setAttribute("data-action", "click->satis-dropdown#select")
|
964
|
+
this.itemsTarget.appendChild(item)
|
965
|
+
}
|
966
|
+
}
|
967
|
+
|
968
|
+
if(item) {
|
969
|
+
if (!this.resultsShown)
|
970
|
+
this.showResultsList()
|
971
|
+
this.setSelectedItem(option.value)
|
972
|
+
}
|
973
|
+
|
974
|
+
return item != null;
|
975
|
+
}
|
580
976
|
}
|