@knoflows/engine 0.1.0-alpha.0 → 0.1.0-alpha.1

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.
Files changed (59) hide show
  1. package/dist/engine.js +13 -9
  2. package/package.json +1 -1
  3. package/static/assets/i18n/en.json +10 -0
  4. package/static/assets/i18n/es.json +10 -0
  5. package/static/chunk-8DHqiag3.js +1 -0
  6. package/static/chunk-B4GVyu_H.js +1 -0
  7. package/static/chunk-BDOL5Qby.js +1 -0
  8. package/static/chunk-BJLDaNHl.js +1 -0
  9. package/static/chunk-BQYw1slv.js +1 -0
  10. package/static/chunk-BU5DKI8R.js +1 -0
  11. package/static/chunk-BquD19tF.js +5 -0
  12. package/static/{chunk-CRPsjdw8.js → chunk-C40TdCIk.js} +1 -1
  13. package/static/{chunk-B8aKNL-C.js → chunk-C50zASMN.js} +1 -1
  14. package/static/chunk-C9CuVcTl.js +1 -0
  15. package/static/{chunk-Bl6kwpIK.js → chunk-CCjvFBCX.js} +1 -1
  16. package/static/chunk-CPxI4OjB.js +1 -0
  17. package/static/chunk-CSPhdKAb.js +1 -0
  18. package/static/chunk-CeFjDLjY.js +1 -0
  19. package/static/chunk-CgvdAwRh.js +1 -0
  20. package/static/chunk-Cnkrtkdu.js +7 -0
  21. package/static/chunk-Csk1w6sD.js +1 -0
  22. package/static/chunk-DI-Ex2sC.js +1 -0
  23. package/static/chunk-DK8z5vU5.js +1 -0
  24. package/static/chunk-DS9-TMN6.js +1 -0
  25. package/static/chunk-Dw1tJgiv.js +1 -0
  26. package/static/{chunk-Cv76Fxhr.js → chunk-DxRo8m4J.js} +3 -3
  27. package/static/chunk-DyP6QbgY.js +1 -0
  28. package/static/chunk-KyBZUWGU.js +1 -0
  29. package/static/chunk-ZijlINsH.js +1 -0
  30. package/static/index.html +5 -2
  31. package/static/main-BK4MAPTK.js +249 -0
  32. package/static/styles-6MW3GE4V.css +1 -0
  33. package/static/chunk-8joH1h3C.js +0 -1
  34. package/static/chunk-B4A7hSM3.js +0 -1
  35. package/static/chunk-BNylhXVN.js +0 -1
  36. package/static/chunk-BV9svMMc.js +0 -1
  37. package/static/chunk-BX5sYPy1.js +0 -1
  38. package/static/chunk-Be6g3Cmv.js +0 -1
  39. package/static/chunk-Bgtkf8nM.js +0 -1
  40. package/static/chunk-BvDaTl4u.js +0 -1
  41. package/static/chunk-ByacugWF.js +0 -1
  42. package/static/chunk-CPYgCVHJ.js +0 -1
  43. package/static/chunk-CZLubDvD.js +0 -1
  44. package/static/chunk-Cczqw9G5.js +0 -1
  45. package/static/chunk-CntkJjcW.js +0 -1
  46. package/static/chunk-Cuh7ppOq.js +0 -1
  47. package/static/chunk-D3rwM_uV.js +0 -7
  48. package/static/chunk-DHPxevqq.js +0 -1
  49. package/static/chunk-DLA1DsR_.js +0 -1
  50. package/static/chunk-DYzjfNdD.js +0 -1
  51. package/static/chunk-DdSpqYCm.js +0 -5
  52. package/static/chunk-Di8Mt9Sl.js +0 -1
  53. package/static/chunk-Di_OsX8x.js +0 -1
  54. package/static/chunk-DlU8g0UO.js +0 -1
  55. package/static/chunk-DpU7iV6a.js +0 -1
  56. package/static/chunk-iJsU0w_6.js +0 -1
  57. package/static/chunk-mjUdDQQg.js +0 -1
  58. package/static/main-JSLBK4RN.js +0 -235
  59. package/static/styles-W2TNDHKW.css +0 -1
