adminizer 4.3.0-build.91 → 4.3.0-build.92

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.
@@ -1 +1 @@
1
- import{u as v,V as y,bw as m,j as e,B as p,bx as i,L as c,by as l}from"./app.js";import{r as d}from"./monaco-ICtx6xoc.js";import{LabelRenderer as x,LazyField as F}from"./add-form-BjXOLDij.js";import g from"./input-error--IOnWghB.js";import{F as w}from"./field-renderer-D0crIeQS.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";import"./icon-DM49pZW3.js";import"./dynamic-controls-BOYmRX_z.js";const B=()=>{const r=v(),{fields:t}=r.props,{data:o,setData:u,post:h,processing:a}=y(Object.fromEntries(t.map(s=>[s.name,s.value??void 0])));d.useEffect(()=>(m(),()=>{m()}),[]);const n=d.useCallback((s,b)=>{u(s,b)},[]),j=s=>{s.preventDefault(),h(r.props.postLink)};return e.jsxs("div",{className:"p-4 w-full",children:[e.jsx("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4 lg:hidden",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",form:"addUserForm",disabled:a||i(),children:[a&&e.jsx(c,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})}),e.jsx("form",{className:"mt-8",id:"addUserForm",onSubmit:j,children:e.jsxs("div",{className:"grid lg:grid-cols-[1fr_150px] gap-4 max-w-[1144px] pb-8",children:[e.jsx("div",{className:"flex flex-col gap-10",children:t.map(s=>e.jsx("div",{className:"grid gap-4 w-full",children:s.type==="markdown"||s.type==="table"||s.type==="jsonEditor"||s.type==="codeEditor"||s.type==="geoJson"?e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:l(`${s.type}-${s.name}`)}),e.jsx(F,{field:s,value:o[s.name],onChange:n,processing:a})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:l(`${s.type}-${s.name}`)}),e.jsx(w,{field:s,value:o[s.name],onChange:n,processing:a})]})},s.name))}),e.jsx("div",{className:"p-4 rounded-md h-fit sticky top-[84px] shadow hidden lg:block",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",disabled:a||i(),children:[a&&e.jsx(c,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})})]})})]})};export{B as default};
1
+ import{u as v,V as y,bw as m,j as e,B as p,bx as i,L as c,by as l}from"./app.js";import{r as d}from"./monaco-ICtx6xoc.js";import{LabelRenderer as x,LazyField as F}from"./add-form-DNaC3dFd.js";import g from"./input-error--IOnWghB.js";import{F as w}from"./field-renderer-C55XFp0k.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";import"./icon-DM49pZW3.js";import"./dynamic-controls-BOYmRX_z.js";const B=()=>{const r=v(),{fields:t}=r.props,{data:o,setData:u,post:h,processing:a}=y(Object.fromEntries(t.map(s=>[s.name,s.value??void 0])));d.useEffect(()=>(m(),()=>{m()}),[]);const n=d.useCallback((s,b)=>{u(s,b)},[]),j=s=>{s.preventDefault(),h(r.props.postLink)};return e.jsxs("div",{className:"p-4 w-full",children:[e.jsx("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4 lg:hidden",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",form:"addUserForm",disabled:a||i(),children:[a&&e.jsx(c,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})}),e.jsx("form",{className:"mt-8",id:"addUserForm",onSubmit:j,children:e.jsxs("div",{className:"grid lg:grid-cols-[1fr_150px] gap-4 max-w-[1144px] pb-8",children:[e.jsx("div",{className:"flex flex-col gap-10",children:t.map(s=>e.jsx("div",{className:"grid gap-4 w-full",children:s.type==="markdown"||s.type==="table"||s.type==="jsonEditor"||s.type==="codeEditor"||s.type==="geoJson"?e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:l(`${s.type}-${s.name}`)}),e.jsx(F,{field:s,value:o[s.name],onChange:n,processing:a})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:l(`${s.type}-${s.name}`)}),e.jsx(w,{field:s,value:o[s.name],onChange:n,processing:a})]})},s.name))}),e.jsx("div",{className:"p-4 rounded-md h-fit sticky top-[84px] shadow hidden lg:block",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",disabled:a||i(),children:[a&&e.jsx(c,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})})]})})]})};export{B as default};
@@ -1 +1 @@
1
- import{j as r}from"./app.js";import{A as o}from"./app-layout-DinOHZzD.js";import t from"./form-B6LFaTgS.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./monaco-ICtx6xoc.js";import"./handsontable-PVakPtJV.js";import"./app-shell-CHEYhVco.js";import"./app-sidebar-DeF8WNmW.js";import"./nav-main-9Eb_A0rf.js";import"./material-icon-BedgD2NE.js";import"./app-sidebar-header-CMmguJzw.js";import"./breadcrumbs-C439DWrC.js";import"./nav-user-CRAfyE-x.js";import"./user-info-CcYdmjMZ.js";import"./user-menu-content-DbUk8ZeY.js";import"./theme-switcher-CKiJbMkh.js";import"./icon-DM49pZW3.js";import"./add-form-BjXOLDij.js";import"./field-renderer-D0crIeQS.js";import"./dynamic-controls-BOYmRX_z.js";import"./input-error--IOnWghB.js";const m=[];function g(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{g as default};
1
+ import{j as r}from"./app.js";import{A as o}from"./app-layout-DinOHZzD.js";import t from"./form-DaTkKdur.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./monaco-ICtx6xoc.js";import"./handsontable-PVakPtJV.js";import"./app-shell-CHEYhVco.js";import"./app-sidebar-DeF8WNmW.js";import"./nav-main-9Eb_A0rf.js";import"./material-icon-BedgD2NE.js";import"./app-sidebar-header-CMmguJzw.js";import"./breadcrumbs-C439DWrC.js";import"./nav-user-CRAfyE-x.js";import"./user-info-CcYdmjMZ.js";import"./user-menu-content-DbUk8ZeY.js";import"./theme-switcher-CKiJbMkh.js";import"./icon-DM49pZW3.js";import"./add-form-DNaC3dFd.js";import"./field-renderer-C55XFp0k.js";import"./dynamic-controls-BOYmRX_z.js";import"./input-error--IOnWghB.js";const m=[];function g(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{g as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-D95dIAP2.js","./vendor-wzZzN_Jv.js","./monaco-ICtx6xoc.js","./handsontable-PVakPtJV.js","./app-CSVBI-Lw.css","./add-form-BjXOLDij.js","./icon-DM49pZW3.js","./field-renderer-D0crIeQS.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./input-error--IOnWghB.js","./add-group-form-BNmpvW8K.js","./add-user-form-DrclnTOd.js","./material-icon-BedgD2NE.js","./app-shell-CHEYhVco.js","./app-sidebar-header-CMmguJzw.js","./breadcrumbs-C439DWrC.js","./nav-user-CRAfyE-x.js","./user-info-CcYdmjMZ.js","./user-menu-content-DbUk8ZeY.js","./theme-switcher-CKiJbMkh.js","./app-sidebar-DeF8WNmW.js","./nav-main-9Eb_A0rf.js","./date-picker-DbJ8nHp5.js","./form-B6LFaTgS.js","./geo-json-uSUIgJf5.js","./list-table-h_zXp43g.js","./del-modal-_b3CSNHb.js","./pagination-render-D3UyVAlr.js","./nav-footer-BwkQkwow.js","./toast-editor-BZM5RHph.js"])))=>i.map(i=>d[i]);
2
- import{_ as t}from"./jsoneditor-D95dIAP2.js";import{u as x,j as o,R as v,U as P}from"./app.js";import{r as l}from"./monaco-ICtx6xoc.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function V(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bM),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-BjXOLDij.js"),__vite__mapDeps([6,0,1,2,3,4,5,7,8,9,10,11]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-BNmpvW8K.js"),__vite__mapDeps([12,0,1,2,3,4,5,7]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-DrclnTOd.js"),__vite__mapDeps([13,0,1,2,3,4,5,7,11,14]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-CHEYhVco.js"),__vite__mapDeps([15,0,1,2,3,4,5]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-CMmguJzw.js").then(e=>e.a),__vite__mapDeps([16,0,1,2,3,4,5,17,18,19,20,21,7,14]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-DeF8WNmW.js"),__vite__mapDeps([22,0,1,2,3,4,5,23,14]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-C439DWrC.js"),__vite__mapDeps([17,0,1,2,3,4,5]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-DbJ8nHp5.js"),__vite__mapDeps([24,0,1,2,3,4,5]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-BOYmRX_z.js"),__vite__mapDeps([9,0,1,2,3,4,5]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-D0crIeQS.js").then(e=>e.f),__vite__mapDeps([8,1,2,0,3,4,5,9,10]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-B6LFaTgS.js"),__vite__mapDeps([25,0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-uSUIgJf5.js"),__vite__mapDeps([26,0,1,2,3,4,5]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.bN),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DM49pZW3.js"),__vite__mapDeps([7,0,1,2,3,4,5]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error--IOnWghB.js"),__vite__mapDeps([11,0,1,2,3,4,5]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-h_zXp43g.js"),__vite__mapDeps([27,0,1,2,3,4,5,7,14,28,29]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-BedgD2NE.js"),__vite__mapDeps([14,0,1,2,3,4,5]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.bO),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.bP),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-BwkQkwow.js"),__vite__mapDeps([30,0,1,2,3,4,5,7]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-9Eb_A0rf.js"),__vite__mapDeps([23,0,1,2,3,4,5,14]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-CRAfyE-x.js"),__vite__mapDeps([18,0,1,2,3,4,5,19,20]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-D3UyVAlr.js"),__vite__mapDeps([29,0,1,2,3,4,5]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-CKiJbMkh.js"),__vite__mapDeps([21,0,1,2,3,4,5,7]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-BZM5RHph.js"),__vite__mapDeps([31,0,1,2,3,4,5]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-CcYdmjMZ.js"),__vite__mapDeps([19,0,1,2,3,4,5]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-DbUk8ZeY.js"),__vite__mapDeps([20,0,1,2,3,4,5,19]),import.meta.url)}),`../components/${s}.tsx`,3)).default;_(o.jsx(E,{...a}))},d=async()=>{const{component:s}=m[1],u=(await import(s)).default;p(o.jsx(u,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),n||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:d,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{V as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-D95dIAP2.js","./vendor-wzZzN_Jv.js","./monaco-ICtx6xoc.js","./handsontable-PVakPtJV.js","./app-CSVBI-Lw.css","./add-form-DNaC3dFd.js","./icon-DM49pZW3.js","./field-renderer-C55XFp0k.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./input-error--IOnWghB.js","./add-group-form-BNmpvW8K.js","./add-user-form-DrclnTOd.js","./material-icon-BedgD2NE.js","./app-shell-CHEYhVco.js","./app-sidebar-header-CMmguJzw.js","./breadcrumbs-C439DWrC.js","./nav-user-CRAfyE-x.js","./user-info-CcYdmjMZ.js","./user-menu-content-DbUk8ZeY.js","./theme-switcher-CKiJbMkh.js","./app-sidebar-DeF8WNmW.js","./nav-main-9Eb_A0rf.js","./date-picker-DbJ8nHp5.js","./form-DaTkKdur.js","./geo-json-uSUIgJf5.js","./list-table-h_zXp43g.js","./del-modal-_b3CSNHb.js","./pagination-render-D3UyVAlr.js","./nav-footer-BwkQkwow.js","./toast-editor-BZM5RHph.js"])))=>i.map(i=>d[i]);
2
+ import{_ as t}from"./jsoneditor-D95dIAP2.js";import{u as x,j as o,R as v,U as P}from"./app.js";import{r as l}from"./monaco-ICtx6xoc.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function V(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bM),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-DNaC3dFd.js"),__vite__mapDeps([6,0,1,2,3,4,5,7,8,9,10,11]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-BNmpvW8K.js"),__vite__mapDeps([12,0,1,2,3,4,5,7]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-DrclnTOd.js"),__vite__mapDeps([13,0,1,2,3,4,5,7,11,14]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-CHEYhVco.js"),__vite__mapDeps([15,0,1,2,3,4,5]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-CMmguJzw.js").then(e=>e.a),__vite__mapDeps([16,0,1,2,3,4,5,17,18,19,20,21,7,14]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-DeF8WNmW.js"),__vite__mapDeps([22,0,1,2,3,4,5,23,14]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-C439DWrC.js"),__vite__mapDeps([17,0,1,2,3,4,5]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-DbJ8nHp5.js"),__vite__mapDeps([24,0,1,2,3,4,5]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-BOYmRX_z.js"),__vite__mapDeps([9,0,1,2,3,4,5]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-C55XFp0k.js").then(e=>e.f),__vite__mapDeps([8,1,2,0,3,4,5,9,10]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-DaTkKdur.js"),__vite__mapDeps([25,0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-uSUIgJf5.js"),__vite__mapDeps([26,0,1,2,3,4,5]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.bN),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DM49pZW3.js"),__vite__mapDeps([7,0,1,2,3,4,5]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error--IOnWghB.js"),__vite__mapDeps([11,0,1,2,3,4,5]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-h_zXp43g.js"),__vite__mapDeps([27,0,1,2,3,4,5,7,14,28,29]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-BedgD2NE.js"),__vite__mapDeps([14,0,1,2,3,4,5]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.bO),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.bP),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-BwkQkwow.js"),__vite__mapDeps([30,0,1,2,3,4,5,7]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-9Eb_A0rf.js"),__vite__mapDeps([23,0,1,2,3,4,5,14]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-CRAfyE-x.js"),__vite__mapDeps([18,0,1,2,3,4,5,19,20]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-D3UyVAlr.js"),__vite__mapDeps([29,0,1,2,3,4,5]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-CKiJbMkh.js"),__vite__mapDeps([21,0,1,2,3,4,5,7]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-BZM5RHph.js"),__vite__mapDeps([31,0,1,2,3,4,5]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-CcYdmjMZ.js"),__vite__mapDeps([19,0,1,2,3,4,5]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-DbUk8ZeY.js"),__vite__mapDeps([20,0,1,2,3,4,5,19]),import.meta.url)}),`../components/${s}.tsx`,3)).default;_(o.jsx(E,{...a}))},d=async()=>{const{component:s}=m[1],u=(await import(s)).default;p(o.jsx(u,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),n||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:d,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{V as default};
@@ -32,12 +32,8 @@
32
32
  "src/assets/js/components/icon.tsx"
33
33
  ]
34
34
  },
