adminizer 4.2.0-build.50 → 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-XGIlS4LL.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-_VEBFz_S.js → add-group-form-YI6KS37x.js} +1 -1
- package/assets/add-user-DWcH0s9-.js +1 -0
- package/assets/{add-user-form-BFAFyXuz.js → add-user-form-bv5BNX5A.js} +1 -1
- package/assets/{app-CXlohNEv.css → app-CVnUv8s_.css} +10 -2
- package/assets/{app-layout-NMKA6xAa.js → app-layout-DecN527i.js} +1 -1
- package/assets/{app-shell-Dd-kA5uc.js → app-shell-DHzMWA1L.js} +1 -1
- package/assets/{app-sidebar-C4Y6TSY3.js → app-sidebar-4JFP8UdU.js} +1 -1
- package/assets/app-sidebar-header-CIKLfLsF.js +1 -0
- package/assets/app.js +2 -2
- package/assets/breadcrumbs-Bo2z-LNC.js +1 -0
- package/assets/catalog-C71LuRag.css +1 -0
- package/assets/{catalog-CEVSwmj8.js → catalog-DVyrGTNR.js} +4 -4
- package/assets/{dashboard-jLbWzL7K.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-C7qCVvAC.js → field-renderer-BHo944Cn.js} +133 -133
- package/assets/{field-renderer-BlBZuSiD.css → field-renderer-CsBa_tMB.css} +1 -1
- package/assets/form-BXfnz6h5.js +1 -0
- package/assets/{form-CYsLdORv.js → form-hP8sjbND.js} +1 -1
- package/assets/{geo-json-XGenv_Sy.js → geo-json-CVaNUZbb.js} +1 -1
- package/assets/{handsontable-Dxb-hF7-.js → handsontable-CZQ5Ietj.js} +1 -1
- package/assets/home-BD4MWmm9.js +2 -0
- package/assets/{icon-DQL8h8HI.js → icon-C_X2cQ6W.js} +1 -1
- package/assets/index-C148XJoK.js +1 -0
- package/assets/{init-user-DZtnQ7VL.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-Du8TTXit.js → list-table-_OiQmr2A.js} +3 -3
- package/assets/{login-2THGmUHc.js → login-jzvVXgAV.js} +1 -1
- package/assets/manifest.json +160 -112
- package/assets/{material-icon-CPvFwV5P.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-Ceq6vuwa.js +1 -0
- package/assets/{monaco-editor-9fDiyfuW.js → monaco-editor-XX8Hz76f.js} +3 -3
- package/assets/multi-select-BbKSrMw2.js +1 -0
- package/assets/nav-footer-B8gMV6Wp.js +1 -0
- package/assets/nav-main-BUp9qA8R.js +1 -0
- package/assets/nav-user-DeF3SDRj.js +1 -0
- package/assets/{pagination-render-D6MBqi0B.js → pagination-render-B9U_hVbB.js} +1 -1
- package/assets/{register-Dks3YdiZ.js → register-C6acWsLe.js} +1 -1
- package/assets/theme-switcher-D8T9NgWG.js +1 -0
- package/assets/{toast-editor-1Pul3oMs.js → toast-editor-C0550yms.js} +1 -1
- package/assets/use-appearance-CXP5cHaQ.js +1 -0
- package/assets/{user-info-DTsggabP.js → user-info-CAgkqARx.js} +1 -1
- package/assets/{user-menu-content-Dnh2qpwQ.js → user-menu-content-BxL0QMC9.js} +1 -1
- package/assets/welcome-Dk7GoS5R.js +1 -0
- 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.d.ts +1 -1
- package/helpers/inertiaAddHelper.js +4 -0
- package/interfaces/adminpanelConfig.d.ts +3 -0
- package/interfaces/global.d.ts +2 -0
- package/lib/Adminizer.js +2 -2
- package/lib/media-manager/AbstractMediaManager.d.ts +19 -19
- package/lib/media-manager/AbstractMediaManager.js +13 -11
- package/lib/media-manager/DefaultMediaManager.d.ts +17 -0
- package/lib/media-manager/DefaultMediaManager.js +98 -125
- package/lib/media-manager/Items.d.ts +45 -0
- package/lib/media-manager/Items.js +279 -334
- package/lib/media-manager/Thumb.js +1 -2
- package/lib/media-manager/helpers/MediaManagerHelper.js +4 -6
- package/lib/v4/DataAccessor.d.ts +1 -0
- package/lib/v4/DataAccessor.js +15 -8
- package/lib/v4/model/adapter/sequelize.js +56 -34
- package/lib/v4/model/adapter/waterline.js +12 -4
- package/lib/v4/widgets/abstractCustom.d.ts +1 -1
- package/models/MediaManagerAP.d.ts +62 -0
- package/models/MediaManagerAP.js +45 -0
- package/models/MediaManagerAssociationsAP.d.ts +38 -0
- package/models/MediaManagerAssociationsAP.js +27 -0
- package/models/MediaManagerMetaAP.d.ts +30 -0
- package/models/MediaManagerMetaAP.js +21 -0
- package/package.json +14 -5
- package/system/Router.js +4 -2
- package/system/bindExpressUtils.js +1 -1
- package/system/bindMediaManager.d.ts +2 -0
- package/system/bindMediaManager.js +19 -20
- package/system/bindModels.js +3 -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-BzeOQ-DB.js +0 -1
- package/assets/add-form-BLdLojfl.js +0 -1
- package/assets/add-group-Bx2s4UXM.js +0 -1
- package/assets/add-user-C3BY-sey.js +0 -1
- package/assets/app-sidebar-header-DQnbMxfM.js +0 -1
- package/assets/breadcrumbs-D0gGjNVI.js +0 -1
- package/assets/catalog-Cc6Mk9sX.css +0 -1
- package/assets/date-picker-SAfAWPoh.js +0 -1
- package/assets/debounce-qdyXyOeG.js +0 -1
- package/assets/del-modal-Dj3n8iVJ.js +0 -1
- package/assets/form-DjAQC5zI.js +0 -1
- package/assets/home-DfUM0yKC.js +0 -2
- package/assets/input-error-BztTAmHq.js +0 -1
- package/assets/list-B1FodBkq.js +0 -1
- package/assets/module-D55s6p7N.js +0 -1
- package/assets/multi-select-e4PqgWYn.js +0 -1
- package/assets/nav-footer-B7wjmsPb.js +0 -1
- package/assets/nav-main-Cx1BkIzi.js +0 -1
- package/assets/nav-user-BWl2j-y-.js +0 -1
- package/assets/use-appearance-J8J2w43p.js +0 -1
- package/assets/welcome-HFROxPwP.js +0 -1
|
@@ -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
|
}
|
package/lib/v4/DataAccessor.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class DataAccessor {
|
|
|
14
14
|
private fields;
|
|
15
15
|
private actionVerb;
|
|
16
16
|
constructor(adminizer: Adminizer, user: UserAP, entity: Entity, action: ActionType);
|
|
17
|
+
private getModelConfig;
|
|
17
18
|
/**
|
|
18
19
|
* Retrieves the fields for the given entity based on action type,
|
|
19
20
|
* taking into account access rights and configuration settings.
|
package/lib/v4/DataAccessor.js
CHANGED
|
@@ -15,6 +15,12 @@ export class DataAccessor {
|
|
|
15
15
|
this.action = action;
|
|
16
16
|
this.actionVerb = getTokenAction(this.action);
|
|
17
17
|
}
|
|
18
|
+
getModelConfig(modelName) {
|
|
19
|
+
const entry = Object.entries(this.adminizer.config.models)
|
|
20
|
+
.find(([key]) => key.toLowerCase() === modelName.toLowerCase());
|
|
21
|
+
const config = entry ? entry[1] : undefined;
|
|
22
|
+
return isObject(config) ? config : undefined;
|
|
23
|
+
}
|
|
18
24
|
/**
|
|
19
25
|
* Retrieves the fields for the given entity based on action type,
|
|
20
26
|
* taking into account access rights and configuration settings.
|
|
@@ -88,10 +94,13 @@ export class DataAccessor {
|
|
|
88
94
|
const model = this.adminizer.modelHandler.model.get(modelName);
|
|
89
95
|
if (model) {
|
|
90
96
|
populatedModelFieldsConfig = this.getAssociatedFieldsConfig(modelName);
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
const modelCfg = this.getModelConfig(modelName);
|
|
98
|
+
if (modelCfg) {
|
|
99
|
+
associatedModelConfig = modelCfg;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
Adminizer.log.error(`DataAccessor > getFieldsConfig > Model config not found: ${modelName}`);
|
|
103
|
+
}
|
|
95
104
|
}
|
|
96
105
|
else {
|
|
97
106
|
Adminizer.log.error(`DataAccessor > getFieldsConfig > Model not found: ${modelName} when ${key}`);
|
|
@@ -112,7 +121,8 @@ export class DataAccessor {
|
|
|
112
121
|
}
|
|
113
122
|
getAssociatedFieldsConfig(modelName) {
|
|
114
123
|
const model = this.adminizer.modelHandler.model.get(modelName);
|
|
115
|
-
|
|
124
|
+
const modelConfig = this.getModelConfig(modelName);
|
|
125
|
+
if (!model || !modelConfig) {
|
|
116
126
|
return undefined;
|
|
117
127
|
}
|
|
118
128
|
// Check if user has access to the associated model
|
|
@@ -122,9 +132,6 @@ export class DataAccessor {
|
|
|
122
132
|
return undefined;
|
|
123
133
|
}
|
|
124
134
|
const associatedFields = {};
|
|
125
|
-
const modelConfig = this.adminizer.config.models[modelName];
|
|
126
|
-
if (!isObject(modelConfig))
|
|
127
|
-
throw `Type error ModelConfig should is object`;
|
|
128
135
|
// Get the main fields configuration
|
|
129
136
|
const fieldsConfig = modelConfig.fields || {};
|
|
130
137
|
// Merge action-specific fields configuration if it exists
|
|
@@ -27,14 +27,23 @@ function generateAssociationsFromSchema(models, schemas) {
|
|
|
27
27
|
}
|
|
28
28
|
// 💡 O:M связь (один ко многим)
|
|
29
29
|
else {
|
|
30
|
+
let foreignKey = `${modelName}Id`;
|
|
31
|
+
if (field.collection === modelName) {
|
|
32
|
+
foreignKey = `${field.via}Id`;
|
|
33
|
+
}
|
|
30
34
|
model.hasMany(targetModel, {
|
|
31
35
|
as: fieldName,
|
|
32
|
-
foreignKey
|
|
33
|
-
});
|
|
34
|
-
targetModel.belongsTo(model, {
|
|
35
|
-
as: field.via,
|
|
36
|
-
foreignKey: `${modelName}Id`,
|
|
36
|
+
foreignKey,
|
|
37
37
|
});
|
|
38
|
+
const alias = field.via;
|
|
39
|
+
const belongsToOptions = { foreignKey };
|
|
40
|
+
if (targetModel.rawAttributes[alias] || targetModel.associations[alias]) {
|
|
41
|
+
belongsToOptions.as = `${alias}Ref`;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
belongsToOptions.as = alias;
|
|
45
|
+
}
|
|
46
|
+
targetModel.belongsTo(model, belongsToOptions);
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
// 💡 O:1 или 1:1 (belongsTo)
|
|
@@ -42,21 +51,18 @@ function generateAssociationsFromSchema(models, schemas) {
|
|
|
42
51
|
const targetModel = models[field.model];
|
|
43
52
|
if (!targetModel)
|
|
44
53
|
continue;
|
|
45
|
-
// Avoid naming
|
|
46
|
-
const foreignKey = `${fieldName}Id`;
|
|
54
|
+
// Avoid naming collisions by using an explicit foreign key
|
|
47
55
|
const alias = fieldName;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
model.belongsTo(targetModel, {
|
|
57
|
-
foreignKey: alias, // если нет конфликта, можно использовать alias как FK
|
|
58
|
-
});
|
|
56
|
+
const foreignKey = `${alias}Id`;
|
|
57
|
+
// Reuse the attribute name unless it already exists on the model or association
|
|
58
|
+
let asName = alias;
|
|
59
|
+
if (model.rawAttributes[alias] || model.associations[alias]) {
|
|
60
|
+
asName = `${alias}Ref`;
|
|
59
61
|
}
|
|
62
|
+
model.belongsTo(targetModel, {
|
|
63
|
+
as: asName,
|
|
64
|
+
foreignKey,
|
|
65
|
+
});
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
}
|
|
@@ -152,8 +158,7 @@ export class SequelizeModel extends AbstractModel {
|
|
|
152
158
|
for (const key in criteria) {
|
|
153
159
|
const value = criteria[key];
|
|
154
160
|
if (value === undefined ||
|
|
155
|
-
value === null
|
|
156
|
-
(typeof value === "object" && Object.keys(value).length === 0)) {
|
|
161
|
+
(typeof value === "object" && value !== null && Object.keys(value).length === 0)) {
|
|
157
162
|
continue;
|
|
158
163
|
}
|
|
159
164
|
// 🧠 Заменяем ключ на `via`, если это ассоциация
|
|
@@ -162,22 +167,36 @@ export class SequelizeModel extends AbstractModel {
|
|
|
162
167
|
if (attr?.type === "association" && attr.via) {
|
|
163
168
|
targetKey = attr.via;
|
|
164
169
|
}
|
|
165
|
-
if (
|
|
170
|
+
if (value === null) {
|
|
171
|
+
result[targetKey] = { [Op.is]: null };
|
|
172
|
+
}
|
|
173
|
+
else if (typeof value === "object" && !Array.isArray(value)) {
|
|
166
174
|
const operatorEntries = Object.entries(value)
|
|
167
175
|
.filter(([_, v]) => v !== undefined && v !== null)
|
|
168
176
|
.map(([op, val]) => {
|
|
169
177
|
switch (op) {
|
|
170
|
-
case "contains":
|
|
171
|
-
|
|
172
|
-
case "
|
|
173
|
-
|
|
174
|
-
case "
|
|
175
|
-
|
|
176
|
-
case "
|
|
177
|
-
|
|
178
|
-
case "
|
|
179
|
-
|
|
180
|
-
|
|
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];
|
|
181
200
|
}
|
|
182
201
|
});
|
|
183
202
|
if (operatorEntries.length > 0) {
|
|
@@ -354,7 +373,7 @@ export class SequelizeModel extends AbstractModel {
|
|
|
354
373
|
include: includes
|
|
355
374
|
});
|
|
356
375
|
for (const inst of instances) {
|
|
357
|
-
//For each association, we call getxxx () once again
|
|
376
|
+
//For each association, we call getxxx () once again
|
|
358
377
|
for (const alias of assocNames) {
|
|
359
378
|
// @ts-ignore accessors is present
|
|
360
379
|
const getAccessor = this.model.associations[alias].accessors.get;
|
|
@@ -530,7 +549,10 @@ export class SequelizeAdapter extends AbstractAdapter {
|
|
|
530
549
|
}
|
|
531
550
|
/**Registration of system models*/
|
|
532
551
|
static async registerSystemModels(sequelize) {
|
|
533
|
-
|
|
552
|
+
let modelsDir = path.resolve(import.meta.dirname, "../../../../models");
|
|
553
|
+
if (!fs.existsSync(modelsDir)) {
|
|
554
|
+
modelsDir = path.resolve(import.meta.dirname, "../../../../src/models");
|
|
555
|
+
}
|
|
534
556
|
let files = fs.readdirSync(modelsDir).filter(f => f.endsWith(".js"));
|
|
535
557
|
if (!files.length) {
|
|
536
558
|
files = fs.readdirSync(modelsDir).filter(f => f.endsWith(".ts") && !f.endsWith(".d.ts"));
|
|
@@ -78,10 +78,14 @@ export class WaterlineAdapter extends AbstractAdapter {
|
|
|
78
78
|
return this.orm.ontology.collections;
|
|
79
79
|
}
|
|
80
80
|
getModel(modelName) {
|
|
81
|
-
|
|
81
|
+
const matchedKey = Object.keys(this.orm.ontology.collections).find(key => key.toLowerCase() === modelName.toLowerCase());
|
|
82
|
+
if (!matchedKey) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
return this.orm.ontology.collections[matchedKey];
|
|
82
86
|
}
|
|
83
87
|
getAttributes(modelName) {
|
|
84
|
-
const model = this.
|
|
88
|
+
const model = this.getModel(modelName);
|
|
85
89
|
if (!model) {
|
|
86
90
|
throw new Error(`Model "${modelName}" was not found`);
|
|
87
91
|
}
|
|
@@ -89,7 +93,10 @@ export class WaterlineAdapter extends AbstractAdapter {
|
|
|
89
93
|
}
|
|
90
94
|
/** Method that processes custom waterline model creation. Is used for system models. Replaces beforeCreate method in waterline */
|
|
91
95
|
static async registerSystemModels(waterlineORM) {
|
|
92
|
-
|
|
96
|
+
let systemModelsDir = path.resolve(import.meta.dirname, "../../../../models");
|
|
97
|
+
if (!fs.existsSync(systemModelsDir)) {
|
|
98
|
+
systemModelsDir = path.resolve(import.meta.dirname, "../../../../src/models");
|
|
99
|
+
}
|
|
93
100
|
let systemModelsFiles = fs.readdirSync(systemModelsDir).filter(file => file.endsWith(".js"));
|
|
94
101
|
if (!systemModelsFiles.length) {
|
|
95
102
|
systemModelsFiles = fs.readdirSync(systemModelsDir).filter(file => file.endsWith(".ts") && !file.endsWith(".d.ts"));
|
|
@@ -99,11 +106,12 @@ export class WaterlineAdapter extends AbstractAdapter {
|
|
|
99
106
|
const modelName = path.basename(file).replace(/\.(ts|js)$/, "");
|
|
100
107
|
const systemModelPath = path.resolve(systemModelsDir, file);
|
|
101
108
|
const adminizerModel = (await import(pathToFileURL(systemModelPath).href)).default;
|
|
102
|
-
const waterlineLikeModel = generateWaterlineModel(modelName, adminizerModel);
|
|
109
|
+
const waterlineLikeModel = generateWaterlineModel(modelName, structuredClone(adminizerModel));
|
|
103
110
|
// Register model in Waterline ORM
|
|
104
111
|
waterlineORM.registerModel(waterlineLikeModel);
|
|
105
112
|
}));
|
|
106
113
|
function generateWaterlineModel(modelName, attributes) {
|
|
114
|
+
attributes = JSON.parse(JSON.stringify(attributes));
|
|
107
115
|
const primaryKey = Object.keys(attributes).find(fieldName => attributes[fieldName]?.primaryKey === true);
|
|
108
116
|
if (!primaryKey) {
|
|
109
117
|
throw new Error(`Model "${modelName}" must have a primary key.`);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { MediaManagerAssociationsAP } from "./MediaManagerAssociationsAP";
|
|
2
|
+
import { MediaManagerMetaAP } from "./MediaManagerMetaAP";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
id: {
|
|
5
|
+
type: string;
|
|
6
|
+
allowNull: boolean;
|
|
7
|
+
uuid: boolean;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
required: boolean;
|
|
10
|
+
};
|
|
11
|
+
parent: {
|
|
12
|
+
model: string;
|
|
13
|
+
};
|
|
14
|
+
variants: {
|
|
15
|
+
collection: string;
|
|
16
|
+
via: string;
|
|
17
|
+
};
|
|
18
|
+
mimeType: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
path: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
group: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
tag: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
url: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
filename: {
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
meta: {
|
|
40
|
+
collection: string;
|
|
41
|
+
via: string;
|
|
42
|
+
};
|
|
43
|
+
modelAssociation: {
|
|
44
|
+
collection: string;
|
|
45
|
+
via: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
49
|
+
export interface MediaManagerAP {
|
|
50
|
+
id: string;
|
|
51
|
+
parent?: MediaManagerAP;
|
|
52
|
+
variants?: MediaManagerAP[];
|
|
53
|
+
mimeType?: string;
|
|
54
|
+
path?: string;
|
|
55
|
+
size?: number;
|
|
56
|
+
group?: string;
|
|
57
|
+
tag?: string;
|
|
58
|
+
url?: string;
|
|
59
|
+
filename?: string;
|
|
60
|
+
meta?: MediaManagerMetaAP[];
|
|
61
|
+
modelAssociation?: MediaManagerAssociationsAP[];
|
|
62
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: {
|
|
3
|
+
type: "string",
|
|
4
|
+
allowNull: false,
|
|
5
|
+
uuid: true,
|
|
6
|
+
primaryKey: true,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
parent: {
|
|
10
|
+
model: "MediaManagerAP"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
collection: "MediaManagerAP",
|
|
14
|
+
via: "parent"
|
|
15
|
+
},
|
|
16
|
+
mimeType: {
|
|
17
|
+
type: "string"
|
|
18
|
+
},
|
|
19
|
+
path: {
|
|
20
|
+
type: "string"
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: "number"
|
|
24
|
+
},
|
|
25
|
+
group: {
|
|
26
|
+
type: "string"
|
|
27
|
+
},
|
|
28
|
+
tag: {
|
|
29
|
+
type: "string"
|
|
30
|
+
},
|
|
31
|
+
url: {
|
|
32
|
+
type: "string"
|
|
33
|
+
},
|
|
34
|
+
filename: {
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
meta: {
|
|
38
|
+
collection: "MediaManagerMetaAP",
|
|
39
|
+
via: "parent"
|
|
40
|
+
},
|
|
41
|
+
modelAssociation: {
|
|
42
|
+
collection: "MediaManagerAssociationsAP",
|
|
43
|
+
via: "file"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MediaManagerAP } from "./MediaManagerAP";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: {
|
|
4
|
+
type: string;
|
|
5
|
+
allowNull: boolean;
|
|
6
|
+
uuid: boolean;
|
|
7
|
+
primaryKey: boolean;
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
mediaManagerId: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
model: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
modelId: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
widgetName: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
sortOrder: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
file: {
|
|
26
|
+
model: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
30
|
+
export interface MediaManagerAssociationsAP {
|
|
31
|
+
id: string;
|
|
32
|
+
mediaManagerId?: string;
|
|
33
|
+
model?: Record<string, unknown>;
|
|
34
|
+
modelId?: Record<string, unknown>;
|
|
35
|
+
widgetName?: string;
|
|
36
|
+
sortOrder?: number;
|
|
37
|
+
file?: MediaManagerAP;
|
|
38
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: {
|
|
3
|
+
type: "string",
|
|
4
|
+
allowNull: false,
|
|
5
|
+
uuid: true,
|
|
6
|
+
primaryKey: true,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
mediaManagerId: {
|
|
10
|
+
type: "string"
|
|
11
|
+
},
|
|
12
|
+
model: {
|
|
13
|
+
type: "json"
|
|
14
|
+
},
|
|
15
|
+
modelId: {
|
|
16
|
+
type: "json"
|
|
17
|
+
},
|
|
18
|
+
widgetName: {
|
|
19
|
+
type: "string"
|
|
20
|
+
},
|
|
21
|
+
sortOrder: {
|
|
22
|
+
type: "number"
|
|
23
|
+
},
|
|
24
|
+
file: {
|
|
25
|
+
model: "MediaManagerAP"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MediaManagerAP } from "./MediaManagerAP";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: {
|
|
4
|
+
type: string;
|
|
5
|
+
allowNull: boolean;
|
|
6
|
+
uuid: boolean;
|
|
7
|
+
primaryKey: boolean;
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
key: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
value: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
isPublic: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
parent: {
|
|
20
|
+
model: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
export interface MediaManagerMetaAP {
|
|
25
|
+
id: string;
|
|
26
|
+
key?: string;
|
|
27
|
+
value?: Record<string, unknown>;
|
|
28
|
+
isPublic?: boolean;
|
|
29
|
+
parent?: MediaManagerAP;
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: {
|
|
3
|
+
type: "string",
|
|
4
|
+
allowNull: false,
|
|
5
|
+
uuid: true,
|
|
6
|
+
primaryKey: true,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
key: {
|
|
10
|
+
type: "string"
|
|
11
|
+
},
|
|
12
|
+
value: {
|
|
13
|
+
type: "json"
|
|
14
|
+
},
|
|
15
|
+
isPublic: {
|
|
16
|
+
type: "boolean"
|
|
17
|
+
},
|
|
18
|
+
parent: {
|
|
19
|
+
model: "MediaManagerAP"
|
|
20
|
+
}
|
|
21
|
+
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
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",
|
|
8
8
|
"./ui/*": "./dist/ui/components/ui/*.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"test": "vitest --
|
|
11
|
+
"test": "vitest --watch=false",
|
|
12
|
+
"test:watch": "vitest --reporter verbose",
|
|
12
13
|
"start": "cross-env NO_SEED_DATA=true ORM=sequelize tsx --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
13
|
-
"dev": "cross-env VITE_ENV=dev tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
14
|
-
"dev:
|
|
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",
|
|
17
|
+
"dev:waterline": "cross-env VITE_ENV=dev ORM=waterline tsx watch --tsconfig ./fixture/tsconfig.json ./fixture/index.ts",
|
|
15
18
|
"build:assets": "vite build",
|
|
16
19
|
"compile:backend": "tsc -p src/tsconfig.json",
|
|
17
20
|
"compile:ui": "tsc -p tsconfig.ui.json",
|
|
@@ -35,6 +38,7 @@
|
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"@minoru/react-dnd-treeview": "^3.5.2",
|
|
37
40
|
"@radix-ui/react-context-menu": "^2.2.15",
|
|
41
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
38
42
|
"body-parser": "^1.20.3",
|
|
39
43
|
"chalk": "^5.4.1",
|
|
40
44
|
"cmdk": "^1.1.1",
|
|
@@ -46,10 +50,13 @@
|
|
|
46
50
|
"express": "^4.21.2",
|
|
47
51
|
"express-session": "^1.18.1",
|
|
48
52
|
"jsonwebtoken": "^9.0.2",
|
|
53
|
+
"material-icons": "^1.13.14",
|
|
49
54
|
"multer": "^1.4.5-lts.1",
|
|
50
55
|
"next-themes": "^0.4.6",
|
|
51
56
|
"password-hash": "^1.2.2",
|
|
57
|
+
"react-cropper": "^2.3.3",
|
|
52
58
|
"react-dnd": "^16.0.1",
|
|
59
|
+
"reflect-metadata": "^0.2.2",
|
|
53
60
|
"sharp": "^0.33.5",
|
|
54
61
|
"typeorm": "^0.3.20",
|
|
55
62
|
"uuid": "^11.0.5",
|
|
@@ -59,6 +66,8 @@
|
|
|
59
66
|
"devDependencies": {
|
|
60
67
|
"@babel/plugin-proposal-decorators": "^7.27.1",
|
|
61
68
|
"@ckeditor/ckeditor5-react": "^9.5.0",
|
|
69
|
+
"@dnd-kit/core": "^6.3.1",
|
|
70
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
62
71
|
"@eslint/compat": "^1.2.9",
|
|
63
72
|
"@faker-js/faker": "^9.7.0",
|
|
64
73
|
"@handsontable/react": "^15.2.0",
|
|
@@ -110,13 +119,13 @@
|
|
|
110
119
|
"cross-env": "^7.0.3",
|
|
111
120
|
"eslint": "^9.26.0",
|
|
112
121
|
"handsontable": "^15.2.0",
|
|
122
|
+
"image-size": "^2.0.2",
|
|
113
123
|
"isomorphic-webcrypto": "^2.3.8",
|
|
114
124
|
"json-schema": "^0.4.0",
|
|
115
125
|
"leaflet": "^1.9.4",
|
|
116
126
|
"leaflet-draw": "^1.0.4",
|
|
117
127
|
"lodash-es": "^4.17.21",
|
|
118
128
|
"lucide-react": "^0.485.0",
|
|
119
|
-
"material-icons": "^1.13.14",
|
|
120
129
|
"react": "^19.0.0",
|
|
121
130
|
"react-day-picker": "^8.10.1",
|
|
122
131
|
"react-dom": "^19.0.0",
|
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,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// }
|
|
1
|
+
import { DefaultMediaManager } from "../lib/media-manager/DefaultMediaManager";
|
|
2
|
+
import { MediaManagerHandler } from "../lib/media-manager/MediaManagerHandler";
|
|
3
|
+
import serveStatic from "serve-static";
|
|
4
|
+
import path from "path";
|
|
5
|
+
export default function bindMediaManager(adminizer) {
|
|
6
|
+
adminizer.emitter.on("adminizer:loaded", async () => {
|
|
7
|
+
try {
|
|
8
|
+
let mediaManager = new DefaultMediaManager(adminizer, 'default', 'media-manager', adminizer.config.mediamanager.fileStoragePath);
|
|
9
|
+
MediaManagerHandler.add(mediaManager);
|
|
10
|
+
}
|
|
11
|
+
catch (e) {
|
|
12
|
+
console.log(e);
|
|
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')));
|
|
19
|
+
}
|