adminizer 4.6.0-build.211 → 4.6.0-build.213

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,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-De1FvcYu.js","./handsontable-PxYdjN8c.js","./monaco-BhBYtg3d.js","./app-CPcnQ89K.css","./RelationDialogStack-CJ8JvUDg.js","./icon-BTIjB9Wk.js","./dynamic-controls-k61T9W2P.js","./input-error-CSrUHo1P.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B7c4coU-.js","./add-user-form-BXSGx38D.js","./material-icon-BXxpxGAd.js","./app-shell-DbPu3ZPM.js","./app-sidebar-header-BeiWUuCC.js","./breadcrumbs-CZZirDj8.js","./nav-user-DIuv8mfu.js","./user-info-DtBK5Kh8.js","./user-menu-content-bdKtg5yV.js","./theme-switcher-2tPEnSJf.js","./app-sidebar-DEpxtufv.js","./nav-main-CroFjRVi.js","./date-picker-Dk9WjnjY.js","./form-WqY1RtmV.js","./geo-json-D5fjz6BF.js","./list-table-PLHaED_1.js","./del-modal-CF3OUMvW.js","./pagination-render-40Bk8JSz.js","./nav-footer-Cgr3-a9q.js","./toast-editor-D3dhpAw1.js"])))=>i.map(i=>d[i]);
2
- import{_ as t}from"./jsoneditor-De1FvcYu.js";import{u as x,j as o,ah as v,ai as P}from"./app.js";import{r as l}from"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.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 T(){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.bZ),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./RelationDialogStack-CJ8JvUDg.js").then(e=>e.b),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-B7c4coU-.js"),__vite__mapDeps([10,0,1,2,3,4,6]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-BXSGx38D.js"),__vite__mapDeps([11,0,1,2,3,4,6,8,12]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-DbPu3ZPM.js"),__vite__mapDeps([13,0,1,2,3,4]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-BeiWUuCC.js").then(e=>e.c),__vite__mapDeps([14,0,1,2,3,4,15,16,17,18,19,6,12]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-DEpxtufv.js"),__vite__mapDeps([20,0,1,2,3,4,21,12]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-CZZirDj8.js"),__vite__mapDeps([15,0,1,2,3,4]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-Dk9WjnjY.js"),__vite__mapDeps([22,0,1,2,3,4]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-k61T9W2P.js"),__vite__mapDeps([7,0,1,2,3,4]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./RelationDialogStack-CJ8JvUDg.js").then(e=>e.f),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-WqY1RtmV.js"),__vite__mapDeps([23,0,1,2,3,4,5,6,7,8,9]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-D5fjz6BF.js"),__vite__mapDeps([24,0,1,2,3,4]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.b_),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-BTIjB9Wk.js"),__vite__mapDeps([6,0,1,2,3,4]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error-CSrUHo1P.js"),__vite__mapDeps([8,0,1,2,3,4]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-PLHaED_1.js"),__vite__mapDeps([25,0,1,2,3,4,6,12,26,27]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-BXxpxGAd.js"),__vite__mapDeps([12,0,1,2,3,4]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.b$),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.c0),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-Cgr3-a9q.js"),__vite__mapDeps([28,0,1,2,3,4,6]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-CroFjRVi.js"),__vite__mapDeps([21,0,1,2,3,4,12]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-DIuv8mfu.js"),__vite__mapDeps([16,0,1,2,3,4,17,18]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-40Bk8JSz.js"),__vite__mapDeps([27,0,1,2,3,4]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-2tPEnSJf.js"),__vite__mapDeps([19,0,1,2,3,4,6]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-D3dhpAw1.js"),__vite__mapDeps([29,0,1,2,3,4]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-DtBK5Kh8.js"),__vite__mapDeps([17,0,1,2,3,4]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-bdKtg5yV.js"),__vite__mapDeps([18,0,1,2,3,4,17]),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{T as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-De1FvcYu.js","./handsontable-PxYdjN8c.js","./monaco-BhBYtg3d.js","./app-CPcnQ89K.css","./RelationDialogStack-CJ8JvUDg.js","./icon-BTIjB9Wk.js","./dynamic-controls-k61T9W2P.js","./input-error-CSrUHo1P.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B7c4coU-.js","./add-user-form-BXSGx38D.js","./material-icon-BXxpxGAd.js","./app-shell-DbPu3ZPM.js","./app-sidebar-header-BeiWUuCC.js","./breadcrumbs-CZZirDj8.js","./nav-user-DIuv8mfu.js","./user-info-DtBK5Kh8.js","./user-menu-content-bdKtg5yV.js","./theme-switcher-2tPEnSJf.js","./app-sidebar-DEpxtufv.js","./nav-main-CroFjRVi.js","./date-picker-Dk9WjnjY.js","./form-WqY1RtmV.js","./geo-json-D5fjz6BF.js","./list-table-DIi7YPGB.js","./del-modal-CF3OUMvW.js","./pagination-render-DxD78ahJ.js","./nav-footer-Cgr3-a9q.js","./toast-editor-D3dhpAw1.js"])))=>i.map(i=>d[i]);
2
+ import{_ as t}from"./jsoneditor-De1FvcYu.js";import{u as x,j as o,ah as v,ai as P}from"./app.js";import{r as l}from"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.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 T(){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.bZ),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./RelationDialogStack-CJ8JvUDg.js").then(e=>e.b),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-B7c4coU-.js"),__vite__mapDeps([10,0,1,2,3,4,6]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-BXSGx38D.js"),__vite__mapDeps([11,0,1,2,3,4,6,8,12]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-DbPu3ZPM.js"),__vite__mapDeps([13,0,1,2,3,4]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-BeiWUuCC.js").then(e=>e.c),__vite__mapDeps([14,0,1,2,3,4,15,16,17,18,19,6,12]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-DEpxtufv.js"),__vite__mapDeps([20,0,1,2,3,4,21,12]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-CZZirDj8.js"),__vite__mapDeps([15,0,1,2,3,4]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-Dk9WjnjY.js"),__vite__mapDeps([22,0,1,2,3,4]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-k61T9W2P.js"),__vite__mapDeps([7,0,1,2,3,4]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./RelationDialogStack-CJ8JvUDg.js").then(e=>e.f),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-WqY1RtmV.js"),__vite__mapDeps([23,0,1,2,3,4,5,6,7,8,9]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-D5fjz6BF.js"),__vite__mapDeps([24,0,1,2,3,4]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.b_),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-BTIjB9Wk.js"),__vite__mapDeps([6,0,1,2,3,4]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error-CSrUHo1P.js"),__vite__mapDeps([8,0,1,2,3,4]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-DIi7YPGB.js"),__vite__mapDeps([25,0,1,2,3,4,6,12,26,27]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-BXxpxGAd.js"),__vite__mapDeps([12,0,1,2,3,4]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.b$),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.c0),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-Cgr3-a9q.js"),__vite__mapDeps([28,0,1,2,3,4,6]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-CroFjRVi.js"),__vite__mapDeps([21,0,1,2,3,4,12]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-DIuv8mfu.js"),__vite__mapDeps([16,0,1,2,3,4,17,18]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-DxD78ahJ.js"),__vite__mapDeps([27,0,1,2,3,4]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-2tPEnSJf.js"),__vite__mapDeps([19,0,1,2,3,4,6]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-D3dhpAw1.js"),__vite__mapDeps([29,0,1,2,3,4]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-DtBK5Kh8.js"),__vite__mapDeps([17,0,1,2,3,4]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-bdKtg5yV.js"),__vite__mapDeps([18,0,1,2,3,4,17]),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{T as default};
@@ -1 +1 @@
1
- import{j as o}from"./app.js";import{A as r}from"./app-layout-mT3oXgd7.js";import t from"./list-table-PLHaED_1.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-DEpxtufv.js";import"./nav-main-CroFjRVi.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-BeiWUuCC.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-DIuv8mfu.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-bdKtg5yV.js";import"./theme-switcher-2tPEnSJf.js";import"./icon-BTIjB9Wk.js";import"./RelationDialogStack-CJ8JvUDg.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";import"./del-modal-CF3OUMvW.js";import"./pagination-render-40Bk8JSz.js";const m=[],R=()=>o.jsx(r,{breadcrumbs:m,className:"overflow-auto h-[calc(100svh-16px)]",children:o.jsx(t,{})});export{R as default};
1
+ import{j as o}from"./app.js";import{A as r}from"./app-layout-mT3oXgd7.js";import t from"./list-table-DIi7YPGB.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-DEpxtufv.js";import"./nav-main-CroFjRVi.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-BeiWUuCC.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-DIuv8mfu.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-bdKtg5yV.js";import"./theme-switcher-2tPEnSJf.js";import"./icon-BTIjB9Wk.js";import"./RelationDialogStack-CJ8JvUDg.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";import"./del-modal-CF3OUMvW.js";import"./pagination-render-DxD78ahJ.js";const m=[],R=()=>o.jsx(r,{breadcrumbs:m,className:"overflow-auto h-[calc(100svh-16px)]",children:o.jsx(t,{})});export{R as default};
@@ -1,4 +1,4 @@
1
- import{bO as Ue,j as f,B as G,aD as Ke,aE as Xe,bP as Qe,I as Ye,bQ as Ee,a5 as Ze,a6 as Je,a7 as re,a8 as We,a9 as be,aa as xe,u as et,t as _e,r as B,T as tt,ai as q,bR as nt,bS as ot,q as $e,s as Fe,v as Me,w as Ve,x as Pe,S as rt,c as it,d as st,e as lt,f as ut,aY as W,o as at,E as gt,aZ as dt}from"./app.js";import{r as _}from"./handsontable-PxYdjN8c.js";import{Icon as O}from"./icon-BTIjB9Wk.js";import U from"./material-icon-BXxpxGAd.js";import{D as ct}from"./del-modal-CF3OUMvW.js";import ft from"./pagination-render-40Bk8JSz.js";import"./jsoneditor-De1FvcYu.js";import"./monaco-BhBYtg3d.js";function pt(e,o,t,n,r){return _.useMemo(()=>Object.entries(e).map(([i,s])=>({accessorKey:i,header:()=>f.jsxs("div",{className:`flex flex-col gap-1 text-center max-w-[300px] ${s.direction?"text-chart-1":""}`,children:[f.jsxs(G,{variant:"ghost",className:"cursor-pointer hover:text-inherit",onClick:()=>{if(o){const l=s.direction==="asc"?"desc":"asc";o(s.data,l)}},children:[f.jsx("span",{className:"overflow-hidden text-ellipsis",children:s.title}),s.direction?f.jsx(O,{iconNode:s.direction==="asc"?Ke:Xe,className:"size-3"}):f.jsx(O,{iconNode:Qe,className:"size-3"})]}),r&&t&&f.jsx("input",{type:"text",defaultValue:s.searchColumnValue,className:"text-xs p-1 border rounded mb-2 text-foreground",onChange:l=>{t(s.data,l.target.value)},onKeyDown:l=>{l.key==="Enter"&&n&&n()}})]}),cell:({row:l})=>{var a;const u=Ue(((a=l.getValue(i))==null?void 0:a.toString())??"");return f.jsx("div",{className:"text-center max-w-[300px] overflow-hidden text-ellipsis",dangerouslySetInnerHTML:{__html:u}})}})),[e,o,r,t])}/**
1
+ import{bO as Ue,j as f,B as G,aD as Ke,aE as Xe,bP as Qe,I as Ye,bQ as Ee,a5 as Ze,a6 as Je,a7 as re,a8 as We,a9 as be,aa as xe,u as et,t as _e,r as B,T as tt,ai as q,bR as nt,bS as ot,q as $e,s as Fe,v as Me,w as Ve,x as Pe,S as rt,c as it,d as st,e as lt,f as ut,aY as W,o as at,E as gt,aZ as dt}from"./app.js";import{r as _}from"./handsontable-PxYdjN8c.js";import{Icon as O}from"./icon-BTIjB9Wk.js";import U from"./material-icon-BXxpxGAd.js";import{D as ct}from"./del-modal-CF3OUMvW.js";import ft from"./pagination-render-DxD78ahJ.js";import"./jsoneditor-De1FvcYu.js";import"./monaco-BhBYtg3d.js";function pt(e,o,t,n,r){return _.useMemo(()=>Object.entries(e).map(([i,s])=>({accessorKey:i,header:()=>f.jsxs("div",{className:`flex flex-col gap-1 text-center max-w-[300px] ${s.direction?"text-chart-1":""}`,children:[f.jsxs(G,{variant:"ghost",className:"cursor-pointer hover:text-inherit",onClick:()=>{if(o){const l=s.direction==="asc"?"desc":"asc";o(s.data,l)}},children:[f.jsx("span",{className:"overflow-hidden text-ellipsis",children:s.title}),s.direction?f.jsx(O,{iconNode:s.direction==="asc"?Ke:Xe,className:"size-3"}):f.jsx(O,{iconNode:Qe,className:"size-3"})]}),r&&t&&f.jsx("input",{type:"text",defaultValue:s.searchColumnValue,className:"text-xs p-1 border rounded mb-2 text-foreground",onChange:l=>{t(s.data,l.target.value)},onKeyDown:l=>{l.key==="Enter"&&n&&n()}})]}),cell:({row:l})=>{var a;const u=Ue(((a=l.getValue(i))==null?void 0:a.toString())??"");return f.jsx("div",{className:"text-center max-w-[300px] overflow-hidden text-ellipsis",dangerouslySetInnerHTML:{__html:u}})}})),[e,o,r,t])}/**
2
2
  * table-core
3
3
  *
4
4
  * Copyright (c) TanStack
@@ -327,7 +327,7 @@
327
327
  ]
328
328
  },
329
329
  "src/assets/js/components/list-table.tsx": {
330
- "file": "list-table-PLHaED_1.js",
330
+ "file": "list-table-DIi7YPGB.js",
331
331
  "name": "list-table",
332
332
  "src": "src/assets/js/components/list-table.tsx",
333
333
  "isDynamicEntry": true,
@@ -415,7 +415,7 @@
415
415
  ]
416
416
  },
417
417
  "src/assets/js/components/pagination-render.tsx": {
418
- "file": "pagination-render-40Bk8JSz.js",
418
+ "file": "pagination-render-DxD78ahJ.js",
419
419
  "name": "pagination-render",
420
420
  "src": "src/assets/js/components/pagination-render.tsx",
421
421
  "isDynamicEntry": true,
@@ -560,7 +560,7 @@
560
560
  ]
561
561
  },
562
562
  "src/assets/js/pages/catalog.tsx": {
563
- "file": "catalog-RUS5EBuy.js",
563
+ "file": "catalog-BoonmK4z.js",
564
564
  "name": "catalog",
565
565
  "src": "src/assets/js/pages/catalog.tsx",
566
566
  "isDynamicEntry": true,
@@ -676,7 +676,7 @@
676
676
  ]
677
677
  },
678
678
  "src/assets/js/pages/home.tsx": {
679
- "file": "home-C_xUaJoJ.js",
679
+ "file": "home-Bk_HC60_.js",
680
680
  "name": "home",
681
681
  "src": "src/assets/js/pages/home.tsx",
682
682
  "isDynamicEntry": true,
@@ -731,7 +731,7 @@
731
731
  ]
732
732
  },
733
733
  "src/assets/js/pages/list.tsx": {
734
- "file": "list-CDFtsuUr.js",
734
+ "file": "list-CpkT1A5r.js",
735
735
  "name": "list",
736
736
  "src": "src/assets/js/pages/list.tsx",
737
737
  "isDynamicEntry": true,
@@ -0,0 +1 @@
1
+ import{u as g,j as s,bT as f,bU as j,bV as o,bW as l,bX as h,bY as N}from"./app.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";const $=({pagination:r,pageChange:t,currentPage:a})=>{const n=g().props.uiMessages??{},u=n.First||"First",p=n.Last||"Last",c=n.Previous||"Previous",i=n.Next||"Next",d=a!==1&&r.last_page>1,b=a!==r.last_page&&r.last_page>1;return s.jsx(f,{children:s.jsxs(j,{className:"flex-wrap",children:[s.jsx(o,{className:`${d?"":"opacity-40 pointer-events-none"}`,children:s.jsx(l,{className:"px-6 cursor-pointer bg-secondary hover:bg-muted-foreground/15",onClick:e=>{e.preventDefault(),t(1)},children:u})}),s.jsx(o,{children:s.jsx(h,{label:c,className:`cursor-pointer bg-secondary hover:bg-muted-foreground/15 ${r.prev_page_url?"":"opacity-50 pointer-events-none"}`,onClick:e=>{e.preventDefault(),r.prev_page_url&&t(a-1)}})}),r.links.map((e,x)=>e.label==="Previous"||e.label==="Next"||e.label===c||e.label===i?null:s.jsx(o,{children:s.jsx(l,{className:`cursor-pointer bg-secondary hover:bg-muted-foreground/15 ${e.active?"!bg-primary dark:!bg-muted-foreground !text-primary-foreground dark:!text-ring":""}`,onClick:m=>{m.preventDefault();const v=parseInt(e.label);t(v)},isActive:e.active,children:e.label})},x)),s.jsx(o,{children:s.jsx(N,{label:i,className:`cursor-pointer bg-secondary hover:bg-muted-foreground/15 ${r.next_page_url?"":"opacity-50 pointer-events-none"}`,onClick:e=>{e.preventDefault(),r.next_page_url&&t(a+1)}})}),s.jsx(o,{className:`${b?"":"opacity-40 pointer-events-none"}`,children:s.jsx(l,{className:"px-6 cursor-pointer bg-secondary hover:bg-muted-foreground/15",onClick:e=>{e.preventDefault(),t(r.last_page)},children:p})})]})})};export{$ as default};
package/lib/Adminizer.js CHANGED
@@ -97,11 +97,9 @@ export class Adminizer {
97
97
  const condition3 = url.startsWith('/public');
98
98
  const conditions = [
99
99
  condition1,
100
- condition2
100
+ condition2,
101
+ condition3
101
102
  ];
102
- if (process.env.IS_SAILS === undefined) {
103
- conditions.push(condition3);
104
- }
105
103
  if (!conditions.some(condition => condition)) {
106
104
  return typeof next === 'function' ? next() : undefined;
107
105
  }
package/lib/I18n.js CHANGED
@@ -72,8 +72,10 @@ export class I18n {
72
72
  }
73
73
  locale = this.defaultLocale;
74
74
  }
75
- const translation = I18n.locales[locale][singular];
75
+ const localeDictionary = I18n.locales[locale] || {};
76
+ const translation = localeDictionary[singular];
76
77
  if (!translation && this.devMode) {
78
+ I18n.locales[locale] = I18n.locales[locale] || {};
77
79
  I18n.locales[locale][singular] = plural ? { one: singular, other: plural } : singular;
78
80
  this.writeFile(locale);
79
81
  }
@@ -87,7 +89,11 @@ export class I18n {
87
89
  }
88
90
  try {
89
91
  const data = fs.readFileSync(file, "utf8");
90
- I18n.locales[locale] = JSON.parse(data);
92
+ const parsed = JSON.parse(data);
93
+ I18n.locales[locale] = {
94
+ ...(I18n.locales[locale] || {}),
95
+ ...parsed
96
+ };
91
97
  if (!this.devMode) {
92
98
  I18n.localeCache[file] = I18n.locales[locale];
93
99
  }
@@ -51,6 +51,7 @@ export declare class WidgetHandler {
51
51
  getById(id: string): WidgetType | undefined;
52
52
  removeById(id: string): void;
53
53
  getAll(user: UserAP, i18n: I18n): Promise<WidgetConfig[]>;
54
+ private translateWidgetConfig;
54
55
  getWidgetsDB(id: number, auth: boolean, i18n: I18n): Promise<{
55
56
  widgets: WidgetConfig[];
56
57
  layout: WidgetsLayouts;
@@ -119,6 +119,13 @@ export class WidgetHandler {
119
119
  }
120
120
  return Promise.resolve(widgets);
121
121
  }
122
+ translateWidgetConfig(widget, i18n) {
123
+ return {
124
+ ...widget,
125
+ name: typeof widget.name === "string" ? i18n.__(widget.name) : widget.name,
126
+ description: typeof widget.description === "string" ? i18n.__(widget.description) : widget.description
127
+ };
128
+ }
122
129
  async getWidgetsDB(id, auth, i18n) {
123
130
  let user;
124
131
  let result = {
@@ -142,7 +149,7 @@ export class WidgetHandler {
142
149
  }
143
150
  else {
144
151
  // User has saved widgets - return them
145
- result.widgets = user.widgets.widgets;
152
+ result.widgets = (user.widgets.widgets || []).map((widget) => this.translateWidgetConfig(widget, i18n));
146
153
  result.layout = user.widgets.layout;
147
154
  }
148
155
  return result;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.6.0-build.211",
4
+ "version": "4.6.0-build.213",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
@@ -1,14 +1,12 @@
1
1
  export default async function setLocale(req, res, proceed) {
2
- if (!req.i18n) {
3
- return proceed();
4
- }
5
- if (typeof req.adminizer.config.translation === 'boolean') {
2
+ if (!req.i18n || typeof req.i18n.setLocale !== 'function') {
6
3
  return proceed();
7
4
  }
8
5
  if (req.user && req.user.locale) {
9
6
  req.i18n.setLocale(req.user.locale);
7
+ return proceed();
10
8
  }
11
- else {
9
+ if (typeof req.adminizer.config.translation !== 'boolean') {
12
10
  req.i18n.setLocale(req.adminizer.config.translation.defaultLocale);
13
11
  }
14
12
  return proceed();
@@ -58,7 +58,6 @@ export function bindInertia(adminizer) {
58
58
  });
59
59
  // Route prefix script
60
60
  const routePrefixScript = `<script>window.routePrefix = "${adminizer.config.routePrefix}";</script>`;
61
- // For Sails JS
62
61
  const bindPublic = `<script>window.bindPublic = ${adminizer.config.bind?.public}</script>`;
63
62
  return `
64
63
  ${preloadLinks.join('\n')}
@@ -142,6 +141,21 @@ export function bindInertia(adminizer) {
142
141
  "Error: Fields data is invalid": req.i18n.__("Error: Fields data is invalid"),
143
142
  "No fields to display": req.i18n.__("No fields to display"),
144
143
  "Error: Some fields are missing required properties (name, type, label)": req.i18n.__("Error: Some fields are missing required properties (name, type, label)"),
144
+ Edit: req.i18n.__("Edit"),
145
+ create: req.i18n.__("create"),
146
+ Clean: req.i18n.__("Clean"),
147
+ "Are you sure?": req.i18n.__("Are you sure?"),
148
+ "Select Item type": req.i18n.__("Select Item type"),
149
+ "Select Ids": req.i18n.__("Select Ids"),
150
+ "Open in a new window": req.i18n.__("Open in a new window"),
151
+ Visible: req.i18n.__("Visible"),
152
+ "Performing an action...": req.i18n.__("Performing an action..."),
153
+ "Action completed": req.i18n.__("Action completed"),
154
+ Save: req.i18n.__("Save"),
155
+ First: req.i18n.__("First"),
156
+ Last: req.i18n.__("Last"),
157
+ Previous: req.i18n.__("Previous"),
158
+ Next: req.i18n.__("Next"),
145
159
  },
146
160
  menu: req.user ? menuHelper.getMenuItems(req) : null,
147
161
  title: menuHelper.getBrandTitle(),
@@ -196,4 +210,7 @@ function checkAuth(req, adminizer) {
196
210
  };
197
211
  }
198
212
  }
213
+ if (req.i18n && typeof adminizer.config.translation !== 'boolean') {
214
+ req.i18n.setLocale(req.user?.locale || adminizer.config.translation.defaultLocale);
215
+ }
199
216
  }
@@ -11,12 +11,26 @@ export default function bindReqFunctions(adminizer) {
11
11
  /**
12
12
  * Add i18n
13
13
  * */
14
- req.i18n = new I18n({
15
- locales: adminizer.config.translation !== false ? adminizer.config.translation.locales : [],
16
- directory: adminizer.config.translation !== false ? adminizer.config.translation.path ?? null : null
17
- });
14
+ const hasExternalI18n = typeof req.i18n?.__ === "function";
15
+ if (!hasExternalI18n) {
16
+ req.i18n = new I18n({
17
+ locales: adminizer.config.translation !== false ? adminizer.config.translation.locales : [],
18
+ directory: adminizer.config.translation !== false ? adminizer.config.translation.path ?? null : null
19
+ });
20
+ }
18
21
  if (res.locals) {
19
- req.i18n.registerMethods(res.locals, req);
22
+ if (hasExternalI18n) {
23
+ const externalI18n = req.i18n;
24
+ const methods = ["__", "__n", "getLocale", "isPreferredLocale"];
25
+ for (const method of methods) {
26
+ if (typeof externalI18n?.[method] === "function") {
27
+ res.locals[method] = externalI18n[method].bind(externalI18n);
28
+ }
29
+ }
30
+ }
31
+ else {
32
+ req.i18n.registerMethods(res.locals, req);
33
+ }
20
34
  }
21
35
  // NOTE: This is here because inertia should receive data to routes
22
36
  // JWT token
@@ -31,6 +45,24 @@ export default function bindReqFunctions(adminizer) {
31
45
  if (req.session.userPretended) {
32
46
  req.user = req.session.userPretended;
33
47
  }
48
+ if (typeof adminizer.config.translation !== "boolean" && req.i18n?.setLocale) {
49
+ const configuredLocales = adminizer.config.translation?.locales || [];
50
+ const normalizeLocale = (value) => {
51
+ if (typeof value !== "string")
52
+ return null;
53
+ const normalized = value.toLowerCase().replace("_", "-");
54
+ const base = normalized.split("-")[0];
55
+ if (configuredLocales.includes(normalized))
56
+ return normalized;
57
+ if (configuredLocales.includes(base))
58
+ return base;
59
+ return null;
60
+ };
61
+ const preferredLocale = normalizeLocale(req.user?.locale) ||
62
+ normalizeLocale(req.user?.language) ||
63
+ normalizeLocale(req.headers["x-locale"]);
64
+ req.i18n.setLocale(preferredLocale || adminizer.config.translation.defaultLocale);
65
+ }
34
66
  next();
35
67
  };
36
68
  // adminizer.app.use('/', bindReqFunctionsF);
@@ -6,7 +6,7 @@
6
6
  "Back": "ﻒﻠﺧ",
7
7
  "Back to Login": "ﻝﻮﺧﺪﻟﺍ ﻞﻴﺠﺴﺗ ﻰﻟﺇ ﺓﺩﻮﻌﻟﺍ",
8
8
  "Additional login page": "صفحة تسجيل دخول إضافية",
9
- "Clean": "Clean",
9
+ "Clean": "نظيفة",
10
10
  "Confirm Password": "ﺭﻭﺮﻤﻟﺍ ﺔﻤﻠﻛ ﺪﻴﻛﺄﺗ",
11
11
  "Confirm Password*": "*ﺭﻭﺮﻤﻟﺍ ﺔﻤﻠﻛ ﺪﻴﻛﺄﺗ",
12
12
  "Create": "ﻖﻠﺨﻳ",
@@ -98,5 +98,73 @@
98
98
  "Profile expired, contact the administrator": "انتهت صلاحية الملف الشخصي، تواصل مع المسؤول",
99
99
  "The user is not allowed to enter, please contact the administrator": "المستخدم غير مسموح له بالدخول، يرجى التواصل مع المسؤول",
100
100
  "On": "تشغيل",
101
- "Off": "إيقاف"
101
+ "Off": "إيقاف",
102
+ "Leave this field empty if you don't want to change the password": "اترك هذا الحقل فارغًا إذا كنت لا تريد تغيير كلمة المرور",
103
+ "File type are not supported": "نوع الملف غير مدعوم",
104
+ "History": "التاريخ",
105
+ "Models": "نماذج",
106
+ "Users": "المستخدمين",
107
+ "Pick a date": "اختر موعدًا",
108
+ "Model": "نموذج",
109
+ "Event": "حدث",
110
+ "User": "المستخدم",
111
+ "There are no records to display": "لا توجد سجلات لعرضها",
112
+ "Watch": "شاهد",
113
+ "Current": "الحالي",
114
+ "There is no history": "لا يوجد تاريخ",
115
+ "The end of the list has been reached": "تم الوصول إلى نهاية القائمة",
116
+ "Log out": "تسجيل الخروج",
117
+ "Adminpanel": "لوحة الإدارة",
118
+ "Visible": "مرئي",
119
+ "The file used by the models": "الملف المستخدم من قبل النماذج",
120
+ "This is opensource project": "هذا هو مشروع مفتوح المصدر",
121
+ "Groups": "المجموعات",
122
+ "System": "نظام",
123
+ "Table": "الجدول",
124
+ "Tile": "بلاط",
125
+ "Load more": "تحميل المزيد",
126
+ "Images": "الصور",
127
+ "Videos": "فيديوهات",
128
+ "Texts": "النصوص",
129
+ "Applications": "التطبيقات",
130
+ "File": "ملف",
131
+ "Name": "الاسم",
132
+ "Type": "اكتب",
133
+ "Size (orig.)": "الحجم (الأصل)",
134
+ "W x H (orig.)": "العرض × الارتفاع (الأصل)",
135
+ "W x H": "العرض × الارتفاع",
136
+ "Sizes": "الأحجام",
137
+ "Sizes/Ver": "الأحجام/الإصدار",
138
+ "Locales": "اللغات",
139
+ "Data": "البيانات",
140
+ "Date": "التاريخ",
141
+ "User login": "تسجيل دخول المستخدم",
142
+ "avatar": "الصورة الرمزية",
143
+ "expires": "تنتهي",
144
+ "is administrator": "هو المسؤول",
145
+ "widgets": "الحاجيات",
146
+ "isConfirmed": "تم التأكيد",
147
+ "id": "معرف",
148
+ "title": "عنوان",
149
+ "slug": "سبيكة",
150
+ "owner": "مالك",
151
+ "userAPs": "مستخدمو لوحة الإدارة",
152
+ "schema": "المخطط",
153
+ "example": "مثال",
154
+ "Navigation": "الملاحة",
155
+ "All controlss": "جميع الضوابط",
156
+ "Categorys": "الفئات",
157
+ "Textarea": "منطقة النص",
158
+ "Disabled": "معطل",
159
+ "Boolean": "منطقية",
160
+ "time": "الوقت",
161
+ "Number": "رقم",
162
+ "Editor": "محرر",
163
+ "Date and time": "التاريخ والوقت",
164
+ "First": "أولاً",
165
+ "Last": "آخر",
166
+ "Previous": "سابق",
167
+ "Next": "التالي",
168
+ "Notifications": "إشعارات",
169
+ "Global Settings": "الإعدادات العالمية"
102
170
  }