@@ -0,0 +1,7 @@
1
+ import {G as Gn,u as un}from'./chunk-ZijlINsH.js';import {U as U$1}from'./chunk-DI-Ex2sC.js';import {f}from'./chunk-DyP6QbgY.js';import {e as et,U as U$2,G,i as it,v as vt}from'./chunk-DK8z5vU5.js';import {W as W$1,I}from'./chunk-Dw1tJgiv.js';import'./chunk-BQYw1slv.js';import'./chunk-KyBZUWGU.js';import'./chunk-C50zASMN.js';import {C,W,U,a as ar,b as at,q as qo,H as Hw,R as Rt,X as rd,Y as Bw,c as qe$1,Q as QE,F as Fn,M as Mt,d as sd,z as zc,e as t7,Z as y7,f as ec,g as _i,m as bD,K as Kc,p as gI,A as _D,a0 as $0,a1 as B0,v as vw,h as Rw,P as Ph,O as Ow,B as VD,L as LD,j as gh,u as nl,a2 as Pw,a3 as xw,w as ch,N as ND,y as xD,l as lh,E as Pu,G as Lu,a4 as Mh,a5 as ah,a6 as Nw,a7 as MD}from'./main-BK4MAPTK.js';var de=t=>({index:t}),ce=()=>[],Ce=(t,s)=>s.definition.id,ge=(t,s)=>s.index;function be(t,s){if(t&1){let e=LD();_i(0,"div",1)(1,"button",2),gh("click",function(){Pu(e);let o=VD();return Lu(o.closeIteration())}),vw(2),Rw(3,"transloco"),Kc(),_i(4,"p",3),vw(5),Rw(6,"transloco"),Kc(),_i(7,"app-job-step-workspace",4),gh("selectExecution",function(o){Pu(e);let m=VD();return Lu(m.onNestedSelect(o))}),Kc()();}if(t&2){let e=s,i=VD();gI(2),nl(" ",Ow(3,9,"jobs.detail.loopBack")," "),gI(3),nl(" ",Pw(6,11,"jobs.detail.loopIteration",xw(14,de,e.index+1))," "),gI(2),ch("definitions",i.nestedLoopDefinition().steps)("executions",e.stepExecutions)("job",i.job())("selectedExecutionId",i.nestedSelectedId())("currentExecutionId",null)("waitingEvent",null)("canResume",false);}}function he(t,s){if(t&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD().$implicit,i=VD(2);ah("data-testid","step-status-"+e.definition.id),gI(),Ph(Ow(2,2,i.stepStatusKey(s.status)));}}function ve(t,s){if(t&1){let e=LD();_i(0,"li")(1,"button",9),gh("click",function(){let o=Pu(e).$implicit,m=VD(2);return Lu(m.onStepClick(o))}),_i(2,"span",10),vw(3),Kc(),_i(4,"span",11)(5,"span",12),vw(6),Rw(7,"transloco"),Kc(),bD(8,he,3,4,"nz-tag"),Kc()()();}if(t&2){let e,i=s.$implicit,o=VD(2);gI(),Mh("selected",o.isSelected(i))("current",o.isCurrent(i))("unreached",!i.reached),ch("disabled",!i.reached),ah("data-testid","step-"+i.definition.id),gI(2),Ph(i.definition.name),gI(3),Ph(Ow(7,11,o.stepTypeKey(i.definition.type))),gI(2),_D((e=i.execution)?8:-1,e);}}function Ee(t,s){t&1&&(_i(0,"p",8),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.noStepSelected")," "));}function Se(t,s){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"jobs.detail.inProgress.loop")));}function we(t,s){if(t&1){let e=LD();_i(0,"li")(1,"button",19),gh("click",function(){let o=Pu(e).$implicit,m=VD(4);return Lu(m.openIteration(m.selectedDefinition(),o))}),vw(2),Rw(3,"transloco"),Kc()();}if(t&2){let e=s.$implicit;gI(),ah("data-testid","loop-iteration-"+e.index),gI(),nl(" ",Pw(3,2,"jobs.detail.loopIteration",xw(5,de,e.index+1))," ");}}function Ie(t,s){t&1&&(_i(0,"li",12),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"jobs.detail.noIterations")));}function Te(t,s){if(t&1&&(_i(0,"p",18),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.selectedExecution().error);}}function ke(t,s){if(t&1&&(_i(0,"div",13)(1,"h3"),vw(2),Kc(),bD(3,Se,3,3,"p",16),_i(4,"ul",17),ND(5,we,4,7,"li",null,ge,false,Ie,3,3,"li",12),Kc(),bD(8,Te,2,1,"p",18),Kc()),t&2){let e=VD(3);gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.isRunning(e.selectedExecution())?3:-1),gI(2),xD(e.selectedExecution().iterations??Nw(4,ce)),gI(3),_D(e.selectedExecution().error?8:-1);}}function Me(t,s){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.inProgress.sub_workflow")," "));}function ye(t,s){if(t&1&&(_i(0,"p",18),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.selectedExecution().error);}}function je(t,s){if(t&1&&(_i(0,"div",14)(1,"h3"),vw(2),Kc(),bD(3,Me,3,3,"p",16),lh(4,"app-job-status-table",20),bD(5,ye,2,1,"p",18),Kc()),t&2){let e=VD(3);gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.isRunning(e.selectedExecution())?3:-1),gI(),ch("jobIds",e.selectedExecution().childJobIds??Nw(4,ce)),gI(),_D(e.selectedExecution().error?5:-1);}}function De(t,s){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=s.$implicit;gI(),Ph(e);}}function Je(t,s){t&1&&(_i(0,"li",12),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"jobs.resume.noQuestions")));}function Pe(t,s){if(t&1&&(_i(0,"p",25),vw(1),Kc()),t&2){let e=VD(5);gI(),Ph(e.resumeParseError());}}function Ne(t,s){if(t&1){let e=LD();_i(0,"section",21)(1,"h4"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul",23),ND(5,De,2,1,"li",null,MD,false,Je,3,3,"li",12),Kc(),_i(8,"label"),vw(9),Rw(10,"transloco"),_i(11,"textarea",24),gh("input",function(o){Pu(e);let m=VD(4);return Lu(m.onResumeTextInput(o))}),Kc()(),bD(12,Pe,2,1,"p",25),_i(13,"button",26),gh("click",function(){Pu(e);let o=VD(4);return Lu(o.resumeSubmit.emit())}),vw(14),Rw(15,"transloco"),Kc()();}if(t&2){let e=VD(4);gI(2),Ph(Ow(3,7,"jobs.resume.heading")),gI(3),xD(e.waitingPrompts()),gI(4),nl(" ",Ow(10,9,"jobs.resume.jsonLabel")," "),gI(2),ch("value",e.resumeText()),gI(),_D(e.resumeParseError()?12:-1),gI(),ch("disabled",e.resuming()),gI(),nl(" ",Ow(15,11,e.resuming()?"jobs.resume.submitting":"jobs.resume.button")," ");}}function Oe(t,s){if(t&1&&(_i(0,"pre",22),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.formatOutput(e.selectedExecution()));}}function We(t,s){if(t&1&&(_i(0,"div",15)(1,"h3"),vw(2),Kc(),bD(3,Ne,16,13,"section",21)(4,Oe,2,1,"pre",22),Kc()),t&2){let e=VD(3);gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.showResume()?3:4);}}function ze(t,s){if(t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD(4);gI(),nl(" ",Ow(2,1,"jobs.detail.inProgress."+e.selectedExecution().type)," ");}}function Re(t,s){if(t&1&&(_i(0,"p",27),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.selectedExecution().error);}}function Be(t,s){if(t&1&&(_i(0,"pre",22),vw(1),Kc()),t&2){let e=VD(4);gI(),Ph(e.formatOutput(e.selectedExecution()));}}function Fe(t,s){if(t&1&&(_i(0,"div")(1,"h3"),vw(2),Kc(),bD(3,ze,3,3,"p",16)(4,Re,2,1,"p",27)(5,Be,2,1,"pre",22),Kc()),t&2){let e=VD(3);ah("data-testid",e.selectedExecution().type+"-view"),gI(2),Ph(e.selectedDefinition()?.name),gI(),_D(e.isRunning(e.selectedExecution())?3:e.selectedExecution().error?4:5);}}function Ve(t,s){if(t&1&&bD(0,ke,9,5,"div",13)(1,je,6,5,"div",14)(2,We,5,2,"div",15)(3,Fe,6,3,"div"),t&2){let e,i=VD(2);_D((e=i.selectedExecution().type)==="loop"?0:e==="sub_workflow"?1:e==="interaction"?2:3);}}function Le(t,s){if(t&1&&(_i(0,"aside",5)(1,"h3"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul",6),ND(5,ve,9,13,"li",null,Ce),Kc()(),_i(7,"section",7),bD(8,Ee,3,3,"p",8)(9,Ve,4,1),Kc()),t&2){let e=VD();gI(2),Ph(Ow(3,2,"jobs.detail.stepsHeading")),gI(3),xD(e.rows()),gI(3),_D(e.selectedExecution()?9:8);}}var pe=(()=>{class t{constructor(){this.definitions=$0.required(),this.executions=$0.required(),this.job=$0.required(),this.selectedExecutionId=$0(null),this.currentExecutionId=$0(null),this.waitingEvent=$0(null),this.resumeText=$0(`{
2
+
3
+ }`),this.resumeParseError=$0(null),this.resuming=$0(false),this.canResume=$0(false),this.selectExecution=B0(),this.resumeTextChange=B0(),this.resumeSubmit=B0(),this.nestedIteration=qo(null),this.nestedLoopDefinition=qo(null),this.nestedSelectedId=qo(null),this.rows=Hw(()=>it(this.definitions(),this.executions())),this.selectedExecution=Hw(()=>{let e=this.selectedExecutionId();return e?this.executions().find(i=>i.id===e)??null:null}),this.selectedDefinition=Hw(()=>{let e=this.selectedExecution();return e?this.definitions().find(i=>i.id===e.stepDefinitionId)??null:null}),this.waitingPrompts=Hw(()=>{let e=this.waitingEvent();return e?e.questions.length>0?e.questions:e.data!=null?[JSON.stringify(e.data,null,2)]:[]:[]}),this.showResume=Hw(()=>{if(!this.canResume())return false;let e=this.selectedExecution(),i=this.currentExecutionId();return e!=null&&e.id===i&&e.type==="interaction"&&this.job().status==="waiting_for_human"});}stepStatusKey(e){return `jobs.stepStatus.${e}`}stepTypeKey(e){return `step-list.stepType.${e}`}onStepClick(e){!e.reached||!e.execution||(this.nestedIteration.set(null),this.nestedLoopDefinition.set(null),this.selectExecution.emit(e.execution.id));}openIteration(e,i){this.nestedLoopDefinition.set(e),this.nestedIteration.set(i);let o=i.stepExecutions[0];this.nestedSelectedId.set(o?.id??null);}closeIteration(){this.nestedIteration.set(null),this.nestedLoopDefinition.set(null),this.nestedSelectedId.set(null);}onNestedSelect(e){this.nestedSelectedId.set(e);}onResumeTextInput(e){this.resumeTextChange.emit(e.target.value);}formatOutput(e){return e.error?e.error:e.output===void 0?"":typeof e.output=="string"?e.output:JSON.stringify(e.output,null,2)}isRunning(e){return e?.status==="running"}isSelected(e){return e.execution!=null&&e.execution.id===this.selectedExecutionId()}isCurrent(e){return e.execution!=null&&e.execution.id===this.currentExecutionId()}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-step-workspace"]],inputs:{definitions:[1,"definitions"],executions:[1,"executions"],job:[1,"job"],selectedExecutionId:[1,"selectedExecutionId"],currentExecutionId:[1,"currentExecutionId"],waitingEvent:[1,"waitingEvent"],resumeText:[1,"resumeText"],resumeParseError:[1,"resumeParseError"],resuming:[1,"resuming"],canResume:[1,"canResume"]},outputs:{selectExecution:"selectExecution",resumeTextChange:"resumeTextChange",resumeSubmit:"resumeSubmit"},decls:3,vars:1,consts:[["data-testid","job-step-workspace",1,"workspace"],["data-testid","loop-drill-in",1,"nested"],["nz-button","","nzType","link","type","button","data-testid","loop-back",3,"click"],[1,"nested-label"],[3,"selectExecution","definitions","executions","job","selectedExecutionId","currentExecutionId","waitingEvent","canResume"],["data-testid","step-side-panel",1,"side-panel"],[1,"step-list"],["data-testid","step-main-area",1,"main-area"],["data-testid","no-step-selected",1,"muted"],["type","button",1,"step-button",3,"click","disabled"],[1,"step-name"],[1,"step-meta"],[1,"muted"],["data-testid","loop-view"],["data-testid","sub-workflow-view"],["data-testid","interaction-view"],["data-testid","step-in-progress"],["data-testid","loop-iterations",1,"iteration-list"],[1,"error"],["nz-button","","nzType","link","type","button",3,"click"],[3,"jobIds"],["data-testid","resume-form",1,"resume"],["data-testid","step-output"],["data-testid","waiting-questions"],["data-testid","resume-json","rows","8",3,"input","value"],["data-testid","resume-parse-error",1,"error"],["nz-button","","nzType","primary","type","button","data-testid","resume-button",3,"click","disabled"],["data-testid","step-error",1,"error"]],template:function(i,o){if(i&1&&(_i(0,"div",0),bD(1,be,8,16,"div",1)(2,Le,10,4),Kc()),i&2){let m;gI(),_D((m=o.nestedIteration())?1:2,m);}},dependencies:[t,Fn,sd,zc,t7,y7,W$1,I,vt,ec],styles:[".workspace[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(14rem,18rem) 1fr;gap:1rem;align-items:start;min-height:20rem}.nested[_ngcontent-%COMP%]{grid-column:1 / -1}.nested-label[_ngcontent-%COMP%]{margin:0 0 .75rem;color:#57534e}.side-panel[_ngcontent-%COMP%]{border:1px solid #d6d3d1;background:#ffffffbf;padding:.75rem}.side-panel[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem}.step-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}.step-button[_ngcontent-%COMP%]{width:100%;text-align:left;font:inherit;padding:.45rem .55rem;border:1px solid transparent;background:transparent;cursor:pointer;display:flex;flex-direction:column;gap:.2rem}.step-button[_ngcontent-%COMP%]:hover:not(:disabled){background:#f5f5f4}.step-button.selected[_ngcontent-%COMP%]{border-color:#a8a29e;background:#fafaf9}.step-button.current[_ngcontent-%COMP%]{box-shadow:inset 3px 0 #0c0a09}.step-button[_ngcontent-%COMP%]:disabled, .step-button.unreached[_ngcontent-%COMP%]{opacity:.55;cursor:not-allowed}.step-name[_ngcontent-%COMP%]{font-weight:600}.step-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;font-size:.8rem}.main-area[_ngcontent-%COMP%]{border:1px solid #d6d3d1;background:#ffffffd9;padding:1rem;min-height:16rem}.main-area[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0}.muted[_ngcontent-%COMP%]{color:#78716c}.error[_ngcontent-%COMP%]{color:#9f1239}pre[_ngcontent-%COMP%]{overflow:auto;padding:.75rem;background:#f5f5f4;border:1px solid #d6d3d1;font-size:.85rem}.iteration-list[_ngcontent-%COMP%]{padding-left:1.1rem}.resume[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0}.resume[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{font:inherit;font-family:ui-monospace,Consolas,monospace;padding:.4rem .5rem;border:1px solid #a8a29e}@media(max-width:48rem){.workspace[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});}}return t})();function Ae(t,s){t&1&&(_i(0,"p",1),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function $e(t,s){if(t&1&&(_i(0,"p",2),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function qe(t,s){if(t&1){let e=LD();_i(0,"button",15),gh("click",function(){Pu(e);let o=VD(2);return Lu(o.jumpToCurrent())}),vw(1),Rw(2,"transloco"),Kc();}t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.jumpToCurrent")," "));}function Ke(t,s){if(t&1&&(_i(0,"p",11),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.actionError());}}function Qe(t,s){t&1&&(lh(0,"nz-alert",12),Rw(1,"transloco")),t&2&&ch("nzMessage",Ow(1,1,"jobs.detail.queued"));}function He(t,s){if(t&1){let e=LD();_i(0,"app-job-step-workspace",16),gh("selectExecution",function(o){Pu(e);let m=VD(2);return Lu(m.onSelectExecution(o))})("resumeTextChange",function(o){Pu(e);let m=VD(2);return Lu(m.setResumeText(o))})("resumeSubmit",function(){Pu(e);let o=VD(2);return Lu(o.submitResume())}),Kc();}if(t&2){let e=VD(),i=VD();ch("definitions",s.steps)("executions",e.stepHistory)("job",e)("selectedExecutionId",i.viewedExecutionId())("currentExecutionId",i.currentStep()?.id??null)("waitingEvent",i.waitingEvent())("resumeText",i.resumeText())("resumeParseError",i.resumeParseError())("resuming",i.resuming())("canResume",true);}}function Ue(t,s){t&1&&(_i(0,"p",14),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.detail.workflowMissing")," "));}function Ge(t,s){if(t&1&&(_i(0,"header",3)(1,"div")(2,"a",4),vw(3),Rw(4,"transloco"),Kc(),_i(5,"h1",5),vw(6),Kc(),_i(7,"p",6)(8,"span",7),vw(9),Kc(),vw(10," \xB7 "),_i(11,"nz-tag",8),vw(12),Rw(13,"transloco"),Kc(),vw(14," \xB7 "),_i(15,"span",9),vw(16),Kc()()(),bD(17,qe,3,3,"button",10),Kc(),bD(18,Ke,2,1,"p",11),bD(19,Qe,2,3,"nz-alert",12)(20,He,1,10,"app-job-step-workspace",13)(21,Ue,3,3,"p",14)),t&2){let e,i=s,o=VD();gI(3),Ph(Ow(4,8,"jobs.detail.backToStart")),gI(3),Ph(i.id),gI(3),Ph(i.workflowId),gI(3),Ph(Ow(13,10,o.statusKey(i.status))),gI(4),Ph(o.subjectText()),gI(),_D(o.showJumpToCurrent()?17:-1),gI(),_D(o.actionError()?18:-1),gI(),_D(o.showQueued()?19:(e=o.workflow())?20:21,e);}}var Et=(()=>{class t{constructor(){this.route=C(W),this.jobsApi=C(U),this.workflowsApi=C(U$1),this.eventsService=C(f),this.transloco=C(ar),this.destroyRef=C(at),this.job=qo(null),this.workflow=qo(null),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.eventStream=qo(null),this.eventsSnapshot=qo([]),this.autoFollow=qo(true),this.viewedExecutionId=qo(null),this.resumeText=qo(`{
4
+
5
+ }`),this.resumeParseError=qo(null),this.resuming=qo(false),this.currentStep=Hw(()=>{let e=this.job();return e?et(e):null}),this.showQueued=Hw(()=>{let e=this.job();return e!=null&&et(e)==null}),this.showJumpToCurrent=Hw(()=>{let e=this.currentStep();return e?this.viewedExecutionId()!==e.id:false}),this.eventLog=Hw(()=>this.eventStream()?.events()??this.eventsSnapshot()),this.waitingEvent=Hw(()=>{let e=this.eventLog();for(let i=e.length-1;i>=0;i-=1){let o=e[i];if(o?.type==="waiting_for_human")return o}return null}),this.destroyRef.onDestroy(()=>this.closeStream()),this.route.paramMap.pipe(Rt(this.destroyRef)).subscribe(e=>{let i=e.get("id");if(!i){this.loading.set(false),this.loadError.set(this.transloco.translate("jobs.detail.loadFailed"));return}this.load(i);}),rd(()=>{let e=this.eventStream();if(!e)return;let i=e.latest();i&&Bw(()=>{(i.type==="step_started"||i.type==="step_completed"||i.type==="step_failed"||i.type==="waiting_for_human"||i.type==="waiting_for_children"||i.type==="human_answered"||i.type==="job_completed"||i.type==="job_failed")&&this.refreshJob(i.jobId),(i.type==="job_completed"||i.type==="job_failed")&&this.closeStream();});}),rd(()=>{let e=this.currentStep();this.autoFollow()&&Bw(()=>{this.viewedExecutionId.set(e?.id??null);});});}statusKey(e){return `jobs.status.${e}`}subjectText(){return U$2(this.job()?.subjectContext)??"\u2014"}onSelectExecution(e){this.autoFollow.set(false),this.viewedExecutionId.set(e);}jumpToCurrent(){this.autoFollow.set(true),this.viewedExecutionId.set(this.currentStep()?.id??null);}setResumeText(e){this.resumeText.set(e),this.resumeParseError.set(null);}submitResume(){let e=this.job();if(!e)return;let i;try{i=JSON.parse(this.resumeText());}catch(o){this.resumeParseError.set(o instanceof Error?o.message:this.transloco.translate("jobs.resume.invalidJson"));return}this.resumeParseError.set(null),this.actionError.set(null),this.resuming.set(true),this.jobsApi.resume(e.id,i).subscribe({next:o=>{this.resuming.set(false),this.applyJob(o),G(o.status)&&this.closeStream();},error:o=>{this.resuming.set(false),this.actionError.set(this.errorMessage(o,this.transloco.translate("jobs.errors.resumeFailed")));}});}load(e){this.loading.set(true),this.loadError.set(null),this.actionError.set(null),this.autoFollow.set(true),this.viewedExecutionId.set(null),this.resumeText.set(`{
6
+
7
+ }`),this.resumeParseError.set(null),this.closeStream(),this.eventsSnapshot.set([]),this.jobsApi.get(e).pipe(Rt(this.destroyRef)).subscribe({next:i=>{this.workflowsApi.get(i.workflowId).subscribe({next:o=>{this.workflow.set(o),this.applyJob(i),this.loading.set(false),G(i.status)||this.eventStream.set(this.eventsService.connect({jobId:i.id}));},error:o=>{this.workflow.set(null),this.applyJob(i),this.loading.set(false),this.actionError.set(this.errorMessage(o,this.transloco.translate("jobs.detail.workflowLoadFailed"))),G(i.status)||this.eventStream.set(this.eventsService.connect({jobId:i.id}));}});},error:i=>{this.loading.set(false),this.loadError.set(this.errorMessage(i,this.transloco.translate("jobs.detail.loadFailed")));}});}applyJob(e){this.job.set(e),this.autoFollow()&&this.viewedExecutionId.set(et(e)?.id??null);}refreshJob(e){this.jobsApi.get(e).subscribe({next:i=>this.applyJob(i),error:i=>{this.actionError.set(this.errorMessage(i,this.transloco.translate("jobs.errors.refreshFailed")));}});}closeStream(){let e=this.eventStream();e&&(this.eventsSnapshot.set(e.events()),e.close(),this.eventStream.set(null));}errorMessage(e,i){return e instanceof qe$1||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-detail"]],decls:4,vars:1,consts:[["data-testid","job-detail",1,"detail-page"],["data-testid","loading"],["data-testid","load-error",1,"error"],[1,"header"],["routerLink","/jobs"],["data-testid","job-id"],[1,"meta"],["data-testid","job-workflow"],["data-testid","job-status"],["data-testid","job-subject"],["nz-button","","type","button","data-testid","jump-to-current"],["data-testid","action-error",1,"error"],["data-testid","queued-message","nzType","info",3,"nzMessage"],[3,"definitions","executions","job","selectedExecutionId","currentExecutionId","waitingEvent","resumeText","resumeParseError","resuming","canResume"],["data-testid","missing-workflow",1,"muted"],["nz-button","","type","button","data-testid","jump-to-current",3,"click"],[3,"selectExecution","resumeTextChange","resumeSubmit","definitions","executions","job","selectedExecutionId","currentExecutionId","waitingEvent","resumeText","resumeParseError","resuming","canResume"]],template:function(i,o){if(i&1&&(_i(0,"main",0),bD(1,Ae,3,3,"p",1)(2,$e,2,1,"p",2)(3,Ge,22,12),Kc()),i&2){let m;gI(),_D(o.loading()?1:o.loadError()?2:(m=o.job())?3:-1,m);}},dependencies:[Fn,Mt,Gn,un,sd,zc,t7,y7,W$1,I,pe,ec],styles:[".detail-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:1.35rem;word-break:break-all}.meta[_ngcontent-%COMP%]{margin:.35rem 0 0;color:#57534e;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.error[_ngcontent-%COMP%]{color:#9f1239}.muted[_ngcontent-%COMP%]{color:#78716c}"]});}}return t})();export{Et as JobDetailComponent};
@@ -0,0 +1 @@
1
+ import {a0 as $0,a1 as B0,s,r,Q as QE,F as Fn,bW as Jc,N as ND,bX as Xc,p as gI,y as xD,v as vw,m as bD,u as nl,A as _D,L as LD,bY as mh,B as VD,bZ as ph,a5 as ah,S as SD,a6 as Nw,P as Ph,E as Pu,G as Lu}from'./main-BK4MAPTK.js';var P=()=>[],$=(t,r)=>r.name;function S(t,r){t&1&&(Jc(0,"span",1),vw(1,"*"),Xc());}function O(t,r){if(t&1){let e=LD();Jc(0,"input",6),mh("change",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("checked",n.checked(e)),ah("data-testid","input-"+e.name);}}function D(t,r){if(t&1){let e=LD();Jc(0,"input",7),mh("input",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function L(t,r){if(t&1&&(Jc(0,"option",4),vw(1),Xc()),t&2){let e=r.$implicit;ph("value",e),gI(),Ph(e);}}function q(t,r){if(t&1){let e=LD();Jc(0,"select",8),mh("change",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),ND(1,L,2,2,"option",4,SD),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name),gI(),xD(e.options??Nw(2,P));}}function N(t,r){if(t&1){let e=LD();Jc(0,"input",9),mh("input",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function B(t,r){if(t&1&&(Jc(0,"label"),vw(1),bD(2,S,2,0,"span",1),bD(3,O,1,2,"input",2)(4,D,1,2,"input",3)(5,q,3,3,"select",4)(6,N,1,2,"input",5),Xc()),t&2){let e,n=r.$implicit;gI(),nl(" ",n.label," "),gI(),_D(n.required?2:-1),gI(),_D((e=n.type)==="boolean"?3:e==="number"?4:e==="select"?5:6);}}function z(t){if(t.defaultValue!==void 0)return t.defaultValue;switch(t.type){case "boolean":return false;case "number":return "";case "select":return t.options?.[0]??"";default:return ""}}function J(t){let r={};for(let e of t)r[e.name]=z(e);return r}var K=(()=>{class t{constructor(){this.fields=$0([]),this.values=$0({}),this.valuesChange=B0();}displayValue(e){let n=this.values()[e.name];return n==null?"":String(n)}checked(e){return !!this.values()[e.name]}setValue(e,n){let o=n.target,a=o.value;e.type==="boolean"?a=o.checked:e.type==="number"&&(a=o.value===""?"":Number(o.value)),this.valuesChange.emit(s(r({},this.values()),{[e.name]:a}));}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-input-form"]],inputs:{fields:[1,"fields"],values:[1,"values"]},outputs:{valuesChange:"valuesChange"},decls:3,vars:0,consts:[["data-testid","workflow-input-form",1,"input-form"],[1,"required"],["type","checkbox",3,"checked"],["type","number",3,"value"],[3,"value"],["type","text",3,"value"],["type","checkbox",3,"change","checked"],["type","number",3,"input","value"],[3,"change","value"],["type","text",3,"input","value"]],template:function(n,o){n&1&&(Jc(0,"div",0),ND(1,B,7,3,"label",null,$),Xc()),n&2&&(gI(),xD(o.fields()));},dependencies:[Fn],styles:["label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}input[type=checkbox][_ngcontent-%COMP%]{width:1.1rem;height:1.1rem}.required[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{J,K};
@@ -0,0 +1 @@
1
+ import {C,b_ as Kn,a8 as sc,b$ as Xa,c0 as lc,i as ie}from'./main-BK4MAPTK.js';var U=(()=>{class r{constructor(){this.http=C(Kn),this.baseUrl=`${sc.apiBaseUrl}/workflows`;}list(t){return this.http.get(this.baseUrl,{params:Xa(t)}).pipe(lc())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(lc())}create(t){return this.http.post(this.baseUrl,t).pipe(lc())}update(t,i){return this.http.patch(`${this.baseUrl}/${encodeURIComponent(t)}`,i).pipe(lc())}delete(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(lc())}static{this.\u0275fac=function(i){return new(i||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
@@ -0,0 +1 @@
1
+ import {W,I}from'./chunk-Dw1tJgiv.js';import {d as dr,c as ca,r as rr,o as oa,s as sr,V as Vn,p as pa}from'./chunk-BQYw1slv.js';import {C,U as U$1,b as at,a0 as $0,q as qo,X as rd,Y as Bw,a9 as Sg,aa as rs,ab as Og,R as Rt,Q as QE,F as Fn,M as Mt,f as ec,m as bD,A as _D,g as _i,v as vw,h as Rw,K as Kc,p as gI,P as Ph,O as Ow,B as VD,N as ND,w as ch,y as xD,a5 as ah,a3 as xw,u as nl}from'./main-BK4MAPTK.js';var q=new Set(["completed","failed","cancelled"]);function G(e){return q.has(e)}function et(e){let o=e.stepHistory.find(t=>t.status==="running");if(o)return o;if((e.status==="waiting_for_human"||e.status==="waiting_for_children")&&e.currentStepExecutionId){let t=e.stepHistory.find(n=>n.id===e.currentStepExecutionId);if(t)return t}return G(e.status)&&e.stepHistory.length>0?e.stepHistory[e.stepHistory.length-1]??null:null}function it(e,o){let t=new Map;for(let n of o)t.set(n.stepDefinitionId,n);return e.map(n=>{let d=t.get(n.id)??null;return {definition:n,execution:d,reached:d!=null}})}function U(e){if(!e)return null;if(e.mode==="single"){let t=e.subject;return `${t.id} \xB7 ${t.title}`}let o=e.subjects.length;if(o===0)return null;if(o===1){let t=e.subjects[0];return `${t.id} \xB7 ${t.title}`}return `${o} subjects`}var Q=e=>["/jobs",e],V=(e,o)=>o.id;function X(e,o){e&1&&(_i(0,"p",0),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Y(e,o){if(e&1&&(_i(0,"p",1),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.loadError());}}function Z(e,o){if(e&1&&(_i(0,"tr")(1,"td")(2,"a",3),vw(3),Kc()(),_i(4,"td")(5,"nz-tag"),vw(6),Rw(7,"transloco"),Kc()(),_i(8,"td")(9,"span"),vw(10),Kc()(),_i(11,"td")(12,"span"),vw(13),Kc()(),_i(14,"td")(15,"span"),vw(16),Kc()()()),e&2){let t=o.$implicit,n=VD(2);ah("data-testid","job-row-"+t.id),gI(2),ch("routerLink",xw(14,Q,t.id)),ah("data-testid","job-link-"+t.id),gI(),nl(" ",t.id," "),gI(2),ah("data-testid","job-status-"+t.id),gI(),Ph(Ow(7,12,n.statusKey(t.status))),gI(3),ah("data-testid","job-subject-"+t.id),gI(),Ph(n.subjectText(t)),gI(2),ah("data-testid","job-started-"+t.id),gI(),Ph(t.createdAt),gI(2),ah("data-testid","job-completed-"+t.id),gI(),Ph(t.completedAt??"\u2014");}}function tt(e,o){if(e&1&&(_i(0,"nz-table",2)(1,"thead")(2,"tr")(3,"th"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc(),_i(12,"th"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"th"),vw(16),Rw(17,"transloco"),Kc()()(),_i(18,"tbody"),ND(19,Z,17,16,"tr",null,V),Kc()()),e&2){let t=VD();ch("nzData",t.displayJobs())("nzFrontPagination",false)("nzShowPagination",false)("nzSize","middle"),gI(4),Ph(Ow(5,9,"jobs.table.column.id")),gI(3),Ph(Ow(8,11,"jobs.table.column.status")),gI(3),Ph(Ow(11,13,"jobs.table.column.subject")),gI(3),Ph(Ow(14,15,"jobs.table.column.started")),gI(3),Ph(Ow(17,17,"jobs.table.column.completed")),gI(3),xD(t.displayJobs());}}var vt=(()=>{class e{constructor(){this.jobsApi=C(U$1),this.destroyRef=C(at),this.jobs=$0(null),this.jobIds=$0([]),this.loaded=qo([]),this.loading=qo(false),this.loadError=qo(null),rd(()=>{let t=this.jobs(),n=this.jobIds();if(t!=null){Bw(()=>{this.loaded.set([]),this.loading.set(false),this.loadError.set(null);});return}if(n.length===0){Bw(()=>{this.loaded.set([]),this.loading.set(false);});return}Bw(()=>{this.loading.set(true),this.loadError.set(null),Sg(n.map(d=>this.jobsApi.get(d).pipe(rs(()=>Og(null))))).pipe(Rt(this.destroyRef)).subscribe({next:d=>{this.loaded.set(d.filter(W=>W!=null)),this.loading.set(false);},error:()=>{this.loading.set(false),this.loadError.set("Failed to load jobs");}});});});}displayJobs(){let t=this.jobs();return t??this.loaded()}statusKey(t){return `jobs.status.${t}`}subjectText(t){return U(t.subjectContext)??"\u2014"}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-job-status-table"]],inputs:{jobs:[1,"jobs"],jobIds:[1,"jobIds"]},decls:3,vars:1,consts:[["data-testid","job-status-loading"],["data-testid","job-status-error",1,"error"],["data-testid","job-status-table",3,"nzData","nzFrontPagination","nzShowPagination","nzSize"],[3,"routerLink"]],template:function(n,d){n&1&&bD(0,X,3,3,"p",0)(1,Y,2,1,"p",1)(2,tt,21,19,"nz-table",2),n&2&&_D(d.loading()&&d.jobs()==null?0:d.loadError()?1:2);},dependencies:[Fn,Mt,dr,ca,rr,oa,sr,Vn,pa,W,I,ec],styles:[".error[_ngcontent-%COMP%]{color:#9f1239}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return e})();export{G,U,et as e,it as i,vt as v};
@@ -0,0 +1 @@
1
+ import {J,K as K$1}from'./chunk-Csk1w6sD.js';import {U}from'./chunk-DI-Ex2sC.js';import {C,U as U$1,I as ue,a as ar,W,q as qo,H as Hw,s,r,c as qe,Q as QE,F as Fn,M as Mt,f as ec,g as _i,v as vw,h as Rw,K as Kc,m as bD,j as gh,N as ND,p as gI,P as Ph,O as Ow,A as _D,u as nl,w as ch,y as xD,B as VD,T as Lh,L as LD,E as Pu,G as Lu}from'./main-BK4MAPTK.js';var L=(t,p)=>p.id;function $(t,p){if(t&1&&(_i(0,"p",3),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function z(t,p){if(t&1&&(_i(0,"option",6),vw(1),Kc()),t&2){let e=p.$implicit;ch("value",e.id),gI(),Lh("",e.name," (",e.id,")");}}function G(t,p){if(t&1){let e=LD();_i(0,"label"),vw(1),Rw(2,"transloco"),_i(3,"input",10),Rw(4,"transloco"),gh("input",function(o){Pu(e);let s=VD(2);return Lu(s.setSubjectId(o))}),Kc()();}if(t&2){let e=VD(2);gI(),nl(" ",Ow(2,3,"jobs.start.subjectId")," "),gI(2),ch("value",e.subjectId())("placeholder",Ow(4,5,"jobs.start.subjectIdPlaceholder"));}}function H(t,p){if(t&1){let e=LD();bD(0,G,5,7,"label"),_i(1,"app-workflow-input-form",9),gh("valuesChange",function(o){Pu(e);let s=VD();return Lu(s.inputValues.set(o))}),Kc();}if(t&2){let e=VD();_D(e.needsSubjectId()?0:-1),gI(),ch("fields",p.inputSchema)("values",e.inputValues());}}function K(t,p){if(t&1&&(_i(0,"p",8),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.actionError());}}var re=(()=>{class t{constructor(){this.workflowsApi=C(U),this.jobsApi=C(U$1),this.router=C(ue),this.transloco=C(ar),this.route=C(W),this.workflows=qo([]),this.selectedWorkflowId=qo(""),this.subjectId=qo(""),this.inputValues=qo({}),this.loadError=qo(null),this.actionError=qo(null),this.starting=qo(false),this.selectedWorkflow=Hw(()=>this.workflows().find(e=>e.id===this.selectedWorkflowId())??null),this.needsSubjectId=Hw(()=>{let e=this.selectedWorkflow();return e!=null&&e.appliesTo!=="none"}),this.workflowsApi.list({cardinality:"single"}).subscribe({next:e=>{this.workflows.set(e);let n=this.route.snapshot.queryParamMap.get("workflowId"),o=n&&e.some(C=>C.id===n)?n:e[0]?.id;o&&this.selectWorkflow(o);let s=this.route.snapshot.queryParamMap.get("subjectId");s&&this.subjectId.set(s);},error:e=>{this.loadError.set(this.errorMessage(e,this.transloco.translate("jobs.errors.loadWorkflows")));}});}selectWorkflow(e){this.selectedWorkflowId.set(e);let n=this.workflows().find(o=>o.id===e);this.inputValues.set(J(n?.inputSchema??[])),this.actionError.set(null);}onWorkflowChange(e){let n=e.target.value;this.selectWorkflow(n);}setSubjectId(e){this.subjectId.set(e.target.value);}start(){let e=this.selectedWorkflow();if(e){if(this.needsSubjectId()&&!this.subjectId().trim()){this.actionError.set(this.transloco.translate("jobs.errors.subjectIdRequired"));return}this.actionError.set(null),this.starting.set(true),this.jobsApi.start(s(r({workflowId:e.id},this.needsSubjectId()?{subjectId:this.subjectId().trim()}:{}),{inputValues:r({},this.inputValues())})).subscribe({next:n=>{this.starting.set(false),this.router.navigate(["/jobs",n.id]);},error:n=>{this.starting.set(false),this.actionError.set(this.errorMessage(n,this.transloco.translate("jobs.errors.startFailed")));}});}}errorMessage(e,n){return e instanceof qe||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-runner"]],decls:26,vars:23,consts:[[1,"runner"],["routerLink","/jobs"],[1,"lede"],["data-testid","load-error",1,"error"],["data-testid","start-form",1,"panel"],["data-testid","workflow-select",3,"change","value"],[3,"value"],["data-testid","start-button","type","button",3,"click","disabled"],["data-testid","action-error",1,"error"],[3,"valuesChange","fields","values"],["data-testid","subject-id","type","text",3,"input","value","placeholder"]],template:function(n,o){if(n&1&&(_i(0,"main",0)(1,"a",1),vw(2),Rw(3,"transloco"),Kc(),_i(4,"h1"),vw(5),Rw(6,"transloco"),Kc(),_i(7,"p",2),vw(8),Rw(9,"transloco"),Kc(),bD(10,$,2,1,"p",3),_i(11,"section",4)(12,"h2"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"label"),vw(16),Rw(17,"transloco"),_i(18,"select",5),gh("change",function(C){return o.onWorkflowChange(C)}),ND(19,z,2,3,"option",6,L),Kc()(),bD(21,H,2,3),_i(22,"button",7),gh("click",function(){return o.start()}),vw(23),Rw(24,"transloco"),Kc()(),bD(25,K,2,1,"p",8),Kc()),n&2){let s;gI(2),Ph(Ow(3,11,"jobs.detail.backToStart")),gI(3),Ph(Ow(6,13,"jobs.title")),gI(3),Ph(Ow(9,15,"jobs.lede")),gI(2),_D(o.loadError()?10:-1),gI(3),Ph(Ow(14,17,"jobs.start.heading")),gI(3),nl(" ",Ow(17,19,"jobs.start.workflow")," "),gI(2),ch("value",o.selectedWorkflowId()),gI(),xD(o.workflows()),gI(2),_D((s=o.selectedWorkflow())?21:-1,s),gI(),ch("disabled",o.starting()),gI(),nl(" ",Ow(24,21,o.starting()?"jobs.start.starting":"jobs.start.button")," "),gI(2),_D(o.actionError()?25:-1);}},dependencies:[Fn,Mt,K$1,ec],styles:[".runner[_ngcontent-%COMP%]{max-width:52rem;margin:0 auto;padding:1.5rem;color:#1c1917;line-height:1.45}.lede[_ngcontent-%COMP%]{color:#57534e}.panel[_ngcontent-%COMP%]{margin-top:1.25rem;padding:1rem 0;border-top:1px solid #d6d3d1}label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}button[_ngcontent-%COMP%]{font:inherit;margin-top:.5rem;padding:.45rem .9rem;border:1px solid #44403c;background:#f5f5f4;cursor:pointer}button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{re as JobRunnerComponent};
@@ -0,0 +1 @@
1
+ import {ah as YE,ai as uu,C,bw as XI,an as _r,aq as Le,b0 as Le$1,bp as N7,bR as B7,Q as QE,aC as pt,aD as Se,bF as ly,ak as Z0,aG as BD,aX as $D,m as bD,p as gI,A as _D,j as gh,bS as _h,a4 as Mh,bT as fr,bU as pr,L as LD,g as _i,K as Kc,E as Pu,B as VD,G as Lu}from'./main-BK4MAPTK.js';var V=["*"];function x(o,A){if(o&1){let n=LD();_i(0,"nz-icon",1),gh("click",function(e){Pu(n);let i=VD();return Lu(i.closeTag(e))}),Kc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Le).valueSignal;nzMode="default";nzColor;nzChecked=false;nzBordered=true;nzOnClose=new Le$1;nzCheckedChange=new Le$1;isPresetColor=false;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked));}closeTag(n){this.nzOnClose.emit(n),n.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el);}clearPresetColor(){let n=new RegExp(`(ant-tag-(?:${[...fr,...pr].join("|")}))`,"g"),t=this.el.classList.toString(),e=[],i=n.exec(t);for(;i!==null;)e.push(i[1]),i=n.exec(t);this.el.classList.remove(...e);}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=N7(this.nzColor)||B7(this.nzColor):this.isPresetColor=false,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`);}ngOnChanges(n){let{nzColor:t}=n;t&&this.setPresetColor();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=QE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&gh("click",function(){return e.updateCheckedStatus()}),t&2&&(_h("background-color",e.isPresetColor?"":e.nzColor),Mh("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir()==="rtl")("ant-tag-borderless",!e.nzBordered));},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",Z0],nzBordered:[2,"nzBordered","nzBordered",Z0]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[ly],ngContentSelectors:V,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(t,e){t&1&&(BD(),$D(0),bD(1,x,1,0,"nz-icon",0)),t&2&&(gI(),_D(e.nzMode==="closeable"?1:-1));},dependencies:[pt,Se],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=YE({type:o});static \u0275inj=uu({imports:[I]})}return o})();export{I,W};