UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

1 lines 1.78 kB
import{Pn as e,fn as t}from"./ErrorBlock-CuwX01Wv.js";import{D as n,F as r}from"./web-BWdORzMO.js";import{t as i}from"./userStore-BExk_Pfb.js";import{t as a}from"./permissions-kIH5Rv10.js";import{t as o}from"./Layout-4UKP18vE.js";import{C as s,D as c,E as l,S as u}from"./publish-operations-D4J5WbXS.js";import{n as d,r as f}from"./Content-DzC1IbOX.js";import{t as p}from"./Standard-D4PJGqo4.js";import"./Headers-CX-ZCzBz.js";import{t as m}from"./Row-DCxdbdkd.js";var h=()=>{let h=e(),g=u({mode:`url`,schema:{filters:{name:c(),description:c(),locked:s(),createdAt:c(),updatedAt:c()},sorts:{name:l(),createdAt:l()}},options:{singleSort:!0}}),[_,v]=r(!1);return n(o,{get slots(){return{header:n(p,{get copy(){return{title:t()(`routes.roles.title`),description:t()(`routes.roles.description`)}},get actions(){return{create:[{open:_(),setOpen:v,permission:i.get.hasPermission([a.RolesCreate]).all,label:t()(a.RolesCreate)}],contentLocale:!0}},get slots(){return{bottom:n(m,{searchParams:g,onRefresh:()=>{h.invalidateQueries({queryKey:[`roles.getMultiple`]})},get filterSection(){return{subject:t()(`routes.roles.title`),fields:[{label:t()(`common.name`),key:`name`,type:`text`},{label:t()(`common.description`),key:`description`,type:`text`},{label:t()(`common.status`),key:`locked`,type:`checkbox`,trueLabel:t()(`common.status.locked`),falseLabel:t()(`common.status.unlocked`)},{label:t()(`common.created.at`),key:`createdAt`,type:`datetime`},{label:t()(`common.updated.at`),key:`updatedAt`,type:`datetime`}]}},get sorts(){return[{label:t()(`common.name`),key:`name`},{label:t()(`common.created.at`),key:`createdAt`}]},perPage:[]})}}})}},get children(){return[n(d,{state:{searchParams:g,setOpenCreateRolePanel:v}}),n(f,{get state(){return{open:_(),setOpen:v}}})]}})};export{h as default};