adminizer 4.1.0-build.35 → 4.1.0-build.36

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.
Files changed (30) hide show
  1. package/Readme.md +1 -1
  2. package/assets/{add-VGaP5zEb.js → add-BOMae0jC.js} +1 -1
  3. package/assets/{add-group-CU2zD7To.js → add-group-BHyaFPsj.js} +1 -1
  4. package/assets/{add-user-BkTa9shp.js → add-user-DjT6o3z9.js} +1 -1
  5. package/assets/{app-DVDnphrb.css → app-BrkasjFX.css} +1 -1
  6. package/assets/{app-layout-NY6MXzc5.js → app-layout-BC2Dk0GE.js} +1 -1
  7. package/assets/{app-shell-BjaxjNs9.js → app-shell-jCQ5EbpR.js} +1 -1
  8. package/assets/{app-sidebar-header-5IaQpngt.js → app-sidebar-header-BcGzUtnn.js} +1 -1
  9. package/assets/{app-sidebar-CLu13Pcu.js → app-sidebar-wFqi5-7E.js} +1 -1
  10. package/assets/app.js +2 -2
  11. package/assets/{catalog-C88wv-rq.js → catalog-DGH9s-S8.js} +1 -1
  12. package/assets/{dashboard-DKUwxgt4.js → dashboard-DFn55U5H.js} +1 -1
  13. package/assets/field-renderer-zGC76llY.js +1 -1
  14. package/assets/{form-BMth9K43.js → form-B9sI77wk.js} +1 -1
  15. package/assets/{home-lYdYhEcS.js → home-BmydIqzz.js} +2 -2
  16. package/assets/{list-B-EsqncQ.js → list-Dy_nWfcN.js} +1 -1
  17. package/assets/manifest.json +58 -58
  18. package/assets/{module-CsWq478Z.js → module-UO5sAKpW.js} +1 -1
  19. package/assets/{nav-footer-Vm24wf5X.js → nav-footer-_TcxXo9x.js} +1 -1
  20. package/assets/nav-main-DPeRWb5e.js +1 -0
  21. package/assets/{nav-user-DgYX0wO7.js → nav-user-G2BeH6Uu.js} +1 -1
  22. package/assets/{sidebar-DGp3i7GG.js → sidebar-CkxHTDia.js} +1 -1
  23. package/assets/{welcome-C9BMKsoY.js → welcome-Dh8vAafD.js} +1 -1
  24. package/helpers/menuHelper.d.ts +4 -0
  25. package/helpers/menuHelper.js +4 -2
  26. package/interfaces/adminpanelConfig.d.ts +8 -0
  27. package/package.json +1 -1
  28. package/system/bindInertia.js +6 -2
  29. package/system/defaults.js +8 -2
  30. package/assets/nav-main-JVt9gzn8.js +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.1.0-build.35",
4
+ "version": "4.1.0-build.36",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "vitest --reporter verbose",
@@ -113,7 +113,7 @@ export function bindInertia(adminizer) {
113
113
  title: menuHelper.getBrandTitle(),
114
114
  brand: menuHelper.getBrandTitle(),
115
115
  logout: menuHelper.getLogoutUrl(),
116
- logoutBtn: req.user?.locale == 'ru' ? 'Выход' : "Log out",
116
+ logoutBtn: req.i18n.__("Log out"),
117
117
  section: req.user ? [
118
118
  {
119
119
  title: req.i18n.__("Adminpanel"),
@@ -121,7 +121,11 @@ export function bindInertia(adminizer) {
121
121
  link: req.adminizer.config.routePrefix,
122
122
  icon: "rocket_launch",
123
123
  },
124
- ...(req.adminizer.configHelper.getConfig().sections)
124
+ ...((req.adminizer.configHelper.getConfig().sections || [])
125
+ .map((sec) => ({
126
+ ...sec,
127
+ title: req.i18n.__(sec.title),
128
+ })))
125
129
  ] : null,
126
130
  showVersion: req.adminizer.config.showVersion ?? false
127
131
  });
