@knoflows/engine 0.1.0 → 0.1.1-alpha.0
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/engine.js +19 -19
- package/dist/migrations/20260921193000_local_repo_remote/migration.sql +3 -0
- package/dist/migrations/20260921193000_local_repo_remote/snapshot.json +1378 -0
- package/package.json +1 -1
- package/static/assets/i18n/en.json +14 -0
- package/static/assets/i18n/es.json +14 -0
- package/static/chunk--EZIkevK.js +1 -0
- package/static/{chunk-D3JZ8ur5.js → chunk-8ezEUcxN.js} +6 -6
- package/static/chunk-B17yZLWe.js +1 -0
- package/static/{chunk-7NTQwN96.js → chunk-B8OjWpOp.js} +1 -1
- package/static/chunk-BHko4hHm.js +1 -0
- package/static/{chunk-DSgUAlqN.js → chunk-BIJScqTM.js} +1 -1
- package/static/{chunk-B_R_vsLt.js → chunk-BKYaECRn.js} +1 -1
- package/static/chunk-BLN4QkSi.js +1 -0
- package/static/{chunk-BrP_q6LZ.js → chunk-BRAytoQl.js} +1 -1
- package/static/{chunk-xeQj_hSF.js → chunk-BaLWULJh.js} +1 -1
- package/static/{chunk-Dx92ksvP.js → chunk-BcDRgzYZ.js} +1 -1
- package/static/{chunk-5xJXPFlv.js → chunk-Bok52e_k.js} +1 -1
- package/static/{chunk-CuwZV6XG.js → chunk-BowAQ7m9.js} +1 -1
- package/static/{chunk-C9PkSfMb.js → chunk-Bz7bE4tT.js} +1 -1
- package/static/{chunk-BCHj6l85.js → chunk-C7P7hUiX.js} +1 -1
- package/static/{chunk-BcQQgpKh.js → chunk-CAxHAuhV.js} +1 -1
- package/static/{chunk-Cvoe3MtC.js → chunk-CGHIKxZG.js} +1 -1
- package/static/{chunk-CZoPJsBm.js → chunk-CJWR0gwk.js} +1 -1
- package/static/{chunk-BRZ5T52h.js → chunk-CZA-kp5w.js} +1 -1
- package/static/{chunk-ZqQUQSE8.js → chunk-CoQPYpxp.js} +1 -1
- package/static/{chunk-DAONFRT8.js → chunk-CtiubhW7.js} +1 -1
- package/static/{chunk-hpn_m1ZC.js → chunk-CwEMAptL.js} +1 -1
- package/static/{chunk-CRGkNzel.js → chunk-D-ueyYEC.js} +3 -3
- package/static/{chunk-DHC_yfIa.js → chunk-D1355dNd.js} +1 -1
- package/static/{chunk-CV-FUe_H.js → chunk-D8qyjd0z.js} +1 -1
- package/static/{chunk-Dg-4XevL.js → chunk-DOAz4S6b.js} +1 -1
- package/static/{chunk-VXZaUyyE.js → chunk-DbQy6dR8.js} +1 -1
- package/static/chunk-DdDI9wRc.js +5 -0
- package/static/{chunk-BIdwV0jx.js → chunk-Det50scT.js} +1 -1
- package/static/{chunk-BIL86kgf.js → chunk-Dm_EWkUz.js} +1 -1
- package/static/chunk-DoJknvak.js +1 -0
- package/static/{chunk-DEF7Ge5B.js → chunk-DrncP2Qx.js} +1 -1
- package/static/{chunk-DvWh-Q5D.js → chunk-EDwdt-Wk.js} +1 -1
- package/static/chunk-IjKs-6Cl.js +1 -0
- package/static/{chunk-DyiDg8XX.js → chunk-LPXHXTnJ.js} +1 -1
- package/static/{chunk-DVJ9L-aC.js → chunk-SiaN7xSQ.js} +1 -1
- package/static/{chunk-Bv1r1Ly-.js → chunk-YU-Bg77r.js} +1 -1
- package/static/{chunk-Ysn4Fbgj.js → chunk-bSS_wejP.js} +1 -1
- package/static/{chunk-CLM-K-Vg.js → chunk-iIEmH_ui.js} +1 -1
- package/static/{chunk-CPNxRF7A.js → chunk-vINo5yVD.js} +1 -1
- package/static/index.html +1 -1
- package/static/{main-SI5AKDMC.js → main-3VZRFHGG.js} +1 -1
- package/static/chunk--WRMKpmO.js +0 -5
- package/static/chunk-BaYdwXIA.js +0 -1
- package/static/chunk-C3Xml1YG.js +0 -1
- package/static/chunk-DDhSFoAE.js +0 -1
- package/static/chunk-DaO-gpzS.js +0 -1
- package/static/chunk-pi-mtheN.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a7 as KE,a8 as fu,C,bV as XI,bf as _r,ab as Oe,ae as Le$1,bW as Bl,bX as _l,Z as ZE,a3 as Ah,a4 as Th,ai as ly,av as K0,aj as $D,ak as UD,l as _D,o as gI,M as MD,m as mh,aP as Mh,al as Sh,bY as qn,bZ as $n,G as FD,j as _i,J as Jc,O as Fu,H as HD,Q as ju}from'./main-
|
|
1
|
+
import {a7 as KE,a8 as fu,C,bV as XI,bf as _r,ab as Oe,ae as Le$1,bW as Bl,bX as _l,Z as ZE,a3 as Ah,a4 as Th,ai as ly,av as K0,aj as $D,ak as UD,l as _D,o as gI,M as MD,m as mh,aP as Mh,al as Sh,bY as qn,bZ as $n,G as FD,j as _i,J as Jc,O as Fu,H as HD,Q as ju}from'./main-3VZRFHGG.js';var V=["*"];function x(o,A){if(o&1){let n=FD();_i(0,"nz-icon",1),mh("click",function(e){Fu(n);let i=HD();return ju(i.closeTag(e))}),Jc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Oe).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-(?:${[...qn,...$n].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=Bl(this.nzColor)||_l(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=ZE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&mh("click",function(){return e.updateCheckedStatus()}),t&2&&(Mh("background-color",e.isPresetColor?"":e.nzColor),Sh("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",K0],nzBordered:[2,"nzBordered","nzBordered",K0]},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&&($D(),UD(0),_D(1,x,1,0,"nz-icon",0)),t&2&&(gI(),MD(e.nzMode==="closeable"?1:-1));},dependencies:[Ah,Th],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=KE({type:o});static \u0275inj=fu({imports:[I]})}return o})();export{I,W};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p as pc,a as as,d as dc,K as Kl,U as Ul,c as cc,J as Ji,l as ls,e as es}from'./chunk-
|
|
1
|
+
import {p as pc,a as as,d as dc,K as Kl,U as Ul,c as cc,J as Ji,l as ls,e as es}from'./chunk-CtiubhW7.js';import {a5 as q0,a6 as U0,q as qo,U as Uw,Z as ZE,d as $8,v as v3,Y as pf,a0 as bd,a1 as sp,a2 as fp,K as Kt,j as _i,l as _D,I as Iw,P as Pw,J as Jc,x as xD,o as gI,M as MD,w as lh,L as Lh,p as Fw,B as AD,G as FD,m as mh,H as HD,z as rl,az as jw,E as Aw,D as ch,O as Fu,Q as ju}from'./main-3VZRFHGG.js';var Q=t=>({count:t}),U=t=>["/jobs",t],X=(t,c)=>c.id;function Y(t,c){if(t&1){let e=FD();_i(0,"div",1)(1,"button",4),mh("click",function(){Fu(e);let o=HD();return ju(o.emitBulk())}),Iw(2),Pw(3,"transloco"),Jc()();}if(t&2){let e=HD();gI(),lh("disabled",e.checkedCount()===0),gI(),rl(" ",jw(3,2,"runnableTable.runSelected",Aw(5,Q,e.checkedCount()))," ");}}function Z(t,c){if(t&1){let e=FD();_i(0,"th",5),mh("nzCheckedChange",function(o){Fu(e);let s=HD();return ju(s.onAllChecked(o))}),Jc();}if(t&2){let e=HD();lh("nzChecked",e.allChecked())("nzIndeterminate",e.someChecked());}}function ee(t,c){t&1&&(_i(0,"th"),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"runnableTable.column.actions")));}function te(t,c){if(t&1){let e=FD();_i(0,"td",12),mh("nzCheckedChange",function(o){Fu(e);let s=HD().$implicit,H=HD();return ju(H.onItemChecked(s.id,o))}),Jc();}if(t&2){let e=HD().$implicit,n=HD();lh("nzChecked",n.checkedIds().has(e.id)),ch("data-testid","check-"+e.id);}}function ne(t,c){if(t&1&&(_i(0,"span",9),Iw(1),Jc()),t&2){let e=HD().$implicit;ch("data-testid","subtitle-"+e.id),gI(),Lh(e.subtitle);}}function ie(t,c){if(t&1&&(_i(0,"a",10),Iw(1),Pw(2,"transloco"),Jc()),t&2){let e=c,n=HD().$implicit,o=HD();lh("routerLink",Aw(5,U,e.id)),ch("data-testid","latest-"+n.id),gI(),rl(" ",Fw(2,3,o.statusKey(e.status))," ");}}function oe(t,c){if(t&1&&(_i(0,"span",11),Iw(1),Pw(2,"transloco"),Jc()),t&2){let e=HD().$implicit;ch("data-testid","latest-"+e.id),gI(),Lh(Fw(2,2,"runnableTable.neverRun"));}}function ae(t,c){if(t&1){let e=FD();_i(0,"td")(1,"button",13),mh("click",function(){Fu(e);let o=HD().$implicit,s=HD();return ju(s.emitRow(o.id))}),Iw(2),Pw(3,"transloco"),Jc()();}if(t&2){let e=HD().$implicit;gI(),ch("data-testid","run-"+e.id),gI(),rl(" ",Fw(3,2,"runnableTable.run")," ");}}function le(t,c){if(t&1&&(_i(0,"tr"),_D(1,te,1,2,"td",6),_i(2,"td")(3,"div",7)(4,"span",8),Iw(5),Jc(),_D(6,ne,2,2,"span",9),Jc()(),_i(7,"td"),_D(8,ie,3,7,"a",10)(9,oe,3,4,"span",11),Jc(),_D(10,ae,4,4,"td"),Jc()),t&2){let e,n=c.$implicit,o=HD();ch("data-testid","row-"+n.id),gI(),MD(o.selectable()?1:-1),gI(3),ch("data-testid","label-"+n.id),gI(),Lh(n.primaryLabel),gI(),MD(n.subtitle?6:-1),gI(2),MD((e=n.latestJob)?8:9,e),gI(2),MD(o.showRowAction()?10:-1);}}var we=(()=>{class t{constructor(){this.rows=q0([]),this.selectable=q0(false),this.showRowAction=q0(true),this.rowAction=U0(),this.bulkAction=U0(),this.checkedIds=qo(new Set),this.checkedCount=Uw(()=>this.checkedIds().size),this.allChecked=Uw(()=>{let e=this.rows();return e.length>0&&e.every(n=>this.checkedIds().has(n.id))}),this.someChecked=Uw(()=>{let e=this.checkedCount();return e>0&&e<this.rows().length});}onItemChecked(e,n){this.checkedIds.update(o=>{let s=new Set(o);return n?s.add(e):s.delete(e),s});}onAllChecked(e){this.checkedIds.set(e?new Set(this.rows().map(n=>n.id)):new Set);}emitBulk(){this.bulkAction.emit([...this.checkedIds()]);}emitRow(e){this.rowAction.emit(e);}statusKey(e){return `jobs.status.${e}`}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-runnable-items-table"]],inputs:{rows:[1,"rows"],selectable:[1,"selectable"],showRowAction:[1,"showRowAction"]},outputs:{rowAction:"rowAction",bulkAction:"bulkAction"},decls:16,vars:12,consts:[["data-testid","runnable-items-table",1,"runnable-table"],["data-testid","bulk-bar",1,"bulk-bar"],[3,"nzData","nzFrontPagination","nzShowPagination"],["data-testid","select-all",3,"nzChecked","nzIndeterminate"],["nz-button","","type","button","data-testid","run-selected",3,"click","disabled"],["data-testid","select-all",3,"nzCheckedChange","nzChecked","nzIndeterminate"],[3,"nzChecked"],[1,"item"],[1,"primary"],[1,"subtitle"],[3,"routerLink"],[1,"never"],[3,"nzCheckedChange","nzChecked"],["nz-button","","nzType","link","type","button",3,"click"]],template:function(n,o){n&1&&(_i(0,"div",0),_D(1,Y,4,7,"div",1),_i(2,"nz-table",2)(3,"thead")(4,"tr"),_D(5,Z,1,2,"th",3),_i(6,"th"),Iw(7),Pw(8,"transloco"),Jc(),_i(9,"th"),Iw(10),Pw(11,"transloco"),Jc(),_D(12,ee,3,3,"th"),Jc()(),_i(13,"tbody"),xD(14,le,11,7,"tr",null,X),Jc()()()),n&2&&(gI(),MD(o.selectable()?1:-1),gI(),lh("nzData",o.rows())("nzFrontPagination",false)("nzShowPagination",false),gI(3),MD(o.selectable()?5:-1),gI(2),Lh(Fw(8,8,"runnableTable.column.item")),gI(3),Lh(Fw(11,10,"runnableTable.column.latestRun")),gI(2),MD(o.showRowAction()?12:-1),gI(2),AD(o.rows()));},dependencies:[$8,v3,pf,bd,sp,fp,pc,as,dc,Kl,Ul,cc,Ji,ls,es,Kt],styles:[".runnable-table[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.bulk-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem}.primary[_ngcontent-%COMP%]{font-weight:600}.subtitle[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem}.never[_ngcontent-%COMP%]{color:#78716c}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{we as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as ae,l as le}from'./chunk-
|
|
1
|
+
import {a as ae,l as le}from'./chunk-EDwdt-Wk.js';import {T}from'./chunk-SiaN7xSQ.js';import {H as He}from'./chunk-CwEMAptL.js';import'./chunk-BIJScqTM.js';import {C,a as C1,R as J1,b7 as m,b8 as y,b as at,V as Ve,bo as O,bp as de,ba as Se,q as qo,U as Uw,u as ue$1,r as r$1,c as bi,Z as ZE,d as $8,e as al,bb as er,f as rl,g as $i,v as v3,Y as pf,a0 as bd,a1 as sp,a2 as fp,h as ex,F as Fm,A as Am,K as Kt,j as _i,I as Iw,J as Jc,P as Pw,m as mh,l as _D,o as gI,L as Lh,p as Fw,w as lh,z as rl$1,M as MD,H as HD,G as FD,k as iE,x as xD,y as aE,B as AD,N as ND,n as uh,O as Fu,Q as ju}from'./main-3VZRFHGG.js';import {b}from'./chunk-BcDRgzYZ.js';import {a as ai,z}from'./chunk-Dm_EWkUz.js';import {k as d_}from'./chunk-8ezEUcxN.js';import'./chunk-iIEmH_ui.js';var ue=(t,s)=>s.id;function he(t,s){t&1&&(_i(0,"p",6),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function fe(t,s){if(t&1&&(_i(0,"p",7),Iw(1),Jc()),t&2){let e=HD();gI(),Lh(e.loadError());}}function ge(t,s){if(t&1&&(_i(0,"li"),Iw(1),Jc()),t&2){let e=s.$implicit;gI(),Lh(e);}}function _e(t,s){if(t&1&&(_i(0,"section",8)(1,"h2"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"ul"),xD(5,ge,2,1,"li",null,ND),Jc()()),t&2){let e=HD(2);gI(2),Lh(Fw(3,1,"shortcuts.editor.validation")),gI(3),AD(e.validationErrors());}}function ve(t,s){if(t&1&&uh(0,"nz-option",12),t&2){let e=s.$implicit;lh("nzValue",e.id)("nzLabel",e.name);}}function we(t,s){if(t&1){let e=FD();_i(0,"app-workflow-input-form",14),mh("valuesChange",function(i){Fu(e);let u=HD(2);return ju(u.setInputValues(i))}),Jc();}if(t&2){let e=HD(2);lh("fields",s.inputSchema)("values",e.inputValues());}}function Ce(t,s){if(t&1){let e=FD();_D(0,_e,7,3,"section",8),_i(1,"label",9)(2,"span"),Iw(3),Pw(4,"transloco"),Jc(),_i(5,"input",10),mh("ngModelChange",function(i){Fu(e);let u=HD();return ju(u.name.set(i))}),Jc(),iE(),Jc(),_i(6,"div",9)(7,"span"),Iw(8),Pw(9,"transloco"),Jc(),_i(10,"nz-select",11),mh("ngModelChange",function(i){Fu(e);let u=HD();return ju(u.onWorkflowChange(i))}),xD(11,ve,1,2,"nz-option",12,ue),Jc(),iE(),Jc(),_D(13,we,1,2,"app-workflow-input-form",13);}if(t&2){let e,o=HD();MD(o.validationErrors().length>0?0:-1),gI(3),Lh(Fw(4,6,"shortcuts.editor.name")),gI(2),lh("ngModel",o.name()),aE(),gI(3),Lh(Fw(9,8,"shortcuts.editor.workflow")),gI(2),lh("ngModel",o.workflowId()),aE(),gI(),AD(o.eligibleWorkflows()),gI(2),MD((e=o.selectedWorkflow())?13:-1,e);}}function be(t){let s=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),e=crypto.randomUUID().slice(0,8);return s.length>0?`sc-${s}-${e}`:`sc-${e}`}var Ge=(()=>{class t{constructor(){this.route=C(C1),this.router=C(J1),this.shortcutsApi=C(m),this.nav=C(y),this.workflowsApi=C(b),this.message=C(He),this.destroyRef=C(at),this.transloco=C(Ve),this.language=C(O),this.routeId=de(this.route.paramMap.pipe(Se(e=>e.get("id"))),{initialValue:this.route.snapshot.paramMap.get("id")}),this.name=qo(""),this.workflowId=qo(""),this.workflows=qo([]),this.inputValues=qo({}),this.lastJobId=qo(void 0),this.loadError=qo(null),this.validationErrors=qo([]),this.saving=qo(false),this.loading=qo(true),this.isNew=Uw(()=>!this.routeId()),this.pageTitle=Uw(()=>(this.language.currentLang(),this.isNew()?this.transloco.translate("shortcuts.editor.titleNew"):this.transloco.translate("shortcuts.editor.titleEdit",{name:this.name().trim()}))),this.eligibleWorkflows=Uw(()=>this.workflows().filter(e=>e.appliesTo==="none"&&e.subjectHandling==="per-subject")),this.selectedWorkflow=Uw(()=>this.eligibleWorkflows().find(e=>e.id===this.workflowId())??null),this.workflowsApi.list().pipe(ue$1(this.destroyRef)).subscribe({next:e=>this.workflows.set(e),error:e=>{this.workflows.set([]),this.message.error(this.errorMessage(e,this.transloco.translate("shortcuts.editor.loadFailed")));}}),this.route.paramMap.pipe(ue$1(this.destroyRef)).subscribe(e=>{let o=e.get("id");if(this.validationErrors.set([]),this.loadError.set(null),!o){this.name.set(""),this.workflowId.set(""),this.inputValues.set({}),this.lastJobId.set(void 0),this.loading.set(false);return}this.loading.set(true),this.shortcutsApi.get(o).subscribe({next:i=>{this.name.set(i.name),this.workflowId.set(i.workflowId),this.inputValues.set(i.inputValues),this.lastJobId.set(i.lastJobId),this.loading.set(false);},error:i=>{this.loading.set(false),this.loadError.set(this.errorMessage(i,this.transloco.translate("shortcuts.editor.loadFailed")));}});});}onWorkflowChange(e){this.workflowId.set(e);let o=this.eligibleWorkflows().find(i=>i.id===e);this.inputValues.set(ae(o?.inputSchema??[]));}setInputValues(e){this.inputValues.set(e);}save(){let e=this.routeId(),o=r$1({id:e??be(this.name()),name:this.name().trim(),workflowId:this.workflowId(),inputValues:this.inputValues()},this.lastJobId()?{lastJobId:this.lastJobId()}:{}),i=d_.safeParse(o);if(!i.success){this.validationErrors.set(T(i.error));return}this.validationErrors.set([]),this.saving.set(true),(this.isNew()||!e?this.shortcutsApi.create(i.data):this.shortcutsApi.update(e,i.data)).subscribe({next:M=>{this.saving.set(false),this.nav.refresh(),this.message.success(this.transloco.translate(this.isNew()?"shortcuts.editor.created":"shortcuts.editor.saved")),this.isNew()&&this.router.navigate(["/shortcuts",M.id,"edit"]);},error:M=>{this.saving.set(false),this.message.error(this.errorMessage(M,this.transloco.translate("shortcuts.editor.saveFailed")));}});}errorMessage(e,o){return e instanceof bi||e instanceof Error?e.message:o}static{this.\u0275fac=function(o){return new(o||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-shortcut-editor"]],decls:15,vars:10,consts:[["data-testid","shortcut-editor",1,"editor"],[1,"header"],["data-testid","page-title"],[1,"header-actions"],["routerLink","/shortcuts"],["nz-button","","nzType","primary","type","button","data-testid","save-button",3,"click","nzLoading","disabled"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","validation-errors",1,"errors"],[1,"field"],["nz-input","","data-testid","shortcut-name",3,"ngModelChange","ngModel"],["data-testid","shortcut-workflow",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[3,"fields","values"],[3,"valuesChange","fields","values"]],template:function(o,i){o&1&&(_i(0,"main",0)(1,"header",1)(2,"div")(3,"h1",2),Iw(4),Jc()(),_i(5,"div",3)(6,"a",4),Iw(7),Pw(8,"transloco"),Jc(),_i(9,"button",5),mh("click",function(){return i.save()}),Iw(10),Pw(11,"transloco"),Jc()()(),_D(12,he,3,3,"p",6)(13,fe,2,1,"p",7)(14,Ce,14,10),Jc()),o&2&&(gI(4),Lh(i.pageTitle()),gI(3),Lh(Fw(8,6,"shortcuts.editor.backToList")),gI(2),lh("nzLoading",i.saving())("disabled",i.loading()||!!i.loadError()),gI(),rl$1(" ",Fw(11,8,"common.save")," "),gI(2),MD(i.loading()?12:i.loadError()?13:14));},dependencies:[$8,al,er,rl,$i,v3,pf,bd,sp,fp,ai,z,ex,Fm,Am,le,Kt],styles:[".editor[_ngcontent-%COMP%]{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-actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.errors[_ngcontent-%COMP%]{border:1px solid #fecdd3;background:#fff1f2;padding:.75rem 1rem}.errors[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 .35rem;font-size:1rem}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{Ge as ShortcutEditorComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a7 as KE,a8 as fu,bP as hn,aA as mT,C,a9 as Z0,ab as Oe$1,aB as yT,aC as zt,Z as ZE,as as st,at as Ee$1,au as w5,av as K0,aj as $D,l as _D,j as _i,J as Jc,M as MD,o as gI,aQ as aw,al as Sh,am as Ih,an as WD,ao as GD,aM as Yl,bQ as Wr,r as r$1,ai as ly,H as HD,aw as rh,w as lh,n as uh,aR as xw,ak as UD,x as xD,aO as SD,B as AD,bR as eD,bS as dh,aP as Mh,aJ as tl,I as Iw,aK as nl,L as Lh,bT as oh,ax as Eh,ac as Er,N as ND}from'./main-SI5AKDMC.js';var Ce=["*"];function fe(e,a){if(e&1&&(_i(0,"div",0),uh(1,"nz-skeleton-element",4),Jc()),e&2){let t=HD(2);gI(),lh("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle");}}function _e(e,a){if(e&1&&uh(0,"h3",5),e&2){let t=HD(2);Mh("width",t.toCSSUnit(t.title.width));}}function ve(e,a){if(e&1&&uh(0,"li"),e&2){let t=a.$index,n=HD(3);Mh("width",n.toCSSUnit(n.widthList[t]));}}function ge(e,a){if(e&1&&(_i(0,"ul",3),xD(1,ve,1,2,"li",6,ND),Jc()),e&2){let t=HD(2);gI(),AD(t.rowsList);}}function he(e,a){if(e&1&&(_D(0,fe,2,2,"div",0),_i(1,"div",1),_D(2,_e,1,2,"h3",2),_D(3,ge,3,0,"ul",3),Jc()),e&2){let t=HD();MD(t.nzAvatar?0:-1),gI(2),MD(t.nzTitle?2:-1),gI(),MD(t.nzParagraph?3:-1);}}function Se(e,a){e&1&&UD(0);}var Te=(()=>{class e{nzActive=false;nzType;nzBlock=false;static \u0275fac=function(n){return new(n||e)};static \u0275dir=eD({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(n,i){n&2&&Sh("ant-skeleton-active",i.nzActive)("ant-skeleton-block",i.nzBlock);},inputs:{nzActive:[2,"nzActive","nzActive",K0],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",K0]}})}return e})();var ye=(()=>{class e{nzShape="circle";nzSize="default";styleMap={};ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let n=`${this.nzSize}px`;this.styleMap={width:n,height:n,"line-height":n};}else this.styleMap={};}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},features:[ly],decls:1,vars:10,consts:[[1,"ant-skeleton-avatar"]],template:function(n,i){n&1&&dh(0,"span",0),n&2&&(aw(i.styleMap),Sh("ant-skeleton-avatar-square",i.nzShape==="square")("ant-skeleton-avatar-circle",i.nzShape==="circle")("ant-skeleton-avatar-lg",i.nzSize==="large")("ant-skeleton-avatar-sm",i.nzSize==="small"));},encapsulation:2})}return e})();var ce=(()=>{class e{cdr=C(Z0);nzActive=false;nzLoading=true;nzRound=false;nzTitle=true;nzAvatar=false;nzParagraph=true;title;avatar;paragraph;rowsList=[];widthList=[];toCSSUnit(t=""){return Wr(t)}getTitleProps(){let t=!!this.nzAvatar,n=!!this.nzParagraph,i="";return !t&&n?i="38%":t&&n&&(i="50%"),r$1({width:i},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return r$1({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,n=!!this.nzTitle,i={};return (!t||!n)&&(i.width="61%"),!t&&n?i.rows=3:i.rows=2,r$1(r$1({},i),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:n}=this.paragraph,i=[];return t&&Array.isArray(t)?i=t:t&&!Array.isArray(t)&&(i=[],i[n-1]=t),i}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck();}ngOnInit(){this.updateProps();}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps();}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(n,i){n&2&&Sh("ant-skeleton-with-avatar",!!i.nzAvatar)("ant-skeleton-active",i.nzActive)("ant-skeleton-round",i.nzRound);},inputs:{nzActive:[2,"nzActive","nzActive",K0],nzLoading:[2,"nzLoading","nzLoading",K0],nzRound:[2,"nzRound","nzRound",K0],nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],features:[ly],ngContentSelectors:Ce,decls:2,vars:1,consts:[[1,"ant-skeleton-header"],[1,"ant-skeleton-content"],[1,"ant-skeleton-title",3,"width"],[1,"ant-skeleton-paragraph"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[3,"width"]],template:function(n,i){n&1&&($D(),_D(0,he,4,3)(1,Se,1,0)),n&2&&MD(i.nzLoading?0:1);},dependencies:[Te,ye],encapsulation:2})}return e})(),pe=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=KE({type:e});static \u0275inj=fu({})}return e})();function Ne(e,a){}function ke(e,a){if(e&1&&(_i(0,"div",0),rh(1,Ne,0,0,"ng-template",2),Jc()),e&2){let t=HD();gI(),lh("ngTemplateOutlet",t.nzAvatar);}}function be(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzTitle);}}function Me(e,a){if(e&1&&(_i(0,"div",3),rh(1,be,2,1,"ng-container",5),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzTitle);}}function Ae(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzDescription);}}function De(e,a){if(e&1&&(_i(0,"div",4),rh(1,Ae,2,1,"ng-container",5),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzDescription);}}function Ee(e,a){if(e&1&&(_i(0,"div",1),_D(1,Me,2,1,"div",3),_D(2,De,2,1,"div",4),Jc()),e&2){let t=HD();gI(),MD(t.nzTitle?1:-1),gI(),MD(t.nzDescription?2:-1);}}var me=["*"];function we(e,a){e&1&&UD(0);}var Pe=()=>({rows:4});function Be(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzTitle);}}function Oe(e,a){if(e&1&&(_i(0,"div",6),rh(1,Be,2,1,"ng-container",9),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzTitle);}}function Fe(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzExtra);}}function Le(e,a){if(e&1&&(_i(0,"div",7),rh(1,Fe,2,1,"ng-container",9),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzExtra);}}function He(e,a){}function Ie(e,a){if(e&1&&rh(0,He,0,0,"ng-template",8),e&2){let t=HD(2);lh("ngTemplateOutlet",t.listOfNzCardTabComponent.template);}}function qe(e,a){if(e&1&&(_i(0,"div",0)(1,"div",5),_D(2,Oe,2,1,"div",6),_D(3,Le,2,1,"div",7),Jc(),_D(4,Ie,1,1,null,8),Jc()),e&2){let t=HD();gI(2),MD(t.nzTitle?2:-1),gI(),MD(t.nzExtra?3:-1),gI(),MD(t.listOfNzCardTabComponent?4:-1);}}function je(e,a){}function Re(e,a){if(e&1&&(_i(0,"div",1),rh(1,je,0,0,"ng-template",8),Jc()),e&2){let t=HD();gI(),lh("ngTemplateOutlet",t.nzCover);}}function Ge(e,a){e&1&&uh(0,"nz-skeleton",3),e&2&&lh("nzActive",true)("nzTitle",false)("nzParagraph",xw(3,Pe));}function Qe(e,a){e&1&&UD(0);}function Ve(e,a){}function $e(e,a){if(e&1&&(_i(0,"li")(1,"span"),rh(2,Ve,0,0,"ng-template",8),Jc()()),e&2){let t=a.$implicit,n=a.$count;Mh("width",100/n,"%"),gI(2),lh("ngTemplateOutlet",t);}}function Ue(e,a){if(e&1&&(_i(0,"ul",4),xD(1,$e,3,3,"li",10,SD),Jc()),e&2){let t=HD();gI(),AD(t.nzActions);}}var We=(()=>{class e{nzHoverable=true;static \u0275fac=function(n){return new(n||e)};static \u0275dir=eD({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(n,i){n&2&&Sh("ant-card-hoverable",i.nzHoverable);},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",K0]},exportAs:["nzCardGrid"]})}return e})(),Ze=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],decls:2,vars:2,consts:[[1,"ant-card-meta-avatar"],[1,"ant-card-meta-detail"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-title"],[1,"ant-card-meta-description"],[4,"nzStringTemplateOutlet"]],template:function(n,i){n&1&&(_D(0,ke,2,1,"div",0),_D(1,Ee,3,2,"div",1)),n&2&&(MD(i.nzAvatar?0:-1),gI(),MD(i.nzTitle||i.nzDescription?1:-1));},dependencies:[w5,st,Ee$1],encapsulation:2})}return e})(),Je=(()=>{class e{template;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-card-tab"]],viewQuery:function(n,i){if(n&1&&Eh(Er,7),n&2){let S;WD(S=GD())&&(i.template=S.first);}},exportAs:["nzCardTab"],ngContentSelectors:me,decls:1,vars:0,template:function(n,i){n&1&&($D(),oh(0,we,1,0,"ng-template"));},encapsulation:2})}return e})(),ze="card",Ke=(()=>{let e,a=[],t=[],n,i=[],S=[],W,Z=[],J=[];return class U{static{let C=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[Yl()],n=[Yl()],W=[Yl()],mT(null,null,e,{kind:"field",name:"nzBordered",static:false,private:false,access:{has:r=>"nzBordered"in r,get:r=>r.nzBordered,set:(r,l)=>{r.nzBordered=l;}},metadata:C},a,t),mT(null,null,n,{kind:"field",name:"nzHoverable",static:false,private:false,access:{has:r=>"nzHoverable"in r,get:r=>r.nzHoverable,set:(r,l)=>{r.nzHoverable=l;}},metadata:C},i,S),mT(null,null,W,{kind:"field",name:"nzSize",static:false,private:false,access:{has:r=>"nzSize"in r,get:r=>r.nzSize,set:(r,l)=>{r.nzSize=l;}},metadata:C},Z,J),C&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:C});}cdr=C(Z0);dir=C(Oe$1).valueSignal;_nzModuleName=ze;nzBordered=yT(this,a,true);nzLoading=(yT(this,t),false);nzHoverable=yT(this,i,false);nzBodyStyle=(yT(this,S),null);nzCover;nzActions=[];nzType=null;nzSize=yT(this,Z,"default");nzTitle=yT(this,J);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;constructor(){zt(ze,()=>this.cdr.markForCheck());}static \u0275fac=function(r){return new(r||U)};static \u0275cmp=ZE({type:U,selectors:[["nz-card"]],contentQueries:function(r,l,K){if(r&1&&Ih(K,Je,5)(K,We,4),r&2){let E;WD(E=GD())&&(l.listOfNzCardTabComponent=E.first),WD(E=GD())&&(l.listOfNzCardGridDirective=E);}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(r,l){r&2&&Sh("ant-card-loading",l.nzLoading)("ant-card-bordered",l.nzBordered)("ant-card-hoverable",l.nzHoverable)("ant-card-small",l.nzSize==="small")("ant-card-contain-grid",l.listOfNzCardGridDirective&&l.listOfNzCardGridDirective.length)("ant-card-type-inner",l.nzType==="inner")("ant-card-contain-tabs",!!l.listOfNzCardTabComponent)("ant-card-rtl",l.dir()==="rtl");},inputs:{nzBordered:[2,"nzBordered","nzBordered",K0],nzLoading:[2,"nzLoading","nzLoading",K0],nzHoverable:[2,"nzHoverable","nzHoverable",K0],nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],ngContentSelectors:me,decls:6,vars:6,consts:[[1,"ant-card-head"],[1,"ant-card-cover"],[1,"ant-card-body"],[3,"nzActive","nzTitle","nzParagraph"],[1,"ant-card-actions"],[1,"ant-card-head-wrapper"],[1,"ant-card-head-title"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[4,"nzStringTemplateOutlet"],[3,"width"]],template:function(r,l){r&1&&($D(),_D(0,qe,5,3,"div",0),_D(1,Re,2,1,"div",1),_i(2,"div",2),_D(3,Ge,1,4,"nz-skeleton",3)(4,Qe,1,0),Jc(),_D(5,Ue,3,0,"ul",4)),r&2&&(MD(l.nzTitle||l.nzExtra||l.listOfNzCardTabComponent?0:-1),gI(),MD(l.nzCover?1:-1),gI(),aw(l.nzBodyStyle),gI(),MD(l.nzLoading?3:4),gI(2),MD(l.nzActions.length?5:-1));},dependencies:[st,Ee$1,w5,pe,ce],encapsulation:2})}})(),Nt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=KE({type:e});static \u0275inj=fu({imports:[Ke,Ze,hn]})}return e})();export{Ke as K,Nt as N};
|
|
1
|
+
import {a7 as KE,a8 as fu,bP as hn,aA as mT,C,a9 as Z0,ab as Oe$1,aB as yT,aC as zt,Z as ZE,as as st,at as Ee$1,au as w5,av as K0,aj as $D,l as _D,j as _i,J as Jc,M as MD,o as gI,aQ as aw,al as Sh,am as Ih,an as WD,ao as GD,aM as Yl,bQ as Wr,r as r$1,ai as ly,H as HD,aw as rh,w as lh,n as uh,aR as xw,ak as UD,x as xD,aO as SD,B as AD,bR as eD,bS as dh,aP as Mh,aJ as tl,I as Iw,aK as nl,L as Lh,bT as oh,ax as Eh,ac as Er,N as ND}from'./main-3VZRFHGG.js';var Ce=["*"];function fe(e,a){if(e&1&&(_i(0,"div",0),uh(1,"nz-skeleton-element",4),Jc()),e&2){let t=HD(2);gI(),lh("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle");}}function _e(e,a){if(e&1&&uh(0,"h3",5),e&2){let t=HD(2);Mh("width",t.toCSSUnit(t.title.width));}}function ve(e,a){if(e&1&&uh(0,"li"),e&2){let t=a.$index,n=HD(3);Mh("width",n.toCSSUnit(n.widthList[t]));}}function ge(e,a){if(e&1&&(_i(0,"ul",3),xD(1,ve,1,2,"li",6,ND),Jc()),e&2){let t=HD(2);gI(),AD(t.rowsList);}}function he(e,a){if(e&1&&(_D(0,fe,2,2,"div",0),_i(1,"div",1),_D(2,_e,1,2,"h3",2),_D(3,ge,3,0,"ul",3),Jc()),e&2){let t=HD();MD(t.nzAvatar?0:-1),gI(2),MD(t.nzTitle?2:-1),gI(),MD(t.nzParagraph?3:-1);}}function Se(e,a){e&1&&UD(0);}var Te=(()=>{class e{nzActive=false;nzType;nzBlock=false;static \u0275fac=function(n){return new(n||e)};static \u0275dir=eD({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(n,i){n&2&&Sh("ant-skeleton-active",i.nzActive)("ant-skeleton-block",i.nzBlock);},inputs:{nzActive:[2,"nzActive","nzActive",K0],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",K0]}})}return e})();var ye=(()=>{class e{nzShape="circle";nzSize="default";styleMap={};ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let n=`${this.nzSize}px`;this.styleMap={width:n,height:n,"line-height":n};}else this.styleMap={};}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},features:[ly],decls:1,vars:10,consts:[[1,"ant-skeleton-avatar"]],template:function(n,i){n&1&&dh(0,"span",0),n&2&&(aw(i.styleMap),Sh("ant-skeleton-avatar-square",i.nzShape==="square")("ant-skeleton-avatar-circle",i.nzShape==="circle")("ant-skeleton-avatar-lg",i.nzSize==="large")("ant-skeleton-avatar-sm",i.nzSize==="small"));},encapsulation:2})}return e})();var ce=(()=>{class e{cdr=C(Z0);nzActive=false;nzLoading=true;nzRound=false;nzTitle=true;nzAvatar=false;nzParagraph=true;title;avatar;paragraph;rowsList=[];widthList=[];toCSSUnit(t=""){return Wr(t)}getTitleProps(){let t=!!this.nzAvatar,n=!!this.nzParagraph,i="";return !t&&n?i="38%":t&&n&&(i="50%"),r$1({width:i},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return r$1({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,n=!!this.nzTitle,i={};return (!t||!n)&&(i.width="61%"),!t&&n?i.rows=3:i.rows=2,r$1(r$1({},i),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:n}=this.paragraph,i=[];return t&&Array.isArray(t)?i=t:t&&!Array.isArray(t)&&(i=[],i[n-1]=t),i}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck();}ngOnInit(){this.updateProps();}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps();}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(n,i){n&2&&Sh("ant-skeleton-with-avatar",!!i.nzAvatar)("ant-skeleton-active",i.nzActive)("ant-skeleton-round",i.nzRound);},inputs:{nzActive:[2,"nzActive","nzActive",K0],nzLoading:[2,"nzLoading","nzLoading",K0],nzRound:[2,"nzRound","nzRound",K0],nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],features:[ly],ngContentSelectors:Ce,decls:2,vars:1,consts:[[1,"ant-skeleton-header"],[1,"ant-skeleton-content"],[1,"ant-skeleton-title",3,"width"],[1,"ant-skeleton-paragraph"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[3,"width"]],template:function(n,i){n&1&&($D(),_D(0,he,4,3)(1,Se,1,0)),n&2&&MD(i.nzLoading?0:1);},dependencies:[Te,ye],encapsulation:2})}return e})(),pe=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=KE({type:e});static \u0275inj=fu({})}return e})();function Ne(e,a){}function ke(e,a){if(e&1&&(_i(0,"div",0),rh(1,Ne,0,0,"ng-template",2),Jc()),e&2){let t=HD();gI(),lh("ngTemplateOutlet",t.nzAvatar);}}function be(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzTitle);}}function Me(e,a){if(e&1&&(_i(0,"div",3),rh(1,be,2,1,"ng-container",5),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzTitle);}}function Ae(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzDescription);}}function De(e,a){if(e&1&&(_i(0,"div",4),rh(1,Ae,2,1,"ng-container",5),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzDescription);}}function Ee(e,a){if(e&1&&(_i(0,"div",1),_D(1,Me,2,1,"div",3),_D(2,De,2,1,"div",4),Jc()),e&2){let t=HD();gI(),MD(t.nzTitle?1:-1),gI(),MD(t.nzDescription?2:-1);}}var me=["*"];function we(e,a){e&1&&UD(0);}var Pe=()=>({rows:4});function Be(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzTitle);}}function Oe(e,a){if(e&1&&(_i(0,"div",6),rh(1,Be,2,1,"ng-container",9),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzTitle);}}function Fe(e,a){if(e&1&&(tl(0),Iw(1),nl()),e&2){let t=HD(3);gI(),Lh(t.nzExtra);}}function Le(e,a){if(e&1&&(_i(0,"div",7),rh(1,Fe,2,1,"ng-container",9),Jc()),e&2){let t=HD(2);gI(),lh("nzStringTemplateOutlet",t.nzExtra);}}function He(e,a){}function Ie(e,a){if(e&1&&rh(0,He,0,0,"ng-template",8),e&2){let t=HD(2);lh("ngTemplateOutlet",t.listOfNzCardTabComponent.template);}}function qe(e,a){if(e&1&&(_i(0,"div",0)(1,"div",5),_D(2,Oe,2,1,"div",6),_D(3,Le,2,1,"div",7),Jc(),_D(4,Ie,1,1,null,8),Jc()),e&2){let t=HD();gI(2),MD(t.nzTitle?2:-1),gI(),MD(t.nzExtra?3:-1),gI(),MD(t.listOfNzCardTabComponent?4:-1);}}function je(e,a){}function Re(e,a){if(e&1&&(_i(0,"div",1),rh(1,je,0,0,"ng-template",8),Jc()),e&2){let t=HD();gI(),lh("ngTemplateOutlet",t.nzCover);}}function Ge(e,a){e&1&&uh(0,"nz-skeleton",3),e&2&&lh("nzActive",true)("nzTitle",false)("nzParagraph",xw(3,Pe));}function Qe(e,a){e&1&&UD(0);}function Ve(e,a){}function $e(e,a){if(e&1&&(_i(0,"li")(1,"span"),rh(2,Ve,0,0,"ng-template",8),Jc()()),e&2){let t=a.$implicit,n=a.$count;Mh("width",100/n,"%"),gI(2),lh("ngTemplateOutlet",t);}}function Ue(e,a){if(e&1&&(_i(0,"ul",4),xD(1,$e,3,3,"li",10,SD),Jc()),e&2){let t=HD();gI(),AD(t.nzActions);}}var We=(()=>{class e{nzHoverable=true;static \u0275fac=function(n){return new(n||e)};static \u0275dir=eD({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(n,i){n&2&&Sh("ant-card-hoverable",i.nzHoverable);},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",K0]},exportAs:["nzCardGrid"]})}return e})(),Ze=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],decls:2,vars:2,consts:[[1,"ant-card-meta-avatar"],[1,"ant-card-meta-detail"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-title"],[1,"ant-card-meta-description"],[4,"nzStringTemplateOutlet"]],template:function(n,i){n&1&&(_D(0,ke,2,1,"div",0),_D(1,Ee,3,2,"div",1)),n&2&&(MD(i.nzAvatar?0:-1),gI(),MD(i.nzTitle||i.nzDescription?1:-1));},dependencies:[w5,st,Ee$1],encapsulation:2})}return e})(),Je=(()=>{class e{template;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=ZE({type:e,selectors:[["nz-card-tab"]],viewQuery:function(n,i){if(n&1&&Eh(Er,7),n&2){let S;WD(S=GD())&&(i.template=S.first);}},exportAs:["nzCardTab"],ngContentSelectors:me,decls:1,vars:0,template:function(n,i){n&1&&($D(),oh(0,we,1,0,"ng-template"));},encapsulation:2})}return e})(),ze="card",Ke=(()=>{let e,a=[],t=[],n,i=[],S=[],W,Z=[],J=[];return class U{static{let C=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[Yl()],n=[Yl()],W=[Yl()],mT(null,null,e,{kind:"field",name:"nzBordered",static:false,private:false,access:{has:r=>"nzBordered"in r,get:r=>r.nzBordered,set:(r,l)=>{r.nzBordered=l;}},metadata:C},a,t),mT(null,null,n,{kind:"field",name:"nzHoverable",static:false,private:false,access:{has:r=>"nzHoverable"in r,get:r=>r.nzHoverable,set:(r,l)=>{r.nzHoverable=l;}},metadata:C},i,S),mT(null,null,W,{kind:"field",name:"nzSize",static:false,private:false,access:{has:r=>"nzSize"in r,get:r=>r.nzSize,set:(r,l)=>{r.nzSize=l;}},metadata:C},Z,J),C&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:C});}cdr=C(Z0);dir=C(Oe$1).valueSignal;_nzModuleName=ze;nzBordered=yT(this,a,true);nzLoading=(yT(this,t),false);nzHoverable=yT(this,i,false);nzBodyStyle=(yT(this,S),null);nzCover;nzActions=[];nzType=null;nzSize=yT(this,Z,"default");nzTitle=yT(this,J);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;constructor(){zt(ze,()=>this.cdr.markForCheck());}static \u0275fac=function(r){return new(r||U)};static \u0275cmp=ZE({type:U,selectors:[["nz-card"]],contentQueries:function(r,l,K){if(r&1&&Ih(K,Je,5)(K,We,4),r&2){let E;WD(E=GD())&&(l.listOfNzCardTabComponent=E.first),WD(E=GD())&&(l.listOfNzCardGridDirective=E);}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(r,l){r&2&&Sh("ant-card-loading",l.nzLoading)("ant-card-bordered",l.nzBordered)("ant-card-hoverable",l.nzHoverable)("ant-card-small",l.nzSize==="small")("ant-card-contain-grid",l.listOfNzCardGridDirective&&l.listOfNzCardGridDirective.length)("ant-card-type-inner",l.nzType==="inner")("ant-card-contain-tabs",!!l.listOfNzCardTabComponent)("ant-card-rtl",l.dir()==="rtl");},inputs:{nzBordered:[2,"nzBordered","nzBordered",K0],nzLoading:[2,"nzLoading","nzLoading",K0],nzHoverable:[2,"nzHoverable","nzHoverable",K0],nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],ngContentSelectors:me,decls:6,vars:6,consts:[[1,"ant-card-head"],[1,"ant-card-cover"],[1,"ant-card-body"],[3,"nzActive","nzTitle","nzParagraph"],[1,"ant-card-actions"],[1,"ant-card-head-wrapper"],[1,"ant-card-head-title"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[4,"nzStringTemplateOutlet"],[3,"width"]],template:function(r,l){r&1&&($D(),_D(0,qe,5,3,"div",0),_D(1,Re,2,1,"div",1),_i(2,"div",2),_D(3,Ge,1,4,"nz-skeleton",3)(4,Qe,1,0),Jc(),_D(5,Ue,3,0,"ul",4)),r&2&&(MD(l.nzTitle||l.nzExtra||l.listOfNzCardTabComponent?0:-1),gI(),MD(l.nzCover?1:-1),gI(),aw(l.nzBodyStyle),gI(),MD(l.nzLoading?3:4),gI(2),MD(l.nzActions.length?5:-1));},dependencies:[st,Ee$1,w5,pe,ce],encapsulation:2})}})(),Nt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=KE({type:e});static \u0275inj=fu({imports:[Ke,Ze,hn]})}return e})();export{Ke as K,Nt as N};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f}from'./chunk-
|
|
1
|
+
import {f}from'./chunk-BIJScqTM.js';import {x,h,w}from'./chunk-D8qyjd0z.js';import {W,I}from'./chunk-Bok52e_k.js';import'./chunk-8ezEUcxN.js';import {L as Lt,u as ut,p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-CtiubhW7.js';import'./chunk-iIEmH_ui.js';import {Z as ZE,n as uh,C,$,V as Ve,b as at,S as p,q as qo,U as Uw,u as ue$1,aW as Ng,c as bi,d as $8,X as M5,v as v3,Y as pf,a0 as bd,a1 as sp,a2 as fp,K as Kt,j as _i,I as Iw,P as Pw,J as Jc,m as mh,l as _D,o as gI,L as Lh,p as Fw,w as lh,z as rl,M as MD,H as HD,x as xD,B as AD,G as FD,D as ch,E as Aw,O as Fu,Q as ju}from'./main-3VZRFHGG.js';var pe=t=>["/jobs",t],ce=(t,d)=>d.id;function me(t,d){t&1&&(_i(0,"p",3),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function he(t,d){if(t&1&&(_i(0,"p",4),Iw(1),Jc()),t&2){let e=HD();gI(),Lh(e.loadError());}}function ue(t,d){if(t&1&&(_i(0,"p",5),Iw(1),Jc()),t&2){let e=HD(2);gI(),Lh(e.actionError());}}function fe(t,d){t&1&&(_i(0,"p",6),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"worktrees.activeWarning")));}function ge(t,d){t&1&&(_i(0,"p",7),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"worktrees.emptyState")));}function Ce(t,d){if(t&1){let e=FD();_i(0,"tr")(1,"td")(2,"label",9),mh("nzCheckedChange",function(l){let b=Fu(e).$implicit,le=HD(3);return ju(le.toggleSelected(b.id,l))}),Jc()(),_i(3,"td")(4,"a",10),Iw(5),Jc()(),_i(6,"td"),Iw(7),Jc(),_i(8,"td"),Iw(9),Jc(),_i(10,"td",11),Iw(11),Jc(),_i(12,"td")(13,"nz-tag",12),Iw(14),Pw(15,"transloco"),Jc()(),_i(16,"td"),Iw(17),Jc()();}if(t&2){let e=d.$implicit,i=HD(3);ch("data-testid","worktree-row-"+e.id),gI(2),lh("nzChecked",i.isSelected(e.id)),ch("data-testid","worktree-select-"+e.id),gI(2),lh("routerLink",Aw(16,pe,e.id)),ch("data-testid","worktree-job-"+e.id),gI(),Lh(e.id),gI(2),Lh(i.repoName(e)),gI(2),Lh(e.branch??"\u2014"),gI(2),Lh(e.worktreePath),gI(2),lh("nzColor",i.jobStatusTagColor(e.status,i.theme.theme()))("ngClass",i.jobStatusTagClass(e.status,i.theme.theme())),ch("data-testid","worktree-status-"+e.id),gI(),Lh(Fw(15,14,i.statusKey(e.status))),gI(3),Lh(e.createdAt);}}function xe(t,d){if(t&1&&(_i(0,"nz-table",8)(1,"thead")(2,"tr"),uh(3,"th"),_i(4,"th"),Iw(5),Pw(6,"transloco"),Jc(),_i(7,"th"),Iw(8),Pw(9,"transloco"),Jc(),_i(10,"th"),Iw(11),Pw(12,"transloco"),Jc(),_i(13,"th"),Iw(14),Pw(15,"transloco"),Jc(),_i(16,"th"),Iw(17),Pw(18,"transloco"),Jc(),_i(19,"th"),Iw(20),Pw(21,"transloco"),Jc()()(),_i(22,"tbody"),xD(23,Ce,18,18,"tr",null,ce),Jc()()),t&2){let e=HD(2);lh("nzData",e.jobs())("nzShowPagination",false),gI(5),Lh(Fw(6,8,"worktrees.column.job")),gI(3),Lh(Fw(9,10,"worktrees.column.repository")),gI(3),Lh(Fw(12,12,"worktrees.column.branch")),gI(3),Lh(Fw(15,14,"worktrees.column.path")),gI(3),Lh(Fw(18,16,"worktrees.column.status")),gI(3),Lh(Fw(21,18,"worktrees.column.created")),gI(3),AD(e.jobs());}}function be(t,d){if(t&1&&(_D(0,ue,2,1,"p",5),_D(1,fe,3,3,"p",6),_D(2,ge,3,3,"p",7)(3,xe,25,20,"nz-table",8)),t&2){let e=HD();MD(e.actionError()?0:-1),gI(),MD(e.selectedHasActive()?1:-1),gI(),MD(e.jobs().length===0?2:3);}}var se=(()=>{class t{constructor(){this.jobsApi=C($),this.reposApi=C(f),this.transloco=C(Ve),this.destroyRef=C(at),this.theme=C(p),this.jobStatusTagClass=x,this.jobStatusTagColor=h,this.jobs=qo([]),this.repos=qo([]),this.selectedIds=qo([]),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.deleting=qo(false),this.selectedHasActive=Uw(()=>this.selectedJobs().some(e=>!w(e.status))),this.selectedJobs=Uw(()=>{let e=new Set(this.selectedIds());return this.jobs().filter(i=>e.has(i.id))}),this.reload();}statusKey(e){return `jobs.status.${e}`}repoName(e){return this.repos().find(l=>_e(e,l))?.name??"\u2014"}isSelected(e){return this.selectedIds().includes(e)}toggleSelected(e,i){this.selectedIds.update(l=>i?l.includes(e)?l:[...l,e]:l.filter(b=>b!==e)),this.actionError.set(null);}deleteSelected(){if(!(this.deleting()||this.selectedIds().length===0)){if(this.selectedHasActive()){this.actionError.set(this.transloco.translate("worktrees.activeWarning"));return}this.deleting.set(true),this.actionError.set(null),this.jobsApi.deleteWorktrees(this.selectedIds()).pipe(ue$1(this.destroyRef)).subscribe({next:()=>{this.deleting.set(false),this.selectedIds.set([]),this.reload();},error:e=>{this.deleting.set(false),this.actionError.set(this.errorMessage(e,this.transloco.translate("worktrees.deleteFailed")));}});}}reload(){this.loading.set(true),this.loadError.set(null),Ng({jobs:this.jobsApi.list({liveWorktree:true}),repos:this.reposApi.list()}).pipe(ue$1(this.destroyRef)).subscribe({next:({jobs:e,repos:i})=>{this.jobs.set(e),this.repos.set(i),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("worktrees.loadFailed")));}});}errorMessage(e,i){return e instanceof bi||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-worktree-list"]],decls:11,vars:8,consts:[["data-testid","worktrees-manage",1,"list-page"],[1,"header"],["nz-button","","nzDanger","","type","button","data-testid","delete-worktrees",3,"click","disabled"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","active-warning",1,"warn"],["data-testid","empty-state",1,"empty"],["data-testid","worktree-table",3,"nzData","nzShowPagination"],["nz-checkbox","",3,"nzCheckedChange","nzChecked"],[3,"routerLink"],[1,"path-cell"],[3,"nzColor","ngClass"]],template:function(i,l){i&1&&(_i(0,"div",0)(1,"header",1)(2,"h1"),Iw(3),Pw(4,"transloco"),Jc(),_i(5,"button",2),mh("click",function(){return l.deleteSelected()}),Iw(6),Pw(7,"transloco"),Jc()(),_D(8,me,3,3,"p",3)(9,he,2,1,"p",4)(10,be,4,3),Jc()),i&2&&(gI(3),Lh(Fw(4,4,"worktrees.title")),gI(2),lh("disabled",l.deleting()||l.selectedIds().length===0),gI(),rl(" ",Fw(7,6,"worktrees.deleteSelected")," "),gI(2),MD(l.loading()?8:l.loadError()?9:10));},dependencies:[$8,M5,v3,pf,bd,sp,fp,Lt,ut,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-page[_ngcontent-%COMP%]{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}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.error[_ngcontent-%COMP%]{color:#9f1239}.warn[_ngcontent-%COMP%]{color:#92400e}.path-cell[_ngcontent-%COMP%]{overflow-wrap:anywhere;word-break:break-word}"]});}}return t})();function _e(t,d){let e=(t.worktreePath??"").replaceAll("\\","/"),i=d.localPath.replaceAll("\\","/").replace(/\/+$/,""),l=(d.worktreeBasePath??ke(i)).replaceAll("\\","/");return e.startsWith(l)||e.startsWith(i)}function ke(t){let d=t.split("/"),e=d.pop()??"repo";return `${d.join("/")}/${e}-worktrees`}var qe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-worktrees-manage"]],decls:1,vars:0,template:function(i,l){i&1&&uh(0,"app-worktree-list");},dependencies:[se],encapsulation:2});}}return t})();export{qe as WorktreesManageComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {aZ as H,Z as ZE,a_ as D6,v as v3,a$ as Yc,a3 as Ah,a4 as Th,K as Kt,j as _i,x as xD,J as Jc,n as uh,o as gI,B as AD,I as Iw,P as Pw,aH as QD,H as HD,w as lh,E as Aw,aR as xw,D as ch,z as rl,p as Fw}from'./main-
|
|
1
|
+
import {aZ as H,Z as ZE,a_ as D6,v as v3,a$ as Yc,a3 as Ah,a4 as Th,K as Kt,j as _i,x as xD,J as Jc,n as uh,o as gI,B as AD,I as Iw,P as Pw,aH as QD,H as HD,w as lh,E as Aw,aR as xw,D as ch,z as rl,p as Fw}from'./main-3VZRFHGG.js';var A=e=>["/manage",e],z=()=>({exact:true}),K=(e,i)=>i.path;function L(e,i){if(e&1&&(_i(0,"a",3,0),uh(2,"span",4),Iw(3),Pw(4,"transloco"),Jc()),e&2){let t=i.$implicit,n=QD(1),r=HD();lh("routerLink",Aw(8,A,t.path))("routerLinkActiveOptions",xw(10,z)),ch("data-testid","manage-tab-"+t.path),gI(2),lh("nzType",t.icon)("nzTheme",r.navIconTheme(n.isActive,t.icon)),gI(),rl(" ",Fw(4,6,t.labelKey)," ");}}var I=[{path:"workflows",labelKey:"manage.tab.workflows",icon:"partition"},{path:"views",labelKey:"manage.tab.views",icon:"appstore"},{path:"providers",labelKey:"manage.tab.providers",icon:"api"},{path:"context-files",labelKey:"manage.tab.contextFiles",icon:"file"},{path:"local-repositories",labelKey:"manage.tab.localRepositories",icon:"database"},{path:"worktrees",labelKey:"manage.tab.worktrees",icon:"deployment-unit"},{path:"preferences",labelKey:"manage.tab.preferences",icon:"setting"}],B=(()=>{class e{constructor(){this.tabs=I,this.navIconTheme=H;}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275cmp=ZE({type:e,selectors:[["app-manage-shell"]],decls:5,vars:0,consts:[["rla","routerLinkActive"],["data-testid","manage-shell",1,"manage-shell"],["data-testid","manage-tabs","role","tablist",1,"manage-tabs"],["role","tab","routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"],["nz-icon","",1,"tab-icon",3,"nzType","nzTheme"]],template:function(n,r){n&1&&(_i(0,"section",1)(1,"nav",2),xD(2,L,5,11,"a",3,K),Jc(),uh(4,"router-outlet"),Jc()),n&2&&(gI(2),AD(r.tabs));},dependencies:[D6,v3,Yc,Ah,Th,Kt],styles:[".manage-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}.manage-tabs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;padding:.5rem 1.5rem 0;border-bottom:1px solid var(--knoflows-border, #e1dacb);background:var(--knoflows-surface, #fff)}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;padding:.65rem .9rem;color:var(--knoflows-text-secondary, inherit);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}.tab-icon[_ngcontent-%COMP%]{font-size:16px;color:currentColor}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--knoflows-text, inherit)}.manage-tabs[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--knoflows-link, inherit);font-weight:600;border-bottom-color:var(--knoflows-link, currentColor)}"]});}}return e})();export{I as MANAGE_TABS,B as ManageShellComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {q as qo,U as Uw,aV as ix,i as ie}from'./main-
|
|
1
|
+
import {q as qo,U as Uw,aV as ix,i as ie}from'./main-3VZRFHGG.js';var f=(()=>{class e{connect(t){let n=new URLSearchParams;t?.jobId&&n.set("jobId",t.jobId),t?.batchId&&n.set("batchId",t.batchId);let r=n.toString(),p=`${ix.apiBaseUrl}/events${r?`?${r}`:""}`,a=qo([]),b=Uw(()=>{let o=a();return o.length>0?o[o.length-1]:void 0}),s=new EventSource(p);return s.onmessage=o=>{let c;try{c=JSON.parse(o.data);}catch(d){return}a.update(d=>[...d,c]);},{events:a.asReadonly(),latest:b,close:()=>{s.onmessage=null,s.close();}}}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();export{f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {w as we}from'./chunk-
|
|
1
|
+
import {w as we}from'./chunk-BowAQ7m9.js';import {A as At}from'./chunk-BKYaECRn.js';import {a as ae,l as le}from'./chunk-EDwdt-Wk.js';import'./chunk-CwEMAptL.js';import'./chunk-BIJScqTM.js';import {C,a as C1,b6 as U,$,V as Ve,b as at$1,q as qo,U as Uw,u as ue,r as r$1,aW as Ng,aY as Dg,c as bi,Z as ZE,d as $8,v as v3,Y as pf,a0 as bd,a1 as sp,a2 as fp,K as Kt,j as _i,l as _D,J as Jc,o as gI,M as MD,I as Iw,P as Pw,L as Lh,p as Fw,H as HD,G as FD,m as mh,w as lh,z as rl,O as Fu,Q as ju,n as uh,E as Aw}from'./main-3VZRFHGG.js';import {b}from'./chunk-BcDRgzYZ.js';import {G as Gn,u as un}from'./chunk-bSS_wejP.js';import'./chunk-Dm_EWkUz.js';import {U as U$1}from'./chunk-YU-Bg77r.js';import'./chunk-CtiubhW7.js';import'./chunk-iIEmH_ui.js';var et=i=>["/batches",i];function it(i,r){i&1&&(_i(0,"p",1),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function nt(i,r){if(i&1&&(_i(0,"p",2),Iw(1),Jc()),i&2){let t=HD();gI(),Lh(t.loadError());}}function ot(i,r){i&1&&(_i(0,"a",10),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(lh("routerLink",Aw(4,et,r)),gI(),rl(" ",Fw(2,2,"views.detail.openBatch")," "));}function at(i,r){if(i&1&&(uh(0,"nz-alert",9),_D(1,ot,3,6,"a",10)),i&2){let t,e=HD(2);lh("nzMessage",e.confirmation()),gI(),MD((t=e.confirmationBatchId())?1:-1,t);}}function lt(i,r){i&1&&(_i(0,"p",11),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),rl(" ",Fw(2,1,"views.detail.noBulkWorkflows")," "));}function rt(i,r){if(i&1&&(_i(0,"p",14),Iw(1),Jc()),i&2){let t=HD(4);gI(),Lh(t.launchError());}}function st(i,r){if(i&1){let t=FD();_i(0,"p",12),Iw(1),Jc(),_i(2,"app-workflow-input-form",13),mh("valuesChange",function(n){Fu(t);let s=HD(3);return ju(s.setInputValues(n))}),Jc(),_D(3,rt,2,1,"p",14),_i(4,"div",15)(5,"button",16),mh("click",function(){Fu(t);let n=HD(3);return ju(n.launch())}),Iw(6),Pw(7,"transloco"),Jc(),_i(8,"button",17),mh("click",function(){Fu(t);let n=HD(3);return ju(n.cancelLaunch())}),Iw(9),Pw(10,"transloco"),Jc()();}if(i&2){let t=r,e=HD(3);gI(),Lh(t.name),gI(),lh("fields",t.inputSchema)("values",e.inputValues()),gI(),MD(e.launchError()?3:-1),gI(2),lh("nzLoading",e.launching())("disabled",e.launching()),gI(),rl(" ",Fw(7,8,e.launching()?"views.detail.launching":"views.detail.launch")," "),gI(3),rl(" ",Fw(10,10,"views.detail.cancelLaunch")," ");}}function ct(i,r){if(i&1&&(_i(0,"section",6)(1,"h2"),Iw(2),Pw(3,"transloco"),Jc(),_D(4,lt,3,3,"p",11)(5,st,11,12),Jc()),i&2){let t,e=HD(2);gI(2),rl(" ",Fw(3,2,r==="view"?"views.detail.launchViewTitle":"views.detail.launchSelectedTitle")," "),gI(2),MD(e.canBulkLaunch()?(t=e.boundWorkflow())?5:-1:4,t);}}function dt(i,r){i&1&&(_i(0,"p",7),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"views.detail.emptySubjects")));}function ut(i,r){if(i&1){let t=FD();_i(0,"app-runnable-items-table",18),mh("rowAction",function(n){Fu(t);let s=HD(2);return ju(s.onRowAction(n))})("bulkAction",function(n){Fu(t);let s=HD(2);return ju(s.onBulkAction(n))}),Jc();}if(i&2){let t=HD(2);lh("rows",t.rows())("selectable",true)("showRowAction",t.showRowAction());}}function pt(i,r){if(i&1){let t=FD();_i(0,"header",3)(1,"h1",4),Iw(2),Jc(),_i(3,"button",5),mh("click",function(){Fu(t);let n=HD();return ju(n.beginLaunch("view"))}),Iw(4),Pw(5,"transloco"),Jc()(),_D(6,at,2,2),_D(7,ct,6,4,"section",6),_D(8,dt,3,3,"p",7)(9,ut,1,3,"app-runnable-items-table",8);}if(i&2){let t,e=HD();gI(2),Lh(r.name),gI(),lh("disabled",!e.canBulkLaunch()),gI(),rl(" ",Fw(5,6,"views.detail.runOnAll")," "),gI(2),MD(e.confirmation()?6:-1),gI(),MD((t=e.launchMode())?7:-1,t),gI(),MD(e.subjects().length===0?8:9);}}var zt=(()=>{class i{constructor(){this.route=C(C1),this.viewsApi=C(U),this.workflowsApi=C(b),this.batchesApi=C(U$1),this.jobsApi=C($),this.startJob=C(At),this.transloco=C(Ve),this.destroyRef=C(at$1),this.view=qo(null),this.subjects=qo([]),this.workflows=qo([]),this.latestBySubject=qo({}),this.loading=qo(true),this.loadError=qo(null),this.selectedIds=qo([]),this.launchMode=qo(null),this.inputValues=qo({}),this.launching=qo(false),this.launchError=qo(null),this.confirmation=qo(null),this.confirmationBatchId=qo(null),this.boundWorkflow=Uw(()=>{let t=this.view();return t?this.workflows().find(e=>e.id===t.workflowId)??null:null}),this.canBulkLaunch=Uw(()=>this.boundWorkflow()!=null),this.showRowAction=Uw(()=>this.boundWorkflow()?.subjectHandling==="per-subject"),this.rows=Uw(()=>{let t=this.latestBySubject();return this.subjects().map(e=>({id:e.id,primaryLabel:e.title,subtitle:this.subjectDetails(e),latestJob:t[e.id]??null}))}),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(t=>{let e=t.get("id");if(!e){this.loading.set(false),this.loadError.set(this.transloco.translate("views.detail.loadFailed"));return}this.load(e);});}subjectDetails(t){if(t.subjectType==="ticket")return [t.status,t.assignee].filter(Boolean).join(" \xB7 ");if(t.subjectType==="pull_request"){let e=`${t.sourceBranch} \u2192 ${t.targetBranch}`;return t.author?`${t.author} \xB7 ${e}`:e}return t.url??""}onBulkAction(t){this.selectedIds.set(t),this.beginLaunch("manual");}onRowAction(t){let e=this.view();e&&this.startJob.start({workflowId:e.workflowId,subjectId:t});}beginLaunch(t){t==="manual"&&this.selectedIds().length===0||(this.launchError.set(null),this.confirmation.set(null),this.confirmationBatchId.set(null),this.launchMode.set(t),this.inputValues.set(ae(this.boundWorkflow()?.inputSchema??[])));}cancelLaunch(){this.launchMode.set(null),this.launchError.set(null);}setInputValues(t){this.inputValues.set(t);}launch(){let t=this.view(),e=this.boundWorkflow(),n=this.launchMode();if(!t||!e||!n)return;let s=n==="view"?{mode:"view",viewId:t.id}:{mode:"manual",subjectType:t.subjectType,subjectIds:[...this.selectedIds()]};this.launching.set(true),this.launchError.set(null),this.batchesApi.launch({workflowId:e.id,selection:s,triggeredBy:n==="view"?"view_bulk":"multiselect",inputValues:r$1({},this.inputValues())}).pipe(ue(this.destroyRef)).subscribe({next:w=>{this.launching.set(false),this.confirmation.set(this.confirmationMessage(w)),this.confirmationBatchId.set(w.kind==="batch"?w.batch.id:null),this.launchMode.set(null),this.refreshLatest(t.workflowId,this.subjects().map(tt=>tt.id));},error:w=>{this.launching.set(false),this.launchError.set(this.errorMessage(w,this.transloco.translate("views.detail.launchFailed")));}});}confirmationMessage(t){return t.kind==="batch"?this.transloco.translate("views.detail.confirmation.batch",{id:t.batch.id,count:t.batch.jobIds.length}):this.transloco.translate("views.detail.confirmation.job",{id:t.job.id})}load(t){this.loading.set(true),this.loadError.set(null),this.selectedIds.set([]),this.launchMode.set(null),this.confirmation.set(null),this.confirmationBatchId.set(null),Ng({view:this.viewsApi.get(t),subjects:this.viewsApi.getSubjects(t),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({view:e,subjects:n,workflows:s})=>{this.view.set(e),this.subjects.set(n),this.workflows.set(s),this.loading.set(false),this.refreshLatest(e.workflowId,n.map(w=>w.id));},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("views.detail.loadFailed")));}});}refreshLatest(t,e){(e.length===0?Dg({}):this.jobsApi.latestBySubject(t,e)).pipe(ue(this.destroyRef)).subscribe({next:s=>this.latestBySubject.set(s),error:()=>this.latestBySubject.set({})});}errorMessage(t,e){return t instanceof bi||t instanceof Error?t.message:e}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-view-detail"]],decls:4,vars:1,consts:[["data-testid","view-detail",1,"detail-page"],["data-testid","loading"],["data-testid","load-error",1,"error"],[1,"header"],["data-testid","view-name"],["nz-button","","nzType","primary","type","button","data-testid","run-on-all",3,"click","disabled"],["data-testid","launch-panel",1,"launch-panel"],["data-testid","empty-subjects",1,"muted"],[3,"rows","selectable","showRowAction"],["data-testid","launch-confirmation","nzType","success",3,"nzMessage"],["nz-button","","nzType","link","data-testid","open-batch",3,"routerLink"],["data-testid","no-bulk-workflows",1,"muted"],["data-testid","launch-workflow",1,"muted"],[3,"valuesChange","fields","values"],["data-testid","launch-error",1,"error"],[1,"launch-actions"],["nz-button","","nzType","primary","type","button","data-testid","launch-submit",3,"click","nzLoading","disabled"],["nz-button","","type","button","data-testid","launch-cancel",3,"click"],[3,"rowAction","bulkAction","rows","selectable","showRowAction"]],template:function(e,n){if(e&1&&(_i(0,"main",0),_D(1,it,3,3,"p",1)(2,nt,2,1,"p",2)(3,pt,10,8),Jc()),e&2){let s;gI(),MD(n.loading()?1:n.loadError()?2:(s=n.view())?3:-1,s);}},dependencies:[$8,v3,Gn,un,pf,bd,sp,fp,le,we,Kt],styles:[".detail-page[_ngcontent-%COMP%]{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:center}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;min-width:14rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.launch-panel[_ngcontent-%COMP%]{padding:1rem;border:1px solid #d6d3d1;background:#ffffffb3}.launch-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1.1rem}.launch-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;margin-top:.5rem}.muted[_ngcontent-%COMP%]{color:#78716c}.error[_ngcontent-%COMP%]{color:#9f1239}.actions[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return i})();export{zt as ViewDetailComponent};
|