35
- "_field-renderer-CRNLShJD.css": {
36
- "file": "field-renderer-CRNLShJD.css",
37
- "src": "_field-renderer-CRNLShJD.css"
38
- },
39
- "_field-renderer-D0crIeQS.js": {
40
- "file": "field-renderer-D0crIeQS.js",
35
+ "_field-renderer-C55XFp0k.js": {
36
+ "file": "field-renderer-C55XFp0k.js",
41
37
  "name": "field-renderer",
42
38
  "isDynamicEntry": true,
43
39
  "imports": [
@@ -59,6 +55,10 @@
59
55
  "field-renderer-CRNLShJD.css"
60
56
  ]
61
57
  },
58
+ "_field-renderer-CRNLShJD.css": {
59
+ "file": "field-renderer-CRNLShJD.css",
60
+ "src": "_field-renderer-CRNLShJD.css"
61
+ },
62
62
  "_handsontable-PVakPtJV.js": {
63
63
  "file": "handsontable-PVakPtJV.js",
64
64
  "name": "handsontable",
@@ -187,7 +187,7 @@
187
187
  ]
188
188
  },
189
189
  "src/assets/js/components/add-form.tsx": {
190
- "file": "add-form-BjXOLDij.js",
190
+ "file": "add-form-DNaC3dFd.js",
191
191
  "name": "add-form",
192
192
  "src": "src/assets/js/components/add-form.tsx",
193
193
  "isDynamicEntry": true,
@@ -195,7 +195,7 @@
195
195
  "src/assets/js/app.tsx",
196
196
  "_monaco-ICtx6xoc.js",
197
197
  "src/assets/js/components/icon.tsx",
198
- "_field-renderer-D0crIeQS.js",
198
+ "_field-renderer-C55XFp0k.js",
199
199
  "src/assets/js/components/input-error.tsx",
200
200
  "_jsoneditor-D95dIAP2.js",
201
201
  "_vendor-wzZzN_Jv.js",
@@ -301,7 +301,7 @@
301
301
  ]