@@ -30,9 +30,12 @@ let adminpanelConfig = {
30
30
  */
31
31
  models: {
32
32
  UserAP: {
33
- title: "Users AP",
33
+ title: "Users",
34
34
  model: "userap",
35
35
  icon: "people",
36
+ navbar: {
37
+ section: "System"
38
+ },
36
39
  add: {
37
40
  controller: "../controllers/addUser"
38
41
  },
@@ -72,9 +75,12 @@ let adminpanelConfig = {
72
75
  }
73
76
  },
74
77
  GroupAP: {
75
- title: "Groups AP",
78
+ title: "Groups",
76
79
  model: "groupap",
77
80
  icon: "group_add",
81
+ navbar: {
82
+ section: "System"
83
+ },
78
84
  add: {
79
85
  controller: "../controllers/addGroup"
80
86
  },
@@ -1 +0,0 @@
1
- import{r as i,j as t,q as L,J as M}from"./app.js";import{c as v}from"./compiler-runtime-Cj7rbuyn.js";import{f as w,h as E,c as D,i as B,j as G,n as z,k as F,e as I}from"./sidebar-DGp3i7GG.js";import C from"./material-icon-BAd3Wrgn.js";import{j as q,i as J,c as Q}from"./index-BCpOvf4m.js";import{c as U,a as H}from"./index-Cq31rrfZ.js";import{u as W}from"./index-DU8vYhyh.js";import{P as y}from"./index-DN1K56yz.js";import{P as K}from"./index-lqMxC6QB.js";import{C as V}from"./chevron-right-D5q8rF7h.js";var N="Collapsible",[X,me]=U(N),[Y,R]=X(N),A=i.forwardRef((o,e)=>{const{__scopeCollapsible:n,open:s,defaultOpen:r,disabled:c,onOpenChange:p,...h}=o,[d,u]=q({prop:s,defaultProp:r??!1,onChange:p,caller:N});return t.jsx(Y,{scope:n,disabled:c,contentId:J(),open:d,onOpenToggle:i.useCallback(()=>u(f=>!f),[u]),children:t.jsx(y.div,{"data-state":_(d),"data-disabled":c?"":void 0,...h,ref:e})})});A.displayName=N;var O="CollapsibleTrigger",$=i.forwardRef((o,e)=>{const{__scopeCollapsible:n,...s}=o,r=R(O,n);return t.jsx(y.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":_(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:e,onClick:Q(o.onClick,r.onOpenToggle)})});$.displayName=O;var S="CollapsibleContent",T=i.forwardRef((o,e)=>{const{forceMount:n,...s}=o,r=R(S,o.__scopeCollapsible);return t.jsx(K,{present:n||r.open,children:({present:c})=>t.jsx(Z,{...s,ref:e,present:c})})});T.displayName=S;var Z=i.forwardRef((o,e)=>{const{__scopeCollapsible:n,present:s,children:r,...c}=o,p=R(S,n),[h,d]=i.useState(s),u=i.useRef(null),f=W(e,u),j=i.useRef(0),a=j.current,m=i.useRef(0),b=m.current,l=p.open||h,P=i.useRef(l),g=i.useRef(void 0);return i.useEffect(()=>{const x=requestAnimationFrame(()=>P.current=!1);return()=>cancelAnimationFrame(x)},[]),H(()=>{const x=u.current;if(x){g.current=g.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const k=x.getBoundingClientRect();j.current=k.height,m.current=k.width,P.current||(x.style.transitionDuration=g.current.transitionDuration,x.style.animationName=g.current.animationName),d(s)}},[p.open,s]),t.jsx(y.div,{"data-state":_(p.open),"data-disabled":p.disabled?"":void 0,id:p.contentId,hidden:!l,...c,ref:f,style:{"--radix-collapsible-content-height":a?`${a}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...o.style},children:l&&r})});function _(o){return o?"open":"closed"}var ee=A;function te(o){const e=v.c(4);let n;e[0]!==o?({...n}=o,e[0]=o,e[1]=n):n=e[1];let s;return e[2]!==n?(s=t.jsx(ee,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=s):s=e[3],s}function ne(o){const e=v.c(4);let n;e[0]!==o?({...n}=o,e[0]=o,e[1]=n):n=e[1];let s;return e[2]!==n?(s=t.jsx($,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=s):s=e[3],s}function se(o){const e=v.c(4);let n;e[0]!==o?({...n}=o,e[0]=o,e[1]=n):n=e[1];let s;return e[2]!==n?(s=t.jsx(T,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=s):s=e[3],s}function oe(o){const e=v.c(10),{items:n}=o;let s;e[0]!==n?(s=n===void 0?[]:n,e[0]=n,e[1]=s):s=e[1];const r=s,c=L(),p=ae;let h;e[2]!==c?(h=a=>{const m=p(c.url),b=p(a);return m===b||m.startsWith(`${b}/`)},e[2]=c,e[3]=h):h=e[3];const d=h;let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(z,{children:"Platform"}),e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==r?(f=r&&r.map(a=>{var m,b;return((m=a.actions)==null?void 0:m.length)>0?t.jsx(te,{asChild:!0,defaultOpen:d(a.link),className:"group/collapsible",children:t.jsxs(w,{children:[t.jsx(ne,{asChild:!0,children:t.jsxs(E,{tooltip:a.title,children:[t.jsx(C,{name:a.icon,className:"!text-[18px]"}),t.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:a.title}),t.jsx(V,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),t.jsx(se,{children:t.jsx(D,{children:(b=a.actions)==null?void 0:b.map(l=>t.jsx(B,{children:t.jsx(G,{asChild:!0,isActive:d(l.link),children:l.type==="blank"?t.jsxs("a",{href:l.link,target:"_blank",rel:"noopener noreferrer",children:[l.icon&&t.jsx(C,{name:l.icon,className:"!text-[18px]"}),t.jsx("span",{children:l.title})]}):t.jsxs(M,{href:l.link,children:[l.icon&&t.jsx(C,{name:l.icon,className:"!text-[18px]"}),t.jsx("span",{children:l.title})]})})},l.id))})})]})},a.title):t.jsx(w,{children:t.jsx(E,{asChild:!0,isActive:d(a.link),tooltip:{children:a.title},children:a.type==="blank"?t.jsxs("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:[a.icon&&t.jsx(C,{name:a.icon,className:"!text-[18px]"}),t.jsx("span",{children:a.title})]}):t.jsxs(M,{href:a.link,children:[a.icon&&t.jsx(C,{name:a.icon,className:"!text-[18px]"}),t.jsx("span",{children:a.title})]})})},a.title)}),e[5]=d,e[6]=r,e[7]=f):f=e[7];let j;return e[8]!==f?(j=t.jsxs(F,{className:"px-2 py-0",children:[u,t.jsx(I,{children:f})]}),e[8]=f,e[9]=j):j=e[9],j}function ae(o){return o.split("?")[0].replace(/\/$/,"")}const be=Object.freeze(Object.defineProperty({__proto__:null,NavMain:oe},Symbol.toStringTag,{value:"Module"}));export{T as C,oe as N,A as a,ne as b,be as n};