@amd-gaia/agent-ui 0.26.0-rc.26 → 0.26.0-rc.28
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/dist/assets/AdvancedSettings-B3hLr8J9.js +1 -0
- package/dist/assets/AutomationsSettings-B1ZTLqec.js +1 -0
- package/dist/assets/ConnectorsPane---BBksXt.js +1 -0
- package/dist/assets/DocumentLibrary-CrydZx2a.js +4 -0
- package/dist/assets/FileBrowser-DFRRgVm-.js +4 -0
- package/dist/assets/MemoryDashboard-B4AO_CU8.css +1 -0
- package/dist/assets/MemoryDashboard-D5UJivg9.js +1 -0
- package/dist/assets/MessagingSettings-Cv6KxpRD.js +1 -0
- package/dist/assets/{MobileAccessModal-D8ZYrCIG.js → MobileAccessModal-BGiBsfft.js} +1 -1
- package/dist/assets/ScheduleManager-DQBnf_IN.css +1 -0
- package/dist/assets/ScheduleManager-DrUs12hn.js +1 -0
- package/dist/assets/index-B5bK6rYG.css +1 -0
- package/dist/assets/{index-CfU2dWvX.js → index-DGbIgS5I.js} +68 -68
- package/dist/assets/useT-C7sjcds4.js +6 -0
- package/dist/assets/{zap-DKYGVV35.js → zap-Be3EN_ZV.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/AdvancedSettings-CH9ly-BC.js +0 -1
- package/dist/assets/AutomationsSettings-Du3QdyJx.js +0 -1
- package/dist/assets/ConnectorsPane-DdfNqaQQ.js +0 -1
- package/dist/assets/DocumentLibrary-LFSHJV8o.js +0 -4
- package/dist/assets/FileBrowser-2ndV1hij.js +0 -4
- package/dist/assets/MemoryDashboard-CaKCiP3x.js +0 -1
- package/dist/assets/MemoryDashboard-DQAIE4LO.css +0 -1
- package/dist/assets/MessagingSettings-DZRWyFOR.js +0 -1
- package/dist/assets/ScheduleManager-4KFITiEE.js +0 -1
- package/dist/assets/ScheduleManager-ClLoUw67.css +0 -1
- package/dist/assets/index-d_vhyKvd.css +0 -1
- package/dist/assets/useT-DsUV1mns.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.schedule-modal{flex-direction:column;width:640px;max-height:80vh;display:flex}.schedule-modal .modal-body{flex:1;overflow-y:auto}.schedule-create-form{flex-direction:column;gap:10px;margin-bottom:20px;display:flex}.schedule-field{flex-direction:column;gap:4px;display:flex}.schedule-field-label{font-size:var(--fs-label);color:var(--text-secondary);font-weight:600}.schedule-field-hint,.schedule-prompt-hint{color:var(--text-muted);font-size:11px}.schedule-form-row{gap:8px;display:flex}.schedule-form-row input{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--text-primary);font-size:13px;font-family:var(--font-sans);flex:1;padding:8px 12px}.schedule-form-row input:focus{border-color:var(--accent);outline:none}.schedule-form-row input::placeholder{color:var(--text-muted)}.schedule-prompt-input{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);width:100%;color:var(--text-primary);font-size:13px;font-family:var(--font-sans);resize:vertical;min-height:60px;padding:8px 12px}.schedule-prompt-input:focus{border-color:var(--accent);outline:none}.schedule-prompt-input::placeholder{color:var(--text-muted)}.schedule-create-actions{justify-content:flex-end;gap:8px;display:flex}.schedule-form-error{color:var(--accent);margin-top:-4px;font-size:12px}.schedule-action-error{border-inline-start:2px solid var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent);color:var(--text-primary);overflow-wrap:anywhere;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:8px;padding:6px 8px;font-size:12px;display:flex}.schedule-section{margin-bottom:20px}.schedule-section:last-child{margin-bottom:0}.schedule-section h4{font-size:var(--fs-label);color:var(--text-muted);margin-bottom:10px;font-weight:700}.schedule-empty{color:var(--text-muted);text-align:center;padding:24px 12px;font-size:13px}.schedule-list{flex-direction:column;gap:6px;display:flex}.schedule-card{border-radius:var(--radius-sm);background:var(--bg-secondary);border:1px solid var(--border-light);cursor:pointer;transition:background var(--duration-fast) var(--ease);flex-direction:column;padding:10px 12px;display:flex}.schedule-card:hover{background:var(--bg-hover)}.schedule-card.selected{border-color:var(--accent);background:var(--bg-hover)}.schedule-card.just-ran{animation:schedule-flash var(--duration-pulse) var(--ease)}@keyframes schedule-flash{0%{border-color:var(--accent-green)}to{border-color:var(--border-light)}}.schedule-card-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.schedule-card-name{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;font-weight:600;overflow:hidden}.schedule-card-status{font-size:var(--fs-caption);text-transform:capitalize;border-radius:var(--radius-sm);padding:2px 8px;font-weight:600}.schedule-card-status.active{color:var(--accent-green);background:color-mix(in srgb, var(--accent-green) 10%, transparent)}.schedule-card-status.paused{color:var(--accent-yellow);background:color-mix(in srgb, var(--accent-yellow) 10%, transparent)}.schedule-card-status.cancelled{color:var(--text-muted);background:var(--bg-tertiary)}.schedule-card-meta{color:var(--text-secondary);align-items:center;gap:12px;margin-top:6px;font-size:12px;display:flex}.schedule-card-error{border-inline-start:2px solid var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent);color:var(--text-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin-top:6px;padding:6px 8px;font-size:12px}.schedule-card-prompt{color:var(--text-secondary);-webkit-line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin-top:4px;font-size:12px;display:-webkit-box;overflow:hidden}.schedule-card-actions{gap:4px;margin-top:8px;display:flex}.schedule-card-actions .btn-sm{border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg-tertiary);color:var(--text-primary);cursor:pointer;transition:background var(--duration-fast) var(--ease);align-items:center;gap:4px;padding:3px 10px;font-size:11px;display:inline-flex}.schedule-card-actions .btn-sm:hover{background:var(--bg-active)}.schedule-card-actions .btn-sm.chat{color:var(--accent-blue);border-color:var(--accent-blue)}.schedule-card-actions .btn-sm.chat:hover{background:color-mix(in srgb, var(--accent-blue) 10%, transparent)}.schedule-card-actions .btn-sm.danger{color:var(--accent);border-color:var(--accent)}.schedule-card-actions .btn-sm.danger:hover{background:color-mix(in srgb, var(--danger) 10%, transparent)}.schedule-results{border-top:1px solid var(--border);margin-top:16px;padding-top:14px}.schedule-results h4{font-size:var(--fs-label);color:var(--text-muted);margin-bottom:10px;font-weight:700}.schedule-results-list{flex-direction:column;gap:6px;max-height:200px;display:flex;overflow-y:auto}.schedule-result-item{border-radius:var(--radius-sm);background:var(--bg-tertiary);padding:8px 10px;font-size:12px}.schedule-result-time{color:var(--text-muted);font-family:var(--font-sans);font-size:var(--fs-caption);font-variant-numeric:tabular-nums;margin-bottom:4px}.schedule-result-content{color:var(--text-primary);white-space:pre-wrap;word-break:break-word;max-height:60px;overflow-y:auto}.schedule-result-error{color:var(--accent);max-height:none}.schedule-results-empty{color:var(--text-muted);text-align:center;padding:12px;font-size:12px}.schedule-nl-input{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);width:100%;color:var(--text-primary);font-size:13px;font-family:var(--font-sans);resize:vertical;min-height:50px;padding:10px 12px}.schedule-nl-input:focus{border-color:var(--accent);outline:none}.schedule-nl-input::placeholder{color:var(--text-muted)}.schedule-parsed-preview{border-radius:var(--radius-sm);border:1px solid var(--border-light);background:var(--bg-tertiary);padding:10px 12px;font-size:12px}.schedule-parsed-preview.valid{border-color:var(--accent-green);background:color-mix(in srgb, var(--accent-green) 5%, transparent)}.schedule-parsed-preview.invalid{border-color:var(--accent);background:color-mix(in srgb, var(--danger) 5%, transparent)}.schedule-parsed-loading{color:var(--text-muted);font-style:italic}.schedule-parsed-description{color:var(--text-primary);margin-bottom:4px;font-weight:600}.schedule-parsed-hint{color:var(--text-secondary);margin-bottom:4px}.schedule-parsed-next{color:var(--text-secondary);margin-bottom:6px;font-size:11px}.schedule-parsed-details{flex-wrap:wrap;gap:8px;display:flex}.schedule-parsed-tag{border-radius:var(--radius-sm);background:var(--bg-secondary);border:1px solid var(--border);color:var(--text-secondary);align-items:center;gap:4px;padding:2px 8px;font-size:11px;display:inline-flex}.schedule-field-missing{box-shadow:0 0 0 1px color-mix(in srgb, var(--accent-yellow) 30%, transparent);border-color:var(--accent-yellow)!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{Hr as t,St as n,Tr as r,Yr as i,_r as a,a as o,i as s,o as c,qr as l,r as u,si as d,t as f,vr as p,wr as m,yr as h}from"./useT-C7sjcds4.js";import{Mt as g,Pt as _,Zt as v,h as y,jt as b,n as x,st as S,wt as C,yt as w}from"./index-DGbIgS5I.js";import{n as T,t as ee}from"./zap-Be3EN_ZV.js";var E=e(d(),1),D=8e3,O={active:`schedules.status.active`,paused:`schedules.status.paused`,cancelled:`schedules.status.cancelled`};function k(e,t,n,r){if(!e)return t(`schedules.time.never`);let i=new Date(e),a=(n||new Date).getTime()-i.getTime(),o=Math.floor(a/1e3);if(o<0){let e=Math.abs(o);if(e<60)return t(`schedules.time.inSeconds`,{n:e});let n=Math.floor(e/60);if(n<60)return t(`schedules.time.inMinutes`,{n});let r=Math.floor(n/60);return r<24?t(`schedules.time.inHours`,{n:r}):t(`schedules.time.inDays`,{n:Math.floor(r/24)})}if(o<60)return t(`time.justNow`);let s=Math.floor(o/60);if(s<60)return t(`time.minutesAgo`,{n:s});let c=Math.floor(s/60);return c<24?t(`time.hoursAgo`,{n:c}):i.toLocaleDateString(r,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function te(e,t,n=u.bare,r){if(!e)return n(`schedules.time.never`);let i=k(e,n,t,r),a=new Date(e);return a.getTime()<=(t||new Date).getTime()?i:n(`schedules.time.clockIn`,{clock:a.toLocaleString(r,{weekday:`short`,hour:`numeric`,minute:`2-digit`}),relative:i})}function A(e){if(!e)return!1;let t=new Date(e).getTime()-Date.now();return t>0&&t<6e4}function j(e,t,n=0){let r=new Date(2e3,0,1,t,n);return new Intl.DateTimeFormat(f(e),{hour:`numeric`,minute:`2-digit`}).format(r)}function M(e,t){let[n,r]=e.split(`:`).map(Number);return j(t,n,r)}function N(e,n,r){let i=`${e}.${new Intl.PluralRules(r.locale).select(n)}`;return t(i)?i:null}var P=e=>e.length===5&&e.every(e=>e<5),F=e=>e.length===2&&e.includes(5)&&e.includes(6);function I(e,t,n){if(P(e))return n(`schedules.desc.days.weekdays`);if(F(e))return n(`schedules.desc.days.weekends`);if(e.length===7)return n(`schedules.desc.days.every`);let r=N(`schedules.desc.dayList`,e.length,t);return r?n(r,{days:e.map(e=>n(`schedules.dayName.${e}`)).join(n(`schedules.desc.dayJoin`))}):null}function L(e,t,n,r){let{kind:i,count:a,unit:o,days:s,time:c,start_hour:l,end_hour:u}=e,d=e=>c?n(`schedules.desc.at`,{when:e,time:M(c,r)}):e;if(i===`every`||i===`window`){let e=a&&o?N(`schedules.span.${o}`,a,t):null,c=s?I(s,t,n):void 0;if(!e||c===null)return null;let d=n(e,{n:a});if(i===`every`)return c?n(`schedules.desc.everyOn`,{span:d,days:c}):n(`schedules.desc.every`,{span:d});if(l==null||u==null)return null;let f=n(`schedules.hours`,{start:j(r,l),end:j(r,u)});return c?n(`schedules.desc.windowOn`,{span:d,hours:f,days:c}):n(`schedules.desc.window`,{span:d,hours:f})}if(i===`daily`)return c?d(n(`schedules.desc.daily`)):null;if(i!==`days`||!s?.length)return null;if(s.length===7)return d(n(`schedules.desc.daily`));if(P(s))return d(n(`schedules.desc.weekdays`));if(F(s))return d(n(`schedules.desc.weekends`));let f=I(s,t,n);return f&&d(n(`schedules.desc.onDays`,{days:f}))}function ne(e,t){return!e||L(e,t,t.bare,t)===null?null:t.compose((n,r)=>L(e,t,n,s(r))??``)}function R(e,t){return e.length===5&&!e.includes(5)&&!e.includes(6)?t(`schedules.days.weekdays`):e.length===2&&e.includes(5)&&e.includes(6)?t(`schedules.days.weekends`):e.length===7?t(`schedules.days.every`):e.map(e=>t(`schedules.day.${e}`)).join(t(`schedules.days.join`))}function re({schedule:e}){let t=o(),{selectedSchedule:n,selectSchedule:c,updateScheduleStatus:u,runScheduleNow:d,deleteSchedule:m,results:y,resultsLoading:b,loadSchedules:S,loadResults:w}=x(),{setCurrentSession:j,setShowSchedules:M}=r(),N=n===e.name,P=ne(e.description_parts,t),[F,I]=(0,E.useState)(!1),L=(0,E.useRef)(null),R=(0,E.useCallback)(()=>{L.current&&=(clearTimeout(L.current),null)},[]);(0,E.useEffect)(()=>R,[R]);let[re,z]=(0,E.useState)(()=>new Date),B=(0,E.useRef)(null);(0,E.useEffect)(()=>{let t=e.status===`active`&&A(e.next_run_at);return t&&!B.current?B.current=setInterval(()=>{z(new Date),e.next_run_at&&new Date(e.next_run_at).getTime()<=Date.now()&&S()},1e3):!t&&B.current&&(clearInterval(B.current),B.current=null),()=>{B.current&&=(clearInterval(B.current),null)}},[e.status,e.next_run_at,S]);let V=(0,E.useRef)(e.last_run_at);(0,E.useEffect)(()=>{N&&e.last_run_at!==V.current&&(V.current=e.last_run_at,w(e.name))},[N,e.last_run_at,e.name,w]);let H=e.last_run_at&&Date.now()-new Date(e.last_run_at).getTime()<5e3,U=(0,E.useCallback)(t=>{t.stopPropagation();let n=e.status===`active`?`paused`:`active`;i.ui.info(`Schedule "${e.name}": ${e.status} -> ${n}`),u(e.name,n)},[e.name,e.status,u]),W=(0,E.useCallback)(t=>{t.stopPropagation(),i.ui.info(`Schedule "${e.name}": run now`),d(e.name)},[e.name,d]),G=(0,E.useCallback)(t=>{t.stopPropagation(),R(),F?(i.ui.info(`Deleting schedule "${e.name}"`),m(e.name)):(I(!0),L.current=setTimeout(()=>{L.current=null,I(!1)},D))},[e.name,F,m,R]),K=(0,E.useCallback)(t=>{t.stopPropagation(),e.session_id&&(i.ui.info(`Opening chat session for schedule "${e.name}"`),j(e.session_id),M(!1))},[e.session_id,e.name,j,M]);return h(`div`,{className:`schedule-card ${N?`selected`:``} ${H?`just-ran`:``}`,onClick:()=>c(N?null:e.name),children:[h(`div`,{className:`schedule-card-header`,children:[p(`span`,{className:`schedule-card-name`,dir:`auto`,title:e.name,children:e.name}),p(`span`,{className:`schedule-card-status ${e.status}`,children:t(O[e.status])})]}),p(`div`,{className:`schedule-card-prompt`,dir:`auto`,title:e.prompt,children:e.prompt}),h(`div`,{className:`schedule-card-meta`,children:[h(`span`,{title:l(P??e.description),children:[p(v,{size:11}),` `,P??p(`bdi`,{children:e.description})]}),p(`span`,{children:t(`schedules.card.runs`,{n:e.run_count})}),e.error_count>0&&p(`span`,{children:t(`schedules.card.errors`,{n:e.error_count})}),p(`span`,{children:t.compose((t,n)=>t(`schedules.card.last`,{when:k(e.last_run_at,t,void 0,f(s(n)))}))}),p(`span`,{children:t.compose((t,n)=>t(`schedules.card.next`,{when:e.status===`paused`?t(`schedules.status.paused`):te(e.next_run_at,re,t,f(s(n)))}))})]}),e.last_error&&!(N&&!b&&y.some(e=>e.error))&&p(`div`,{className:`schedule-card-error`,children:t(`schedules.card.lastFailed`,{error:e.last_error})}),h(`div`,{className:`schedule-card-actions`,children:[e.session_id&&h(`button`,{className:`btn-sm chat`,onClick:K,title:t(`schedules.card.openChatTitle`),children:[p(T,{size:11}),` `,t(`schedules.card.openChat`)]}),h(`button`,{className:`btn-sm`,onClick:W,disabled:e.running,title:t(`schedules.card.runNowTitle`),children:[p(ee,{size:11}),` `,t(e.running?`schedules.card.running`:`schedules.card.runNow`)]}),p(`button`,{className:`btn-sm`,onClick:U,title:t(e.status===`active`?`schedules.card.pause`:`schedules.card.resume`),children:e.status===`active`?h(a.Fragment,{children:[p(_,{size:11}),` `,t(`schedules.card.pause`)]}):h(a.Fragment,{children:[p(g,{size:11}),` `,t(`schedules.card.resume`)]})}),h(`button`,{className:`btn-sm danger`,onClick:G,title:t(`schedules.card.delete`),children:[p(C,{size:11}),` `,t(F?`schedules.card.confirmDelete`:`schedules.card.delete`)]})]}),N&&h(`div`,{className:`schedule-results`,children:[p(`h4`,{children:t(`schedules.history`)}),b?p(`p`,{className:`schedule-results-empty`,children:t(`schedules.historyLoading`)}):y.length===0?p(`p`,{className:`schedule-results-empty`,children:t(`schedules.historyEmpty`)}):p(`div`,{className:`schedule-results-list`,children:y.map(e=>h(`div`,{className:`schedule-result-item`,children:[p(`div`,{className:`schedule-result-time`,children:t.compose((t,n)=>k(e.executed_at,t,void 0,f(s(n))))}),e.error?p(`div`,{className:`schedule-result-content schedule-result-error`,children:p(`bdi`,{children:e.error})}):p(`div`,{className:`schedule-result-content`,children:e.result?p(`bdi`,{children:e.result}):t(`schedules.noOutput`)})]},e.id))})]})]})}function z(){let e=o(),{setShowSchedules:t}=r(),{schedules:l,loading:u,error:d,actionError:g,loadSchedules:_,createSchedule:C,dismissActionError:T}=x(),ee=(0,E.useCallback)(()=>t(!1),[t]);m(!0,ee);let D=(0,E.useRef)(null);S(D,!0),y(D,!0);let[O]=(0,E.useState)(()=>x.getState().draft),[k,A]=(0,E.useState)(O!==null),[N,P]=(0,E.useState)(O?.when??``),[F,I]=(0,E.useState)(O?.name??``),[L,z]=(0,E.useState)(O?.prompt??``),[B,V]=(0,E.useState)(null),[H,U]=(0,E.useState)(!1),[W,G]=(0,E.useState)(!1),[K,q]=(0,E.useState)(null),[J,Y]=(0,E.useState)(!1),X=(0,E.useId)(),ie=`${X}-when`,ae=`${X}-when-error`,Z=`${X}-when-hint`,oe=`${X}-name`,se=`${X}-name-error`,ce=`${X}-prompt`,Q=!H&&B!==null&&!B.valid,le=Q&&/[A-Za-z]/.test(N);(0,E.useEffect)(()=>{let e=N.trim()||F.trim()||L.trim();x.getState().setDraft(e?{when:N,name:F,prompt:L}:null)},[N,F,L]);let $=(0,E.useRef)(null);(0,E.useEffect)(()=>{if(!N.trim())V(null);else return $.current&&clearTimeout($.current),$.current=window.setTimeout(async()=>{U(!0);try{let e=await n(N);V(e)}catch{V(null)}finally{U(!1)}},400),()=>{$.current&&clearTimeout($.current)}},[N]);let ue=(0,E.useRef)(null);(0,E.useEffect)(()=>(i.ui.info(`Schedule Manager opened`),_(),ue.current=window.setInterval(()=>_(),5e3),()=>{ue.current&&clearInterval(ue.current),T()}),[_,T]);let de=N.trim()&&F.trim()&&L.trim()&&(B===null||B.valid),fe=(0,E.useCallback)(async()=>{if(de){G(!0),q(null),Y(!1);try{await C(F.trim(),N.trim(),L.trim()),x.getState().setDraft(null),P(``),I(``),z(``),V(null),A(!1),i.ui.info(`Schedule "${F}" created`)}catch(t){t instanceof c&&t.httpStatus===409?Y(!0):q(t instanceof Error?t.message:e(`schedules.createFailed`))}finally{G(!1)}}},[de,F,N,L,C,e]);return p(`div`,{ref:D,className:`modal-overlay`,onClick:()=>t(!1),role:`dialog`,"aria-modal":`true`,"aria-label":e(`schedules.title`),children:h(`div`,{className:`modal-panel schedule-modal`,onClick:e=>e.stopPropagation(),children:[h(`div`,{className:`modal-header`,children:[p(`h3`,{children:e(`schedules.title`)}),p(`button`,{className:`btn-icon`,onClick:()=>t(!1),"aria-label":e(`schedules.close`),children:p(w,{size:18})})]}),h(`div`,{className:`modal-body`,children:[p(`section`,{className:`schedule-section`,children:k?h(`div`,{className:`schedule-create-form`,children:[h(`div`,{className:`schedule-field`,children:[p(`label`,{className:`schedule-field-label`,htmlFor:ie,children:e(`schedules.when`)}),p(`textarea`,{id:ie,className:`schedule-nl-input`,placeholder:e.bare(`schedules.whenPlaceholder`),value:N,onChange:e=>P(e.target.value),"aria-invalid":Q,"aria-describedby":Q?`${ae} ${Z}`:Z,autoFocus:!0,rows:2}),p(`div`,{id:Z,className:`schedule-field-hint`,children:e(`schedules.whenHint`)})]}),(B||H)&&p(`div`,{className:`schedule-parsed-preview ${B?.valid?`valid`:`invalid`}`,"aria-live":`polite`,children:H?p(`span`,{className:`schedule-parsed-loading`,children:e(`schedules.parsing`)}):B?h(a.Fragment,{children:[B.valid?p(`div`,{className:`schedule-parsed-description`,children:ne(B.description_parts,e)??p(`bdi`,{children:B.description})}):h(`div`,{id:ae,children:[p(`div`,{className:`schedule-parsed-description`,children:e(`schedules.notUnderstood`)}),le&&p(`div`,{className:`schedule-parsed-hint`,children:p(`bdi`,{children:B.description})})]}),B.valid&&B.next_run_at&&p(`div`,{className:`schedule-parsed-next`,children:e.compose((e,t)=>e(`schedules.nextRun`,{when:te(B.next_run_at,void 0,e,f(s(t)))}))}),B.valid&&h(`div`,{className:`schedule-parsed-details`,children:[B.time_of_day&&h(`span`,{className:`schedule-parsed-tag`,children:[p(v,{size:10}),` `,M(B.time_of_day,e)]}),B.start_hour!=null&&B.end_hour!=null&&h(`span`,{className:`schedule-parsed-tag`,children:[p(v,{size:10}),` `,e.compose((e,t)=>e(`schedules.hours`,{start:j(s(t),B.start_hour),end:j(s(t),B.end_hour)}))]}),B.days_of_week&&p(`span`,{className:`schedule-parsed-tag`,children:e.compose(e=>R(B.days_of_week,e))})]})]}):null}),h(`div`,{className:`schedule-field`,children:[p(`label`,{className:`schedule-field-label`,htmlFor:oe,children:e(`schedules.name`)}),p(`div`,{className:`schedule-form-row`,children:p(`input`,{id:oe,type:`text`,placeholder:e(`schedules.namePlaceholder`),value:F,onChange:e=>{I(e.target.value),Y(!1)},className:!F.trim()&&N.trim()?`schedule-field-missing`:``,"aria-invalid":J,"aria-describedby":J?se:void 0})}),J&&p(`p`,{id:se,className:`schedule-form-error`,role:`alert`,children:e(`schedules.nameTaken`)})]}),h(`div`,{className:`schedule-field`,children:[p(`label`,{className:`schedule-field-label`,htmlFor:ce,children:e(`schedules.prompt`)}),p(`textarea`,{id:ce,className:`schedule-prompt-input ${!L.trim()&&N.trim()?`schedule-field-missing`:``}`,placeholder:e(`schedules.promptPlaceholder`),value:L,onChange:e=>z(e.target.value)}),p(`div`,{className:`schedule-prompt-hint`,children:e(`schedules.promptHint`)})]}),K&&p(`p`,{className:`schedule-form-error`,children:p(`bdi`,{children:K})}),h(`div`,{className:`schedule-create-actions`,children:[p(`button`,{className:`btn-secondary`,onClick:()=>{A(!1),q(null),Y(!1),V(null),P(``),I(``),z(``)},children:e(`schedules.cancel`)}),p(`button`,{className:`btn-primary`,onClick:fe,disabled:!de||W,children:e(W?`schedules.creating`:`schedules.create`)})]})]}):h(`button`,{className:`btn-primary`,onClick:()=>A(!0),children:[p(b,{size:14}),` `,e(`schedules.new`)]})}),h(`section`,{className:`schedule-section`,children:[p(`h4`,{children:e(`schedules.list`)}),g&&h(`div`,{className:`schedule-action-error`,role:`alert`,children:[p(`span`,{children:p(`bdi`,{children:g})}),p(`button`,{className:`btn-icon`,onClick:T,"aria-label":e(`schedules.dismissError`),children:p(w,{size:14})})]}),u?p(`p`,{className:`schedule-empty`,children:e(`schedules.loading`)}):d?p(`p`,{className:`schedule-empty`,children:e(`schedules.loadFailed`)}):l.length===0?p(`p`,{className:`schedule-empty`,children:e(`schedules.empty`)}):p(`div`,{className:`schedule-list`,children:l.map(e=>p(re,{schedule:e},e.id))})]})]})]})})}export{z as ScheduleManager};
|