302
302
  },
303
303
  "src/assets/js/components/form.tsx": {
304
- "file": "form-B6LFaTgS.js",
304
+ "file": "form-DaTkKdur.js",
305
305
  "name": "form",
306
306
  "src": "src/assets/js/components/form.tsx",
307
307
  "isDynamicEntry": true,
@@ -310,7 +310,7 @@
310
310
  "_monaco-ICtx6xoc.js",
311
311
  "src/assets/js/components/add-form.tsx",
312
312
  "src/assets/js/components/input-error.tsx",
313
- "_field-renderer-D0crIeQS.js",
313
+ "_field-renderer-C55XFp0k.js",
314
314
  "_jsoneditor-D95dIAP2.js",
315
315
  "_vendor-wzZzN_Jv.js",
316
316
  "_handsontable-PVakPtJV.js",
@@ -388,7 +388,7 @@
388
388
  ]
389
389
  },
390
390
  "src/assets/js/components/media-manager/media-manager.tsx": {
391
- "file": "media-manager-Bms57WSN.js",
391
+ "file": "media-manager-91CMk2mo.js",
392
392
  "name": "media-manager",
393
393
  "src": "src/assets/js/components/media-manager/media-manager.tsx",
394
394
  "isDynamicEntry": true,
@@ -396,7 +396,7 @@
396
396
  "src/assets/js/app.tsx",
397
397
  "_monaco-ICtx6xoc.js",
398
398
  "_handsontable-PVakPtJV.js",
399
- "_field-renderer-D0crIeQS.js",
399
+ "_field-renderer-C55XFp0k.js",
400
400
  "_tabs-BK_5wdPA.js",
401
401
  "_jsoneditor-D95dIAP2.js",
402
402
  "_vendor-wzZzN_Jv.js",
@@ -570,7 +570,7 @@
570
570
  ]
