PageSourceSearch

https://www.matb3aa.com/build/assets/outgoing-email-log-datatable-DhkUhReE.js

js matb3aa.com collected 2026-10-02 23:44:48 UTC 5,220 bytes, 2 lines download raw bytes

1import{a as g,b as c,u,j as e,Z as p,_ as x,T as t,q as h,$ as j,au as b,ci as y,a6 as f,D,a5 as w,Q as S,bu as v,a8 as C}from"./main-C5FkkY_k.js";import{d as P}from"./download-file-from-url-BVaKcxRP.js";import{u as T}from"./use-rerurun-scheduled-command-C5h1TC-Q.js";import{N as I}from"./name-with-avatar-DNRyiWzy.js";import{V as E}from"./Visibility-BQbjQ7q2.js";import{u as k,a as N,G as L,D as F,b as _,c as B}from"./use-datatable-query-BI9K8ZK8.js";import{D as H}from"./data-table-add-item-button-CzJX6__q.js";import{a as q,b as Q,c as W}from"./datatable-page-with-header-layout-tujT8rxt.js";import{T as z}from"./table-AkiYA7bp.js";import{D as A}from"./Download-DNYejRQX.js";import"./vendor-sentry-CSC1LWfl.js";import"./paginated-resources-D_biNLoM.js";import"./FilterAlt-DfstoAgG.js";import"./form-normalized-model-chip-field-DOi_2WNM.js";import"./use-normalized-models-ufWmut2A.js";import"./form-chip-field-DsBgpKDZ.js";import"./input-CwiD8Fi7.js";import"./chip-list-C58gjOgx.js";import"./accordion-jJCealvW.js";import"./checkbox-CiikQ2cF.js";import"./CheckBoxOutlineBlank-DMAPH2Dc.js";import"./ArrowRightAlt-CLOatDOs.js";import"./DateRange-CIdah-uB.js";import"./use-base-date-picker-state-8inmGh_Q.js";import"./use-date-formatter--8V5WNXd.js";import"./DateFormatter-Dix9bfnP.js";import"./KeyboardArrowRight-Do1AjPm4.js";import"./use-date-range-picker-state-CxMYlLZ0.js";import"./list-Ccp63_MN.js";import"./switch-NFMJX3UN.js";import"./formatted-date-BpcEwh-U.js";import"./dialog-footer-CEIAfWBF.js";import"./is-tablet-media-query-BeAg7Y3K.js";import"./use-current-date-time-BZoeB9pr.js";import"./select-C-cHqIfk.js";import"./combobox-end-adornment-Cpux3d2E.js";import"./normalized-model-field-A9yRlSmc.js";import"./Edit-CgZvPjEI.js";import"./skeleton-zInX5rkk.js";import"./Add-ByA27rVt.js";import"./dashboard-layout-context-DrSYpHZQ.js";import"./ArrowDownward-BEHIu2On.js";import"./useInteractOutside-oPUBaUZg.js";import"./useEffectEvent-CHDbs1OK.js";import"./is-ctrl-or-shift-pressed-DLBHnC6T.js";import"./use-pointer-events-P0JxxBzZ.js";import"./useGlobalListeners-CFjvE546.js";const M=""+new URL("opened-D9TOlgf-.svg",import.meta.url).href;function O(a){return g({queryKey:["logs/outgoing-email",a],queryFn:()=>R(a)})}function R(a){return c.get(`logs/outgoing-email/${a}`).then(o=>o.data)}function $({logItemId:a}){const{data:o}=O(a),{base_url:s}=u();return e.jsxs(p,{size:"fullscreen",children:[e.jsx(x,{showDivider:!0,padding:"px-24 py-10",actions:e.jsx(h,{variant:"outline",size:"xs",disabled:!o,type:"button",onClick:o?()=>P(`${s}/api/v1/logs/outgoing-email/${a}/download`):void 0,children:e.jsx(t,{message:"Download"})}),children:e.jsx(t,{message:"Email preview"})}),e.jsx(j,{children:o?e.jsx("iframe",{srcDoc:o.logItem.parsed_message.body.html,className:"h-max w-full border-none",onLoad:n=>{const r=n.target;r.style.height=r.contentWindow.document.body.scrollHeight+"px"}}):e.jsx("div",{className:"flex min-h-200 items-center justify-center",children:e.jsx(b,{isIndeterminate:!0})})})]})}const V=[{key:"message_id",allowsSorting:!0,visibleInMode:"all",width:"flex-3 min-w-200",header:()=>e.jsx(t,{message:"Subject"}),body:a=>e.jsx(I,{label:a.subject,description:a.message_id})},{key:"status",allowsSorting:!0,header:()=>e.jsx(t,{message:"Status"}),body:a=>{switch(a.status){case"sent":return e.jsx(l,{color:"positive",children:e.jsx(t,{message:"Sent"})});case"not-sent":return e.jsx(l,{color:void 0,children:e.jsx(t,{message:"Not sent"})});case"error":return e.jsx(l,{color:"danger",children:e.jsx(t,{message:"Error"})})}}},{key:"from",allowsSorting:!0,header:()=>e.jsx(t,{message:"From"}),body:a=>a.from},{key:"to",allowsSorting:!0,header:()=>e.jsx(t,{message:"To"}),body:a=>a.to},{key:"created_at",allowsSorting:!0,header:()=>e.jsx(t,{message:"Date"}),body:a=>e.jsx(y,{date:a.created_at})},{key:"actions",header:()=>e.jsx(t,{message:"Actions"}),hideHeader:!0,align:"end",width:"w-42 flex-shrink-0",visibleInMode:"all",body:a=>e.jsx(G,{item:a})}];function G({item:a}){const o=T();return e.jsxs(D,{type:"modal",children:[e.jsx(w,{label:e.jsx(t,{message:"Preview"}),children:e.jsx(S,{size:"md",className:"text-muted",disabled:o.isPending,onClick:()=>{o.mutate({id:a.id})},children:e.jsx(E,{})})}),e.jsx($,{logItemId:a.id})]})}function l({color:a,children:o}){return e.jsx(f,{color:a,size:"xs",className:"w-max min-w-50 text-center",children:o})}function Ae(){const{searchParams:a,sortDescriptor:o,mergeIntoSearchParams:s,setSearchQuery:n,isFiltering:r}=k(C),i=N({...v.logs.email(a)}
1),d=e.jsx(H,{elementType:"a",href:"api/v1/logs/outgoing-email/download",download:!0,icon:e.jsx(A,{}),children:e.jsx(t,{message:"Download log"})});return e.jsxs(q,{children:[e.jsx(L,{query:i}),e.jsxs(Q,{children:[e.jsx(F,{searchValue:a.query,onSearchChange:n,actions:d}),e.jsxs(W,{children:[e.jsx(z,{columns:V,data:i.items,sortDescriptor:o,onSortChange:s,enableSelection:!1}),i.isEmpty&&e.jsx(_,{isFiltering:r,image:M,title:e.jsx(t,{message:"No outgoing emails have been logged yet"}),filteringTitle:e.jsx(t,{message:"No matching emails"})}),e.jsx(B,{query:i,onPageChange:m=>s({page:m}),onPerPageChange:m=>s({perPage:m})})]})]})]})}export{Ae as Component};
2//# sourceMappingURL=outgoing-email-log-datatable-DhkUhReE.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.