@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 2.67 kB
JavaScript
import{Pn as e,fn as t}from"./ErrorBlock-CuwX01Wv.js";import{D as n}from"./web-BWdORzMO.js";import{t as r}from"./Layout-4UKP18vE.js";import{D as i,E as a,S as o,w as s}from"./publish-operations-D4J5WbXS.js";import{l as c}from"./Content-DzC1IbOX.js";import{t as l}from"./Standard-D4PJGqo4.js";import"./Headers-CX-ZCzBz.js";import{t as u}from"./Row-DCxdbdkd.js";var d=()=>{let d=e(),f=o({mode:`url`,schema:{filters:{fromAddress:i(),toAddress:i(),subject:i(),template:i(),currentStatus:i(),type:i(),priority:i(),attemptCount:s(),lastAttemptedAt:i(),createdAt:i(),updatedAt:i()},sorts:{createdAt:a({defaultValue:`desc`}),lastAttemptedAt:a(),attemptCount:a()}},options:{singleSort:!0}});return n(r,{get slots(){return{header:n(l,{get copy(){return{title:t()(`routes.email.title`),description:t()(`routes.email.description`)}},get slots(){return{bottom:n(u,{searchParams:f,onRefresh:()=>{d.invalidateQueries({queryKey:[`email.getMultiple`]})},get filterSection(){return{subject:t()(`routes.email.title`),fields:[{label:t()(`common.from`),key:`fromAddress`,type:`text`},{label:t()(`common.to`),key:`toAddress`,type:`text`},{label:t()(`common.subject`),key:`subject`,type:`text`},{label:t()(`email.templates.singular`),key:`template`,type:`text`},{label:t()(`common.status`),key:`currentStatus`,type:`select`,options:[{label:t()(`common.status.sent`),value:`sent`},{label:t()(`common.status.delivered`),value:`delivered`},{label:t()(`common.status.failed`),value:`failed`},{label:t()(`common.status.delayed`),value:`delayed`},{label:t()(`common.status.complained`),value:`complained`},{label:t()(`common.status.bounced`),value:`bounced`},{label:t()(`common.status.clicked`),value:`clicked`},{label:t()(`common.status.opened`),value:`opened`},{label:t()(`common.status.scheduled`),value:`scheduled`}]},{label:t()(`common.type`),key:`type`,type:`select`,options:[{label:t()(`common.internal`),value:`internal`},{label:t()(`common.external`),value:`external`}]},{label:t()(`common.priority`),key:`priority`,type:`select`,options:[{label:`Low`,value:`low`},{label:`Normal`,value:`normal`},{label:`High`,value:`high`}]},{label:t()(`common.attempt.count`),key:`attemptCount`,type:`number`},{label:t()(`common.last.attempt.at`),key:`lastAttemptedAt`,type:`datetime`},{label:t()(`common.created.at`),key:`createdAt`,type:`datetime`},{label:t()(`common.updated.at`),key:`updatedAt`,type:`datetime`}]}},get sorts(){return[{label:t()(`common.attempt.count`),key:`attemptCount`},{label:t()(`common.last.attempt.at`),key:`lastAttemptedAt`},{label:t()(`common.created.at`),key:`createdAt`}]},perPage:[]})}}})}},get children(){return n(c,{state:{searchParams:f}})}})};export{d as default};