571
571
  },
572
572
  "src/assets/js/pages/add.tsx": {
573
- "file": "add-C2tF8-gD.js",
573
+ "file": "add-NAafOOz0.js",
574
574
  "name": "add",
575
575
  "src": "src/assets/js/pages/add.tsx",
576
576
  "isDynamicEntry": true,
@@ -593,13 +593,13 @@
593
593
  "src/assets/js/components/user-menu-content.tsx",
594
594
  "src/assets/js/components/theme-switcher.tsx",
595
595
  "src/assets/js/components/icon.tsx",
596
- "_field-renderer-D0crIeQS.js",
596
+ "_field-renderer-C55XFp0k.js",
597
597
  "src/assets/js/components/dynamic-controls.tsx",
598
598
  "src/assets/js/components/input-error.tsx"
599
599
  ]
600
600
  },
601
601
  "src/assets/js/pages/catalog.tsx": {
602
- "file": "catalog-CzQI0e2V.js",
602
+ "file": "catalog-DjUVcs4W.js",
603
603
  "name": "catalog",
604
604
  "src": "src/assets/js/pages/catalog.tsx",
605
605
  "isDynamicEntry": true,
@@ -623,7 +623,7 @@
623
623
  "src/assets/js/components/user-menu-content.tsx",
624
624
  "src/assets/js/components/theme-switcher.tsx",
625
625
  "src/assets/js/components/icon.tsx",
626
- "_field-renderer-D0crIeQS.js",
626
+ "_field-renderer-C55XFp0k.js",
627
627
  "src/assets/js/components/dynamic-controls.tsx",
628
628
  "src/assets/js/components/input-error.tsx"
629
629
  ],
