adminizer 4.2.0-build.51 → 4.2.0-build.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{VanillaJSONEditor-BsNSMuiI.js → VanillaJSONEditor-x8tDbio1.js} +3 -3
- package/assets/add-DOaZgoTz.js +1 -0
- package/assets/add-form-BjackXJe.js +1 -0
- package/assets/add-group-Br44s2D6.js +1 -0
- package/assets/{add-group-form-9dIdiUu3.js → add-group-form-YI6KS37x.js} +1 -1
- package/assets/add-user-DWcH0s9-.js +1 -0
- package/assets/{add-user-form-CKEPuXAX.js → add-user-form-bv5BNX5A.js} +1 -1
- package/assets/{app-DcyaNUqI.css → app-CVnUv8s_.css} +10 -2
- package/assets/{app-layout-MF9D28sb.js → app-layout-DecN527i.js} +1 -1
- package/assets/{app-shell-Dd-kA5uc.js → app-shell-DHzMWA1L.js} +1 -1
- package/assets/{app-sidebar-CBCrH_5b.js → app-sidebar-4JFP8UdU.js} +1 -1
- package/assets/{app-sidebar-header-CT58bBx6.js → app-sidebar-header-CIKLfLsF.js} +1 -1
- package/assets/app.js +2 -2
- package/assets/breadcrumbs-Bo2z-LNC.js +1 -0
- package/assets/catalog-C71LuRag.css +1 -0
- package/assets/{catalog-h5-oFEgK.js → catalog-DVyrGTNR.js} +4 -4
- package/assets/{dashboard-Ca0PxrpJ.js → dashboard-Dy3pk9t7.js} +2 -2
- package/assets/date-picker-B2z-aeuv.js +1 -0
- package/assets/debounce-D6eaSoDg.js +1 -0
- package/assets/del-modal-l3LxJWCN.js +1 -0
- package/assets/field-renderer-BHo944Cn.js +407 -0
- package/assets/{field-renderer-BkNaSbkZ.css → field-renderer-CsBa_tMB.css} +1 -1
- package/assets/form-BXfnz6h5.js +1 -0
- package/assets/{form-B30gc4iL.js → form-hP8sjbND.js} +1 -1
- package/assets/{geo-json-XGenv_Sy.js → geo-json-CVaNUZbb.js} +1 -1
- package/assets/{handsontable-CpTuVOqA.js → handsontable-CZQ5Ietj.js} +1 -1
- package/assets/home-BD4MWmm9.js +2 -0
- package/assets/{icon-CS1X91Nz.js → icon-C_X2cQ6W.js} +1 -1
- package/assets/index-C148XJoK.js +1 -0
- package/assets/{init-user--38KZHls.js → init-user-DgCD4ZN1.js} +1 -1
- package/assets/input-error-Bab-HPbn.js +1 -0
- package/assets/list-C-27EH39.js +1 -0
- package/assets/{list-table-CSB-cBZ7.js → list-table-_OiQmr2A.js} +3 -3
- package/assets/{login-BsyYLvZs.js → login-jzvVXgAV.js} +1 -1
- package/assets/manifest.json +114 -88
- package/assets/{material-icon-08xik4mg.js → material-icon-DsiW0iQG.js} +1 -1
- package/assets/media-manager-BZPjl98I.css +1 -0
- package/assets/media-manager-CSB_XRcE.js +14 -0
- package/assets/{module-DF806s6D.js → module-Ceq6vuwa.js} +1 -1
- package/assets/{monaco-editor-Cp_1Q01C.js → monaco-editor-XX8Hz76f.js} +3 -3
- package/assets/multi-select-BbKSrMw2.js +1 -0
- package/assets/{nav-footer-CiLx5SB9.js → nav-footer-B8gMV6Wp.js} +1 -1
- package/assets/{nav-main-DgWcOcOI.js → nav-main-BUp9qA8R.js} +1 -1
- package/assets/nav-user-DeF3SDRj.js +1 -0
- package/assets/{pagination-render-CsKj8TwQ.js → pagination-render-B9U_hVbB.js} +1 -1
- package/assets/{register-CQhM1bKw.js → register-C6acWsLe.js} +1 -1
- package/assets/theme-switcher-D8T9NgWG.js +1 -0
- package/assets/{toast-editor-B9DGyj0_.js → toast-editor-C0550yms.js} +1 -1
- package/assets/{user-info-BSOJr6JQ.js → user-info-CAgkqARx.js} +1 -1
- package/assets/{user-menu-content-BcKOjCpg.js → user-menu-content-BxL0QMC9.js} +1 -1
- package/assets/{welcome-Dq1qVeCh.js → welcome-Dk7GoS5R.js} +1 -1
- package/controllers/edit.js +4 -10
- package/controllers/media-manager/mediaManagerAdapter.d.ts +15 -1
- package/controllers/media-manager/mediaManagerAdapter.js +126 -85
- package/controllers/media-manager/mediaManagerApi.js +10 -4
- package/controllers/view.js +10 -0
- package/fileicons/3g2.svg +1 -0
- package/fileicons/3ga.svg +1 -0
- package/fileicons/3gp.svg +1 -0
- package/fileicons/7z.svg +1 -0
- package/fileicons/aa.svg +1 -0
- package/fileicons/aac.svg +1 -0
- package/fileicons/ac.svg +1 -0
- package/fileicons/accdb.svg +1 -0
- package/fileicons/accdt.svg +1 -0
- package/fileicons/ace.svg +1 -0
- package/fileicons/adn.svg +1 -0
- package/fileicons/ai.svg +1 -0
- package/fileicons/aif.svg +1 -0
- package/fileicons/aifc.svg +1 -0
- package/fileicons/aiff.svg +1 -0
- package/fileicons/ait.svg +1 -0
- package/fileicons/amr.svg +1 -0
- package/fileicons/ani.svg +1 -0
- package/fileicons/apk.svg +1 -0
- package/fileicons/app.svg +1 -0
- package/fileicons/applescript.svg +1 -0
- package/fileicons/asax.svg +1 -0
- package/fileicons/asc.svg +1 -0
- package/fileicons/ascx.svg +1 -0
- package/fileicons/asf.svg +1 -0
- package/fileicons/ash.svg +1 -0
- package/fileicons/ashx.svg +1 -0
- package/fileicons/asm.svg +1 -0
- package/fileicons/asmx.svg +1 -0
- package/fileicons/asp.svg +1 -0
- package/fileicons/aspx.svg +1 -0
- package/fileicons/asx.svg +1 -0
- package/fileicons/au.svg +1 -0
- package/fileicons/aup.svg +1 -0
- package/fileicons/avi.svg +1 -0
- package/fileicons/axd.svg +1 -0
- package/fileicons/aze.svg +1 -0
- package/fileicons/bak.svg +1 -0
- package/fileicons/bash.svg +1 -0
- package/fileicons/bat.svg +1 -0
- package/fileicons/bin.svg +1 -0
- package/fileicons/blank.svg +1 -0
- package/fileicons/bmp.svg +1 -0
- package/fileicons/bowerrc.svg +1 -0
- package/fileicons/bpg.svg +1 -0
- package/fileicons/browser.svg +1 -0
- package/fileicons/bz2.svg +1 -0
- package/fileicons/bzempty.svg +1 -0
- package/fileicons/c.svg +1 -0
- package/fileicons/cab.svg +1 -0
- package/fileicons/cad.svg +1 -0
- package/fileicons/caf.svg +1 -0
- package/fileicons/cal.svg +1 -0
- package/fileicons/catalog.json +1 -0
- package/fileicons/cd.svg +1 -0
- package/fileicons/cdda.svg +1 -0
- package/fileicons/cer.svg +1 -0
- package/fileicons/cfg.svg +1 -0
- package/fileicons/cfm.svg +1 -0
- package/fileicons/cfml.svg +1 -0
- package/fileicons/cgi.svg +1 -0
- package/fileicons/chm.svg +1 -0
- package/fileicons/class.svg +1 -0
- package/fileicons/cmd.svg +1 -0
- package/fileicons/code-workspace.svg +1 -0
- package/fileicons/codekit.svg +1 -0
- package/fileicons/coffee.svg +1 -0
- package/fileicons/coffeelintignore.svg +1 -0
- package/fileicons/com.svg +1 -0
- package/fileicons/compile.svg +1 -0
- package/fileicons/conf.svg +1 -0
- package/fileicons/config.svg +1 -0
- package/fileicons/cpp.svg +1 -0
- package/fileicons/cptx.svg +1 -0
- package/fileicons/cr2.svg +1 -0
- package/fileicons/crdownload.svg +1 -0
- package/fileicons/crt.svg +1 -0
- package/fileicons/crypt.svg +1 -0
- package/fileicons/cs.svg +1 -0
- package/fileicons/csh.svg +1 -0
- package/fileicons/cson.svg +1 -0
- package/fileicons/csproj.svg +1 -0
- package/fileicons/css.svg +1 -0
- package/fileicons/csv.svg +1 -0
- package/fileicons/cue.svg +1 -0
- package/fileicons/cur.svg +1 -0
- package/fileicons/dart.svg +1 -0
- package/fileicons/dat.svg +1 -0
- package/fileicons/data.svg +1 -0
- package/fileicons/db.svg +1 -0
- package/fileicons/dbf.svg +1 -0
- package/fileicons/deb.svg +1 -0
- package/fileicons/default.svg +1 -0
- package/fileicons/dgn.svg +1 -0
- package/fileicons/dist.svg +1 -0
- package/fileicons/diz.svg +1 -0
- package/fileicons/dll.svg +1 -0
- package/fileicons/dmg.svg +1 -0
- package/fileicons/dng.svg +1 -0
- package/fileicons/doc.svg +1 -0
- package/fileicons/docb.svg +1 -0
- package/fileicons/docm.svg +1 -0
- package/fileicons/docx.svg +1 -0
- package/fileicons/dot.svg +1 -0
- package/fileicons/dotm.svg +1 -0
- package/fileicons/dotx.svg +1 -0
- package/fileicons/download.svg +1 -0
- package/fileicons/dpj.svg +1 -0
- package/fileicons/ds_store.svg +1 -0
- package/fileicons/dsn.svg +1 -0
- package/fileicons/dtd.svg +1 -0
- package/fileicons/dwg.svg +1 -0
- package/fileicons/dxf.svg +1 -0
- package/fileicons/editorconfig.svg +1 -0
- package/fileicons/el.svg +1 -0
- package/fileicons/elf.svg +1 -0
- package/fileicons/eml.svg +1 -0
- package/fileicons/enc.svg +1 -0
- package/fileicons/eot.svg +1 -0
- package/fileicons/eps.svg +1 -0
- package/fileicons/epub.svg +1 -0
- package/fileicons/eslintignore.svg +1 -0
- package/fileicons/exe.svg +1 -0
- package/fileicons/f4v.svg +1 -0
- package/fileicons/fax.svg +1 -0
- package/fileicons/fb2.svg +1 -0
- package/fileicons/fla.svg +1 -0
- package/fileicons/flac.svg +1 -0
- package/fileicons/flv.svg +1 -0
- package/fileicons/fnt.svg +1 -0
- package/fileicons/folder.svg +1 -0
- package/fileicons/fon.svg +1 -0
- package/fileicons/gadget.svg +1 -0
- package/fileicons/gdp.svg +1 -0
- package/fileicons/gem.svg +1 -0
- package/fileicons/gif.svg +1 -0
- package/fileicons/gitattributes.svg +1 -0
- package/fileicons/gitignore.svg +1 -0
- package/fileicons/go.svg +1 -0
- package/fileicons/gpg.svg +1 -0
- package/fileicons/gpl.svg +1 -0
- package/fileicons/gradle.svg +1 -0
- package/fileicons/gz.svg +1 -0
- package/fileicons/h.svg +1 -0
- package/fileicons/handlebars.svg +1 -0
- package/fileicons/hbs.svg +1 -0
- package/fileicons/heic.svg +1 -0
- package/fileicons/hlp.svg +1 -0
- package/fileicons/hs.svg +1 -0
- package/fileicons/hsl.svg +1 -0
- package/fileicons/htm.svg +1 -0
- package/fileicons/html.svg +1 -0
- package/fileicons/ibooks.svg +1 -0
- package/fileicons/icns.svg +1 -0
- package/fileicons/ico.svg +1 -0
- package/fileicons/ics.svg +1 -0
- package/fileicons/idx.svg +1 -0
- package/fileicons/iff.svg +1 -0
- package/fileicons/ifo.svg +1 -0
- package/fileicons/image.svg +1 -0
- package/fileicons/img.svg +1 -0
- package/fileicons/iml.svg +1 -0
- package/fileicons/in.svg +1 -0
- package/fileicons/inc.svg +1 -0
- package/fileicons/indd.svg +1 -0
- package/fileicons/inf.svg +1 -0
- package/fileicons/info.svg +1 -0
- package/fileicons/ini.svg +1 -0
- package/fileicons/inv.svg +1 -0
- package/fileicons/iso.svg +1 -0
- package/fileicons/j2.svg +1 -0
- package/fileicons/jar.svg +1 -0
- package/fileicons/java.svg +1 -0
- package/fileicons/jpe.svg +1 -0
- package/fileicons/jpeg.svg +1 -0
- package/fileicons/jpg.svg +1 -0
- package/fileicons/js.svg +1 -0
- package/fileicons/json.svg +1 -0
- package/fileicons/jsp.svg +1 -0
- package/fileicons/jsx.svg +1 -0
- package/fileicons/key.svg +1 -0
- package/fileicons/kf8.svg +1 -0
- package/fileicons/kmk.svg +1 -0
- package/fileicons/ksh.svg +1 -0
- package/fileicons/kt.svg +1 -0
- package/fileicons/kts.svg +1 -0
- package/fileicons/kup.svg +1 -0
- package/fileicons/less.svg +1 -0
- package/fileicons/lex.svg +1 -0
- package/fileicons/licx.svg +1 -0
- package/fileicons/lisp.svg +1 -0
- package/fileicons/lit.svg +1 -0
- package/fileicons/lnk.svg +1 -0
- package/fileicons/lock.svg +1 -0
- package/fileicons/log.svg +1 -0
- package/fileicons/lua.svg +1 -0
- package/fileicons/m.svg +1 -0
- package/fileicons/m2v.svg +1 -0
- package/fileicons/m3u.svg +1 -0
- package/fileicons/m3u8.svg +1 -0
- package/fileicons/m4.svg +1 -0
- package/fileicons/m4a.svg +1 -0
- package/fileicons/m4r.svg +1 -0
- package/fileicons/m4v.svg +1 -0
- package/fileicons/map.svg +1 -0
- package/fileicons/master.svg +1 -0
- package/fileicons/mc.svg +1 -0
- package/fileicons/md.svg +1 -0
- package/fileicons/mdb.svg +1 -0
- package/fileicons/mdf.svg +1 -0
- package/fileicons/me.svg +1 -0
- package/fileicons/mi.svg +1 -0
- package/fileicons/mid.svg +1 -0
- package/fileicons/midi.svg +1 -0
- package/fileicons/mk.svg +1 -0
- package/fileicons/mkv.svg +1 -0
- package/fileicons/mm.svg +1 -0
- package/fileicons/mng.svg +1 -0
- package/fileicons/mo.svg +1 -0
- package/fileicons/mobi.svg +1 -0
- package/fileicons/mod.svg +1 -0
- package/fileicons/mov.svg +1 -0
- package/fileicons/mp2.svg +1 -0
- package/fileicons/mp3.svg +1 -0
- package/fileicons/mp4.svg +1 -0
- package/fileicons/mpa.svg +1 -0
- package/fileicons/mpd.svg +1 -0
- package/fileicons/mpe.svg +1 -0
- package/fileicons/mpeg.svg +1 -0
- package/fileicons/mpg.svg +1 -0
- package/fileicons/mpga.svg +1 -0
- package/fileicons/mpp.svg +1 -0
- package/fileicons/mpt.svg +1 -0
- package/fileicons/msg.svg +1 -0
- package/fileicons/msi.svg +1 -0
- package/fileicons/msu.svg +1 -0
- package/fileicons/nef.svg +1 -0
- package/fileicons/nes.svg +1 -0
- package/fileicons/nfo.svg +1 -0
- package/fileicons/nix.svg +1 -0
- package/fileicons/npmignore.svg +1 -0
- package/fileicons/ocx.svg +1 -0
- package/fileicons/odb.svg +1 -0
- package/fileicons/ods.svg +1 -0
- package/fileicons/odt.svg +1 -0
- package/fileicons/ogg.svg +1 -0
- package/fileicons/ogv.svg +1 -0
- package/fileicons/ost.svg +1 -0
- package/fileicons/otf.svg +1 -0
- package/fileicons/ott.svg +1 -0
- package/fileicons/ova.svg +1 -0
- package/fileicons/ovf.svg +1 -0
- package/fileicons/p12.svg +1 -0
- package/fileicons/p7b.svg +1 -0
- package/fileicons/pages.svg +1 -0
- package/fileicons/part.svg +1 -0
- package/fileicons/partial.svg +1 -0
- package/fileicons/pcd.svg +1 -0
- package/fileicons/pdb.svg +1 -0
- package/fileicons/pdf.svg +1 -0
- package/fileicons/pem.svg +1 -0
- package/fileicons/pfx.svg +1 -0
- package/fileicons/pgp.svg +1 -0
- package/fileicons/ph.svg +1 -0
- package/fileicons/phar.svg +1 -0
- package/fileicons/php.svg +1 -0
- package/fileicons/pid.svg +1 -0
- package/fileicons/pkg.svg +1 -0
- package/fileicons/pl.svg +1 -0
- package/fileicons/plist.svg +1 -0
- package/fileicons/pm.svg +1 -0
- package/fileicons/png.svg +1 -0
- package/fileicons/po.svg +1 -0
- package/fileicons/pom.svg +1 -0
- package/fileicons/pot.svg +1 -0
- package/fileicons/potx.svg +1 -0
- package/fileicons/pps.svg +1 -0
- package/fileicons/ppsx.svg +1 -0
- package/fileicons/ppt.svg +1 -0
- package/fileicons/pptm.svg +1 -0
- package/fileicons/pptx.svg +1 -0
- package/fileicons/prop.svg +1 -0
- package/fileicons/ps.svg +1 -0
- package/fileicons/ps1.svg +1 -0
- package/fileicons/psd.svg +1 -0
- package/fileicons/psp.svg +1 -0
- package/fileicons/pst.svg +1 -0
- package/fileicons/pub.svg +1 -0
- package/fileicons/py.svg +1 -0
- package/fileicons/pyc.svg +1 -0
- package/fileicons/qt.svg +1 -0
- package/fileicons/ra.svg +1 -0
- package/fileicons/ram.svg +1 -0
- package/fileicons/rar.svg +1 -0
- package/fileicons/raw.svg +1 -0
- package/fileicons/rb.svg +1 -0
- package/fileicons/rdf.svg +1 -0
- package/fileicons/rdl.svg +1 -0
- package/fileicons/reg.svg +1 -0
- package/fileicons/resx.svg +1 -0
- package/fileicons/retry.svg +1 -0
- package/fileicons/rm.svg +1 -0
- package/fileicons/rom.svg +1 -0
- package/fileicons/rpm.svg +1 -0
- package/fileicons/rpt.svg +1 -0
- package/fileicons/rsa.svg +1 -0
- package/fileicons/rss.svg +1 -0
- package/fileicons/rst.svg +1 -0
- package/fileicons/rtf.svg +1 -0
- package/fileicons/ru.svg +1 -0
- package/fileicons/rub.svg +1 -0
- package/fileicons/sass.svg +1 -0
- package/fileicons/scss.svg +1 -0
- package/fileicons/sdf.svg +1 -0
- package/fileicons/sed.svg +1 -0
- package/fileicons/sh.svg +1 -0
- package/fileicons/sit.svg +1 -0
- package/fileicons/sitemap.svg +1 -0
- package/fileicons/skin.svg +1 -0
- package/fileicons/sldm.svg +1 -0
- package/fileicons/sldx.svg +1 -0
- package/fileicons/sln.svg +1 -0
- package/fileicons/sol.svg +1 -0
- package/fileicons/sphinx.svg +1 -0
- package/fileicons/sql.svg +1 -0
- package/fileicons/sqlite.svg +1 -0
- package/fileicons/step.svg +1 -0
- package/fileicons/stl.svg +1 -0
- package/fileicons/svg.svg +1 -0
- package/fileicons/swd.svg +1 -0
- package/fileicons/swf.svg +1 -0
- package/fileicons/swift.svg +1 -0
- package/fileicons/swp.svg +1 -0
- package/fileicons/sys.svg +1 -0
- package/fileicons/tar.svg +1 -0
- package/fileicons/tax.svg +1 -0
- package/fileicons/tcsh.svg +1 -0
- package/fileicons/tex.svg +1 -0
- package/fileicons/tfignore.svg +1 -0
- package/fileicons/tga.svg +1 -0
- package/fileicons/tgz.svg +1 -0
- package/fileicons/tif.svg +1 -0
- package/fileicons/tiff.svg +1 -0
- package/fileicons/tmp.svg +1 -0
- package/fileicons/tmx.svg +1 -0
- package/fileicons/torrent.svg +1 -0
- package/fileicons/tpl.svg +1 -0
- package/fileicons/ts.svg +1 -0
- package/fileicons/tsv.svg +1 -0
- package/fileicons/ttf.svg +1 -0
- package/fileicons/twig.svg +1 -0
- package/fileicons/txt.svg +1 -0
- package/fileicons/udf.svg +1 -0
- package/fileicons/vb.svg +1 -0
- package/fileicons/vbproj.svg +1 -0
- package/fileicons/vbs.svg +1 -0
- package/fileicons/vcd.svg +1 -0
- package/fileicons/vcf.svg +1 -0
- package/fileicons/vcs.svg +1 -0
- package/fileicons/vdi.svg +1 -0
- package/fileicons/vdx.svg +1 -0
- package/fileicons/vmdk.svg +1 -0
- package/fileicons/vob.svg +1 -0
- package/fileicons/vox.svg +1 -0
- package/fileicons/vscodeignore.svg +1 -0
- package/fileicons/vsd.svg +1 -0
- package/fileicons/vss.svg +1 -0
- package/fileicons/vst.svg +1 -0
- package/fileicons/vsx.svg +1 -0
- package/fileicons/vtx.svg +1 -0
- package/fileicons/war.svg +1 -0
- package/fileicons/wav.svg +1 -0
- package/fileicons/wbk.svg +1 -0
- package/fileicons/webinfo.svg +1 -0
- package/fileicons/webm.svg +1 -0
- package/fileicons/webp.svg +1 -0
- package/fileicons/wma.svg +1 -0
- package/fileicons/wmf.svg +1 -0
- package/fileicons/wmv.svg +1 -0
- package/fileicons/woff.svg +1 -0
- package/fileicons/woff2.svg +1 -0
- package/fileicons/wps.svg +1 -0
- package/fileicons/wsf.svg +1 -0
- package/fileicons/xaml.svg +1 -0
- package/fileicons/xcf.svg +1 -0
- package/fileicons/xfl.svg +1 -0
- package/fileicons/xlm.svg +1 -0
- package/fileicons/xls.svg +1 -0
- package/fileicons/xlsm.svg +1 -0
- package/fileicons/xlsx.svg +1 -0
- package/fileicons/xlt.svg +1 -0
- package/fileicons/xltm.svg +1 -0
- package/fileicons/xltx.svg +1 -0
- package/fileicons/xml.svg +1 -0
- package/fileicons/xpi.svg +1 -0
- package/fileicons/xps.svg +1 -0
- package/fileicons/xrb.svg +1 -0
- package/fileicons/xsd.svg +1 -0
- package/fileicons/xsl.svg +1 -0
- package/fileicons/xspf.svg +1 -0
- package/fileicons/xz.svg +1 -0
- package/fileicons/yaml.svg +1 -0
- package/fileicons/yml.svg +1 -0
- package/fileicons/z.svg +1 -0
- package/fileicons/zip.svg +1 -0
- package/fileicons/zsh.svg +1 -0
- package/helpers/inertiaAddHelper.js +1 -1
- package/interfaces/adminpanelConfig.d.ts +3 -0
- package/interfaces/global.d.ts +2 -0
- package/lib/media-manager/AbstractMediaManager.d.ts +19 -19
- package/lib/media-manager/AbstractMediaManager.js +13 -11
- package/lib/media-manager/DefaultMediaManager.d.ts +1 -2
- package/lib/media-manager/DefaultMediaManager.js +9 -7
- package/lib/media-manager/Items.js +18 -12
- package/lib/media-manager/Thumb.js +1 -2
- package/lib/media-manager/helpers/MediaManagerHelper.js +4 -6
- package/lib/v4/model/adapter/sequelize.js +28 -15
- package/package.json +5 -1
- package/system/Router.js +4 -2
- package/system/bindExpressUtils.js +1 -1
- package/system/bindMediaManager.js +8 -3
- package/system/bindReqFunctions.js +15 -14
- package/translations/en.json +73 -3
- package/translations/ru.json +120 -71
- package/ui/components/ui/dialog-stack.js +3 -3
- package/ui/components/ui/dialog.js +1 -1
- package/ui/components/ui/table.d.ts +3 -1
- package/ui/components/ui/table.js +2 -2
- package/ui/components/ui/tabs.d.ts +7 -0
- package/ui/components/ui/tabs.js +16 -0
- package/assets/add-BOrwsLPk.js +0 -1
- package/assets/add-form-GQVVok4z.js +0 -1
- package/assets/add-group-ClEk5H3m.js +0 -1
- package/assets/add-user-BCfcjTsJ.js +0 -1
- package/assets/breadcrumbs-DXFXn-ln.js +0 -1
- package/assets/catalog-Cc6Mk9sX.css +0 -1
- package/assets/date-picker-lh34xHZl.js +0 -1
- package/assets/debounce-qdyXyOeG.js +0 -1
- package/assets/del-modal-CwKNFb9U.js +0 -1
- package/assets/field-renderer-C-zyBIEM.js +0 -411
- package/assets/form-xJzl5esP.js +0 -1
- package/assets/home-BrMSrnA_.js +0 -2
- package/assets/input-error-BkhNs96U.js +0 -1
- package/assets/list-Da5LZQoi.js +0 -1
- package/assets/multi-select-Dd_ADH13.js +0 -1
- package/assets/nav-user-Cud95A62.js +0 -1
- package/assets/theme-switcher-BJSJk_M4.js +0 -1
|
@@ -40,11 +40,7 @@ export interface MediaManagerWidgetJSON {
|
|
|
40
40
|
mediaManagerId: string;
|
|
41
41
|
}
|
|
42
42
|
export interface MediaManagerWidgetData {
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated Apparently this is not needed here since it is in the field config settings
|
|
46
|
-
*/
|
|
47
|
-
mediaManagerId: string;
|
|
43
|
+
id: string;
|
|
48
44
|
}
|
|
49
45
|
export type UploaderFile = Express.Multer.File;
|
|
50
46
|
export interface imageSizes {
|
|
@@ -56,22 +52,22 @@ export interface imageSizes {
|
|
|
56
52
|
export type MediaFileType = "application" | "audio" | "example" | "image" | "message" | "model" | "multipart" | "text" | "video";
|
|
57
53
|
export declare abstract class File<T extends MediaManagerItem> {
|
|
58
54
|
abstract type: MediaFileType;
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
urlPathPrefix: string;
|
|
56
|
+
fileStoragePath: string;
|
|
61
57
|
model: string;
|
|
62
58
|
metaModel: string;
|
|
63
59
|
/**
|
|
64
60
|
*
|
|
65
|
-
* @param
|
|
66
|
-
* @param
|
|
61
|
+
* @param urlPathPrefix
|
|
62
|
+
* @param fileStoragePath
|
|
67
63
|
*/
|
|
68
|
-
constructor(urlPathPrefix: string, fileStoragePath: string);
|
|
64
|
+
protected constructor(urlPathPrefix: string, fileStoragePath: string);
|
|
69
65
|
/**
|
|
70
66
|
* Upload a file.
|
|
71
67
|
* @param file
|
|
72
68
|
* @param filename
|
|
73
69
|
* @param origFileName
|
|
74
|
-
* @param
|
|
70
|
+
* @param group
|
|
75
71
|
*/
|
|
76
72
|
abstract upload(file: UploaderFile, filename: string, origFileName: string, group?: string): Promise<T[]>;
|
|
77
73
|
/**
|
|
@@ -100,7 +96,8 @@ export declare abstract class File<T extends MediaManagerItem> {
|
|
|
100
96
|
* @param item
|
|
101
97
|
* @param file
|
|
102
98
|
* @param fileName
|
|
103
|
-
* @param
|
|
99
|
+
* @param group
|
|
100
|
+
* @param localeId
|
|
104
101
|
*/
|
|
105
102
|
abstract uploadVariant(item: MediaManagerItem, file: UploaderFile, fileName: string, group?: string, localeId?: string): Promise<MediaManagerItem>;
|
|
106
103
|
/**
|
|
@@ -141,9 +138,10 @@ export declare abstract class File<T extends MediaManagerItem> {
|
|
|
141
138
|
export declare abstract class AbstractMediaManager {
|
|
142
139
|
uploadMaxBytes: number;
|
|
143
140
|
uloadAllowedTypes: string[];
|
|
144
|
-
|
|
141
|
+
fileStoragePath: string;
|
|
142
|
+
urlPathPrefix: string;
|
|
145
143
|
/**
|
|
146
|
-
|
|
144
|
+
|
|
147
145
|
*/
|
|
148
146
|
allowSearch: boolean;
|
|
149
147
|
/**⚠️ above the settings that need to be implemented*/
|
|
@@ -162,7 +160,6 @@ export declare abstract class AbstractMediaManager {
|
|
|
162
160
|
* @param file
|
|
163
161
|
* @param filename
|
|
164
162
|
* @param origFileName
|
|
165
|
-
* @param imageSizes
|
|
166
163
|
* @param group
|
|
167
164
|
*/
|
|
168
165
|
upload(file: UploaderFile, filename: string, origFileName: string, group?: string): Promise<MediaManagerItem[]>;
|
|
@@ -189,7 +186,7 @@ export declare abstract class AbstractMediaManager {
|
|
|
189
186
|
* @param limit
|
|
190
187
|
* @param skip
|
|
191
188
|
* @param sort
|
|
192
|
-
* @param group
|
|
189
|
+
* @param group
|
|
193
190
|
*/
|
|
194
191
|
getItems(type: string, limit: number, skip: number, sort: SortCriteria, group?: string): Promise<{
|
|
195
192
|
data: MediaManagerItem[];
|
|
@@ -200,9 +197,9 @@ export declare abstract class AbstractMediaManager {
|
|
|
200
197
|
* @param data
|
|
201
198
|
* @param model model in which a mediafile connection was added
|
|
202
199
|
* @param modelId Id in the model in which the mediafile was added
|
|
203
|
-
* @param
|
|
200
|
+
* @param widgetName
|
|
204
201
|
*/
|
|
205
|
-
abstract setRelations(data: MediaManagerWidgetData,
|
|
202
|
+
abstract setRelations(data: MediaManagerWidgetData[],
|
|
206
203
|
/**
|
|
207
204
|
* widget model in which a mediafile connection was added
|
|
208
205
|
*/
|
|
@@ -216,12 +213,14 @@ export declare abstract class AbstractMediaManager {
|
|
|
216
213
|
* Search all items.
|
|
217
214
|
* If not this.allowSearch = true then it will not come here
|
|
218
215
|
* @param s
|
|
216
|
+
* @param group
|
|
219
217
|
*/
|
|
220
218
|
abstract searchAll(s: string, group?: string): Promise<MediaManagerItem[]>;
|
|
221
219
|
/**
|
|
222
220
|
* Search items by type.
|
|
223
221
|
* @param s
|
|
224
222
|
* @param type
|
|
223
|
+
* @param group
|
|
225
224
|
*/
|
|
226
225
|
searchItems(s: string, type: string, group?: string): Promise<MediaManagerItem[]>;
|
|
227
226
|
/**
|
|
@@ -234,7 +233,8 @@ export declare abstract class AbstractMediaManager {
|
|
|
234
233
|
* @param item
|
|
235
234
|
* @param file
|
|
236
235
|
* @param fileName
|
|
237
|
-
* @param
|
|
236
|
+
* @param group
|
|
237
|
+
* @param localeId
|
|
238
238
|
*/
|
|
239
239
|
uploadVariant(item: MediaManagerItem, file: UploaderFile, fileName: string, group?: string, localeId?: string): Promise<MediaManagerItem>;
|
|
240
240
|
/**
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export class File {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
urlPathPrefix;
|
|
3
|
+
fileStoragePath;
|
|
4
4
|
model;
|
|
5
5
|
metaModel;
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
8
|
+
* @param urlPathPrefix
|
|
9
|
+
* @param fileStoragePath
|
|
10
10
|
*/
|
|
11
11
|
constructor(urlPathPrefix, fileStoragePath) {
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
12
|
+
this.urlPathPrefix = urlPathPrefix;
|
|
13
|
+
this.fileStoragePath = fileStoragePath;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -32,9 +32,10 @@ export class File {
|
|
|
32
32
|
export class AbstractMediaManager {
|
|
33
33
|
uploadMaxBytes;
|
|
34
34
|
uloadAllowedTypes;
|
|
35
|
-
|
|
35
|
+
fileStoragePath;
|
|
36
|
+
urlPathPrefix;
|
|
36
37
|
/**
|
|
37
|
-
|
|
38
|
+
|
|
38
39
|
*/
|
|
39
40
|
allowSearch;
|
|
40
41
|
itemTypes = [];
|
|
@@ -59,7 +60,6 @@ export class AbstractMediaManager {
|
|
|
59
60
|
* @param file
|
|
60
61
|
* @param filename
|
|
61
62
|
* @param origFileName
|
|
62
|
-
* @param imageSizes
|
|
63
63
|
* @param group
|
|
64
64
|
*/
|
|
65
65
|
upload(file, filename, origFileName, group) {
|
|
@@ -87,7 +87,7 @@ export class AbstractMediaManager {
|
|
|
87
87
|
* @param limit
|
|
88
88
|
* @param skip
|
|
89
89
|
* @param sort
|
|
90
|
-
* @param group
|
|
90
|
+
* @param group
|
|
91
91
|
*/
|
|
92
92
|
getItems(type, limit, skip, sort, group) {
|
|
93
93
|
return this.getItemType(type)?.getItems(limit, skip, sort, group);
|
|
@@ -96,6 +96,7 @@ export class AbstractMediaManager {
|
|
|
96
96
|
* Search items by type.
|
|
97
97
|
* @param s
|
|
98
98
|
* @param type
|
|
99
|
+
* @param group
|
|
99
100
|
*/
|
|
100
101
|
searchItems(s, type, group) {
|
|
101
102
|
return this.getItemType(type)?.search(s, group);
|
|
@@ -113,7 +114,8 @@ export class AbstractMediaManager {
|
|
|
113
114
|
* @param item
|
|
114
115
|
* @param file
|
|
115
116
|
* @param fileName
|
|
116
|
-
* @param
|
|
117
|
+
* @param group
|
|
118
|
+
* @param localeId
|
|
117
119
|
*/
|
|
118
120
|
uploadVariant(item, file, fileName, group, localeId) {
|
|
119
121
|
const parts = item.mimeType.split("/");
|
|
@@ -5,7 +5,6 @@ export declare class DefaultMediaManager extends AbstractMediaManager {
|
|
|
5
5
|
model: string;
|
|
6
6
|
modelAssoc: string;
|
|
7
7
|
id: string;
|
|
8
|
-
path: string;
|
|
9
8
|
protected readonly adminizer: Adminizer;
|
|
10
9
|
constructor(adminizer: Adminizer, id: string, urlPathPrefix: string, fileStoragePath: string);
|
|
11
10
|
getAll(limit: number, skip: number, sort: SortCriteria, group: string): Promise<{
|
|
@@ -13,6 +12,6 @@ export declare class DefaultMediaManager extends AbstractMediaManager {
|
|
|
13
12
|
next: boolean;
|
|
14
13
|
}>;
|
|
15
14
|
searchAll(s: string, group: string): Promise<MediaManagerItem[]>;
|
|
16
|
-
setRelations(data: MediaManagerWidgetData, model: string, modelId: string, widgetName: string): Promise<void>;
|
|
15
|
+
setRelations(data: MediaManagerWidgetData[], model: string, modelId: string, widgetName: string): Promise<void>;
|
|
17
16
|
getRelations(items: MediaManagerWidgetItem[]): Promise<MediaManagerWidgetClientItem[]>;
|
|
18
17
|
}
|
|
@@ -6,13 +6,12 @@ export class DefaultMediaManager extends AbstractMediaManager {
|
|
|
6
6
|
model = "mediamanagerap";
|
|
7
7
|
modelAssoc = "mediamanagerassociationsap";
|
|
8
8
|
id;
|
|
9
|
-
path;
|
|
10
9
|
adminizer;
|
|
11
10
|
constructor(adminizer, id, urlPathPrefix, fileStoragePath) {
|
|
12
11
|
super(adminizer);
|
|
13
12
|
this.id = id;
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
13
|
+
this.urlPathPrefix = urlPathPrefix;
|
|
14
|
+
this.fileStoragePath = fileStoragePath;
|
|
16
15
|
this.itemTypes.push(new ImageItem(adminizer, urlPathPrefix, fileStoragePath));
|
|
17
16
|
this.itemTypes.push(new TextItem(adminizer, urlPathPrefix, fileStoragePath));
|
|
18
17
|
this.itemTypes.push(new ApplicationItem(adminizer, urlPathPrefix, fileStoragePath));
|
|
@@ -27,7 +26,7 @@ export class DefaultMediaManager extends AbstractMediaManager {
|
|
|
27
26
|
skip: skip,
|
|
28
27
|
sort: sort,
|
|
29
28
|
}, { populate: [["variants", { sort: sort }], ["meta", {}]] });
|
|
30
|
-
let next = await this.adminizer.modelHandler.model.get(this.model)["
|
|
29
|
+
let next = await this.adminizer.modelHandler.model.get(this.model)["_find"]({
|
|
31
30
|
where: { parent: null, group: group },
|
|
32
31
|
limit: limit,
|
|
33
32
|
skip: skip === 0 ? limit : skip + limit,
|
|
@@ -38,7 +37,7 @@ export class DefaultMediaManager extends AbstractMediaManager {
|
|
|
38
37
|
}
|
|
39
38
|
return {
|
|
40
39
|
data: data,
|
|
41
|
-
next: !!next,
|
|
40
|
+
next: !!next.length,
|
|
42
41
|
};
|
|
43
42
|
}
|
|
44
43
|
async searchAll(s, group) {
|
|
@@ -62,10 +61,13 @@ export class DefaultMediaManager extends AbstractMediaManager {
|
|
|
62
61
|
where: { modelId: modelId, model: model, widgetName: widgetName },
|
|
63
62
|
});
|
|
64
63
|
for (const modelAssociation of modelAssociations) {
|
|
64
|
+
const q = {};
|
|
65
|
+
const pk = this.adminizer.modelHandler.model.get(this.modelAssoc).primaryKey;
|
|
66
|
+
q[pk] = modelAssociation.id;
|
|
65
67
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
66
|
-
await this.adminizer.modelHandler.model.get(this.modelAssoc)["_destroy"](
|
|
68
|
+
await this.adminizer.modelHandler.model.get(this.modelAssoc)["_destroy"](q);
|
|
67
69
|
}
|
|
68
|
-
for (const [key, widgetItem] of data.
|
|
70
|
+
for (const [key, widgetItem] of data.entries()) {
|
|
69
71
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
70
72
|
await this.adminizer.modelHandler.model.get(this.modelAssoc)["_create"]({
|
|
71
73
|
mediaManagerId: this.id,
|
|
@@ -23,7 +23,7 @@ export class ImageItem extends File {
|
|
|
23
23
|
skip: skip,
|
|
24
24
|
sort: sort,
|
|
25
25
|
}, { populate: [["variants", { sort: sort }], ["meta", {}]] });
|
|
26
|
-
let next = await this.adminizer.modelHandler.model.get(this.model)['
|
|
26
|
+
let next = await this.adminizer.modelHandler.model.get(this.model)['_find']({
|
|
27
27
|
where: { parent: null, mimeType: { contains: this.type }, group: group },
|
|
28
28
|
limit: limit,
|
|
29
29
|
skip: skip === 0 ? limit : skip + limit,
|
|
@@ -34,7 +34,7 @@ export class ImageItem extends File {
|
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
36
|
data: data,
|
|
37
|
-
next: !!next,
|
|
37
|
+
next: !!next.length,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
async search(s, group) {
|
|
@@ -58,7 +58,7 @@ export class ImageItem extends File {
|
|
|
58
58
|
group: group,
|
|
59
59
|
tag: "origin",
|
|
60
60
|
filename: origFileName,
|
|
61
|
-
url: `/${this.
|
|
61
|
+
url: `/${this.urlPathPrefix}/${filename}`,
|
|
62
62
|
});
|
|
63
63
|
await this.createMeta(parent.id);
|
|
64
64
|
await this.addFileMeta(file.path, parent.id);
|
|
@@ -84,10 +84,10 @@ export class ImageItem extends File {
|
|
|
84
84
|
let { width, height } = this.imageSizes[sizeKey];
|
|
85
85
|
const buffer = fs.readFileSync(file.path);
|
|
86
86
|
const image = sizeOf(buffer);
|
|
87
|
-
if (image.width < width ||
|
|
88
|
-
image.height < height)
|
|
87
|
+
if (image.width < width || image.height < height)
|
|
89
88
|
continue;
|
|
90
|
-
|
|
89
|
+
const output = `${this.fileStoragePath}/${this.urlPathPrefix}/${sizeName}`;
|
|
90
|
+
let newFile = await this.resizeImage(file.path, output, width, height);
|
|
91
91
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
92
92
|
let newSize = await this.adminizer.modelHandler.model.get(this.model)["_create"]({
|
|
93
93
|
parent: parent.id,
|
|
@@ -95,11 +95,11 @@ export class ImageItem extends File {
|
|
|
95
95
|
size: newFile.size,
|
|
96
96
|
filename: parent.filename,
|
|
97
97
|
group: group,
|
|
98
|
-
path:
|
|
98
|
+
path: output,
|
|
99
99
|
tag: `saze:${sizeKey}`,
|
|
100
|
-
url: `/${this.
|
|
100
|
+
url: `/${this.urlPathPrefix}/${sizeName}`,
|
|
101
101
|
});
|
|
102
|
-
await this.addFileMeta(
|
|
102
|
+
await this.addFileMeta(output, newSize.id);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
async getOrigin(id) {
|
|
@@ -169,7 +169,7 @@ export class ImageItem extends File {
|
|
|
169
169
|
group: group,
|
|
170
170
|
tag: localeId ? `loc:${localeId}` : `size:${width}x${height}`,
|
|
171
171
|
filename: parent.filename,
|
|
172
|
-
url: `/${this.
|
|
172
|
+
url: `/${this.urlPathPrefix}/${filename}`,
|
|
173
173
|
});
|
|
174
174
|
await this.addFileMeta(file.path, item.id);
|
|
175
175
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
@@ -183,6 +183,12 @@ export class ImageItem extends File {
|
|
|
183
183
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
184
184
|
await this.adminizer.modelHandler.model.get(this.model)["_destroy"](criteria);
|
|
185
185
|
await deleteFile(record.path);
|
|
186
|
+
// Delete all variants
|
|
187
|
+
if (record.variants.length) {
|
|
188
|
+
for (const variant of record.variants) {
|
|
189
|
+
await deleteFile(variant.path);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
186
192
|
}
|
|
187
193
|
}
|
|
188
194
|
/*
|
|
@@ -200,7 +206,7 @@ export class TextItem extends ImageItem {
|
|
|
200
206
|
group: group,
|
|
201
207
|
filename: origFileName,
|
|
202
208
|
tag: "origin",
|
|
203
|
-
url: `/${this.
|
|
209
|
+
url: `/${this.urlPathPrefix}/${filename}`,
|
|
204
210
|
});
|
|
205
211
|
await this.createMeta(parent.id);
|
|
206
212
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
@@ -222,7 +228,7 @@ export class TextItem extends ImageItem {
|
|
|
222
228
|
group: group,
|
|
223
229
|
tag: localeId ? `loc:${localeId}` : `ver: ${variants.length + 1}`,
|
|
224
230
|
filename: parent.filename,
|
|
225
|
-
url: `/${this.
|
|
231
|
+
url: `/${this.urlPathPrefix}/${filename}`,
|
|
226
232
|
});
|
|
227
233
|
// TODO refactor CRUD functions for DataAccessor usage
|
|
228
234
|
return (await this.adminizer.modelHandler.model.get(this.model)["_findOne"]({ where: { id: item.id } }));
|
|
@@ -7,8 +7,7 @@ export class MediaManagerThumb {
|
|
|
7
7
|
const manager = MediaManagerHandler.get(managerId);
|
|
8
8
|
const path = await manager.getOrigin(id);
|
|
9
9
|
const baseThumbPath = `${process.cwd()}/.tmp/thumbs`;
|
|
10
|
-
|
|
11
|
-
await fs.mkdir(baseThumbPath);
|
|
10
|
+
await fs.mkdir(baseThumbPath, { recursive: true });
|
|
12
11
|
const thumb = `${baseThumbPath}/${id}_thumb.webp`;
|
|
13
12
|
if (await fileExists(thumb)) {
|
|
14
13
|
return await fs.readFile(thumb);
|
|
@@ -21,9 +21,10 @@ export function randomFileName(filenameOrig, type, prefix) {
|
|
|
21
21
|
export async function saveRelationsMediaManager(fields, reqData, model, recordId) {
|
|
22
22
|
for (let prop in reqData) {
|
|
23
23
|
let fieldConfigConfig = fields[prop].config;
|
|
24
|
+
let options = fieldConfigConfig.options;
|
|
24
25
|
if (fieldConfigConfig.type === 'mediamanager') {
|
|
25
26
|
let data = reqData[prop];
|
|
26
|
-
let mediaManager = MediaManagerHandler.get(
|
|
27
|
+
let mediaManager = MediaManagerHandler.get(options?.id ?? 'default');
|
|
27
28
|
await mediaManager.setRelations(data, model, recordId, prop);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -34,7 +35,7 @@ export async function saveRelationsMediaManager(fields, reqData, model, recordId
|
|
|
34
35
|
*/
|
|
35
36
|
export async function getRelationsMediaManager(data) {
|
|
36
37
|
let mediaManager = MediaManagerHandler.get(data.mediaManagerId);
|
|
37
|
-
return await mediaManager.getRelations(data.list);
|
|
38
|
+
return await mediaManager.getRelations(data.list ?? []);
|
|
38
39
|
}
|
|
39
40
|
/*
|
|
40
41
|
* Delate Ralations
|
|
@@ -48,10 +49,7 @@ export async function deleteRelationsMediaManager(adminizer, model, record) {
|
|
|
48
49
|
if (field && field.type === 'mediamanager') {
|
|
49
50
|
const option = field.options;
|
|
50
51
|
let mediaManager = MediaManagerHandler.get(option?.id ?? 'default');
|
|
51
|
-
let emptyData =
|
|
52
|
-
list: [],
|
|
53
|
-
mediaManagerId: ''
|
|
54
|
-
};
|
|
52
|
+
let emptyData = [];
|
|
55
53
|
await mediaManager.setRelations(emptyData, model, record[0].id, key);
|
|
56
54
|
}
|
|
57
55
|
}
|
|
@@ -158,8 +158,7 @@ export class SequelizeModel extends AbstractModel {
|
|
|
158
158
|
for (const key in criteria) {
|
|
159
159
|
const value = criteria[key];
|
|
160
160
|
if (value === undefined ||
|
|
161
|
-
value === null
|
|
162
|
-
(typeof value === "object" && Object.keys(value).length === 0)) {
|
|
161
|
+
(typeof value === "object" && value !== null && Object.keys(value).length === 0)) {
|
|
163
162
|
continue;
|
|
164
163
|
}
|
|
165
164
|
// 🧠 Заменяем ключ на `via`, если это ассоциация
|
|
@@ -168,22 +167,36 @@ export class SequelizeModel extends AbstractModel {
|
|
|
168
167
|
if (attr?.type === "association" && attr.via) {
|
|
169
168
|
targetKey = attr.via;
|
|
170
169
|
}
|
|
171
|
-
if (
|
|
170
|
+
if (value === null) {
|
|
171
|
+
result[targetKey] = { [Op.is]: null };
|
|
172
|
+
}
|
|
173
|
+
else if (typeof value === "object" && !Array.isArray(value)) {
|
|
172
174
|
const operatorEntries = Object.entries(value)
|
|
173
175
|
.filter(([_, v]) => v !== undefined && v !== null)
|
|
174
176
|
.map(([op, val]) => {
|
|
175
177
|
switch (op) {
|
|
176
|
-
case "contains":
|
|
177
|
-
|
|
178
|
-
case "
|
|
179
|
-
|
|
180
|
-
case "
|
|
181
|
-
|
|
182
|
-
case "
|
|
183
|
-
|
|
184
|
-
case "
|
|
185
|
-
|
|
186
|
-
|
|
178
|
+
case "contains":
|
|
179
|
+
return [Op.like, `%${val}%`];
|
|
180
|
+
case "startsWith":
|
|
181
|
+
return [Op.startsWith, val];
|
|
182
|
+
case "endsWith":
|
|
183
|
+
return [Op.endsWith, val];
|
|
184
|
+
case ">":
|
|
185
|
+
return [Op.gt, val];
|
|
186
|
+
case ">=":
|
|
187
|
+
return [Op.gte, val];
|
|
188
|
+
case "<":
|
|
189
|
+
return [Op.lt, val];
|
|
190
|
+
case "<=":
|
|
191
|
+
return [Op.lte, val];
|
|
192
|
+
case "!=":
|
|
193
|
+
return [Op.ne, val];
|
|
194
|
+
case "in":
|
|
195
|
+
return [Op.in, val];
|
|
196
|
+
case "nin":
|
|
197
|
+
return [Op.notIn, val];
|
|
198
|
+
default:
|
|
199
|
+
return [Op.eq, val];
|
|
187
200
|
}
|
|
188
201
|
});
|
|
189
202
|
if (operatorEntries.length > 0) {
|
|
@@ -360,7 +373,7 @@ export class SequelizeModel extends AbstractModel {
|
|
|
360
373
|
include: includes
|
|
361
374
|
});
|
|
362
375
|
for (const inst of instances) {
|
|
363
|
-
//For each association, we call getxxx () once again
|
|
376
|
+
//For each association, we call getxxx () once again
|
|
364
377
|
for (const alias of assocNames) {
|
|
365
378
|
// @ts-ignore accessors is present
|
|
366
379
|
const getAccessor = this.model.associations[alias].accessors.get;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adminizer",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.2.0-build.
|
|
4
|
+
"version": "4.2.0-build.52",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./index.js",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"test:watch": "vitest --reporter verbose",
|
|
13
13
|
"start": "cross-env NO_SEED_DATA=true ORM=sequelize tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
14
14
|
"dev": "cross-env VITE_ENV=dev ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
15
|
+
"dev:no-seed": "cross-env VITE_ENV=dev NO_SEED_DATA=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
16
|
+
"dev:no-seed-clean": "cross-env VITE_ENV=dev NO_SEED_DATA=true CLEAN_TMP=true ORM=sequelize tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
15
17
|
"dev:waterline": "cross-env VITE_ENV=dev ORM=waterline tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
16
18
|
"build:assets": "vite build",
|
|
17
19
|
"compile:backend": "tsc -p src/tsconfig.json",
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@minoru/react-dnd-treeview": "^3.5.2",
|
|
38
40
|
"@radix-ui/react-context-menu": "^2.2.15",
|
|
41
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
39
42
|
"body-parser": "^1.20.3",
|
|
40
43
|
"chalk": "^5.4.1",
|
|
41
44
|
"cmdk": "^1.1.1",
|
|
@@ -51,6 +54,7 @@
|
|
|
51
54
|
"multer": "^1.4.5-lts.1",
|
|
52
55
|
"next-themes": "^0.4.6",
|
|
53
56
|
"password-hash": "^1.2.2",
|
|
57
|
+
"react-cropper": "^2.3.3",
|
|
54
58
|
"react-dnd": "^16.0.1",
|
|
55
59
|
"reflect-metadata": "^0.2.2",
|
|
56
60
|
"sharp": "^0.33.5",
|
package/system/Router.js
CHANGED
|
@@ -76,8 +76,10 @@ export default class Router {
|
|
|
76
76
|
/**
|
|
77
77
|
* Media Manager
|
|
78
78
|
*/
|
|
79
|
-
adminizer.app.
|
|
80
|
-
adminizer.app.
|
|
79
|
+
adminizer.app.post(`${adminizer.config.routePrefix}/media-manager-uploader/:id/upload`, adminizer.policyManager.bindPolicies(policies, mediaManagerController));
|
|
80
|
+
adminizer.app.post(`${adminizer.config.routePrefix}/media-manager-uploader/:id/upload-variant`, adminizer.policyManager.bindPolicies(policies, mediaManagerController));
|
|
81
|
+
adminizer.app.all(`${adminizer.config.routePrefix}/media-manager-uploader/:id`, adminizer.policyManager.bindPolicies(policies, mediaManagerController));
|
|
82
|
+
adminizer.app.all(`${adminizer.config.routePrefix}/get-thumbs`, adminizer.policyManager.bindPolicies(policies, thumbController));
|
|
81
83
|
/**
|
|
82
84
|
* List of records
|
|
83
85
|
*/
|
|
@@ -14,7 +14,7 @@ export default function bindExpressUtils(app) {
|
|
|
14
14
|
},
|
|
15
15
|
}));
|
|
16
16
|
/** Bind multer (important: before body-parser) */
|
|
17
|
-
app.use(upload.none()); // Processes form-data without files
|
|
17
|
+
// app.use(upload.none()); // Processes form-data without files
|
|
18
18
|
/** Bind body-parser */
|
|
19
19
|
app.use(bodyParser.urlencoded({ extended: true })); // To process application/x-www-form-urlencoded
|
|
20
20
|
app.use(bodyParser.json()); // To process JSON
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { DefaultMediaManager } from "../lib/media-manager/DefaultMediaManager";
|
|
2
2
|
import { MediaManagerHandler } from "../lib/media-manager/MediaManagerHandler";
|
|
3
|
+
import serveStatic from "serve-static";
|
|
4
|
+
import path from "path";
|
|
3
5
|
export default function bindMediaManager(adminizer) {
|
|
4
|
-
adminizer.emitter.on("
|
|
6
|
+
adminizer.emitter.on("adminizer:loaded", async () => {
|
|
5
7
|
try {
|
|
6
|
-
|
|
7
|
-
let mediaManager = new DefaultMediaManager(adminizer, 'default', 'media-manager', `${process.cwd()}/.tmp/public/media-manager/`);
|
|
8
|
+
let mediaManager = new DefaultMediaManager(adminizer, 'default', 'media-manager', adminizer.config.mediamanager.fileStoragePath);
|
|
8
9
|
MediaManagerHandler.add(mediaManager);
|
|
9
10
|
}
|
|
10
11
|
catch (e) {
|
|
11
12
|
console.log(e);
|
|
12
13
|
}
|
|
13
14
|
});
|
|
15
|
+
// Bind media manager public folder
|
|
16
|
+
adminizer.app.use(`/public`, serveStatic(adminizer.config.mediamanager.fileStoragePath));
|
|
17
|
+
// Bind file icons
|
|
18
|
+
adminizer.app.use(`${adminizer.config.routePrefix}/fileicons`, serveStatic(path.join(import.meta.dirname, '../fileicons')));
|
|
14
19
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Adminizer } from "../lib/Adminizer";
|
|
2
|
-
import multer from "multer";
|
|
3
2
|
import { I18n } from "../lib/v4/I18n";
|
|
4
3
|
import { parse } from "cookie";
|
|
5
4
|
import { verifyUser } from "../lib/v4/helper/jwt";
|
|
@@ -13,19 +12,21 @@ export default function bindReqFunctions(adminizer) {
|
|
|
13
12
|
* Function to upload files using multer.
|
|
14
13
|
* Filename can be set dynamically based on you filename using simple function
|
|
15
14
|
* */
|
|
16
|
-
req.upload = (options) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
// req.upload = (options?: { destination?: string; filename?: (file: Express.Multer.File) => string }) => {
|
|
16
|
+
// const storage = multer.diskStorage({
|
|
17
|
+
// destination: (req, file, cb) => {
|
|
18
|
+
// const destination = options?.destination || "uploads/";
|
|
19
|
+
// cb(null, destination);
|
|
20
|
+
// },
|
|
21
|
+
// filename: (req, file, cb) => {
|
|
22
|
+
// const filename =
|
|
23
|
+
// options?.filename?.(file) || `${Date.now()}-${file.originalname}`;
|
|
24
|
+
// cb(null, filename);
|
|
25
|
+
// },
|
|
26
|
+
// });
|
|
27
|
+
//
|
|
28
|
+
// return multer({storage});
|
|
29
|
+
// };
|
|
29
30
|
/**
|
|
30
31
|
* Add i18n
|
|
31
32
|
* */
|