adminizer 5.0.0-build.16 → 5.0.0-build.17
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/{add-8ZSNOr7N.js → add-Cuxi35EK.js} +1 -1
- package/assets/{add-group-B_uA0tzj.js → add-group-ByLLDf_E.js} +1 -1
- package/assets/{add-user-I7vMynON.js → add-user-CkmT3PMT.js} +1 -1
- package/assets/ai-assistant/agent.es.js +5252 -5018
- package/assets/app.js +15 -15
- package/assets/asmcrypto-DZeQH0LC.js +1 -0
- package/assets/{catalog-CaD8KUrI.js → catalog-A2JXLOqL.js} +1 -1
- package/assets/controls/ckeditor.es.js +2407 -2393
- package/assets/controls/jsoneditor.es.js +4 -4
- package/assets/{dashboard-CcFy7tIQ.js → dashboard-Dv9lzLtL.js} +1 -1
- package/assets/{history--N6wJPNh.js → history-D7FM_eNr.js} +1 -1
- package/assets/{list-BjZKc-qN.js → list-BmoLVCUE.js} +1 -1
- package/assets/login-Cenu5F6t.js +1 -0
- package/assets/manifest.json +35 -26
- package/assets/{media-manager-CHrLjpDc.js → media-manager-CNfKCE87.js} +1 -1
- package/assets/{module-8RTI1lSc.js → module-NlKWOaeV.js} +1 -1
- package/assets/{notification-DgDugJiC.js → notification-BZe5IRJT.js} +1 -1
- package/assets/{user-filters-list-DWi3LKeJ.js → user-filters-list-BtB906Lt.js} +1 -1
- package/assets/{welcome-DAsG_4yV.js → welcome-CMq7mAP5.js} +1 -1
- package/assets/{with-app-layout-hxawi4w0.js → with-app-layout-BNwvJ3R-.js} +1 -1
- package/package.json +2 -1
- package/assets/login-TJqrgvWB.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e,r as a,t,j as r,v as c,A as u}from"./app.js";import{w as p}from"./with-app-layout-
|
|
1
|
+
import{u as e,r as a,t,j as r,v as c,A as u}from"./app.js";import{w as p}from"./with-app-layout-BNwvJ3R-.js";import"./use-appearance-_EbbjHTh.js";const f=[];function n(){const o=e();return a.useEffect(()=>{const s=o.props.flash;s&&(s.success&&t.success(s.success),s.error&&t.error(s.error))},[o.props.flash]),r.jsxs(r.Fragment,{children:[r.jsx(c,{position:"top-center",richColors:!0,closeButton:!0}),r.jsx(u,{page:o,catalog:!1})]})}const d=p(n,{breadcrumbs:f,className:"overflow-auto h-[calc(100svh-16px)]"});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as E,a as I,r as p,j as e,B as f,L as S,I as C,M as A,b as w,c as b,d as N,C as O,T as R,e as z,f as B,g as D,h as M,P as G,i as q,k as U,l as H}from"./app.js";import{w as J}from"./with-app-layout-
|
|
1
|
+
import{u as E,a as I,r as p,j as e,B as f,L as S,I as C,M as A,b as w,c as b,d as N,C as O,T as R,e as z,f as B,g as D,h as M,P as G,i as q,k as U,l as H}from"./app.js";import{w as J}from"./with-app-layout-BNwvJ3R-.js";import"./use-appearance-_EbbjHTh.js";const v=p.memo(({field:s,disabled:c,value:d,onCheckedChange:m,tooltip:i})=>{const x=p.useCallback(h=>{m(s.name,h)},[s.name,m]);return e.jsxs("div",{className:"flex gap-3 items-center",children:[e.jsx(O,{id:s.name,className:"cursor-pointer size-5",disabled:c,checked:d,onCheckedChange:x}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(b,{className:"cursor-pointer",htmlFor:s.name,children:s.label}),i&&e.jsx(R,{children:e.jsxs(z,{children:[e.jsx(B,{onClick:h=>h.preventDefault(),children:e.jsx(C,{iconNode:D,className:"text-primary w-5 h-5 cursor-pointer"})}),e.jsx(M,{align:"center",side:"top",children:e.jsx("p",{children:s.tooltip})})]})})]})]})}),_=p.memo(({field:s,disabled:c,value:d,onCheckedChange:m,onRightsChange:i})=>{const x=s.options?.permissionOptions,[h,k]=p.useState(!1),[o,r]=p.useState(null),[l,g]=p.useState(!1),[t,a]=p.useState(null);if(!x)return e.jsx(v,{field:s,disabled:c,value:d,onCheckedChange:m,tooltip:!0});const y=`token-record-rights-${s.name.slice(15)}`,j=x.rights,F=async()=>{if(!(o||l)){g(!0),a(null);try{const n=s.name.slice(15),u=await H.getJson(`${window.routePrefix}/access-rights/permission-options`,{params:{tokenId:n}});r(u.data.options)}catch{a("Не удалось загрузить варианты разрешения")}finally{g(!1)}}},T=n=>{k(n),n&&F()},$=(n,u)=>{const L=u===!0?Array.from(new Set([...j,n])):j.filter(P=>P!==n);i(y,L)};return e.jsxs("div",{className:"grid gap-2",children:[e.jsx(v,{field:s,disabled:c,value:d,onCheckedChange:m,tooltip:!0}),d&&e.jsxs(G,{open:h,onOpenChange:T,children:[e.jsx(q,{asChild:!0,children:e.jsxs(f,{type:"button",variant:"outline",size:"sm",className:"w-fit ml-8",disabled:c,children:["Выбрать варианты (",j.length,")"]})}),e.jsxs(U,{align:"start",className:"max-h-80 overflow-y-auto",children:[l&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(w,{className:"size-4 animate-spin"}),"Загрузка…"]}),t&&e.jsx("p",{className:"text-sm text-destructive",children:t}),o?.map(n=>e.jsxs("div",{className:"flex gap-3 items-start py-1",children:[e.jsx(O,{id:`${s.name}-${n.id}`,checked:j.includes(n.id),disabled:c,onCheckedChange:u=>$(n.id,u)}),e.jsxs(b,{className:"cursor-pointer grid gap-0.5",htmlFor:`${s.name}-${n.id}`,children:[e.jsx("span",{children:n.name}),n.description&&e.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:n.description})]})]},n.id)),o?.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Вариантов нет"})]})]})]})});function K(){const s=E(),{fields:c,groupedTokens:d,users:m}=s.props,{data:i,setData:x,clearErrors:h,post:k,processing:o}=I({...Object.fromEntries(c.map(t=>[t.name,t.value])),...Object.fromEntries(m.map(t=>[t.name,t.value])),...Object.fromEntries(d.flatMap(t=>t.fields.flatMap(a=>[[a.name,a.value],...a.options?.permissionOptions?[[`token-record-rights-${a.name.slice(15)}`,a.options.permissionOptions.rights]]:[]])))}),r=t=>s.props.fields.find(a=>a.name===t),l=p.useCallback((t,a)=>{h(),x(t,a)},[]),g=t=>{t.preventDefault(),k(s.props.postLink)};return e.jsxs("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4",children:[e.jsxs("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4",children:[e.jsx(f,{className:"mb-3 w-fit",asChild:!0,children:e.jsxs(S,{href:s.props.btnBack.link,children:[e.jsx(C,{iconNode:A}),s.props.btnBack.title]})}),e.jsxs(f,{variant:"green",type:"submit",className:"w-fit",form:"addUserForm",disabled:o||s.props.view,children:[o&&e.jsx(w,{className:"h-4 w-4 animate-spin"}),s.props.btnSave.title]})]}),e.jsx("form",{id:"addUserForm",onSubmit:g,className:`${s.props.view?"cursor-not-allowed":""}`,children:e.jsxs("div",{className:"flex flex-col gap-6 max-w-[1144px]",children:[e.jsx("h2",{className:"font-bold text-xl",children:s.props.head}),e.jsxs("div",{className:"grid gap-4",children:[e.jsx(b,{htmlFor:r("name")?.name,children:r("name")?.label}),e.jsx(N,{id:r("name")?.name,type:"text",required:!0,tabIndex:1,autoComplete:r("name")?.name,value:i.name,onChange:t=>l("name",t.target.value),disabled:o||s.props.view,placeholder:r("name")?.label})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsx(b,{htmlFor:r("description")?.name,children:r("description")?.label}),e.jsx(N,{id:r("description")?.name,type:"text",required:!0,tabIndex:1,autoComplete:r("description")?.name,value:i.description,onChange:t=>l("description",t.target.value),disabled:o||s.props.view,placeholder:r("description")?.label})]}),s.props.users.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-bold text-xl",children:s.props.userHead}),s.props.users.map(t=>e.jsx(v,{field:t,disabled:o||s.props.view,value:i[t.name],onCheckedChange:l},t.name))]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-4 gap-4",children:s.props.groupedTokens?.length>0&&s.props.groupedTokens.map(t=>e.jsxs("div",{className:"grid gap-4 content-start justify-between",children:[e.jsx("h2",{className:"font-bold text-xl mt-3",children:t.header}),t.fields.map(a=>a.options?.permissionOptions?e.jsx(_,{field:{...a,options:{permissionOptions:{...a.options.permissionOptions,rights:i[`token-record-rights-${a.name.slice(15)}`]}}},disabled:o||s.props.view,value:i[a.name],onCheckedChange:l,onRightsChange:l},a.name):e.jsx(v,{field:a,disabled:o||s.props.view,value:i[a.name],onCheckedChange:l,tooltip:!0},a.name))]},t.header))})]})})]})}const Q=[];function V(){return e.jsx(K,{})}const Z=J(V,{breadcrumbs:Q});export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as B,r as m,a as M,j as e,B as d,L as j,I as f,M as H,b as O,c as n,d as c,S as w,m as b,n as v,o as N,p as y,C as g,T as Y,e as $,f as _,g as G,h as J,q as Q,K as W,s as X,R as Z,l as C,t as h}from"./app.js";import{M as ee,w as se}from"./with-app-layout-
|
|
1
|
+
import{u as B,r as m,a as M,j as e,B as d,L as j,I as f,M as H,b as O,c as n,d as c,S as w,m as b,n as v,o as N,p as y,C as g,T as Y,e as $,f as _,g as G,h as J,q as Q,K as W,s as X,R as Z,l as C,t as h}from"./app.js";import{M as ee,w as se}from"./with-app-layout-BNwvJ3R-.js";import"./use-appearance-_EbbjHTh.js";function ae(){const l=B(),[k,P]=m.useState(),{fields:A,groups:F,auth:I}=l.props,[p,U]=m.useState(!1),[x,z]=m.useState(l.props.apiKey),[K,u]=m.useState(!1),{data:r,setData:S,errors:R,setError:T,clearErrors:L,post:E,processing:i}=M({...Object.fromEntries(A.map(s=>[s.name,s.value])),...Object.fromEntries(F.map(s=>[s.name,s.value]))});m.useEffect(()=>{(async()=>{const o=await C.get(`${window.routePrefix}/get-timezones`);P(o.data.timezones)})()},[]);const a=s=>l.props.fields.find(o=>o.name===s),q=s=>{if(s.preventDefault(),r.userPassword!==r.repeatUserPassword){T("repeatUserPassword",l.props.passwordError);return}E(l.props.postLink)},t=(s,o)=>{L(),S(s,o)},D=async()=>{try{const s=await C.post(`${window.routePrefix}/api/user-key/regenerate`);z(s.data.apiKey),h.success("User API key regenerated")}catch(s){console.error("Failed to regenerate user API key:",s),h.error("Failed to regenerate user API key")}u(!1)},V=async()=>{if(x)try{await navigator.clipboard.writeText(x),h.success("API key copied to clipboard")}catch{h.error("Failed to copy")}};return e.jsxs("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4",children:[e.jsxs("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4",children:[e.jsx(d,{className:"mb-3 w-fit",asChild:!0,children:e.jsxs(j,{href:l.props.btnBack.link,children:[e.jsx(f,{iconNode:H}),l.props.btnBack.title]})}),e.jsxs(d,{variant:"green",type:"submit",className:"w-fit",form:"addUserForm",disabled:i||l.props.view,children:[i&&e.jsx(O,{className:"h-4 w-4 animate-spin"}),l.props.btnSave.title]})]}),e.jsx("form",{id:"addUserForm",onSubmit:q,className:l.props.view?"cursor-not-allowed":"",children:e.jsxs("div",{className:"flex flex-col gap-10 max-w-[1144px]",children:[e.jsx("h2",{className:"font-bold text-xl",children:l.props.head}),e.jsxs("div",{className:"flex-col xl:flex-row flex gap-16",children:[e.jsxs("div",{className:"basis-1/2 flex flex-col gap-6",children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{htmlFor:a("login")?.name,children:a("login")?.label}),e.jsx(c,{id:a("login")?.name,type:"text",required:!0,tabIndex:1,autoComplete:"username",value:r.login,onChange:s=>t("login",s.target.value),disabled:i||l.props.view,placeholder:a("login")?.label})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{htmlFor:a("fullName")?.name,children:a("fullName")?.label}),e.jsx(c,{id:a("fullName")?.name,type:"text",required:!0,tabIndex:1,autoComplete:"additional-name",value:r.fullName,onChange:s=>t("fullName",s.target.value),disabled:i||l.props.view,placeholder:a("fullName")?.label})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{htmlFor:a("email")?.name,children:a("email")?.label}),e.jsx(c,{id:a("email")?.name,type:"email",required:!0,tabIndex:1,autoComplete:"email",value:r.email,onChange:s=>t("email",s.target.value),disabled:i||l.props.view,placeholder:a("email")?.label})]})]}),e.jsxs("div",{className:"basis-1/2 flex flex-col gap-6",children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{htmlFor:a("timezone")?.name,children:a("timezone")?.label}),e.jsxs(w,{onValueChange:s=>t("timezone",s),defaultValue:r.timezone,disabled:i||l.props.view,children:[e.jsx(b,{className:"w-full cursor-pointer",children:e.jsx(v,{placeholder:a("timezone")?.name})}),e.jsx(N,{children:(k??[]).map(s=>e.jsx(y,{value:s.value,children:s.label},s.value))})]})]}),e.jsxs("div",{className:"flex flex-col md:flex-row justify-start gap-4 xl:justify-between items-start md:items-center",children:[a("date")&&e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{htmlFor:a("date")?.name,children:a("date")?.label}),e.jsx(c,{id:a("date")?.name,type:"date",className:"max-w-fit",tabIndex:1,value:r.date,onChange:s=>t("date",s.target.value),disabled:i})]}),e.jsxs("div",{className:"flex gap-6",children:[a("isAdmin")&&e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{className:"cursor-pointer",htmlFor:a("isAdmin")?.name,children:a("isAdmin")?.label}),e.jsx(g,{id:a("isAdmin")?.name,className:"cursor-pointer size-5",disabled:i||l.props.view,checked:r.isAdmin,onCheckedChange:s=>t("isAdmin",s)})]}),a("isConfirmed")&&e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{className:"cursor-pointer",htmlFor:a("isConfirmed")?.name,children:a("isConfirmed")?.label}),e.jsx(g,{id:a("isConfirmed")?.name,className:"cursor-pointer size-5",disabled:i||l.props.view,checked:r.isConfirmed,onCheckedChange:s=>t("isConfirmed",s)})]})]})]}),a("locale")&&e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{htmlFor:a("locale")?.name,children:a("locale")?.label}),e.jsxs(w,{onValueChange:s=>t("locale",s),defaultValue:r.locale,disabled:i||l.props.view,children:[e.jsx(b,{className:"w-full cursor-pointer",children:e.jsx(v,{placeholder:a("locale")?.name})}),e.jsx(N,{children:(l.props.locales??[]).map(s=>e.jsx(y,{value:s.value,children:s.label},s.value))})]})]})]})]}),I.user.isAdministrator&&e.jsx(d,{className:"w-fit",asChild:!0,variant:"outline",children:e.jsxs(j,{href:l.props.userPretend.postLink,method:"post",data:{login:r.login,pretend:!0},children:[e.jsx(ee,{name:"masks",className:"!text-[18px]"}),l.props.userPretend.label]})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("label",{className:"font-bold text-xl",children:a("userPassword")?.label}),e.jsx(Y,{children:e.jsxs($,{children:[e.jsx(_,{onClick:s=>s.preventDefault(),children:e.jsx(f,{iconNode:G,className:"text-primary w-5 h-5 cursor-pointer"})}),e.jsx(J,{align:"center",side:"top",children:e.jsx("p",{children:a("userPassword")?.tooltip})})]})})]}),e.jsxs("div",{className:"grid grid-col-1 lg:grid-cols-2 grid-rows-2 gap-x-16 gap-y-6",children:[e.jsxs("div",{className:"grid gap-4 col-span-1",children:[e.jsx(n,{htmlFor:a("userPassword")?.name,children:a("userPassword")?.label}),e.jsx(c,{id:a("userPassword")?.name,type:"password",required:!l.props.edit,tabIndex:1,autoComplete:"new-password",value:r.password,onChange:s=>t("userPassword",s.target.value),disabled:i||l.props.view,placeholder:a("userPassword")?.label})]}),e.jsxs("div",{className:"grid gap-4 col-span-1 col-start-1",children:[e.jsx(n,{htmlFor:a("repeatUserPassword")?.name,children:a("repeatUserPassword")?.label}),e.jsx(c,{id:a("repeatUserPassword")?.name,type:"password",required:!l.props.edit,tabIndex:1,autoComplete:"new-password",value:r.repeatUserPassword,onChange:s=>t("repeatUserPassword",s.target.value),disabled:i||l.props.view,placeholder:a("repeatUserPassword")?.label}),e.jsx(Q,{message:R.repeatUserPassword})]})]}),l.props.groups.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-bold text-xl",children:l.props.groupHead}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-5 xl:grid-cols-6 gap-4",children:l.props.groups.map(s=>e.jsxs("div",{className:"grid gap-4",children:[e.jsx(n,{className:"cursor-pointer",htmlFor:s.name,children:s.label}),e.jsx(g,{id:s.name,disabled:i||l.props.view,className:"cursor-pointer size-5",checked:r[s.name],onCheckedChange:o=>t(s.name,o)})]},s.name))})]}),l.props.edit&&!l.props.view&&e.jsxs(e.Fragment,{children:[e.jsxs("h2",{className:"font-bold text-xl flex items-center gap-2",children:[e.jsx(W,{className:"w-5 h-5"}),"User API Key (for feeds)"]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[x&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 text-sm bg-muted px-3 py-2 rounded font-mono truncate",children:p?x:"••••••••••••••••••••••••"}),e.jsx(d,{variant:"outline",size:"sm",type:"button",onClick:()=>U(!p),children:p?"Hide":"Show"}),p&&e.jsx(d,{variant:"outline",size:"sm",type:"button",onClick:V,children:e.jsx(X,{className:"w-4 h-4"})})]}),e.jsxs(d,{variant:"outline",size:"sm",type:"button",className:"w-fit",onClick:()=>u(!0),children:[e.jsx(Z,{className:"w-4 h-4 mr-2"}),"Regenerate User API Key"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Regenerating this key will invalidate all existing feed URLs. You will need to update the ",e.jsx("code",{className:"bg-muted px-1 text-xs",children:"?userKey="})," parameter in all feed links."]})]})]}),K&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsxs("div",{className:"bg-background rounded-lg shadow-lg max-w-md w-full p-6",children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Regenerate User API Key"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"This will invalidate all existing feed URLs. You will need to update them with the new userKey."}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(d,{variant:"outline",type:"button",onClick:()=>u(!1),children:"Cancel"}),e.jsx(d,{variant:"destructive",type:"button",onClick:D,children:"Regenerate"})]})]})})]})})]})}const le=[];function re(){return e.jsx(ae,{})}const de=se(re,{breadcrumbs:le});export{de as default};
|