@@ -660,7 +660,7 @@
660
660
  ]
661
661
  },
662
662
  "src/assets/js/pages/form.tsx": {
663
- "file": "form-wHGNS6BZ.js",
663
+ "file": "form-DsQb8UGG.js",
664
664
  "name": "form",
665
665
  "src": "src/assets/js/pages/form.tsx",
666
666
  "isDynamicEntry": true,
@@ -684,13 +684,13 @@
684
684
  "src/assets/js/components/theme-switcher.tsx",
685
685
  "src/assets/js/components/icon.tsx",
686
686
  "src/assets/js/components/add-form.tsx",
687
- "_field-renderer-D0crIeQS.js",
687
+ "_field-renderer-C55XFp0k.js",
688
688
  "src/assets/js/components/dynamic-controls.tsx",
689
689
  "src/assets/js/components/input-error.tsx"
690
690
  ]
691
691
  },
692
692
  "src/assets/js/pages/home.tsx": {
693
- "file": "home-DuF0qLi8.js",
693
+ "file": "home-CwEEdA4M.js",
694
694
  "name": "home",
695
695
  "src": "src/assets/js/pages/home.tsx",
696
696
  "isDynamicEntry": true,
@@ -712,7 +712,7 @@
712
712
  "src/assets/js/components/breadcrumbs.tsx",
713
713
  "src/assets/js/components/date-picker.tsx",
714
714
  "src/assets/js/components/dynamic-controls.tsx",
715
- "_field-renderer-D0crIeQS.js",
715
+ "_field-renderer-C55XFp0k.js",
716
716
  "src/assets/js/components/form.tsx",
717
717
  "src/assets/js/components/geo-json.tsx",
718
718
  "src/assets/js/app.tsx",
@@ -1,4 +1,4 @@
1
- import{j as h,ak as kn,al as In,g as Q,w as _i,x as $i,Y as Ln,y as Wi,z as ht,a8 as Mr,a9 as Tr,aa as jr,ab as Rr,am as zn,an as Yt,B as J,a1 as Pn,a2 as Bn,a3 as _t,a4 as oe,a5 as Xn,a6 as se,I as qt,L as Ct,a as bt,ao as Hi,ap as Ui,aq as Fi,a0 as Vi,ar as Gi,f as fr,aj as Ki,D as qi,h as Ji,i as Zi,k as Qr,as as Qi}from"./app.js";import{r as p,e as B}from"./monaco-ICtx6xoc.js";import{r as mt}from"./handsontable-PVakPtJV.js";import{I as Yn,P as $t,p as ea}from"./field-renderer-D0crIeQS.js";import{T as ta,a as ra,b as Ke,c as qe}from"./tabs-BK_5wdPA.js";import{d as na}from"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./dynamic-controls-BOYmRX_z.js";function ia(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return p.useMemo(()=>n=>{e.forEach(a=>a(n))},e)}const Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function it(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Or(t){return"nodeType"in t}function ee(t){var e,r;return t?it(t)?t:Or(t)&&(e=(r=t.ownerDocument)==null?void 0:r.defaultView)!=null?e:window:window}function Ar(t){const{Document:e}=ee(t);return t instanceof e}function Tt(t){return it(t)?!1:t instanceof ee(t).HTMLElement}function _n(t){return t instanceof ee(t).SVGElement}function at(t){return t?it(t)?t.document:Or(t)?Ar(t)?t:Tt(t)||_n(t)?t.ownerDocument:document:document:document}const pe=Jt?p.useLayoutEffect:p.useEffect;function Zt(t){const e=p.useRef(t);return pe(()=>{e.current=t}),p.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return e.current==null?void 0:e.current(...n)},[])}function aa(){const t=p.useRef(null),e=p.useCallback((n,a)=>{t.current=setInterval(n,a)},[]),r=p.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,r]}function St(t,e){e===void 0&&(e=[t]);const r=p.useRef(t);return pe(()=>{r.current!==t&&(r.current=t)},e),r}function jt(t,e){const r=p.useRef();return p.useMemo(()=>{const n=t(r.current);return r.current=n,n},[...e])}function Wt(t){const e=Zt(t),r=p.useRef(null),n=p.useCallback(a=>{a!==r.current&&(e==null||e(a,r.current)),r.current=a},[]);return[r,n]}function Ht(t){const e=p.useRef();return p.useEffect(()=>{e.current=t},[t]),e.current}let or={};function Rt(t,e){return p.useMemo(()=>{if(e)return e;const r=or[t]==null?0:or[t]+1;return or[t]=r,t+"-"+r},[t,e])}function $n(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{const s=Object.entries(o);for(const[d,l]of s){const c=i[d];c!=null&&(i[d]=c+t*l)}return i},{...e})}}const et=$n(1),Et=$n(-1);function oa(t){return"clientX"in t&&"clientY"in t}function Ot(t){if(!t)return!1;const{KeyboardEvent:e}=ee(t.target);return e&&t instanceof e}function sa(t){if(!t)return!1;const{TouchEvent:e}=ee(t.target);return e&&t instanceof e}function Ut(t){if(sa(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:r}=t.touches[0];return{x:e,y:r}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:r}=t.changedTouches[0];return{x:e,y:r}}}return oa(t)?{x:t.clientX,y:t.clientY}:null}const ye=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:r}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:r}=t;return"scaleX("+e+") scaleY("+r+")"}},Transform:{toString(t){if(t)return[ye.Translate.toString(t),ye.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:r,easing:n}=t;return e+" "+r+"ms "+n}}}),en="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function la(t){return t.matches(en)?t:t.querySelector(en)}const ca={display:"none"};function da(t){let{id:e,value:r}=t;return B.createElement("div",{id:e,style:ca},r)}function ua(t){let{id:e,announcement:r,ariaLiveType:n="assertive"}=t;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return B.createElement("div",{id:e,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function ha(){const[t,e]=p.useState("");return{announce:p.useCallback(n=>{n!=null&&e(n)},[]),announcement:t}}const Wn=p.createContext(null);function fa(t){const e=p.useContext(Wn);p.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function pa(){const[t]=p.useState(()=>new Set),e=p.useCallback(n=>(t.add(n),()=>t.delete(n)),[t]);return[p.useCallback(n=>{let{type:a,event:i}=n;t.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[t]),e]}const ga={draggable:`
1
+ import{j as h,ak as kn,al as In,g as Q,w as _i,x as $i,Y as Ln,y as Wi,z as ht,a8 as Mr,a9 as Tr,aa as jr,ab as Rr,am as zn,an as Yt,B as J,a1 as Pn,a2 as Bn,a3 as _t,a4 as oe,a5 as Xn,a6 as se,I as qt,L as Ct,a as bt,ao as Hi,ap as Ui,aq as Fi,a0 as Vi,ar as Gi,f as fr,aj as Ki,D as qi,h as Ji,i as Zi,k as Qr,as as Qi}from"./app.js";import{r as p,e as B}from"./monaco-ICtx6xoc.js";import{r as mt}from"./handsontable-PVakPtJV.js";import{I as Yn,P as $t,p as ea}from"./field-renderer-C55XFp0k.js";import{T as ta,a as ra,b as Ke,c as qe}from"./tabs-BK_5wdPA.js";import{d as na}from"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./dynamic-controls-BOYmRX_z.js";function ia(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return p.useMemo(()=>n=>{e.forEach(a=>a(n))},e)}const Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function it(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Or(t){return"nodeType"in t}function ee(t){var e,r;return t?it(t)?t:Or(t)&&(e=(r=t.ownerDocument)==null?void 0:r.defaultView)!=null?e:window:window}function Ar(t){const{Document:e}=ee(t);return t instanceof e}function Tt(t){return it(t)?!1:t instanceof ee(t).HTMLElement}function _n(t){return t instanceof ee(t).SVGElement}function at(t){return t?it(t)?t.document:Or(t)?Ar(t)?t:Tt(t)||_n(t)?t.ownerDocument:document:document:document}const pe=Jt?p.useLayoutEffect:p.useEffect;function Zt(t){const e=p.useRef(t);return pe(()=>{e.current=t}),p.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return e.current==null?void 0:e.current(...n)},[])}function aa(){const t=p.useRef(null),e=p.useCallback((n,a)=>{t.current=setInterval(n,a)},[]),r=p.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,r]}function St(t,e){e===void 0&&(e=[t]);const r=p.useRef(t);return pe(()=>{r.current!==t&&(r.current=t)},e),r}function jt(t,e){const r=p.useRef();return p.useMemo(()=>{const n=t(r.current);return r.current=n,n},[...e])}function Wt(t){const e=Zt(t),r=p.useRef(null),n=p.useCallback(a=>{a!==r.current&&(e==null||e(a,r.current)),r.current=a},[]);return[r,n]}function Ht(t){const e=p.useRef();return p.useEffect(()=>{e.current=t},[t]),e.current}let or={};function Rt(t,e){return p.useMemo(()=>{if(e)return e;const r=or[t]==null?0:or[t]+1;return or[t]=r,t+"-"+r},[t,e])}function $n(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{const s=Object.entries(o);for(const[d,l]of s){const c=i[d];c!=null&&(i[d]=c+t*l)}return i},{...e})}}const et=$n(1),Et=$n(-1);function oa(t){return"clientX"in t&&"clientY"in t}function Ot(t){if(!t)return!1;const{KeyboardEvent:e}=ee(t.target);return e&&t instanceof e}function sa(t){if(!t)return!1;const{TouchEvent:e}=ee(t.target);return e&&t instanceof e}function Ut(t){if(sa(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:r}=t.touches[0];return{x:e,y:r}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:r}=t.changedTouches[0];return{x:e,y:r}}}return oa(t)?{x:t.clientX,y:t.clientY}:null}const ye=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:r}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:r}=t;return"scaleX("+e+") scaleY("+r+")"}},Transform:{toString(t){if(t)return[ye.Translate.toString(t),ye.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:r,easing:n}=t;return e+" "+r+"ms "+n}}}),en="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function la(t){return t.matches(en)?t:t.querySelector(en)}const ca={display:"none"};function da(t){let{id:e,value:r}=t;return B.createElement("div",{id:e,style:ca},r)}function ua(t){let{id:e,announcement:r,ariaLiveType:n="assertive"}=t;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return B.createElement("div",{id:e,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function ha(){const[t,e]=p.useState("");return{announce:p.useCallback(n=>{n!=null&&e(n)},[]),announcement:t}}const Wn=p.createContext(null);function fa(t){const e=p.useContext(Wn);p.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function pa(){const[t]=p.useState(()=>new Set),e=p.useCallback(n=>(t.add(n),()=>t.delete(n)),[t]);return[p.useCallback(n=>{let{type:a,event:i}=n;t.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[t]),e]}const ga={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -1 +1 @@
1
- export default function upload(req: ReqType, res: ResType): void;
1
+ export declare function ckEditorUpload(req: ReqType, res: ResType): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { ControllerHelper } from "../helpers/controllerHelper";
2
2
  import * as fs from "fs";