@@ -98,5 +98,73 @@
98
98
  "Profile expired, contact the administrator": "账户已过期,请联系管理员",
99
99
  "The user is not allowed to enter, please contact the administrator": "该用户无权登录,请联系管理员",
100
100
  "On": "开",
101
- "Off": "关"
101
+ "Off": "关",
102
+ "Leave this field empty if you don't want to change the password": "如果您不想更改密码,请将此字段留空",
103
+ "File type are not supported": "不支持的文件类型",
104
+ "History": "历史",
105
+ "Models": "型号",
106
+ "Users": "用户",
107
+ "Pick a date": "选择日期",
108
+ "Model": "型号",
109
+ "Event": "活动",
110
+ "User": "用户",
111
+ "There are no records to display": "没有记录可显示",
112
+ "Watch": "手表",
113
+ "Current": "当前",
114
+ "There is no history": "没有历史",
115
+ "The end of the list has been reached": "已到达列表末尾",
116
+ "Log out": "退出",
117
+ "Adminpanel": "管理面板",
118
+ "Visible": "可见的",
119
+ "The file used by the models": "模型使用的文件",
120
+ "This is opensource project": "这是开源项目",
121
+ "Groups": "团体",
122
+ "System": "系统",
123
+ "Table": "表",
124
+ "Tile": "瓷砖",
125
+ "Load more": "加载更多",
126
+ "Images": "图片",
127
+ "Videos": "视频",
128
+ "Texts": "文本",
129
+ "Applications": "应用领域",
130
+ "File": "文件",
131
+ "Name": "名称",
132
+ "Type": "类型",
133
+ "Size (orig.)": "尺寸(原始)",
134
+ "W x H (orig.)": "宽 x 高(原始)",
135
+ "W x H": "宽×高",
136
+ "Sizes": "尺寸",
137
+ "Sizes/Ver": "尺寸/版本",
138
+ "Locales": "区域设置",
139
+ "Data": "数据",
140
+ "Date": "日期",
141
+ "User login": "用户登录",
142
+ "avatar": "头像",
143
+ "expires": "过期",
144
+ "is administrator": "是管理员",
145
+ "widgets": "小部件",
146
+ "isConfirmed": "已确认",
147
+ "id": "编号",
148
+ "title": "标题",
149
+ "slug": "蛞蝓",
150
+ "owner": "业主",
151
+ "userAPs": "用户AP",
152
+ "schema": "图式",
153
+ "example": "例子",
154
+ "Navigation": "导航",
155
+ "All controlss": "所有控制",
156
+ "Categorys": "类别",
157
+ "Textarea": "文本区",
158
+ "Disabled": "残疾人",
159
+ "Boolean": "布尔值",
160
+ "time": "时间",
161
+ "Number": "数量",
162
+ "Editor": "编辑",
163
+ "Date and time": "日期和时间",
164
+ "First": "第一的",
165
+ "Last": "最后的",
166
+ "Previous": "以前的",
167
+ "Next": "下一个",
168
+ "Notifications": "通知",
169
+ "Global Settings": "全局设置"
102
170
  }
