@openhands/agent-canvas 1.0.0-alpha.5 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{automation-detail-ZQs6D2d3.js → automation-detail-CQrtk33s.js} +1 -1
- package/build/assets/{automations-list-CqHXGwSw.js → automations-list-COmogz0S.js} +1 -1
- package/build/assets/edit-automation-modal-DnTHJrf1.js +1 -0
- package/build/assets/{manifest-f141dc70.js → manifest-6400820c.js} +1 -1
- package/build/assets/{root-luPHQiBx.js → root-6AdVEJBT.js} +1 -1
- package/build/index.html +3 -3
- package/config/defaults.json +38 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -1
- package/dist/package.js.map +1 -1
- package/package.json +2 -1
- package/scripts/dev-static.mjs +2 -1
- package/scripts/dev-with-automation.mjs +24 -49
- package/scripts/static-build.mjs +2 -6
- package/build/assets/edit-automation-modal-DgW0Q8vr.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./react-dom-hVBnwgwZ.js";import{t as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t as i}from"./useMutation-CRJwk4cR.js";import{o as a,t as o}from"./declaration-C9nuq2Dj.js";import{n as s}from"./QueryClientProvider-DITRCGAK.js";import{t as c}from"./useTranslation-01pF7z10.js";import{n as l,r as u}from"./custom-toast-handlers-BYxhSr3t.js";import{t as d}from"./utils-Czcl6buL.js";import{c as f,u as p}from"./agent-server-client-options-8OJSXbm8.js";import{n as m}from"./active-backend-context-CkP3ZEJs.js";import{a as h,s as g,t as _}from"./brand-button-8fVVei4i.js";import{n as ee,r as v}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js";import{t as y}from"./proxy-BMZyC45G.js";import{t as te}from"./settings-input-BWCZt9g2.js";import{n as b,t as ne}from"./context-menu-list-item-DzjPB8aC.js";import{t as x}from"./settings-dropdown-input-CAQWQgx-.js";import{t as S}from"./x-mark-CZ57VvRX.js";var C=`/api/automation`,w=v.create();w.interceptors.request.use(e=>{e.baseURL||=p().host;let t=(void 0)?.trim();return t&&e.headers.set(`Authorization`,`Bearer ${t}`),e});function T(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}var E=class e{static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=f().backend;if(r.kind===`cloud`)return y({backend:r,method:`GET`,path:`${C}/v1?${T(t,n)}`});let{data:i}=await w.get(`${C}/v1`,{params:{limit:t,offset:n}});return i}static async getAutomations(t=50,n=0){return e.listAutomations({limit:t,offset:n})}static async getAutomation(e){let t=f().backend,n=`${C}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`)return y({backend:t,method:`GET`,path:n});let{data:r}=await w.get(n);return r}static async updateAutomation(e,t){let n=f().backend,r=`${C}/v1/${encodeURIComponent(e)}`;if(n.kind===`cloud`)return y({backend:n,method:`PATCH`,path:r,body:t});let{data:i}=await w.patch(r,t);return i}static async deleteAutomation(e){let t=f().backend,n=`${C}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`){await y({backend:t,method:`DELETE`,path:n});return}await w.delete(n)}static async dispatchAutomation(e){let t=f().backend,n=`${C}/v1/${encodeURIComponent(e)}/dispatch`;if(t.kind===`cloud`)return y({backend:t,method:`POST`,path:n});let{data:r}=await w.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,i=f().backend,a=`${C}/v1/${encodeURIComponent(e)}/runs`;if(i.kind===`cloud`)return y({backend:i,method:`GET`,path:`${a}?${T(n,r)}`});let{data:o}=await w.get(a,{params:{limit:n,offset:r}});return o}static async getAutomationRuns(t,n=50,r=0){return e.listAutomationRuns(t,{limit:n,offset:r})}static async toggleAutomation(t,n){return e.updateAutomation(t,{enabled:n})}static async downloadTarball(e,t){let n=f().backend,r=`${C}/v1/${encodeURIComponent(e)}/tarball`,i;if(n.kind===`cloud`)i=await y({backend:n,method:`GET`,path:r,responseType:`blob`});else{let{data:e}=await w.get(r,{responseType:`blob`});i=e}let a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`${t}.tar`,o.click(),URL.revokeObjectURL(a)}static async checkHealth(){let e=f().backend,t=`${C}/health`;try{if(e.kind===`cloud`)return await y({backend:e,method:`GET`,path:t});let{data:n}=await w.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},D=e(t()),re=e(n(),1),O=a(),k=[`automation-detail`],A=[`automation-runs`];function ie(e){let{id:t,enabled:n=!0}=e,i=m();return r({queryKey:[...k,t,i.backend.id,i.orgId],queryFn:()=>E.getAutomation(t),staleTime:300*1e3,enabled:!!t&&n})}function j(e){let{id:t,limit:n=20,offset:i=0,enabled:a=!0}=e,o=m();return r({queryKey:[...A,t,{limit:n,offset:i},o.backend.id,o.orgId],queryFn:()=>E.getAutomationRuns(t,n,i),staleTime:60*1e3,enabled:!!t&&a})}var M=[`automations`];function N(e={}){let{limit:t=50,offset:n=0,enabled:i=!0}=e,a=m();return r({queryKey:[...M,{limit:t,offset:n},a.backend.id,a.orgId],queryFn:()=>E.getAutomations(t,n),staleTime:300*1e3,enabled:i})}function P(){let e=s();return i({mutationFn:({id:e,enabled:t})=>E.toggleAutomation(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:M}),e.invalidateQueries({queryKey:k})}})}function F(){let e=s();return i({mutationFn:({id:e,body:t})=>E.updateAutomation(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:M}),e.invalidateQueries({queryKey:k})}})}function I(){let e=s();return i({mutationFn:e=>E.deleteAutomation(e),onSuccess:()=>{e.invalidateQueries({queryKey:M})}})}function L(){let e=s();return i({mutationFn:e=>E.dispatchAutomation(e),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:M}),e.invalidateQueries({queryKey:k}),e.invalidateQueries({queryKey:[...A,n]})}})}var R=[`automation-health`];function z(){let e=m();return r({queryKey:[...R,e.backend.id,e.orgId],queryFn:()=>E.checkHealth(),staleTime:30*1e3,retry:!1})}var B=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,viewBox:`0 0 20 20`,...e,children:(0,O.jsx)(`path`,{d:`M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z`})}),V=`inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted transition-colors hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,H=`inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 text-xs text-muted transition-colors hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`;function U({icon:e,label:t}){return(0,O.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`flex shrink-0 items-center text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)] group-focus-visible:text-[var(--oh-foreground)] [&_svg]:size-4 [&_svg]:text-current`,"aria-hidden":!0,children:e}),(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}function W({items:e}){let{t}=c(`openhands`),[n,r]=(0,D.useState)(!1),[i,a]=(0,D.useState)(),s=(0,D.useRef)(null),l=(0,D.useRef)(null);(0,D.useLayoutEffect)(()=>{if(!n||!s.current)return;let e=()=>{let e=s.current?.getBoundingClientRect();e&&a({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[n]),(0,D.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;s.current?.contains(t)||l.current?.contains(t)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]);let u=n&&i?(0,O.jsx)(b,{ref:l,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,O.jsx)(`li`,{children:(0,O.jsx)(ne,{onClick:t=>{t.stopPropagation(),e.onClick(),r(!1)},isDisabled:e.disabled,className:`group`,children:(0,O.jsx)(U,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`button`,{ref:s,type:`button`,onClick:e=>{e.stopPropagation(),r(e=>!e)},className:V,"aria-label":t(o.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":n,"aria-haspopup":`menu`,children:(0,O.jsx)(B,{className:`size-4`})}),n&&i&&typeof document<`u`?re.createPortal((0,O.jsx)(`div`,{style:i,children:u}),document.body):null]})}function G(e){return!0}var K=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,O.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z`})}),q=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,O.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.636 5.636a9 9 0 1012.728 0M12 3v9`})}),J=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,O.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})}),Y=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:1.5,...e,children:(0,O.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z`})});function ae({onRetry:e}){let{t}=c(`openhands`);return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,O.jsx)(Y,{className:`size-12 text-danger`}),(0,O.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:t(o.AUTOMATIONS$ERROR_TITLE)}),(0,O.jsx)(`button`,{type:`button`,onClick:e,className:`mt-4 rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:t(o.AUTOMATIONS$ERROR_RETRY)})]})}function oe({onRetry:e}){let{t}=c(`openhands`);return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 px-4`,children:[(0,O.jsx)(Y,{className:`size-12 text-[var(--oh-warning)]`}),(0,O.jsx)(`h2`,{className:`mt-4 text-lg font-medium text-content`,children:t(o.AUTOMATIONS$BACKEND_UNAVAILABLE_TITLE)}),(0,O.jsx)(`p`,{className:`mt-2 text-sm text-muted text-center max-w-md`,children:t(o.AUTOMATIONS$BACKEND_UNAVAILABLE_MESSAGE)}),(0,O.jsx)(_,{type:`button`,variant:`secondary`,className:`mt-6`,onClick:e,children:t(o.AUTOMATIONS$BACKEND_UNAVAILABLE_RETRY)})]})}function se({automationName:e,isOpen:t,onConfirm:n,onCancel:r}){let{t:i}=c(`openhands`);return t?(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,O.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,O.jsxs)(`div`,{className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":`Close`,children:(0,O.jsx)(S,{className:`size-5`})}),(0,O.jsx)(`h2`,{className:`text-lg font-medium text-white`,children:i(o.AUTOMATIONS$DELETE_CONFIRM_TITLE)}),(0,O.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:i(o.AUTOMATIONS$DELETE_CONFIRM_MESSAGE,{name:e})}),(0,O.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:i(o.AUTOMATIONS$CANCEL)}),(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:i(o.AUTOMATIONS$DELETE)})]})]})]}):null}var ce=/^(\d+)$/;function X(e,t,n){let r=e.match(ce);if(!r)return null;let i=Number(r[1]);return Number.isNaN(i)||i<t||i>n?null:i}function Z(e){let t=(e??``).trim();if(!t)return{kind:`custom`,raw:``};let n=t.split(/\s+/);if(n.length!==5)return{kind:`custom`,raw:t};let[r,i,a,o,s]=n,c=X(r,0,59),l=X(i,0,23);if(c===null||l===null)return{kind:`custom`,raw:t};if(a!==`*`||o!==`*`)return{kind:`custom`,raw:t,hour:l,minute:c};if(s===`*`||s===`0-6`)return{kind:`daily`,hour:l,minute:c};if(s===`1-5`)return{kind:`weekdays`,hour:l,minute:c};let u=X(s,0,6);return u===null?{kind:`custom`,raw:t,hour:l,minute:c}:{kind:`weekly`,hour:l,minute:c,weekday:u}}function le(e){let{kind:t,hour:n,minute:r,weekday:i}=e;switch(t){case`daily`:return`${r} ${n} * * *`;case`weekdays`:return`${r} ${n} * * 1-5`;case`weekly`:return`${r} ${n} * * ${i??1}`;default:return t}}function Q(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function $(e){let t=e.match(/^(\d{1,2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return Number.isNaN(n)||Number.isNaN(r)||n<0||n>23||r<0||r>59?null:{hour:n,minute:r}}var ue=[o.AUTOMATIONS$WEEKDAY_SUN,o.AUTOMATIONS$WEEKDAY_MON,o.AUTOMATIONS$WEEKDAY_TUE,o.AUTOMATIONS$WEEKDAY_WED,o.AUTOMATIONS$WEEKDAY_THU,o.AUTOMATIONS$WEEKDAY_FRI,o.AUTOMATIONS$WEEKDAY_SAT];function de(e){let t=Z(e.trigger.schedule);return t.kind===`custom`?{name:e.name,prompt:e.prompt??``,frequency:`custom`,weekday:1,timeOfDay:t.hour!==void 0&&t.minute!==void 0?Q(t.hour,t.minute):``,isCustomSchedule:!0,rawSchedule:t.raw}:{name:e.name,prompt:e.prompt??``,frequency:t.kind,weekday:t.kind===`weekly`?t.weekday??1:1,timeOfDay:Q(t.hour,t.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``}}function fe({automation:e,isOpen:t,onClose:n}){let{t:r}=c(`openhands`),i=F(),a=(0,D.useMemo)(()=>de(e),[e]),[s,f]=(0,D.useState)(a),[p,m]=(0,D.useState)(null);if((0,D.useEffect)(()=>{t&&(f(a),m(null))},[t,a]),!t)return null;let v=[{key:`daily`,label:r(o.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:r(o.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:r(o.AUTOMATIONS$FREQUENCY_WEEKLY)},...s.isCustomSchedule?[{key:`custom`,label:r(o.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],y=ue.map((e,t)=>({key:String(t),label:r(e)})),b=!s.isCustomSchedule||$(s.timeOfDay)!==null||s.timeOfDay===``;return(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,O.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,O.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":r(o.AUTOMATIONS$CANCEL),children:(0,O.jsx)(S,{className:`size-5`})}),(0,O.jsx)(`h2`,{className:`text-lg font-medium text-white`,children:r(o.AUTOMATIONS$EDIT_TITLE)}),(0,O.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let a=s.name.trim();if(!a){m(r(o.AUTOMATIONS$NAME_REQUIRED));return}m(null);let c={};a!==e.name&&(c.name=a);let d=s.prompt.trim();if(d!==(e.prompt??``).trim()&&(c.prompt=d.length===0?null:d),!s.isCustomSchedule&&s.frequency!==`custom`){let t=$(s.timeOfDay);if(t){let n=le({kind:s.frequency,hour:t.hour,minute:t.minute,weekday:s.frequency===`weekly`?s.weekday:void 0});n!==e.trigger.schedule&&(c.trigger={...e.trigger,schedule:n})}}if(Object.keys(c).length===0){n();return}i.mutate({id:e.id,body:c},{onSuccess:()=>{u(r(o.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{l(ee(e)?e.response?.data?.message||e.message||r(o.AUTOMATIONS$EDIT_ERROR):e.message||r(o.AUTOMATIONS$EDIT_ERROR))}})},className:`mt-4 flex flex-col gap-4`,"aria-label":r(o.AUTOMATIONS$EDIT_TITLE),children:[(0,O.jsx)(te,{testId:`edit-automation-name`,name:`name`,type:`text`,label:r(o.AUTOMATIONS$NAME),value:s.name,onChange:e=>f(t=>({...t,name:e})),error:p??void 0,showRequiredTag:!0}),(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:r(o.AUTOMATIONS$PROMPT)}),(0,O.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:s.prompt,onChange:e=>f(t=>({...t,prompt:e.target.value})),rows:4,className:d(h,`placeholder:italic`)}),(0,O.jsx)(`span`,{className:`text-xs text-muted`,children:r(o.AUTOMATIONS$EDIT_PROMPT_HINT)})]}),(0,O.jsx)(x,{testId:`edit-automation-frequency`,name:`frequency`,label:r(o.AUTOMATIONS$FREQUENCY),items:v,selectedKey:s.frequency,isDisabled:s.isCustomSchedule,onSelectionChange:e=>{!e||s.isCustomSchedule||f(t=>({...t,frequency:e}))}}),s.frequency===`weekly`&&!s.isCustomSchedule&&(0,O.jsx)(x,{testId:`edit-automation-weekday`,name:`weekday`,label:r(o.AUTOMATIONS$WEEKDAY),items:y,selectedKey:String(s.weekday),onSelectionChange:e=>{e!==null&&f(t=>({...t,weekday:Number(e)}))}}),(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:r(o.AUTOMATIONS$TIME_OF_DAY)}),(0,O.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:s.timeOfDay,onChange:e=>f(t=>({...t,timeOfDay:e.target.value})),disabled:s.isCustomSchedule&&!b,className:d(g,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,O.jsxs)(`span`,{className:`text-xs text-muted`,children:[r(o.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),s.isCustomSchedule&&(0,O.jsxs)(`p`,{className:`text-xs text-muted`,"data-testid":`custom-schedule-hint`,children:[r(o.AUTOMATIONS$CUSTOM_SCHEDULE_HINT),s.rawSchedule&&(0,O.jsxs)(O.Fragment,{children:[` `,(0,O.jsx)(`code`,{className:`text-xs text-content`,children:s.rawSchedule})]})]}),(0,O.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,O.jsx)(_,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:i.isPending,children:r(o.AUTOMATIONS$CANCEL)}),(0,O.jsx)(_,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:i.isPending,"aria-busy":i.isPending,children:i.isPending?r(o.AUTOMATIONS$SAVING):r(o.AUTOMATIONS$SAVE)})]})]})]})]})}export{P as _,Y as a,E as b,K as c,V as d,H as f,L as g,I as h,ae as i,G as l,N as m,se as n,J as o,z as p,oe as r,q as s,fe as t,W as u,ie as v,j as y};
|