3
- import { Adminizer } from "../lib/Adminizer";
4
- export default function upload(req, res) {
3
+ import multer from "multer";
4
+ export async function ckEditorUpload(req, res) {
5
5
  let entity = ControllerHelper.findEntityObject(req);
6
6
  if (req.adminizer.config.auth.enable) {
7
7
  if (!req.user) {
@@ -18,34 +18,58 @@ export default function upload(req, res) {
18
18
  return;
19
19
  }
20
20
  }
21
- if (req.method.toUpperCase() === "POST") {
21
+ const dirDownload = `uploads/${entity.type}/${entity.name}/ckeditor`;
22
+ await handleUpload(req, res, dirDownload);
23
+ }
24
+ async function handleUpload(req, res, dirDownload) {
25
+ const upload = multer(getUploadConfig(dirDownload)).single("file");
26
+ upload(req, res, async (err) => {
22
27
  try {
23
- // set upload directory
24
- const dirDownload = `uploads/${entity.type}/${entity.name}/ckeditor`;
25
- const dir = `${process.cwd()}/.tmp/public/${dirDownload}/`;
26
- if (!fs.existsSync(dir)) {
27
- fs.mkdirSync(dir, { recursive: true });
28
- }
29
- // save file
30
- const filenameOrig = req.body.name.replace(' ', '_');
31
- let filename = filenameOrig.replace(/$/, '_prefix');
32
- req.upload({
33
- destination: dir,
34
- filename: () => filename
35
- }).single("image")(req, res, (err) => {
36
- if (err) {
37
- Adminizer.logger.error("Error uploading file:", err);
38
- return res.status(500).send({ error: err.message || "Internal Server Error" });
28
+ if (err) {
29
+ let errorMessage = err.message;
30
+ if (err.code === 'LIMIT_FILE_SIZE') {
31
+ const maxSizeMB = (5 * 1024 * 1024) / (1024 * 1024);
32
+ errorMessage = `${req.i18n.__('The file exceeds the size limit')} ${maxSizeMB} MB`;
39
33
  }
40
- return res.send({
41
- msg: "success",
42
- url: `/${dirDownload}/${filename}`,
43
- });
34
+ return res.status(400).json({ msg: "error", error: errorMessage });
35
+ }
36
+ return res.send({
37
+ msg: "success",
38
+ url: `/${dirDownload}/${req.file.filename}`,
44
39
  });
45
40
  }
46
- catch (error) {
47
- Adminizer.logger.error("Error in uploadImage:", error);
48
- res.status(500).send({ error: "Internal Server Error" });
41
+ catch (e) {
42
+ console.error(e);
43
+ return res.status(500).send({ error: e.message || 'Upload failed' });
44
+ }
45
+ });
46
+ }
47
+ function getUploadConfig(dirDownload) {
48
+ return {
49
+ storage: setStorage(checkDirectory(dirDownload)),
50
+ limits: {
51
+ fileSize: 5 * 1024 * 1024,
52
+ },
53
+ fileFilter: (req, file, cb) => {
54
+ cb(null, true);
49
55
  }
56
+ };
57
+ }
58
+ function checkDirectory(dirDownload) {
59
+ const outputDir = `${process.cwd()}/.tmp/public/${dirDownload}`;
60
+ if (!fs.existsSync(outputDir)) {
61
+ fs.mkdirSync(outputDir, { recursive: true });
50
62
  }
63
+ return outputDir;
64
+ }
65
+ function setStorage(outputDir) {
66
+ return multer.diskStorage({
67
+ destination: (req, file, cb) => {
68
+ cb(null, outputDir);
69
+ },
70
+ filename: (req, file, cb) => {
71
+ const filename = req.body.name;
72
+ cb(null, filename);
73
+ }
74
+ });
51
75
  }
@@ -129,7 +129,7 @@ export class ControllerHelper {
129
129
  }
130
130
  return Object.keys(models).find(key => key.toLowerCase() === entityName.toLowerCase());
131
131
  }
132
- throw new Error(`Unsupported entity type "${entityType}" in URL`);
132
+ throw new Error(`Unsupported entity type ${entityType} in URL`);
133
133
  }
134
134
  /**
135
135
  * Searches for config from admin panel
@@ -22,7 +22,7 @@ export class CKeditor extends AbstractControls {
22
22
  '|',
23
23
  'horizontalLine',
24
24
  'link',
25
- 'insertImageViaUrl',
25
+ 'insertImage',
26
26
  'insertTable',
27
27
  'blockQuote',
28
28
  '|',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.3.0-build.91",
4
+ "version": "4.3.0-build.92",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
package/system/Router.js CHANGED
@@ -5,7 +5,7 @@ import _edit from "../controllers/edit";
5
5
  import _add from "../controllers/add";
6
6
  import _view from "../controllers/view";
7
7
  import _remove from "../controllers/remove";
8
- import _uploadCKeditor5 from "../controllers/ckeditorUpload";
8
+ import { ckEditorUpload } from "../controllers/ckeditorUpload";
9
9
  import _form from "../controllers/form";
10
10
  import { widgetSwitchController } from "../controllers/widgets/switch";
11
11
  import _getAllWidgets from "../controllers/getAllWidgets";
@@ -81,6 +81,10 @@ export default class Router {
81
81
  adminizer.app.post(`${adminizer.config.routePrefix}/media-manager-uploader/:id/upload-variant`, adminizer.policyManager.bindPolicies(policies, mediaManagerController));
82
82
  adminizer.app.all(`${adminizer.config.routePrefix}/media-manager-uploader/:id`, adminizer.policyManager.bindPolicies(policies, mediaManagerController));
83
83
  adminizer.app.all(`${adminizer.config.routePrefix}/get-thumbs`, adminizer.policyManager.bindPolicies(policies, thumbController));
84
+ /**
85
+ * Upload images CKeditor5
86
+ */
87
+ adminizer.app.post(`${baseRoute}/ckeditor5/upload`, adminizer.policyManager.bindPolicies(policies, ckEditorUpload));
84
88
  /**
85
89
  * Notifications
86
90
  */
@@ -160,11 +164,6 @@ export default class Router {
160
164
  * Remove record
161
165
  */
162
166
  adminizer.app.all(baseRoute + "/remove/:id", adminizer.policyManager.bindPolicies(policies, _remove));
163
- /**
164
- * Upload images CKeditor5
165
- */
166
- //TODO check after mediamanager upgrade possible is not need
167
- adminizer.app.all(`${baseRoute}/ckeditor5/upload`, adminizer.policyManager.bindPolicies(policies, _uploadCKeditor5));
168
167
  /**
169
168
  * Create a default dashboard
170
169
  */