@@ -23,13 +23,13 @@
23
23
  "Group description": "Gruppenbeschreibung",
24
24
  "Group name": "Gruppenname",
25
25
  "Group settings": "Gruppeneinstellungen",
26
- "Info": "Info",
26
+ "Info": "Infos",
27
27
  "Is Administrator": "Ist Administrator",
28
28
  "Is confirmed": "Wird bestätigt",
29
- "Link": "Link",
29
+ "Link": "Verknüpfung",
30
30
  "Locale": "Gebietsschema",
31
31
  "Log in": "Einloggen",
32
- "Login": "Login",
32
+ "Login": "Anmelden",
33
33
  "Members": "Mitglieder",
34
34
  "New record was created": "Neuer Rekord wurde erstellt",
35
35
  "No": "NEIN",
@@ -98,5 +98,73 @@
98
98
  "Profile expired, contact the administrator": "Profil abgelaufen, kontaktieren Sie den Administrator",
99
99
  "The user is not allowed to enter, please contact the administrator": "Der Benutzer darf sich nicht anmelden, bitte kontaktieren Sie den Administrator",
100
100
  "On": "Ein",
101
- "Off": "Aus"
101
+ "Off": "Aus",
102
+ "Leave this field empty if you don't want to change the password": "Lassen Sie dieses Feld leer, wenn Sie das Passwort nicht ändern möchten",
103
+ "File type are not supported": "Dateitypen werden nicht unterstützt",
104
+ "History": "Geschichte",
105
+ "Models": "Modelle",
106
+ "Users": "Benutzer",
107
+ "Pick a date": "Wählen Sie ein Datum",
108
+ "Model": "Modell",
109
+ "Event": "Veranstaltung",
110
+ "User": "Benutzer",
111
+ "There are no records to display": "Es sind keine anzuzeigenden Datensätze vorhanden",
112
+ "Watch": "Beobachten Sie",
113
+ "Current": "Aktuell",
114
+ "There is no history": "Es gibt keine Geschichte",
115
+ "The end of the list has been reached": "Das Ende der Liste ist erreicht",
116
+ "Log out": "Abmelden",
117
+ "Adminpanel": "Adminbereich",
118
+ "Visible": "Sichtbar",
119
+ "The file used by the models": "Die von den Modellen verwendete Datei",
120
+ "This is opensource project": "Dies ist ein OpenSource-Projekt",
121
+ "Groups": "Gruppen",
122
+ "System": "System",
123
+ "Table": "Tisch",
124
+ "Tile": "Fliese",
125
+ "Load more": "Mehr laden",
126
+ "Images": "Bilder",
127
+ "Videos": "Videodateien",
128
+ "Texts": "Texte",
129
+ "Applications": "Anwendungen",
130
+ "File": "Datei",
131
+ "Name": "Bezeichnung",
132
+ "Type": "Typ",
133
+ "Size (orig.)": "Größe (orig.)",
134
+ "W x H (orig.)": "B x H (orig.)",
135
+ "W x H": "B x H",
136
+ "Sizes": "Größen",
137
+ "Sizes/Ver": "Größen/Ver",
138
+ "Locales": "Orte",
139
+ "Data": "Daten",
140
+ "Date": "Datum",
141
+ "User login": "Benutzeranmeldung",
142
+ "avatar": "Avatar",
143
+ "expires": "läuft ab",
144
+ "is administrator": "ist Administrator",
145
+ "widgets": "Widgets",
146
+ "isConfirmed": "ist bestätigt",
147
+ "id": "ID",
148
+ "title": "Titel",
149
+ "slug": "Schnecke",
150
+ "owner": "Besitzer",
151
+ "userAPs": "Benutzer-APs",
152
+ "schema": "Schema",
153
+ "example": "Beispiel",
154
+ "Navigation": "Navigationsmenü",
155
+ "All controlss": "Alle Bedienelemente",
156
+ "Categorys": "Kategorien",
157
+ "Textarea": "Textbereich",
158
+ "Disabled": "Deaktiviert",
159
+ "Boolean": "Boolescher Wert",
160
+ "time": "Zeit",
161
+ "Number": "Nummer",
162
+ "Editor": "Herausgeber",
163
+ "Date and time": "Datum und Uhrzeit",
164
+ "First": "Erste",
165
+ "Last": "Zuletzt",
166
+ "Previous": "Vorherige",
167
+ "Next": "Nächste",
168
+ "Notifications": "Benachrichtigungen",
169
+ "Global Settings": "Globale Einstellungen"
102
170
  }
@@ -181,5 +181,17 @@
181
181
  "Profile expired, contact the administrator": "Profile expired, contact the administrator",
182
182
  "The user is not allowed to enter, please contact the administrator": "The user is not allowed to enter, please contact the administrator",
183
183
  "On": "On",
184
- "Off": "Off"
184
+ "Off": "Off",
185
+ "Visible": "Visible",
186
+ "The file used by the models": "The file used by the models",
187
+ "This is opensource project": "This is opensource project",
188
+ "Groups": "Groups",
189
+ "System": "System",
190
+ "W x H": "W x H",
191
+ "Sizes": "Sizes",
192
+ "First": "First",
193
+ "Last": "Last",
194
+ "Previous": "Previous",
195
+ "Next": "Next",
196
+ "Notifications": "Notifications"
185
197
  }