PageSourceSearch

https://app.searchpilot.com/assets/vite/PublishCompareV3App-o8MMvVxE.js

js searchpilot.com collected 2026-09-24 17:41:45 UTC 6,415 bytes, 2 lines download raw bytes

1import{j as e,a$ as o,b0 as l,A as d}from"./root-C9LVyve2.js";import{u as m}from"./useSuspenseQuery-Cdwzuijc.js";import{g as c}from"./RouterProvider-BasQyeSe.js";import{T as h,H as u}from"./index-BbbtkjlU.js";import{D as b}from"./Diff-CfHW4k5M.js";import{f as t}from"./format-DUiBe8lm.js";import"./queryOptions-BQvTFV_-.js";import"./useMutation-CBnyrxiv.js";import"./hooks-Dmcz0DDD.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"distillery-frontend"};var i=new r.Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="ab8b9a36-f416-4b94-af91-e1fe50c0a60a",r._sentryDebugIdIdentifier="sentry-dbid-ab8b9a36-f416-4b94-af91-e1fe50c0a60a")}catch{}})();const n=c("/$accountSlug/publish/compare"),P=()=>{const r=n.useParams(),i=n.useLoaderDeps(),{data:s}=m(h({...r,...i}));return e.jsxs(e.Fragment,{children:[e.jsx(u,{children:e.jsx("title",{children:"View Publish History Comparison | SearchPilot"})}),e.jsxs(o,{children:[e.jsx(l,{label:s.account.name,href:`/${s.account.slug}/dashboard/`}),e.jsx(l,{label:"Compare Publish History",href:"",currentCrumb:!0})]}),e.jsx("main",{className:"ml-auto w-full grow",children:e.jsxs("div",{className:"mx-auto mt-5 max-w-7xl px-12",children:[e.jsx("section",{className:"my-5",children:e.jsx("div",{className:"rounded-md bg-white p-4 shadow",children:e.jsx("form",{children:e.jsx("div",{className:"px-2",children:e.jsxs("div",{className:"-mx-2 flex items-center",children:[e.jsx("div",{className:"w-4/5 px-2",children:e.jsx("div",{className:"input-group",children:e.jsxs("select",{className:"form-select focus:ring-blue block w-full rounded-md border border-gray-300 bg-white px-3 py-0 py-2 text-sm leading-5 text-black shadow-sm transition duration-150 ease-in-out focus:border-blue-300 focus:outline-none",id:"comparison-dropdown",name:"before_publish",children:[e.jsxs("option",{value:s.beforePublish.id,children:[s.beforePublish.version.toString().padStart(3,"0"),":"," ",t(s.beforePublish.publishDate,"eee do MMM yy hh:mm aaaa")]}),s.publishes.filter(a=>a.id!==s.beforePublish.id).map(a=>e.jsxs("option",{value:a.id,children:[a.version.toString().padStart(3,"0"),":",t(a.publishDate,"eee do MMM yy hh:mm aaaa")]},a.id))]})})}),e.jsx("div",{className:"w-4/5 px-2",children:e.jsxs("select",{className:"form-select block w-full rounded-md border border-gray-300 bg-white px-3 py-0 py-2 text-sm leading-5 text-black shadow-sm transition duration-150 ease-in-out focus:border-blue-300 focus:outline-none focus:ring-blue-300",id:"comparison-dropdown-2",name:"after_publish",children:[e.jsxs("option",{value:s.afterPublish.id,children:[s.afterPublish.version.toString().padStart(3,"0"),":"," ",t(s.afterPublish.publishDate,"eee do MMM yy hh:mm aaaa")]}),s.publishes.filter(a=>a.id!==s.afterPublish.id).map(a=>e.jsxs("option",{value:a.id,children:[a.version.toString().padStart(3,"0"),":",t(a.publishDate,"eee do MMM yy hh:mm aaaa")]},a.id))]})}),e.jsx("div",{className:"w-1/5 px-2 text-right",children:e.jsx("button",{className:"btn btn-primary",type:"submit",children:"Compare"})})]})})})})}),e.jsx("section",{className:"my-5",children:e.jsx("div",{className:"rounded-md bg-white p-4 shadow",children:s.beforePublish.publishDate>s.afterPublish.publishDate?e.jsx(d,{variant:"error",message:"Error: There isn't a valid historic publish for comparison. Please ensure the first event takes place before the second."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex",children:[e.jsxs("div",{className:"w-1/2 p-2",children:[e.jsxs("h2",{className:"mb-4 text-lg font-medium leading-6 text-gray-900",children:["Publish"," ",s.beforePublish.version.toString().padStart(3,"0")]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["On:"," ",t(s.beforePublish.publishDate,"eee do MMM yy hh:mm aaaa")]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["By: ",s.beforePublish.user.firstName," ",s.beforePublish.user.lastName]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["To:"," ",e.jsx("span",{className:"capitalize",children:s.name})," ","for"," ",e.jsx("code",{className:"bg-orange-100 p-1 text-xs text-orange-500",children:s.account.domainName})]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["Notes:"," "]}),e.jsx("div",{className:"rounded border border-solid border-gray-200 bg-white p-2 text-sm text-gray-700 shadow-inner",children:s.beforePublish.notes===""||s.beforePublish.notes===null?"There were no notes saved with the publish.":s.beforePublish.notes})]}),e.jsxs("div",{className:"w-1/2 p-2",children:[e.jsxs("h2",{className:"mb-4 text-lg font-medium leading-6 text-gray-900",children:["Publish"," ",s.afterPublish.version.toString().padStart(3,"0")]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["On:"," ",t(s.afterPublish.publishDate,"eee do MMM yy hh:mm aaaa")]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["By: ",s.afterPublish.user.firstName," ",s.afterPublish.user.lastName]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["To:"," ",e.jsx("span",{className:"capitalize",children:s.name})," ","for"," ",e.jsx("code",{className:"bg-orange-100 p-1 text-xs text-orange-500",children:s.account.domainName})]}),e.jsxs("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:["Notes:"," "]}),e.jsx("div",{className:"rounded border border-solid border-gray-200 bg-white p-2 text-sm text-gray-700 shadow-inner",children:s.afterPublish.notes===""?"There were no notes saved with the publish.":s.afterPublish.notes})]})]}),e.jsxs("div",{className:"diff mb-4 flex",children:[e.jsx("div",{className:"w-1/2 truncate p-2",children:e.jsxs("h2",{className:"text-base font-medium leading-6 text-gray-900",children:["Rules in place before publish"," ",e.jsx("span",{children:s.beforePublish.version.toString().padStart(3,"0")})]})}),e.jsx("div",{className:"w-1/2 truncate p-2",children:e.jsxs("h2",{className:"text-base font-medium leading-6 text-gray-900",children:["Rules in place after publish"," ",e.jsx("span",{children:s.afterPublish.version.toString().padStart(3,"0")})]})})]}),e.jsx("div",{className:"my-4",children:e.jsx(b,{diff:s.diff,account:s.account})})]})})})]})})]})};export{P as default};
2//# sourceMappingURL=PublishCompareV3App-o8MMvVxE.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.