UNPKG

@lucidcms/core

Version:

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

1 lines 2.88 kB
import{Pn as e,fn as t,m as n,o as r}from"./ErrorBlock-CuwX01Wv.js";import{D as i,F as a,j as o,m as s,s as c}from"./web-BWdORzMO.js";import{t as l}from"./userStore-BExk_Pfb.js";import{t as u}from"./permissions-kIH5Rv10.js";import{o as d,t as f}from"./Layout-4UKP18vE.js";import{C as p,D as m,E as h,S as g}from"./publish-operations-D4J5WbXS.js";import{h as _}from"./Content-DzC1IbOX.js";import{n as v}from"./Standard-D4PJGqo4.js";import{t as y}from"./Row-DCxdbdkd.js";import{t as b}from"./SystemSettingsHeader-C24lRDIL.js";var x=s(`<div class="-mx-4 overflow-hidden">`),S=()=>{let s=e(),S=g({mode:`url`,schema:{filters:{key:m(),name:m(),description:m(),enabled:p(),scope:m(),lastUsedAt:m(),lastUsedIp:m(),createdAt:m(),updatedAt:m()},sorts:{name:h(),description:h(),enabled:h(),createdAt:h()}},options:{singleSort:!0}}),[C,w]=a(!1),T=o(()=>l.get.hasPermission([u.IntegrationsCreate]).all),E=r.clientIntegrations.useGetScopes({queryParams:{}}),D=o(()=>(E.data?.data??[]).flatMap(e=>e.scopes.map(r=>{let i=n.getLocaleValue({value:e.details.name}),a=n.getLocaleValue({value:r.details.name});return{value:r.key,label:t()(`client.scopes.option.label`,{group:i,scope:a})}})));return i(f,{get slots(){return{header:i(b,{get actions(){return{create:[{open:C(),setOpen:w,permission:T(),label:t()(`client.integrations.create.action`)}]}}})}},get children(){return i(d,{options:{padding:`24`},get children(){return i(v.Root,{get title(){return t()(`client.integrations.manage.title`)},get description(){return t()(`routes.system.client.integrations.description`)},get children(){return i(v.Content,{get children(){var e=x();return c(e,i(y,{searchParams:S,onRefresh:()=>{s.invalidateQueries({queryKey:[`clientIntegrations.getAll`]})},get filterSection(){return{subject:t()(`client.integrations.manage.title`),fields:[{label:t()(`common.name`),key:`name`,type:`text`},{label:t()(`common.key`),key:`key`,type:`text`},{label:t()(`common.description`),key:`description`,type:`text`},{label:t()(`common.status.active`),key:`enabled`,type:`checkbox`,trueLabel:t()(`common.status.active`),falseLabel:t()(`common.status.inactive`)},{label:t()(`common.scopes`),key:`scope`,type:`select`,options:D(),operators:[`=`]},{label:t()(`common.last.used.at`),key:`lastUsedAt`,type:`datetime`},{label:t()(`client.integrations.last.used.ip`),key:`lastUsedIp`,type:`text`},{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.description`),key:`description`},{label:t()(`common.status.active`),key:`enabled`},{label:t()(`common.created.at`),key:`createdAt`}]},perPage:[],options:{padding:`16`}}),null),c(e,i(_,{state:{searchParams:S,openCreateClientIntegrationPanel:C,setOpenCreateClientIntegrationPanel:w}}),null),e}})}})}})}})};export{S as default};