@knoflows/engine 0.1.0-alpha.12 → 0.1.0-alpha.15
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 +81 -13
- package/dist/migrations/20260919073531_tense_grey_gargoyle/migration.sql +1 -0
- package/dist/migrations/20260919073531_tense_grey_gargoyle/snapshot.json +1348 -0
- package/dist/migrations/20260919081637_fearless_warlock/migration.sql +1 -0
- package/dist/migrations/20260919081637_fearless_warlock/snapshot.json +1358 -0
- package/package.json +3 -3
- package/static/apple-touch-icon.png +0 -0
- package/static/assets/i18n/en.json +50 -9
- package/static/assets/i18n/es.json +50 -9
- package/static/chunk-1Oqdt_Gp.js +1 -0
- package/static/{chunk-C3Ej8Ue9.js → chunk-1eeePIP1.js} +1 -1
- package/static/chunk-37yFTUcY.js +1 -0
- package/static/chunk-7MZQgksi.js +1 -0
- package/static/chunk-7VyHTRp_.js +1 -0
- package/static/chunk-B0V1VBvY.js +1 -0
- package/static/chunk-BH5zvE8A.js +1 -0
- package/static/chunk-BZxs3wP7.js +1 -0
- package/static/chunk-B_L2A3hm.js +1 -0
- package/static/chunk-BbIC5sO2.js +1 -0
- package/static/chunk-BeWWb9rm.js +1 -0
- package/static/chunk-BnD2l9n3.js +1 -0
- package/static/chunk-Bp8u1CCw.js +1 -0
- package/static/chunk-BpOumnMU.js +1 -0
- package/static/chunk-BuPc66MS.js +1 -0
- package/static/{chunk-CK-2DsDH.js → chunk-C4Ee3umI.js} +1 -1
- package/static/chunk-C5n_oTWP.js +1 -0
- package/static/chunk-CF4gc4Im.js +1 -0
- package/static/chunk-CM8oLO7n.js +1 -0
- package/static/chunk-CXGgR5M1.js +1 -0
- package/static/chunk-CiJRU6lo.js +1 -0
- package/static/chunk-Cn95hfnf.js +1 -0
- package/static/chunk-Cq09TrKP.js +1 -0
- package/static/chunk-Cx2n09Ng.js +1 -0
- package/static/chunk-DFoFQkTa.js +1 -0
- package/static/chunk-DMAf3Qir.js +66 -0
- package/static/chunk-DYARU-G0.js +1 -0
- package/static/chunk-DZhQ2iEt.js +1 -0
- package/static/chunk-D_DUAV49.js +1 -0
- package/static/chunk-DgEO14wO.js +1 -0
- package/static/{chunk-hEYSTlD1.js → chunk-DphMF2VB.js} +1 -1
- package/static/chunk-DxZsQqxS.js +1 -0
- package/static/chunk-GQe0l3Uh.js +1 -0
- package/static/chunk-J9qS04nF.js +1 -0
- package/static/chunk-dOUa0Vhs.js +1 -0
- package/static/chunk-nx1xncBD.js +1 -0
- package/static/chunk-q9oVn_qj.js +5 -0
- package/static/{chunk-BquoV7tV.js → chunk-vYeIWxg4.js} +1 -1
- package/static/chunk-yxqIQom4.js +1 -0
- package/static/favicon-16x16.png +0 -0
- package/static/favicon-32x32.png +0 -0
- package/static/favicon.ico +0 -0
- package/static/favicon.svg +12 -0
- package/static/icon-192.png +0 -0
- package/static/icon-512.png +0 -0
- package/static/index.html +30 -5
- package/static/main-2ZW45HAE.js +248 -0
- package/static/media/inter-latin-400-normal-55WT6UWF.woff2 +0 -0
- package/static/media/inter-latin-400-normal-FR5HOXA4.woff +0 -0
- package/static/media/inter-latin-500-normal-W62DVTXI.woff2 +0 -0
- package/static/media/inter-latin-500-normal-ZNGIZ2YB.woff +0 -0
- package/static/media/inter-latin-600-normal-R6Y2SZCR.woff2 +0 -0
- package/static/media/inter-latin-600-normal-ZYHV6QZT.woff +0 -0
- package/static/media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff +0 -0
- package/static/media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2 +0 -0
- package/static/media/space-grotesk-latin-500-normal-GESQWJQV.woff2 +0 -0
- package/static/media/space-grotesk-latin-500-normal-HV4TE4RA.woff +0 -0
- package/static/media/space-grotesk-latin-700-normal-6Z7GHSI6.woff +0 -0
- package/static/media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2 +0 -0
- package/static/nz-theme-dark.css +1 -0
- package/static/nz-theme.css +1 -0
- package/static/styles-JGCTKGGH.css +1 -0
- package/static/chunk--F2Y9kLC.js +0 -1
- package/static/chunk-A3t8CipM.js +0 -1
- package/static/chunk-BAgwFLbm.js +0 -1
- package/static/chunk-BLSuZA6j.js +0 -1
- package/static/chunk-Bc9kVhav.js +0 -1
- package/static/chunk-BdrifDCS.js +0 -66
- package/static/chunk-BkJuaRUH.js +0 -1
- package/static/chunk-BmP-Xct3.js +0 -1
- package/static/chunk-BqB1I-vg.js +0 -1
- package/static/chunk-C5T1qa5G.js +0 -1
- package/static/chunk-CKFZoQzp.js +0 -1
- package/static/chunk-CLNhyiRm.js +0 -1
- package/static/chunk-CN5_Adst.js +0 -1
- package/static/chunk-COSsVdG3.js +0 -1
- package/static/chunk-Cj-KtAk-.js +0 -1
- package/static/chunk-CrD5w72_.js +0 -1
- package/static/chunk-CxBYhrEj.js +0 -1
- package/static/chunk-D5Bqg3D5.js +0 -7
- package/static/chunk-DAfnL0eP.js +0 -1
- package/static/chunk-Dc3mv2RT.js +0 -1
- package/static/chunk-Dc7Nho4-.js +0 -1
- package/static/chunk-Df_jRm7U.js +0 -1
- package/static/chunk-Dl9xoaKd.js +0 -1
- package/static/chunk-DqECIHE5.js +0 -1
- package/static/chunk-Dtfc5XNc.js +0 -1
- package/static/chunk-DxtF2GQ1.js +0 -1
- package/static/chunk-KhdCYqqN.js +0 -1
- package/static/chunk-TkjFi8lV.js +0 -1
- package/static/chunk-UArWmYDU.js +0 -1
- package/static/chunk-WGWZEfc0.js +0 -1
- package/static/chunk-jg6TAN9F.js +0 -1
- package/static/chunk-mb666CWY.js +0 -1
- package/static/chunk-nXCKNQUo.js +0 -1
- package/static/chunk-ndsN8K7Q.js +0 -5
- package/static/chunk-tnTBlRRN.js +0 -1
- package/static/main-RRKPLQCF.js +0 -249
- package/static/styles-6MW3GE4V.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:Space Grotesk;font-style:normal;font-display:swap;font-weight:500;src:url("./media/space-grotesk-latin-500-normal-GESQWJQV.woff2") format("woff2"),url("./media/space-grotesk-latin-500-normal-HV4TE4RA.woff") format("woff")}@font-face{font-family:Space Grotesk;font-style:normal;font-display:swap;font-weight:700;src:url("./media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2") format("woff2"),url("./media/space-grotesk-latin-700-normal-6Z7GHSI6.woff") format("woff")}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:400;src:url("./media/inter-latin-400-normal-55WT6UWF.woff2") format("woff2"),url("./media/inter-latin-400-normal-FR5HOXA4.woff") format("woff")}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:500;src:url("./media/inter-latin-500-normal-W62DVTXI.woff2") format("woff2"),url("./media/inter-latin-500-normal-ZNGIZ2YB.woff") format("woff")}@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:600;src:url("./media/inter-latin-600-normal-R6Y2SZCR.woff2") format("woff2"),url("./media/inter-latin-600-normal-ZYHV6QZT.woff") format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-display:swap;font-weight:500;src:url("./media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2") format("woff2"),url("./media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff") format("woff")}html,body,app-root{height:100%;margin:0}body{font-family:Inter,sans-serif;overflow:hidden}:root{--app-chrome-height: 56px}h1,.display-heading{font-family:Space Grotesk,sans-serif;font-weight:700}code,pre,.mono{font-family:JetBrains Mono,ui-monospace,monospace}.ant-tag{border:none;border-radius:999px}.ant-table-thead>tr>th{font-family:JetBrains Mono,ui-monospace,monospace;font-size:12px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--knoflows-text-secondary)}
|
package/static/chunk--F2Y9kLC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {N as Nt,K as Ke$1}from'./chunk-TkjFi8lV.js';import {X as Xt,Z as Zn,i as ie}from'./chunk-mb666CWY.js';import {_ as _n,C as Cn}from'./chunk-DqECIHE5.js';import {C,V as Ve$1,b as at,q as qo,u as ue,o,Q as QE,M as Mi,n as n8,J as J6,k as k3,L as Ln,d as dd,z as zc,c as t7,Z as y7,X as Xb,e as V5,D as D5,K as Kt,f as _i,v as vw,R as Rw,g as Kc,h as gh,m as bD,p as gI,P as Ph,O as Ow,w as nl,B as _D,T as Ie$1,E as VD,F as LD,N as ND,S as SD,j as oE,x as ch,y as sE,A as xD,ae as Zi,a8 as a,af as E,i as ie$1,l as lh,a5 as ah,a2 as Pw,a3 as xw,a7 as MD,ag as _h,G as Pu,I as Lu}from'./main-RRKPLQCF.js';import {U}from'./chunk-jg6TAN9F.js';import {W,I}from'./chunk-CK-2DsDH.js';import {p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-CrD5w72_.js';import'./chunk-hEYSTlD1.js';var ke=(()=>{class t{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/workflow-library`;}list(){return this.http.get(this.baseUrl).pipe(E())}add(e){return this.http.post(`${this.baseUrl}/${encodeURIComponent(e)}/add`,{}).pipe(E())}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=ie$1({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();var Se=(t,d)=>d.id;function Be(t,d){t&1&&(_i(0,"p",2),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ie(t,d){if(t&1&&(_i(0,"p",3),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Pe(t,d){if(t&1&&(_i(0,"p",4),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.addError());}}function Le(t,d){if(t&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=d.$implicit,i=VD(3);gI(),Ph(Ow(2,1,i.subjectTypeKey(e)));}}function Ne(t,d){if(t&1&&(_i(0,"li")(1,"span"),vw(2),Kc(),_i(3,"span",14),vw(4),Rw(5,"transloco"),Kc()()),t&2){let e=d.$implicit,i=VD(4);_h("margin-left",e.depth,"rem"),gI(2),Ph(e.name),gI(2),Ph(Ow(5,4,i.stepTypeKey(e.type)));}}function We(t,d){if(t&1&&(_i(0,"ol",12),ND(1,Ne,6,6,"li",13,MD),Kc()),t&2){let e=VD().$implicit,i=VD(2);ah("data-testid","library-steps-"+e.id),gI(),xD(i.previewSteps(e));}}function je(t,d){if(t&1){let e=LD();_i(0,"nz-card")(1,"div",6)(2,"h2"),vw(3),Kc(),_i(4,"nz-tag"),vw(5),Rw(6,"transloco"),Kc()(),_i(7,"p",7),vw(8),Kc(),_i(9,"div",8),ND(10,Le,3,3,"nz-tag",null,SD),Kc(),_i(12,"div",9)(13,"button",10),gh("click",function(){let c=Pu(e).$implicit,C=VD(2);return Lu(C.togglePreview(c.id))}),vw(14),Rw(15,"transloco"),Kc(),_i(16,"button",11),gh("click",function(){let c=Pu(e).$implicit,C=VD(2);return Lu(C.addToMyWorkflows(c.id))}),vw(17),Rw(18,"transloco"),Kc()(),bD(19,We,3,1,"ol",12),Kc();}if(t&2){let e=d.$implicit,i=VD(2);ah("data-testid","library-entry-"+e.id),gI(2),ah("data-testid","library-name-"+e.id),gI(),Ph(e.name),gI(),ah("data-testid","library-source-"+e.id),gI(),Ph(Ow(6,13,i.sourceKey(e.source))),gI(2),ah("data-testid","library-description-"+e.id),gI(),nl(" ",e.description," "),gI(2),xD(i.appliesToValues(e)),gI(3),ah("data-testid","library-preview-"+e.id),gI(),nl(" ",Ow(15,15,i.isExpanded(e.id)?"workflow-library.hideSteps":"workflow-library.previewSteps")," "),gI(2),ch("disabled",i.addingId()!==null),ah("data-testid","library-add-"+e.id),gI(),nl(" ",Ow(18,17,i.addingId()===e.id?"workflow-library.adding":"workflow-library.add")," "),gI(2),_D(i.isExpanded(e.id)?19:-1);}}function Fe(t,d){if(t&1&&(bD(0,Pe,2,1,"p",4),_i(1,"div",5),ND(2,je,20,19,"nz-card",null,Se),Kc()),t&2){let e=VD();_D(e.addError()?0:-1),gI(2),xD(e.entries());}}var he=(()=>{class t{constructor(){this.libraryApi=C(ke),this.router=C(Ie$1),this.transloco=C(Ve$1),this.destroyRef=C(at),this.modalRef=C(ie,{optional:true}),this.entries=qo([]),this.loading=qo(true),this.loadError=qo(null),this.addError=qo(null),this.addingId=qo(null),this.expandedIds=qo(new Set),this.libraryApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>{this.entries.set(e),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("workflow-library.loadFailed")));}});}sourceKey(e){return `workflow-library.source.${e}`}appliesToValues(e){let i=e.workflowDefinition.appliesTo;return i==="none"?["none"]:Array.isArray(i)?i:[i]}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}stepTypeKey(e){return `step-list.stepType.${e}`}isExpanded(e){return this.expandedIds().has(e)}togglePreview(e){this.expandedIds.update(i=>{let c=new Set(i);return c.has(e)?c.delete(e):c.add(e),c});}previewSteps(e){return ve(e.workflowDefinition.steps,0)}addToMyWorkflows(e){this.addingId()||(this.addError.set(null),this.addingId.set(e),this.libraryApi.add(e).pipe(ue(this.destroyRef)).subscribe({next:i=>{this.addingId.set(null),this.modalRef?.close(),this.router.navigate(["/workflows",i.id,"edit"]);},error:i=>{this.addingId.set(null),this.addError.set(this.errorMessage(i,this.transloco.translate("workflow-library.addFailed")));}}));}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-library-browser"]],decls:7,vars:4,consts:[["data-testid","workflow-library-browser",1,"library"],[1,"lede"],["data-testid","library-loading"],["data-testid","library-load-error",1,"error"],["data-testid","library-add-error",1,"error"],[1,"cards"],[1,"card-head"],[1,"description"],[1,"applies-to"],[1,"card-actions"],["nz-button","","nzType","link","type","button",3,"click"],["nz-button","","nzType","primary","type","button",3,"click","disabled"],[1,"steps-preview"],[3,"margin-left"],[1,"step-type"]],template:function(i,c){i&1&&(_i(0,"div",0)(1,"p",1),vw(2),Rw(3,"transloco"),Kc(),bD(4,Be,3,3,"p",2)(5,Ie,2,1,"p",3)(6,Fe,4,1),Kc()),i&2&&(gI(2),Ph(Ow(3,2,"workflow-library.lede")),gI(2),_D(c.loading()?4:c.loadError()?5:6));},dependencies:[Mi,dd,zc,t7,y7,Nt,Ke$1,W,I,Kt],styles:[".library[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.lede[_ngcontent-%COMP%]{margin:0;color:#57534e}.cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}.card-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.05rem;font-weight:600}.description[_ngcontent-%COMP%]{margin:.5rem 0 0;color:#57534e}.applies-to[_ngcontent-%COMP%]{margin-top:.5rem}.card-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.5rem}.steps-preview[_ngcontent-%COMP%]{margin:.75rem 0 0;padding-left:1.25rem;color:#44403c}.steps-preview[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:.75rem;margin:.25rem 0}.step-type[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();function ve(t,d){let e=[];for(let i of t)e.push({name:i.name,type:i.type,depth:d}),i.type==="loop"&&Array.isArray(i.steps)&&e.push(...ve(i.steps,d+1));return e}var Oe=t=>({count:t}),De=t=>["/workflows",t,"edit"],$e=(t,d)=>d.id;function He(t,d){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ve(t,d){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Ae(t,d){if(t&1&&(lh(0,"nz-option",9),Rw(1,"transloco")),t&2){let e=d.$implicit,i=VD(2);ch("nzValue",e)("nzLabel",Ow(1,2,i.subjectHandlingFilterKey(e)));}}function Re(t,d){if(t&1&&(_i(0,"p",10),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.deleteError());}}function Ke(t,d){if(t&1){let e=LD();_i(0,"section",11)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"div",13)(5,"button",14),gh("click",function(){Pu(e);let c=VD(2);return Lu(c.openLibrary())}),vw(6),Rw(7,"transloco"),Kc(),_i(8,"a",15),vw(9),Rw(10,"transloco"),Kc()()();}t&2&&(gI(2),Ph(Ow(3,3,"workflows.list.emptyState")),gI(4),nl(" ",Ow(7,5,"workflows.list.emptyBrowseLibrary")," "),gI(3),nl(" ",Ow(10,7,"workflows.list.emptyCreateButton")," "));}function Ue(t,d){if(t&1&&(_i(0,"span"),vw(1),Kc()),t&2){let e=VD().$implicit;ah("data-testid","description-"+e.id),gI(),Ph(e.description);}}function qe(t,d){if(t&1&&(_i(0,"span",17),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD().$implicit;ah("data-testid","description-"+e.id),gI(),Ph(Ow(2,2,"workflows.list.noDescription"));}}function Ge(t,d){if(t&1&&(_i(0,"nz-tag"),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=d.$implicit,i=VD().$implicit,c=VD(3);ah("data-testid","applies-to-"+i.id),gI(),Ph(Ow(2,2,c.subjectTypeKey(e)));}}function Je(t,d){if(t&1){let e=LD();_i(0,"tr")(1,"td")(2,"span"),vw(3),Kc()(),_i(4,"td",16),bD(5,Ue,2,2,"span")(6,qe,3,4,"span",17),Kc(),_i(7,"td"),ND(8,Ge,3,4,"nz-tag",null,SD),Kc(),_i(10,"td")(11,"nz-tag"),vw(12),Rw(13,"transloco"),Kc()(),_i(14,"td")(15,"span"),vw(16),Rw(17,"transloco"),Kc()(),_i(18,"td",18)(19,"a",19),vw(20),Rw(21,"transloco"),Kc(),_i(22,"button",20),Rw(23,"transloco"),Rw(24,"transloco"),Rw(25,"transloco"),gh("nzOnConfirm",function(){let c=Pu(e).$implicit,C=VD(3);return Lu(C.deleteWorkflow(c.id))}),vw(26),Rw(27,"transloco"),Kc()()();}if(t&2){let e=d.$implicit,i=VD(3);ah("data-testid","workflow-"+e.id),gI(2),ah("data-testid","name-"+e.id),gI(),Ph(e.name),gI(2),_D(e.description?.trim()?5:6),gI(3),xD(i.appliesToValues(e)),gI(3),ah("data-testid","subject-handling-"+e.id),gI(),Ph(Ow(13,16,i.subjectHandlingKey(e.subjectHandling))),gI(3),ah("data-testid","step-count-"+e.id),gI(),Ph(Pw(17,18,"workflows.list.stepCount",xw(31,Oe,e.steps.length))),gI(3),ch("routerLink",xw(33,De,e.id)),ah("data-testid","edit-"+e.id),gI(),nl(" ",Ow(21,21,"workflows.list.edit")," "),gI(2),ch("nzPopconfirmTitle",Ow(23,23,"workflows.list.deleteConfirm"))("nzOkText",Ow(24,25,"workflows.list.delete"))("nzCancelText",Ow(25,27,"common.cancel")),ah("data-testid","delete-"+e.id),gI(4),nl(" ",Ow(27,29,"workflows.list.delete")," ");}}function Qe(t,d){if(t&1&&(_i(0,"nz-table",12)(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,"th"),vw(19),Rw(20,"transloco"),Kc()()(),_i(21,"tbody"),ND(22,Je,28,35,"tr",null,$e),Kc()()),t&2){let e=VD(2);ch("nzData",e.workflows())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Ph(Ow(5,9,"workflows.list.column.name")),gI(3),Ph(Ow(8,11,"workflows.list.column.description")),gI(3),Ph(Ow(11,13,"workflow-editor.appliesTo")),gI(3),Ph(Ow(14,15,"workflow-editor.subjectHandling.label")),gI(3),Ph(Ow(17,17,"workflows.list.column.steps")),gI(3),Ph(Ow(20,19,"workflows.list.column.actions")),gI(3),xD(e.workflows());}}function Xe(t,d){if(t&1){let e=LD();_i(0,"div",7)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nz-select",8),gh("ngModelChange",function(c){Pu(e);let C=VD();return Lu(C.setSubjectHandlingFilter(c))}),ND(5,Ae,2,4,"nz-option",9,SD),Kc(),oE(),Kc(),bD(7,Re,2,1,"p",10),bD(8,Ke,11,9,"section",11)(9,Qe,24,21,"nz-table",12);}if(t&2){let e=VD();gI(2),Ph(Ow(3,4,"workflows.list.filterBySubjectHandling")),gI(2),ch("ngModel",e.subjectHandlingFilter()),sE(),gI(),xD(e.subjectHandlingOptions),gI(2),_D(e.deleteError()?7:-1),gI(),_D(e.workflows().length===0?8:9);}}var Ot=(()=>{class t{constructor(){this.workflowsApi=C(U),this.transloco=C(Ve$1),this.destroyRef=C(at),this.modal=C(Xt),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.deleteError=qo(null),this.subjectHandlingFilter=qo("all"),this.subjectHandlingOptions=["all","per-subject","collection"],this.load();}setSubjectHandlingFilter(e){this.subjectHandlingFilter.set(e),this.load();}appliesToValues(e){let i=e.appliesTo;return i==="none"?["none"]:Array.isArray(i)?i:[i]}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}subjectHandlingKey(e){return `workflow-editor.subjectHandling.${e}`}subjectHandlingFilterKey(e){return e==="all"?"workflows.list.filterAll":`workflow-editor.subjectHandling.${e}`}deleteWorkflow(e){this.deleteError.set(null),this.workflowsApi.delete(e).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.workflows.update(i=>i.filter(c=>c.id!==e));},error:i=>{this.deleteError.set(this.errorMessage(i,this.transloco.translate("workflows.list.deleteFailed")));}});}openLibrary(){this.modal.create({nzTitle:this.transloco.translate("workflow-library.title"),nzContent:he,nzFooter:null,nzWidth:720});}load(){let e=this.subjectHandlingFilter();this.loading.set(true),this.loadError.set(null),this.workflowsApi.list(e==="all"?void 0:{subjectHandling:e}).pipe(ue(this.destroyRef)).subscribe({next:i=>{this.workflows.set(i),this.loading.set(false);},error:i=>{this.loading.set(false),this.loadError.set(this.errorMessage(i,this.transloco.translate("workflows.list.loadFailed")));}});}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-list"]],decls:15,vars:10,consts:[["data-testid","workflows-list",1,"list-page"],[1,"header"],[1,"header-actions"],["nz-button","","type","button","data-testid","browse-library",3,"click"],["nz-button","","nzType","primary","routerLink","/workflows/new","data-testid","create-workflow"],["data-testid","loading"],["data-testid","load-error",1,"error"],[1,"field"],["data-testid","subject-handling-filter",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","delete-error",1,"error"],["data-testid","empty-state",1,"empty"],["data-testid","workflow-items",3,"nzData","nzFrontPagination","nzShowPagination"],[1,"empty-actions"],["nz-button","","type","button","data-testid","empty-browse-library",3,"click"],["nz-button","","nzType","primary","routerLink","/workflows/new","data-testid","empty-create"],[1,"description-cell"],[1,"muted"],[1,"actions"],["nz-button","","nzType","link",3,"routerLink"],["nz-button","","nzType","link","nzDanger","","type","button","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle","nzOkText","nzCancelText"]],template:function(i,c){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"div",2)(6,"button",3),gh("click",function(){return c.openLibrary()}),vw(7),Rw(8,"transloco"),Kc(),_i(9,"a",4),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,He,3,3,"p",5)(13,Ve,2,1,"p",6)(14,Xe,10,6),Kc()),i&2&&(gI(3),Ph(Ow(4,4,"workflows.list.title")),gI(4),nl(" ",Ow(8,6,"workflows.list.browseLibrary")," "),gI(3),nl(" ",Ow(11,8,"workflows.list.createButton")," "),gI(2),_D(c.loading()?12:c.loadError()?13:14));},dependencies:[Mi,n8,J6,k3,Ln,dd,zc,t7,y7,Zn,_n,Cn,Xb,V5,D5,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-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-actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;flex-shrink:0}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;max-width:16rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.muted[_ngcontent-%COMP%]{color:#a8a29e;font-style:italic}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.empty-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;gap:.75rem}.error[_ngcontent-%COMP%]{color:#9f1239}.actions[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%] td.description-cell{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;text-overflow:unset;max-width:28rem;vertical-align:top}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{Ot as WorkflowListComponent,Ot as WorkflowsManageComponent};
|
package/static/chunk-A3t8CipM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {T}from'./chunk-C5T1qa5G.js';import {C as Cx,o as oy}from'./chunk-BdrifDCS.js';import {a as ai,z}from'./chunk-WGWZEfc0.js';import {C,a as ae,T as Ie,ai as u,b as at,V as Ve,aS as O,aT as de,al as Se,q as qo,H as Hw,u as ue$1,r,o,Q as QE,M as Mi,n as n8,am as S4,J as J6,k as k3,L as Ln,d as dd,z as zc,c as t7,Z as y7,X as Xb,e as V5,D as D5,K as Kt,f as _i,v as vw,g as Kc,R as Rw,h as gh,m as bD,p as gI,P as Ph,O as Ow,x as ch,w as nl,B as _D,E as VD,F as LD,j as oE,N as ND,y as sE,A as xD,S as SD,l as lh,G as Pu,I as Lu}from'./main-RRKPLQCF.js';import {a as ae$1,l as le}from'./chunk-BkJuaRUH.js';import'./chunk-BAgwFLbm.js';import {U}from'./chunk-jg6TAN9F.js';import'./chunk-hEYSTlD1.js';var me=(t,s)=>s.id;function ue(t,s){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function he(t,s){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function fe(t,s){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=s.$implicit;gI(),Ph(e);}}function ge(t,s){if(t&1&&(_i(0,"section",7)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,fe,2,1,"li",null,SD),Kc()()),t&2){let e=VD(2);gI(2),Ph(Ow(3,1,"shortcuts.editor.validation")),gI(3),xD(e.validationErrors());}}function _e(t,s){if(t&1&&lh(0,"nz-option",11),t&2){let e=s.$implicit;ch("nzValue",e.id)("nzLabel",e.name);}}function we(t,s){if(t&1){let e=LD();_i(0,"app-workflow-input-form",13),gh("valuesChange",function(i){Pu(e);let u=VD(2);return Lu(u.setInputValues(i))}),Kc();}if(t&2){let e=VD(2);ch("fields",s.inputSchema)("values",e.inputValues());}}function ve(t,s){if(t&1){let e=LD();bD(0,ge,7,3,"section",7),_i(1,"label",8)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"input",9),gh("ngModelChange",function(i){Pu(e);let u=VD();return Lu(u.name.set(i))}),Kc(),oE(),Kc(),_i(6,"div",8)(7,"span"),vw(8),Rw(9,"transloco"),Kc(),_i(10,"nz-select",10),gh("ngModelChange",function(i){Pu(e);let u=VD();return Lu(u.onWorkflowChange(i))}),ND(11,_e,1,2,"nz-option",11,me),Kc(),oE(),Kc(),bD(13,we,1,2,"app-workflow-input-form",12);}if(t&2){let e,o=VD();_D(o.validationErrors().length>0?0:-1),gI(3),Ph(Ow(4,6,"shortcuts.editor.name")),gI(2),ch("ngModel",o.name()),sE(),gI(3),Ph(Ow(9,8,"shortcuts.editor.workflow")),gI(2),ch("ngModel",o.workflowId()),sE(),gI(),xD(o.eligibleWorkflows()),gI(2),_D((e=o.selectedWorkflow())?13:-1,e);}}function Ce(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 He=(()=>{class t{constructor(){this.route=C(ae),this.router=C(Ie),this.shortcutsApi=C(u),this.workflowsApi=C(U),this.message=C(Cx),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=Hw(()=>!this.routeId()),this.pageTitle=Hw(()=>(this.language.currentLang(),this.isNew()?this.transloco.translate("shortcuts.editor.titleNew"):this.transloco.translate("shortcuts.editor.titleEdit",{id:this.routeId()}))),this.eligibleWorkflows=Hw(()=>this.workflows().filter(e=>e.appliesTo==="none"&&e.subjectHandling==="per-subject")),this.selectedWorkflow=Hw(()=>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$1(o?.inputSchema??[]));}setInputValues(e){this.inputValues.set(e);}save(){let e=this.routeId(),o=r({id:e??Ce(this.name()),name:this.name().trim(),workflowId:this.workflowId(),inputValues:this.inputValues()},this.lastJobId()?{lastJobId:this.lastJobId()}:{}),i=oy.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.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$1){return e instanceof o||e instanceof Error?e.message:o$1}static{this.\u0275fac=function(o){return new(o||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-shortcut-editor"]],decls:15,vars:10,consts:[["data-testid","shortcut-editor",1,"editor"],[1,"header"],[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"),vw(4),Kc()(),_i(5,"div",2)(6,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i(9,"button",4),gh("click",function(){return i.save()}),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,ue,3,3,"p",5)(13,he,2,1,"p",6)(14,ve,14,10),Kc()),o&2&&(gI(4),Ph(i.pageTitle()),gI(3),Ph(Ow(8,6,"shortcuts.editor.backToList")),gI(2),ch("nzLoading",i.saving())("disabled",i.loading()||!!i.loadError()),gI(),nl(" ",Ow(11,8,"common.save")," "),gI(2),_D(i.loading()?12:i.loadError()?13:14));},dependencies:[Mi,n8,S4,J6,k3,Ln,dd,zc,t7,y7,ai,z,Xb,V5,D5,le,Kt],styles:[".editor[_ngcontent-%COMP%]{max-width:40rem;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-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{He as ShortcutEditorComponent};
|
package/static/chunk-BAgwFLbm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {C,ae as Zi,a8 as a,af as E,i as ie}from'./main-RRKPLQCF.js';var f=(()=>{class r{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/local-repositories`;}list(){return this.http.get(this.baseUrl).pipe(E())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}create(t){return this.http.post(this.baseUrl,t).pipe(E())}update(t,i){return this.http.patch(`${this.baseUrl}/${encodeURIComponent(t)}`,i).pipe(E())}delete(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}static{this.\u0275fac=function(i){return new(i||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{f};
|
package/static/chunk-BLSuZA6j.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {_ as _n,C as Cn}from'./chunk-DqECIHE5.js';import {C,ah as U,ai as u,V as Ve,b as at,q as qo,u as ue,a9 as Ng,o,Q as QE,M as Mi,L as Ln,d as dd,z as zc,c as t7,K as Kt,f as _i,v as vw,R as Rw,g as Kc,m as bD,p as gI,P as Ph,O as Ow,w as nl,B as _D,E as VD,N as ND,x as ch,A as xD,F as LD,h as gh,a5 as ah,G as Pu,I as Lu}from'./main-RRKPLQCF.js';import {U as U$1}from'./chunk-jg6TAN9F.js';import {W,I}from'./chunk-CK-2DsDH.js';import {p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-CrD5w72_.js';import'./chunk-hEYSTlD1.js';function Z(t,p){return [...t.map(i=>({type:"view",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:i.subjectType})),...p.map(i=>({type:"shortcut",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:null}))].sort((i,c)=>i.name.localeCompare(c.name))}var ee=(t,p)=>p.type+p.id;function te(t,p){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ie(t,p){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function ne(t,p){if(t&1&&(_i(0,"p",7),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.deleteError());}}function oe(t,p){t&1&&(_i(0,"section",8)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"div",2)(5,"a",10),vw(6),Rw(7,"transloco"),Kc(),_i(8,"a",11),vw(9),Rw(10,"transloco"),Kc()()()),t&2&&(gI(2),Ph(Ow(3,3,"manage.views.emptyState")),gI(4),nl(" ",Ow(7,5,"manage.views.createView")," "),gI(3),nl(" ",Ow(10,7,"manage.views.createShortcut")," "));}function ae(t,p){if(t&1&&(vw(0),Rw(1,"transloco")),t&2){let e=VD().$implicit,i=VD(3);nl(" ",Ow(1,1,i.subjectTypeKey(e.subjectType))," ");}}function re(t,p){t&1&&(vw(0),Rw(1,"transloco")),t&2&&nl(" ",Ow(1,1,"manage.views.noSubjectType")," ");}function se(t,p){if(t&1){let e=LD();_i(0,"tr")(1,"td"),vw(2),Kc(),_i(3,"td")(4,"nz-tag"),vw(5),Rw(6,"transloco"),Kc()(),_i(7,"td"),vw(8),Kc(),_i(9,"td"),bD(10,ae,2,3)(11,re,2,3),Kc(),_i(12,"td",12)(13,"a",13),vw(14),Rw(15,"transloco"),Kc(),_i(16,"button",14),Rw(17,"transloco"),Rw(18,"transloco"),Rw(19,"transloco"),gh("nzOnConfirm",function(){let c=Pu(e).$implicit,v=VD(3);return Lu(v.deleteItem(c))}),vw(20),Rw(21,"transloco"),Kc()()();}if(t&2){let e=p.$implicit,i=VD(3);ah("data-testid","item-"+e.type+"-"+e.id),gI(),ah("data-testid","name-"+e.type+"-"+e.id),gI(),Ph(e.name),gI(2),ah("data-testid","type-"+e.type+"-"+e.id),gI(),Ph(Ow(6,17,i.typeKey(e.type))),gI(2),ah("data-testid","workflow-"+e.type+"-"+e.id),gI(),nl(" ",i.workflowName(e)," "),gI(),ah("data-testid","subject-type-"+e.type+"-"+e.id),gI(),_D(e.subjectType?10:11),gI(3),ch("routerLink",i.editLink(e)),ah("data-testid","edit-"+e.type+"-"+e.id),gI(),nl(" ",Ow(15,19,"manage.views.edit")," "),gI(2),ch("nzPopconfirmTitle",Ow(17,21,i.deleteConfirmKey(e)))("nzOkText",Ow(18,23,"manage.views.delete"))("nzCancelText",Ow(19,25,"common.cancel")),ah("data-testid","delete-"+e.type+"-"+e.id),gI(4),nl(" ",Ow(21,27,"manage.views.delete")," ");}}function de(t,p){if(t&1&&(_i(0,"nz-table",9)(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,se,22,29,"tr",null,ee),Kc()()),t&2){let e=VD(2);ch("nzData",e.items())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Ph(Ow(5,8,"manage.views.column.name")),gI(3),Ph(Ow(8,10,"manage.views.column.type")),gI(3),Ph(Ow(11,12,"manage.views.column.workflow")),gI(3),Ph(Ow(14,14,"manage.views.column.subjectType")),gI(3),Ph(Ow(17,16,"manage.views.column.actions")),gI(3),xD(e.items());}}function pe(t,p){if(t&1&&(bD(0,ne,2,1,"p",7),bD(1,oe,11,9,"section",8)(2,de,21,18,"nz-table",9)),t&2){let e=VD();_D(e.deleteError()?0:-1),gI(),_D(e.items().length===0?1:2);}}var Ne=(()=>{class t{constructor(){this.viewsApi=C(U),this.shortcutsApi=C(u),this.workflowsApi=C(U$1),this.transloco=C(Ve),this.destroyRef=C(at),this.items=qo([]),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.deleteError=qo(null),this.load();}typeKey(e){return `manage.views.type.${e}`}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}workflowName(e){return this.workflows().find(i=>i.id===e.workflowId)?.name??e.workflowId}editLink(e){return e.type==="view"?["/views",e.id,"edit"]:["/shortcuts",e.id,"edit"]}deleteConfirmKey(e){return e.type==="view"?"manage.views.deleteConfirmView":"manage.views.deleteConfirmShortcut"}deleteItem(e){this.deleteError.set(null),(e.type==="view"?this.viewsApi.delete(e.id):this.shortcutsApi.delete(e.id)).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.items.update(c=>c.filter(v=>!(v.type===e.type&&v.id===e.id)));},error:c=>{this.deleteError.set(this.errorMessage(c,this.transloco.translate("manage.views.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({views:this.viewsApi.list(),shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({views:e,shortcuts:i,workflows:c})=>{this.items.set(Z(e,i)),this.workflows.set(c),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("manage.views.loadFailed")));}});}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-views-and-shortcuts-manage"]],decls:15,vars:10,consts:[["data-testid","views-shortcuts-manage",1,"list-page"],[1,"header"],[1,"header-actions"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","delete-error",1,"error"],["data-testid","empty-state",1,"empty"],["data-testid","managed-items",3,"nzData","nzFrontPagination","nzShowPagination"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","empty-create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","empty-create-shortcut"],[1,"actions"],["nz-button","","nzType","link",3,"routerLink"],["nz-button","","nzType","link","nzDanger","","type","button","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle","nzOkText","nzCancelText"]],template:function(i,c){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"div",2)(6,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i(9,"a",4),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,te,3,3,"p",5)(13,ie,2,1,"p",6)(14,pe,3,2),Kc()),i&2&&(gI(3),Ph(Ow(4,4,"manage.views.title")),gI(4),nl(" ",Ow(8,6,"manage.views.createView")," "),gI(3),nl(" ",Ow(11,8,"manage.views.createShortcut")," "),gI(2),_D(c.loading()?12:c.loadError()?13:14));},dependencies:[Mi,Ln,dd,zc,t7,_n,Cn,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-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-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.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 t})();export{Ne as ViewsAndShortcutsManageComponent};
|
package/static/chunk-Bc9kVhav.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {C,ae as Zi,a8 as a,cg as u,af as E,i as ie}from'./main-RRKPLQCF.js';var U=(()=>{class r{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/batches`;}list(t){return this.http.get(this.baseUrl,{params:u(t)}).pipe(E())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}jobs(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/jobs`).pipe(E())}launch(t){return this.http.post(this.baseUrl,t).pipe(E())}cancel(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/cancel`,{}).pipe(E())}static{this.\u0275fac=function(a){return new(a||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
|