@knoflows/engine 0.1.0-alpha.4 → 0.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/engine.js +14 -13
  2. package/package.json +1 -1
  3. package/static/assets/i18n/en.json +8 -7
  4. package/static/assets/i18n/es.json +8 -7
  5. package/static/{chunk-D6KYmz2w.js → chunk--huWzdqj.js} +1 -1
  6. package/static/chunk-164-t-LC.js +1 -0
  7. package/static/chunk-B2oijRKi.js +1 -0
  8. package/static/{chunk-CWRAmEOi.js → chunk-BMOj-ctp.js} +1 -1
  9. package/static/{chunk-Ca9rxJZS.js → chunk-B_0vwfJH.js} +1 -1
  10. package/static/chunk-Ba2Pk3ZV.js +1 -0
  11. package/static/{chunk-BJ_zTxjo.js → chunk-BgxH8sDB.js} +1 -1
  12. package/static/chunk-BiwCj5Ed.js +1 -0
  13. package/static/{chunk-CECejZs9.js → chunk-C9TOy_jn.js} +1 -1
  14. package/static/{chunk-BaL0hYvK.js → chunk-CIADdbUP.js} +1 -1
  15. package/static/{chunk-VW6e_Kls.js → chunk-CfZWJKlu.js} +1 -1
  16. package/static/chunk-Cg4mENZa.js +1 -0
  17. package/static/chunk-Cv5pNW9n.js +1 -0
  18. package/static/{chunk-BqWiMcNp.js → chunk-CxrhCycA.js} +1 -1
  19. package/static/{chunk-BvGpCrD9.js → chunk-CzSFfhcS.js} +1 -1
  20. package/static/{chunk-CbG3rfKf.js → chunk-D5kutWaL.js} +6 -6
  21. package/static/chunk-D7ecsHWV.js +1 -0
  22. package/static/{chunk-Cdhqfnmn.js → chunk-DZV_xppV.js} +1 -1
  23. package/static/{chunk-DZ8K8fY1.js → chunk-DaPHlPte.js} +1 -1
  24. package/static/{chunk-DrMwVUpq.js → chunk-DeFJOu7x.js} +1 -1
  25. package/static/{chunk-B4PXIvtd.js → chunk-DjcxfmKB.js} +1 -1
  26. package/static/{chunk-jDfyi4_G.js → chunk-DkKxPJBS.js} +1 -1
  27. package/static/{chunk-smuNKEab.js → chunk-DnSW_i5C.js} +3 -3
  28. package/static/{chunk-C5kOvUkS.js → chunk-Dnos4vY0.js} +1 -1
  29. package/static/{chunk-BnjE7sDc.js → chunk-E9Klh0DL.js} +1 -1
  30. package/static/{chunk-DS5k0b_s.js → chunk-GrrV0ukn.js} +1 -1
  31. package/static/chunk-M0pfvgRb.js +1 -0
  32. package/static/{chunk-3tEYpnqu.js → chunk-PG4bRDhM.js} +1 -1
  33. package/static/chunk-dMfVmcfD.js +1 -0
  34. package/static/index.html +1 -1
  35. package/static/{main-5C7K2447.js → main-6LDEPJ3H.js} +1 -1
  36. package/static/chunk--cAlvNjP.js +0 -1
  37. package/static/chunk-4TrlkpZx.js +0 -1
  38. package/static/chunk-99HzEG7y.js +0 -1
  39. package/static/chunk-BEPCHPAV.js +0 -1
  40. package/static/chunk-Byfh9OPw.js +0 -1
  41. package/static/chunk-C67ITweo.js +0 -1
  42. package/static/chunk-Cgq1n6kP.js +0 -1
  43. package/static/chunk-CpxvtoPc.js +0 -1
  44. package/static/chunk-DGw7ID-A.js +0 -1
  45. package/static/chunk-qdbp1qcP.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knoflows/engine",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.7",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "common.loading": "Loading…",
25
25
  "common.errorGeneric": "Something went wrong",
26
26
  "jobs.title": "Kno — Start a Job",
27
- "jobs.lede": "Pick a single-cardinality workflow and start a Job. Watching and resume live on the Job detail page.",
27
+ "jobs.lede": "Pick a workflow that runs one item at a time and start a Job. Watching and resume live on the Job detail page.",
28
28
  "jobs.start.heading": "Start a Job",
29
29
  "jobs.start.workflow": "Workflow",
30
30
  "jobs.start.subjectId": "subjectId",
@@ -97,15 +97,16 @@
97
97
  "workflow-editor.basics": "Basics",
98
98
  "workflow-editor.name": "Workflow name",
99
99
  "workflow-editor.appliesTo": "Runs on",
100
- "workflow-editor.cardinality.label": "Launch mode",
100
+ "workflow-editor.subjectHandling.label": "Items",
101
101
  "workflow-editor.description": "Description",
102
102
  "workflow-editor.subjectType.none": "Nothing, standalone workflow",
103
103
  "workflow-editor.subjectType.ticket": "Ticket",
104
104
  "workflow-editor.subjectType.pull_request": "Pull request",
105
105
  "workflow-editor.subjectType.documentation": "Documentation",
106
- "workflow-editor.cardinality.single": "Single",
107
- "workflow-editor.cardinality.batch": "Batch",
108
- "workflow-editor.cardinality.aggregate": "Aggregate",
106
+ "workflow-editor.subjectHandling.per-subject": "One at a time",
107
+ "workflow-editor.subjectHandling.collection": "As a group",
108
+ "workflow-editor.subjectHandling.help.per-subject": "Steps work on a single item. You can start one row, or run many independently with one notification when you run in bulk.",
109
+ "workflow-editor.subjectHandling.help.collection": "Steps see the whole selected set and produce one combined result.",
109
110
  "workflow-editor.notificationPolicy": "Notification policy",
110
111
  "workflow-editor.trigger.on_fail": "On failure",
111
112
  "workflow-editor.trigger.on_complete": "On completion",
@@ -189,7 +190,7 @@
189
190
  "step-list.onMaxIterations.continue": "Continue",
190
191
  "step-list.onMaxIterations.ask_human": "Ask human",
191
192
  "settings.title": "Settings",
192
- "settings.lede": "Choose which providers Kno uses, and store API keys. Keys take effect immediately; switching an implementation requires a restart.",
193
+ "settings.lede": "Choose which providers Kno uses, and store API keys. Keys and ticket/repo switches take effect immediately; switching the coding agent requires a restart.",
193
194
  "settings.section.ticket": "Ticket tracking",
194
195
  "settings.section.repo": "Repository hosting",
195
196
  "settings.section.agent": "Coding agent",
@@ -225,7 +226,7 @@
225
226
  "workflows.list.emptyCreateButton": "Create your first workflow",
226
227
  "workflows.list.stepCount": "{{count}} steps",
227
228
  "workflows.list.noDescription": "No description",
228
- "workflows.list.filterByLaunchMode": "Filter by launch mode",
229
+ "workflows.list.filterBySubjectHandling": "Filter by items",
229
230
  "workflows.list.filterAll": "All",
230
231
  "workflows.list.edit": "Edit",
231
232
  "workflows.list.delete": "Delete",
@@ -24,7 +24,7 @@
24
24
  "common.loading": "Cargando…",
25
25
  "common.errorGeneric": "Algo salió mal",
26
26
  "jobs.title": "Kno — Iniciar un trabajo",
27
- "jobs.lede": "Elige un flujo de cardinalidad única e inicia un trabajo. La observación y la reanudación viven en la página de detalle del trabajo.",
27
+ "jobs.lede": "Elige un flujo que trabaja de uno en uno e inicia un trabajo. La observación y la reanudación viven en la página de detalle del trabajo.",
28
28
  "jobs.start.heading": "Iniciar un trabajo",
29
29
  "jobs.start.workflow": "Flujo de trabajo",
30
30
  "jobs.start.subjectId": "subjectId",
@@ -97,15 +97,16 @@
97
97
  "workflow-editor.basics": "Básicos",
98
98
  "workflow-editor.name": "name",
99
99
  "workflow-editor.appliesTo": "appliesTo",
100
- "workflow-editor.cardinality.label": "cardinality",
100
+ "workflow-editor.subjectHandling.label": "Elementos",
101
101
  "workflow-editor.description": "description",
102
102
  "workflow-editor.subjectType.none": "none",
103
103
  "workflow-editor.subjectType.ticket": "ticket",
104
104
  "workflow-editor.subjectType.pull_request": "pull_request",
105
105
  "workflow-editor.subjectType.documentation": "documentation",
106
- "workflow-editor.cardinality.single": "single",
107
- "workflow-editor.cardinality.batch": "batch",
108
- "workflow-editor.cardinality.aggregate": "aggregate",
106
+ "workflow-editor.subjectHandling.per-subject": "De uno en uno",
107
+ "workflow-editor.subjectHandling.collection": "En conjunto",
108
+ "workflow-editor.subjectHandling.help.per-subject": "Los pasos trabajan sobre un solo elemento. Puedes iniciar una fila, o ejecutar varios de forma independiente con una notificación cuando lanzas en lote.",
109
+ "workflow-editor.subjectHandling.help.collection": "Los pasos ven todo el conjunto seleccionado y producen un resultado combinado.",
109
110
  "workflow-editor.notificationPolicy": "Política de notificaciones",
110
111
  "workflow-editor.trigger.on_fail": "on_fail",
111
112
  "workflow-editor.trigger.on_complete": "on_complete",
@@ -189,7 +190,7 @@
189
190
  "step-list.onMaxIterations.continue": "continue",
190
191
  "step-list.onMaxIterations.ask_human": "ask_human",
191
192
  "settings.title": "Ajustes",
192
- "settings.lede": "Elige qué proveedores usa Kno y guarda las claves de API. Las claves aplican de inmediato; cambiar una implementación requiere reiniciar.",
193
+ "settings.lede": "Elige qué proveedores usa Kno y guarda las claves de API. Las claves y los cambios de ticket/repositorio aplican de inmediato; cambiar el agente de código requiere reiniciar.",
193
194
  "settings.section.ticket": "Seguimiento de tickets",
194
195
  "settings.section.repo": "Alojamiento de repositorios",
195
196
  "settings.section.agent": "Agente de código",
@@ -225,7 +226,7 @@
225
226
  "workflows.list.emptyCreateButton": "Crea tu primer flujo",
226
227
  "workflows.list.stepCount": "{{count}} pasos",
227
228
  "workflows.list.noDescription": "Sin descripción",
228
- "workflows.list.filterByLaunchMode": "Filtrar por modo de lanzamiento",
229
+ "workflows.list.filterBySubjectHandling": "Filtrar por elementos",
229
230
  "workflows.list.filterAll": "Todos",
230
231
  "workflows.list.edit": "Editar",
231
232
  "workflows.list.delete": "Eliminar",
@@ -1 +1 @@
1
- import {a0 as $0,a1 as B0,s,r,Q as QE,F as Fn,cB as Jc,N as ND,cD as Xc,p as gI,y as xD,v as vw,m as bD,u as nl,A as _D,L as LD,cG as mh,B as VD,cA as ph,a5 as ah,S as SD,a6 as Nw,P as Ph,E as Pu,G as Lu}from'./main-5C7K2447.js';var P=()=>[],$=(t,r)=>r.name;function S(t,r){t&1&&(Jc(0,"span",1),vw(1,"*"),Xc());}function O(t,r){if(t&1){let e=LD();Jc(0,"input",6),mh("change",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("checked",n.checked(e)),ah("data-testid","input-"+e.name);}}function D(t,r){if(t&1){let e=LD();Jc(0,"input",7),mh("input",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function L(t,r){if(t&1&&(Jc(0,"option",4),vw(1),Xc()),t&2){let e=r.$implicit;ph("value",e),gI(),Ph(e);}}function q(t,r){if(t&1){let e=LD();Jc(0,"select",8),mh("change",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),ND(1,L,2,2,"option",4,SD),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name),gI(),xD(e.options??Nw(2,P));}}function N(t,r){if(t&1){let e=LD();Jc(0,"input",9),mh("input",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function B(t,r){if(t&1&&(Jc(0,"label"),vw(1),bD(2,S,2,0,"span",1),bD(3,O,1,2,"input",2)(4,D,1,2,"input",3)(5,q,3,3,"select",4)(6,N,1,2,"input",5),Xc()),t&2){let e,n=r.$implicit;gI(),nl(" ",n.label," "),gI(),_D(n.required?2:-1),gI(),_D((e=n.type)==="boolean"?3:e==="number"?4:e==="select"?5:6);}}function z(t){if(t.defaultValue!==void 0)return t.defaultValue;switch(t.type){case "boolean":return false;case "number":return "";case "select":return t.options?.[0]??"";default:return ""}}function J(t){let r={};for(let e of t)r[e.name]=z(e);return r}var K=(()=>{class t{constructor(){this.fields=$0([]),this.values=$0({}),this.valuesChange=B0();}displayValue(e){let n=this.values()[e.name];return n==null?"":String(n)}checked(e){return !!this.values()[e.name]}setValue(e,n){let o=n.target,a=o.value;e.type==="boolean"?a=o.checked:e.type==="number"&&(a=o.value===""?"":Number(o.value)),this.valuesChange.emit(s(r({},this.values()),{[e.name]:a}));}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-input-form"]],inputs:{fields:[1,"fields"],values:[1,"values"]},outputs:{valuesChange:"valuesChange"},decls:3,vars:0,consts:[["data-testid","workflow-input-form",1,"input-form"],[1,"required"],["type","checkbox",3,"checked"],["type","number",3,"value"],[3,"value"],["type","text",3,"value"],["type","checkbox",3,"change","checked"],["type","number",3,"input","value"],[3,"change","value"],["type","text",3,"input","value"]],template:function(n,o){n&1&&(Jc(0,"div",0),ND(1,B,7,3,"label",null,$),Xc()),n&2&&(gI(),xD(o.fields()));},dependencies:[Fn],styles:["label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}input[type=checkbox][_ngcontent-%COMP%]{width:1.1rem;height:1.1rem}.required[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{J,K};
1
+ import {a0 as $0,a1 as B0,s,r,Q as QE,F as Fn,cB as Jc,N as ND,cD as Xc,p as gI,y as xD,v as vw,m as bD,u as nl,A as _D,L as LD,cG as mh,B as VD,cA as ph,a5 as ah,S as SD,a6 as Nw,P as Ph,E as Pu,G as Lu}from'./main-6LDEPJ3H.js';var P=()=>[],$=(t,r)=>r.name;function S(t,r){t&1&&(Jc(0,"span",1),vw(1,"*"),Xc());}function O(t,r){if(t&1){let e=LD();Jc(0,"input",6),mh("change",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("checked",n.checked(e)),ah("data-testid","input-"+e.name);}}function D(t,r){if(t&1){let e=LD();Jc(0,"input",7),mh("input",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function L(t,r){if(t&1&&(Jc(0,"option",4),vw(1),Xc()),t&2){let e=r.$implicit;ph("value",e),gI(),Ph(e);}}function q(t,r){if(t&1){let e=LD();Jc(0,"select",8),mh("change",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),ND(1,L,2,2,"option",4,SD),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name),gI(),xD(e.options??Nw(2,P));}}function N(t,r){if(t&1){let e=LD();Jc(0,"input",9),mh("input",function(o){Pu(e);let a=VD().$implicit,c=VD();return Lu(c.setValue(a,o))}),Xc();}if(t&2){let e=VD().$implicit,n=VD();ph("value",n.displayValue(e)),ah("data-testid","input-"+e.name);}}function B(t,r){if(t&1&&(Jc(0,"label"),vw(1),bD(2,S,2,0,"span",1),bD(3,O,1,2,"input",2)(4,D,1,2,"input",3)(5,q,3,3,"select",4)(6,N,1,2,"input",5),Xc()),t&2){let e,n=r.$implicit;gI(),nl(" ",n.label," "),gI(),_D(n.required?2:-1),gI(),_D((e=n.type)==="boolean"?3:e==="number"?4:e==="select"?5:6);}}function z(t){if(t.defaultValue!==void 0)return t.defaultValue;switch(t.type){case "boolean":return false;case "number":return "";case "select":return t.options?.[0]??"";default:return ""}}function J(t){let r={};for(let e of t)r[e.name]=z(e);return r}var K=(()=>{class t{constructor(){this.fields=$0([]),this.values=$0({}),this.valuesChange=B0();}displayValue(e){let n=this.values()[e.name];return n==null?"":String(n)}checked(e){return !!this.values()[e.name]}setValue(e,n){let o=n.target,a=o.value;e.type==="boolean"?a=o.checked:e.type==="number"&&(a=o.value===""?"":Number(o.value)),this.valuesChange.emit(s(r({},this.values()),{[e.name]:a}));}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-workflow-input-form"]],inputs:{fields:[1,"fields"],values:[1,"values"]},outputs:{valuesChange:"valuesChange"},decls:3,vars:0,consts:[["data-testid","workflow-input-form",1,"input-form"],[1,"required"],["type","checkbox",3,"checked"],["type","number",3,"value"],[3,"value"],["type","text",3,"value"],["type","checkbox",3,"change","checked"],["type","number",3,"input","value"],[3,"change","value"],["type","text",3,"input","value"]],template:function(n,o){n&1&&(Jc(0,"div",0),ND(1,B,7,3,"label",null,$),Xc()),n&2&&(gI(),xD(o.fields()));},dependencies:[Fn],styles:["label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}input[type=checkbox][_ngcontent-%COMP%]{width:1.1rem;height:1.1rem}.required[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{J,K};
@@ -0,0 +1 @@
1
+ import {N as Nt,K as Ke$1}from'./chunk-BgxH8sDB.js';import {f as fr,K as Ki,x}from'./chunk-Dnos4vY0.js';import {O as Oh}from'./chunk-D5kutWaL.js';import {C,b6 as l,b as at,a as ar,q as qo,a9 as Ng,R as Rt,s,r,c as qe,Q as QE,F as Fn,n as n8,af as S4,J as J6,k as k3,d as sd,z as zc,e as t7,Z as y7,f as ec,g as _i,v as vw,h as Rw,K as Kc,j as gh,m as bD,p as gI,P as Ph,O as Ow,w as ch,u as nl,A as _D,a0 as $0,a1 as B0,$ as $b,V as V5,D as D5,aG as BD,N as ND,o as oE,a5 as ah,x as sE,y as xD,a4 as Mh,l as lh,B as VD,L as LD,E as Pu,G as Lu,aX as $D,S as SD}from'./main-6LDEPJ3H.js';import {G as Gn,u as un}from'./chunk-DjcxfmKB.js';import'./chunk-GrrV0ukn.js';function Z(t){return {ticket:t.activeProviders?.ticket??"manual",repo:t.activeProviders?.repo??"manual",agent:t.activeProviders?.agent??"claude",jira:{baseUrl:t.jira?.baseUrl??"",email:t.jira?.email??""},bitbucket:{baseUrl:t.bitbucket?.baseUrl??"",email:t.bitbucket?.email??"",workspace:t.bitbucket?.workspace??""}}}function Ce(t){let a={};for(let e of Object.keys(t)){let n=t[e].trim();n&&(a[e]=n);}return Object.keys(a).length>0?a:void 0}function G(t){let a=Ce(t.jira),e=Ce(t.bitbucket);return r(r({activeProviders:{ticket:t.ticket,repo:t.repo,agent:t.agent}},a?{jira:a}:{}),e?{bitbucket:e}:{})}function T(t,a){return (t??"")===(a??"")}function he(t,a){let e=G(a),n={},i=t.activeProviders?.ticket??"manual",c=t.activeProviders?.repo??"manual",P=t.activeProviders?.agent??"claude",z={};return i!==a.ticket&&(z.ticket=a.ticket),c!==a.repo&&(z.repo=a.repo),P!==a.agent&&(z.agent=a.agent),Object.keys(z).length>0&&(n.activeProviders=z),(!T(t.jira?.baseUrl,e.jira?.baseUrl)||!T(t.jira?.email,e.jira?.email))&&(n.jira=e.jira??{}),(!T(t.bitbucket?.baseUrl,e.bitbucket?.baseUrl)||!T(t.bitbucket?.email,e.bitbucket?.email)||!T(t.bitbucket?.workspace,e.bitbucket?.workspace))&&(n.bitbucket=e.bitbucket??{}),n}function ve(t){return t.issues.map(a=>`${a.path.length>0?a.path.map(String).join("."):"(root)"}: ${a.message}`)}function be(t){return t==="cursor"?"cursor":"anthropic"}var Pe=["*"],ze=(t,a)=>a.value;function Ee(t,a){if(t&1&&(lh(0,"nz-option",3),Rw(1,"transloco")),t&2){let e=a.$implicit;ch("nzValue",e.value)("nzLabel",Ow(1,2,e.labelKey));}}function Te(t,a){if(t&1&&(_i(0,"div",4),$D(1),Kc()),t&2){let e=VD();ah("data-testid",e.sectionId()+"-config");}}function Ne(t,a){t&1&&(vw(0),Rw(1,"transloco")),t&2&&nl(" ",Ow(1,1,"settings.apiKey.configured")," ");}function Ie(t,a){t&1&&(vw(0),Rw(1,"transloco")),t&2&&nl(" ",Ow(1,1,"settings.apiKey.notConfigured")," ");}var Se=(()=>{class t{constructor(){this.sectionId=$0.required(),this.titleKey=$0.required(),this.implementationLabelKey=$0.required(),this.options=$0.required(),this.selected=$0.required(),this.selectedChange=B0(),this.showConfig=$0(false),this.status=$0(),this.secretDraft=$0(""),this.secretDraftChange=B0(),this.settingSecret=$0(false),this.setSecret=B0();}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-settings-provider-section"]],inputs:{sectionId:[1,"sectionId"],titleKey:[1,"titleKey"],implementationLabelKey:[1,"implementationLabelKey"],options:[1,"options"],selected:[1,"selected"],showConfig:[1,"showConfig"],status:[1,"status"],secretDraft:[1,"secretDraft"],settingSecret:[1,"settingSecret"]},outputs:{selectedChange:"selectedChange",secretDraftChange:"secretDraftChange",setSecret:"setSecret"},ngContentSelectors:Pe,decls:24,vars:29,consts:[[3,"nzTitle"],[1,"field"],[3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[1,"config"],[1,"secret"],[1,"secret-heading"],[1,"secret-status"],[1,"secret-row"],["nz-input","","type","password","autocomplete","off",3,"ngModelChange","ngModel","placeholder"],["nz-button","","type","button",3,"click","nzLoading","disabled"]],template:function(n,i){n&1&&(BD(),_i(0,"nz-card",0),Rw(1,"transloco"),_i(2,"div",1)(3,"span"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"nz-select",2),gh("ngModelChange",function(P){return i.selectedChange.emit(P)}),ND(7,Ee,2,4,"nz-option",3,ze),Kc(),oE(),Kc(),bD(9,Te,2,1,"div",4),_i(10,"div",5)(11,"div",6)(12,"span"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"span",7),bD(16,Ne,2,3)(17,Ie,2,3),Kc()(),_i(18,"div",8)(19,"input",9),Rw(20,"transloco"),gh("ngModelChange",function(P){return i.secretDraftChange.emit(P)}),Kc(),oE(),_i(21,"button",10),gh("click",function(){return i.setSecret.emit()}),vw(22),Rw(23,"transloco"),Kc()()()()),n&2&&(ch("nzTitle",Ow(1,19,i.titleKey())),ah("data-testid",i.sectionId()+"-section"),gI(4),Ph(Ow(5,21,i.implementationLabelKey())),gI(2),ch("ngModel",i.selected()),ah("data-testid",i.sectionId()+"-provider-select"),sE(),gI(),xD(i.options()),gI(2),_D(i.showConfig()?9:-1),gI(),ah("data-testid",i.sectionId()+"-api-key"),gI(3),Ph(Ow(14,23,"settings.apiKey.label")),gI(2),Mh("configured",i.status()?.configured),ah("data-testid",i.sectionId()+"-secret-status"),gI(),_D(i.status()?.configured?16:17),gI(3),ch("ngModel",i.secretDraft())("placeholder",Ow(20,25,"settings.apiKey.placeholder")),ah("data-testid",i.sectionId()+"-secret-input"),sE(),gI(2),ch("nzLoading",i.settingSecret())("disabled",!i.secretDraft().trim()||!i.status()?.secretKey),ah("data-testid",i.sectionId()+"-set-key"),gI(),nl(" ",Ow(23,27,"settings.apiKey.set")," "));},dependencies:[n8,S4,J6,k3,sd,zc,t7,y7,Nt,Ke$1,Ki,x,$b,V5,D5,ec],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.config[_ngcontent-%COMP%]{margin-top:.5rem}.secret[_ngcontent-%COMP%]{margin-top:1rem;padding-top:.75rem;border-top:1px solid #e7e5e4}.secret-heading[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.75rem;margin-bottom:.5rem}.secret-status[_ngcontent-%COMP%]{font-size:.85rem;color:#9f1239}.secret-status.configured[_ngcontent-%COMP%]{color:#166534}.secret-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.secret-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1 1 16rem}"]});}}return t})();function Oe(t,a){t&1&&(_i(0,"div",5),lh(1,"nz-alert",8),Rw(2,"transloco"),Kc()),t&2&&(gI(),ch("nzMessage",Ow(2,1,"settings.restartRequired.message")));}function Ke(t,a){t&1&&(_i(0,"p",6),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ve(t,a){if(t&1&&(_i(0,"p",7),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function je(t,a){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=a.$implicit;gI(),Ph(e);}}function Be(t,a){if(t&1&&(_i(0,"section",9)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,je,2,1,"li",null,SD),Kc()()),t&2){let e=VD(2);gI(2),Ph(Ow(3,1,"settings.validation")),gI(3),xD(e.validationErrors());}}function Fe(t,a){if(t&1){let e=LD();bD(0,Be,7,3,"section",9),_i(1,"app-settings-provider-section",10),gh("selectedChange",function(i){Pu(e);let c=VD();return Lu(c.setTicket(i))})("secretDraftChange",function(i){Pu(e);let c=VD();return Lu(c.setSecretDraft("ticket",i))})("setSecret",function(){Pu(e);let i=VD();return Lu(i.setSecret("ticket"))}),_i(2,"div",11)(3,"label",12)(4,"span"),vw(5),Rw(6,"transloco"),Kc(),_i(7,"input",13),gh("ngModelChange",function(i){Pu(e);let c=VD();return Lu(c.patchJira({baseUrl:i}))}),Kc(),oE(),Kc(),_i(8,"label",12)(9,"span"),vw(10),Rw(11,"transloco"),Kc(),_i(12,"input",14),gh("ngModelChange",function(i){Pu(e);let c=VD();return Lu(c.patchJira({email:i}))}),Kc(),oE(),Kc()()(),_i(13,"app-settings-provider-section",15),gh("selectedChange",function(i){Pu(e);let c=VD();return Lu(c.setRepo(i))})("secretDraftChange",function(i){Pu(e);let c=VD();return Lu(c.setSecretDraft("repo",i))})("setSecret",function(){Pu(e);let i=VD();return Lu(i.setSecret("repo"))}),_i(14,"div",11)(15,"label",12)(16,"span"),vw(17),Rw(18,"transloco"),Kc(),_i(19,"input",16),gh("ngModelChange",function(i){Pu(e);let c=VD();return Lu(c.patchBitbucket({baseUrl:i}))}),Kc(),oE(),Kc(),_i(20,"label",12)(21,"span"),vw(22),Rw(23,"transloco"),Kc(),_i(24,"input",17),gh("ngModelChange",function(i){Pu(e);let c=VD();return Lu(c.patchBitbucket({email:i}))}),Kc(),oE(),Kc(),_i(25,"label",12)(26,"span"),vw(27),Rw(28,"transloco"),Kc(),_i(29,"input",18),gh("ngModelChange",function(i){Pu(e);let c=VD();return Lu(c.patchBitbucket({workspace:i}))}),Kc(),oE(),Kc()()(),_i(30,"app-settings-provider-section",19),gh("selectedChange",function(i){Pu(e);let c=VD();return Lu(c.setAgent(i))})("secretDraftChange",function(i){Pu(e);let c=VD();return Lu(c.setSecretDraft("agent",i))})("setSecret",function(){Pu(e);let i=VD();return Lu(i.setSecret("agent"))}),Kc();}if(t&2){let e=VD();_D(e.validationErrors().length>0?0:-1),gI(),ch("options",e.ticketOptions)("selected",e.draft().ticket)("showConfig",e.draft().ticket==="jira")("status",e.statusFor("jira"))("secretDraft",e.secretDrafts().ticket)("settingSecret",e.settingSecret()==="ticket"),gI(4),Ph(Ow(6,28,"settings.jira.baseUrl")),gI(2),ch("ngModel",e.draft().jira.baseUrl),sE(),gI(3),Ph(Ow(11,30,"settings.jira.email")),gI(2),ch("ngModel",e.draft().jira.email),sE(),gI(),ch("options",e.repoOptions)("selected",e.draft().repo)("showConfig",e.draft().repo==="bitbucket")("status",e.statusFor("bitbucket"))("secretDraft",e.secretDrafts().repo)("settingSecret",e.settingSecret()==="repo"),gI(4),Ph(Ow(18,32,"settings.bitbucket.baseUrl")),gI(2),ch("ngModel",e.draft().bitbucket.baseUrl),sE(),gI(3),Ph(Ow(23,34,"settings.bitbucket.email")),gI(2),ch("ngModel",e.draft().bitbucket.email),sE(),gI(3),Ph(Ow(28,36,"settings.bitbucket.workspace")),gI(2),ch("ngModel",e.draft().bitbucket.workspace),sE(),gI(),ch("options",e.agentOptions)("selected",e.draft().agent)("status",e.agentStatus())("secretDraft",e.secretDrafts().agent)("settingSecret",e.settingSecret()==="agent");}}var _t=(()=>{class t{constructor(){this.api=C(l),this.message=C(fr),this.destroyRef=C(at),this.transloco=C(ar),this.draft=qo(Z({})),this.loaded=qo({}),this.status=qo([]),this.secretDrafts=qo({ticket:"",repo:"",agent:""}),this.settingSecret=qo(null),this.loading=qo(true),this.saving=qo(false),this.loadError=qo(null),this.validationErrors=qo([]),this.restartRequired=qo(false),this.ticketOptions=[{value:"manual",labelKey:"settings.ticket.manual"},{value:"jira",labelKey:"settings.ticket.jira"}],this.repoOptions=[{value:"manual",labelKey:"settings.repo.manual"},{value:"bitbucket",labelKey:"settings.repo.bitbucket"}],this.agentOptions=[{value:"claude",labelKey:"settings.agent.claude"},{value:"cursor",labelKey:"settings.agent.cursor"}],Ng({settings:this.api.getSettings(),status:this.api.getProviderStatus()}).pipe(Rt(this.destroyRef)).subscribe({next:({settings:e,status:n})=>{this.loaded.set(e),this.draft.set(Z(e)),this.status.set(n),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("settings.loadFailed")));}});}statusFor(e){return this.status().find(n=>n.providerId===e)}agentStatus(){return this.statusFor(be(this.draft().agent))}setTicket(e){this.draft.update(n=>s(r({},n),{ticket:e}));}setRepo(e){this.draft.update(n=>s(r({},n),{repo:e}));}setAgent(e){this.draft.update(n=>s(r({},n),{agent:e}));}patchJira(e){this.draft.update(n=>s(r({},n),{jira:r(r({},n.jira),e)}));}patchBitbucket(e){this.draft.update(n=>s(r({},n),{bitbucket:r(r({},n.bitbucket),e)}));}setSecretDraft(e,n){this.secretDrafts.update(i=>s(r({},i),{[e]:n}));}save(){let e=Oh.safeParse(G(this.draft()));if(!e.success){this.validationErrors.set(ve(e.error));return}this.validationErrors.set([]);let n=he(this.loaded(),this.draft());this.saving.set(true),this.api.updateSettings(n).subscribe({next:i=>{this.saving.set(false),this.loaded.set(i.settings),this.draft.set(Z(i.settings)),i.restartRequired?this.restartRequired.set(true):this.message.success(this.transloco.translate("settings.saveSuccess"));},error:i=>{this.saving.set(false),this.message.error(this.errorMessage(i,this.transloco.translate("settings.saveFailed")));}});}setSecret(e){let n=e==="ticket"?this.statusFor("jira"):e==="repo"?this.statusFor("bitbucket"):this.agentStatus(),i=this.secretDrafts()[e]?.trim()??"";!n?.secretKey||!i||(this.settingSecret.set(e),this.api.setSecret(n.secretKey,i).subscribe({next:()=>{this.settingSecret.set(null),this.setSecretDraft(e,""),this.message.success(this.transloco.translate("settings.apiKey.setSuccess")),this.api.getProviderStatus().subscribe({next:c=>this.status.set(c),error:()=>{}});},error:c=>{this.settingSecret.set(null),this.message.error(this.errorMessage(c,this.transloco.translate("settings.apiKey.setFailed")));}}));}errorMessage(e,n){return e instanceof qe||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-settings"]],decls:17,vars:13,consts:[["data-testid","settings-page",1,"settings"],[1,"header"],[1,"lede"],[1,"header-actions"],["nz-button","","nzType","primary","type","button","data-testid","save-button",3,"click","nzLoading","disabled"],["data-testid","restart-required-banner"],["data-testid","loading"],["data-testid","load-error",1,"error"],["nzType","warning","nzShowIcon","","nzBanner","",3,"nzMessage"],["data-testid","validation-errors",1,"errors"],["sectionId","ticket","titleKey","settings.section.ticket","implementationLabelKey","settings.ticketProvider.label",3,"selectedChange","secretDraftChange","setSecret","options","selected","showConfig","status","secretDraft","settingSecret"],[1,"grid"],[1,"field"],["nz-input","","data-testid","jira-base-url",3,"ngModelChange","ngModel"],["nz-input","","data-testid","jira-email",3,"ngModelChange","ngModel"],["sectionId","repo","titleKey","settings.section.repo","implementationLabelKey","settings.repoProvider.label",3,"selectedChange","secretDraftChange","setSecret","options","selected","showConfig","status","secretDraft","settingSecret"],["nz-input","","data-testid","bitbucket-base-url",3,"ngModelChange","ngModel"],["nz-input","","data-testid","bitbucket-email",3,"ngModelChange","ngModel"],["nz-input","","data-testid","bitbucket-workspace",3,"ngModelChange","ngModel"],["sectionId","agent","titleKey","settings.section.agent","implementationLabelKey","settings.agentProvider.label",3,"selectedChange","secretDraftChange","setSecret","options","selected","status","secretDraft","settingSecret"]],template:function(n,i){n&1&&(_i(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"p",2),vw(7),Rw(8,"transloco"),Kc()(),_i(9,"div",3)(10,"button",4),gh("click",function(){return i.save()}),vw(11),Rw(12,"transloco"),Kc()()(),bD(13,Oe,3,3,"div",5),bD(14,Ke,3,3,"p",6)(15,Ve,2,1,"p",7)(16,Fe,31,38),Kc()),n&2&&(gI(4),Ph(Ow(5,7,"settings.title")),gI(3),Ph(Ow(8,9,"settings.lede")),gI(3),ch("nzLoading",i.saving())("disabled",i.loading()||!!i.loadError()),gI(),nl(" ",Ow(12,11,"common.save")," "),gI(2),_D(i.restartRequired()?13:-1),gI(),_D(i.loading()?14:i.loadError()?15:16));},dependencies:[Fn,n8,S4,J6,k3,Gn,un,sd,zc,t7,y7,Ki,x,Se,ec],styles:[".settings[_ngcontent-%COMP%]{max-width:56rem;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}.lede[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.75rem 1rem}.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{_t as SettingsComponent};
@@ -0,0 +1 @@
1
+ import {_ as _n}from'./chunk-CxrhCycA.js';import {w as we}from'./chunk-BiwCj5Ed.js';import {C,ba as u,U as U$1,I as ue,a as ar,b as at,q as qo,H as Hw,R as Rt,a9 as Ng,c as qe,Q as QE,F as Fn,M as Mt,d as sd,z as zc,e as t7,f as ec,g as _i,v as vw,h as Rw,K as Kc,m as bD,p as gI,P as Ph,O as Ow,u as nl,A as _D,B as VD,L as LD,j as gh,w as ch,E as Pu,G as Lu}from'./main-6LDEPJ3H.js';import {U}from'./chunk-CfZWJKlu.js';import'./chunk-CIADdbUP.js';import'./chunk-B_0vwfJH.js';import'./chunk-GrrV0ukn.js';function q(i,b){i&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function G(i,b){if(i&1&&(_i(0,"p",4),vw(1),Kc()),i&2){let t=VD();gI(),Ph(t.loadError());}}function H(i,b){if(i&1&&(_i(0,"p",5),vw(1),Kc()),i&2){let t=VD(2);gI(),Ph(t.actionError());}}function K(i,b){i&1&&(_i(0,"section",6)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",8),vw(5),Rw(6,"transloco"),Kc()()),i&2&&(gI(2),Ph(Ow(3,2,"shortcuts.list.emptyState")),gI(3),nl(" ",Ow(6,4,"shortcuts.list.emptyCreateButton")," "));}function Q(i,b){if(i&1){let t=LD();_i(0,"app-runnable-items-table",9),gh("rowAction",function(e){Pu(t);let c=VD(2);return Lu(c.onRowAction(e))}),Kc();}if(i&2){let t=VD(2);ch("rows",t.rows())("selectable",false)("showRowAction",true);}}function X(i,b){if(i&1&&(bD(0,H,2,1,"p",5),bD(1,K,7,6,"section",6)(2,Q,1,3,"app-runnable-items-table",7)),i&2){let t=VD();_D(t.actionError()?0:-1),gI(),_D(t.shortcuts().length===0?1:2);}}var ht=(()=>{class i{constructor(){this.shortcutsApi=C(u),this.workflowsApi=C(U),this.jobsApi=C(U$1),this.router=C(ue),this.transloco=C(ar),this.destroyRef=C(at),this.shortcuts=qo([]),this.workflows=qo([]),this.jobsById=qo({}),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.rows=Hw(()=>{let t=this.jobsById(),o=this.workflows();return this.shortcuts().map(e=>({id:e.id,primaryLabel:e.name,subtitle:o.find(c=>c.id===e.workflowId)?.name,latestJob:e.lastJobId?t[e.lastJobId]??null:null}))}),this.load();}onRowAction(t){let o=this.shortcuts().find(e=>e.id===t);o&&(this.actionError.set(null),this.jobsApi.start({workflowId:o.workflowId,inputValues:o.inputValues}).pipe(Rt(this.destroyRef)).subscribe({next:e=>{this.shortcutsApi.update(o.id,{lastJobId:e.id}).pipe(Rt(this.destroyRef)).subscribe({next:c=>{this.shortcuts.update(W=>W.map(C=>C.id===c.id?c:C)),this.router.navigate(["/jobs",e.id]);},error:()=>{this.router.navigate(["/jobs",e.id]);}});},error:e=>{this.actionError.set(this.errorMessage(e,this.transloco.translate("shortcuts.list.runFailed")));}}));}deleteShortcut(t){this.actionError.set(null),this.shortcutsApi.delete(t).pipe(Rt(this.destroyRef)).subscribe({next:()=>{this.shortcuts.update(o=>o.filter(e=>e.id!==t));},error:o=>{this.actionError.set(this.errorMessage(o,this.transloco.translate("shortcuts.list.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(Rt(this.destroyRef)).subscribe({next:({shortcuts:t,workflows:o})=>{this.shortcuts.set(t),this.workflows.set(o),this.loading.set(false),this.loadLatestJobs(t);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,this.transloco.translate("shortcuts.list.loadFailed")));}});}loadLatestJobs(t){let o=t.map(e=>e.lastJobId).filter(e=>e!=null);if(o.length===0){this.jobsById.set({});return}Ng(Object.fromEntries(o.map(e=>[e,this.jobsApi.get(e)]))).pipe(Rt(this.destroyRef)).subscribe({next:e=>this.jobsById.set(e),error:()=>this.jobsById.set({})});}errorMessage(t,o){return t instanceof qe||t instanceof Error?t.message:o}static{this.\u0275fac=function(o){return new(o||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-shortcut-list"]],decls:11,vars:7,consts:[["data-testid","shortcuts-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","empty-state",1,"empty"],[3,"rows","selectable","showRowAction"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","empty-create"],[3,"rowAction","rows","selectable","showRowAction"]],template:function(o,e){o&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),bD(8,q,3,3,"p",3)(9,G,2,1,"p",4)(10,X,3,2),Kc()),o&2&&(gI(3),Ph(Ow(4,3,"shortcuts.list.title")),gI(3),nl(" ",Ow(7,5,"shortcuts.list.createButton")," "),gI(2),_D(e.loading()?8:e.loadError()?9:10));},dependencies:[Fn,Mt,sd,zc,t7,_n,we,ec],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}.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}"]});}}return i})();export{ht as ShortcutListComponent};
@@ -1 +1 @@
1
- import {U as U$1}from'./chunk-VW6e_Kls.js';import {v as vt}from'./chunk-BnjE7sDc.js';import'./chunk-CECejZs9.js';import {w as wn,M as Mt$1}from'./chunk-BaL0hYvK.js';import {F as Fe,o as oe}from'./chunk-Ca9rxJZS.js';import'./chunk-DS5k0b_s.js';import {C,U,W,a as ar,b as at,q as qo,H as Hw,R as Rt,s,r,c as qe,Q as QE,F as Fn,n as n8,J as J6,k as k3,M as Mt,d as sd,z as zc,e as t7,$ as $b,V as V5,D as D5,f as ec,g as _i,v as vw,h as Rw,K as Kc,j as gh,N as ND,S as SD,o as oE,l as lh,m as bD,p as gI,P as Ph,O as Ow,u as nl,w as ch,x as sE,y as xD,A as _D,B as VD,L as LD,E as Pu,G as Lu}from'./main-5C7K2447.js';var se=(t,d)=>d.id;function re(t,d){if(t&1&&(lh(0,"nz-option",6),Rw(1,"transloco"),Rw(2,"transloco")),t&2){let e=d.$implicit,i=VD();ch("nzValue",e)("nzLabel",e==="all"?Ow(1,2,"jobs.list.filterAll"):Ow(2,4,i.statusKey(e)));}}function le(t,d){if(t&1&&lh(0,"nz-option",6),t&2){let e=d.$implicit;ch("nzValue",e.id)("nzLabel",e.name+" ("+e.id+")");}}function de(t,d){t&1&&(_i(0,"p",10),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function pe(t,d){if(t&1&&(_i(0,"p",11),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function me(t,d){t&1&&(_i(0,"section",12)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",13),vw(5),Rw(6,"transloco"),Kc()()),t&2&&(gI(2),Ph(Ow(3,2,"jobs.list.empty")),gI(3),nl(" ",Ow(6,4,"jobs.list.startButton")," "));}function ce(t,d){if(t&1){let e=LD();_i(0,"nz-pagination",16),gh("nzPageIndexChange",function(n){Pu(e);let C=VD(2);return Lu(C.setPage(n))}),Kc();}if(t&2){let e=VD(2);ch("nzPageIndex",e.pageIndex())("nzPageSize",e.pageSize)("nzTotal",e.total());}}function ge(t,d){if(t&1&&(lh(0,"app-job-status-table",14),bD(1,ce,1,3,"nz-pagination",15)),t&2){let e=VD();ch("jobs",e.jobs()),gI(),_D(e.total()>e.pageSize||e.pageIndex()>1?1:-1);}}var fe=20,ae=["pending","planning","waiting_for_human","waiting_for_children","implementing","testing","completed","failed","cancelled"],Be=(()=>{class t{constructor(){this.jobsApi=C(U),this.workflowsApi=C(U$1),this.route=C(W),this.transloco=C(ar),this.destroyRef=C(at),this.pageSize=fe,this.statusOptions=["all",...ae],this.jobs=qo([]),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.statusFilter=qo("all"),this.workflowIdFilter=qo(""),this.showChildJobs=qo(false),this.pageIndex=qo(1),this.total=Hw(()=>{let e=(this.pageIndex()-1)*this.pageSize,i=this.jobs().length;return i<this.pageSize?e+i:e+i+1}),this.loadWorkflows(),this.route.queryParamMap.pipe(Rt(this.destroyRef)).subscribe(e=>{let i=e.get("status");i&&ae.includes(i)?this.statusFilter.set(i):this.statusFilter.set("all"),this.pageIndex.set(1),this.loadJobs();});}statusKey(e){return `jobs.status.${e}`}setStatusFilter(e){this.statusFilter.set(e),this.pageIndex.set(1),this.loadJobs();}setWorkflowIdFilter(e){this.workflowIdFilter.set(e),this.pageIndex.set(1),this.loadJobs();}setShowChildJobs(e){this.showChildJobs.set(e),this.pageIndex.set(1),this.loadJobs();}setPage(e){this.pageIndex.set(e),this.loadJobs();}loadWorkflows(){this.workflowsApi.list().pipe(Rt(this.destroyRef)).subscribe({next:e=>{this.workflows.set(e);},error:()=>{this.workflows.set([]);}});}loadJobs(){let e=this.statusFilter(),i=this.workflowIdFilter();this.loading.set(true),this.loadError.set(null),this.jobsApi.list(s(r(r({topLevelOnly:!this.showChildJobs()},e==="all"?{}:{status:e}),i?{workflowId:i}:{}),{limit:this.pageSize,offset:(this.pageIndex()-1)*this.pageSize})).pipe(Rt(this.destroyRef)).subscribe({next:n=>{this.jobs.set(n),this.loading.set(false);},error:n=>{this.loading.set(false),this.loadError.set(this.errorMessage(n,this.transloco.translate("jobs.list.loadFailed")));}});}errorMessage(e,i){return e instanceof qe||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-list"]],decls:32,vars:22,consts:[["data-testid","jobs-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","start-job"],[1,"filters"],[1,"field"],["data-testid","status-filter",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","workflow-filter",3,"ngModelChange","ngModel"],["nzValue","",3,"nzLabel"],["nz-checkbox","","data-testid","show-child-jobs",1,"child-toggle",3,"ngModelChange","ngModel"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","empty-state",1,"empty"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","empty-start"],[3,"jobs"],["data-testid","jobs-pagination",3,"nzPageIndex","nzPageSize","nzTotal"],["data-testid","jobs-pagination",3,"nzPageIndexChange","nzPageIndex","nzPageSize","nzTotal"]],template:function(i,n){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),_i(8,"div",3)(9,"div",4)(10,"span"),vw(11),Rw(12,"transloco"),Kc(),_i(13,"nz-select",5),gh("ngModelChange",function(u){return n.setStatusFilter(u)}),ND(14,re,3,6,"nz-option",6,SD),Kc(),oE(),Kc(),_i(16,"div",4)(17,"span"),vw(18),Rw(19,"transloco"),Kc(),_i(20,"nz-select",7),gh("ngModelChange",function(u){return n.setWorkflowIdFilter(u)}),lh(21,"nz-option",8),Rw(22,"transloco"),ND(23,le,1,2,"nz-option",6,se),Kc(),oE(),Kc(),_i(25,"label",9),gh("ngModelChange",function(u){return n.setShowChildJobs(u)}),vw(26),Rw(27,"transloco"),Kc(),oE(),Kc(),bD(28,de,3,3,"p",10)(29,pe,2,1,"p",11)(30,me,7,6,"section",12)(31,ge,2,2),Kc()),i&2&&(gI(3),Ph(Ow(4,10,"jobs.list.title")),gI(3),nl(" ",Ow(7,12,"jobs.list.startButton")," "),gI(5),Ph(Ow(12,14,"jobs.list.filterByStatus")),gI(2),ch("ngModel",n.statusFilter()),sE(),gI(),xD(n.statusOptions),gI(4),Ph(Ow(19,16,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",n.workflowIdFilter()),sE(),gI(),ch("nzLabel",Ow(22,18,"jobs.list.filterAll")),gI(2),xD(n.workflows()),gI(2),ch("ngModel",n.showChildJobs()),sE(),gI(),nl(" ",Ow(27,20,"jobs.list.showChildJobs")," "),gI(2),_D(n.loading()?28:n.loadError()?29:n.jobs().length===0?30:31));},dependencies:[Fn,n8,J6,k3,Mt,sd,zc,t7,Fe,oe,wn,Mt$1,$b,V5,D5,vt,ec],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[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem 1.25rem;align-items:flex-end}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;min-width:12rem;max-width:18rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.child-toggle[_ngcontent-%COMP%]{padding-bottom:.35rem}.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}"]});}}return t})();export{fe as JOB_LIST_PAGE_SIZE,Be as JobListComponent};
1
+ import {U as U$1}from'./chunk-CfZWJKlu.js';import {v as vt}from'./chunk-E9Klh0DL.js';import'./chunk-C9TOy_jn.js';import {w as wn,M as Mt$1}from'./chunk-CIADdbUP.js';import {F as Fe,o as oe}from'./chunk-B_0vwfJH.js';import'./chunk-GrrV0ukn.js';import {C,U,W,a as ar,b as at,q as qo,H as Hw,R as Rt,s,r,c as qe,Q as QE,F as Fn,n as n8,J as J6,k as k3,M as Mt,d as sd,z as zc,e as t7,$ as $b,V as V5,D as D5,f as ec,g as _i,v as vw,h as Rw,K as Kc,j as gh,N as ND,S as SD,o as oE,l as lh,m as bD,p as gI,P as Ph,O as Ow,u as nl,w as ch,x as sE,y as xD,A as _D,B as VD,L as LD,E as Pu,G as Lu}from'./main-6LDEPJ3H.js';var se=(t,d)=>d.id;function re(t,d){if(t&1&&(lh(0,"nz-option",6),Rw(1,"transloco"),Rw(2,"transloco")),t&2){let e=d.$implicit,i=VD();ch("nzValue",e)("nzLabel",e==="all"?Ow(1,2,"jobs.list.filterAll"):Ow(2,4,i.statusKey(e)));}}function le(t,d){if(t&1&&lh(0,"nz-option",6),t&2){let e=d.$implicit;ch("nzValue",e.id)("nzLabel",e.name+" ("+e.id+")");}}function de(t,d){t&1&&(_i(0,"p",10),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function pe(t,d){if(t&1&&(_i(0,"p",11),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function me(t,d){t&1&&(_i(0,"section",12)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",13),vw(5),Rw(6,"transloco"),Kc()()),t&2&&(gI(2),Ph(Ow(3,2,"jobs.list.empty")),gI(3),nl(" ",Ow(6,4,"jobs.list.startButton")," "));}function ce(t,d){if(t&1){let e=LD();_i(0,"nz-pagination",16),gh("nzPageIndexChange",function(n){Pu(e);let C=VD(2);return Lu(C.setPage(n))}),Kc();}if(t&2){let e=VD(2);ch("nzPageIndex",e.pageIndex())("nzPageSize",e.pageSize)("nzTotal",e.total());}}function ge(t,d){if(t&1&&(lh(0,"app-job-status-table",14),bD(1,ce,1,3,"nz-pagination",15)),t&2){let e=VD();ch("jobs",e.jobs()),gI(),_D(e.total()>e.pageSize||e.pageIndex()>1?1:-1);}}var fe=20,ae=["pending","planning","waiting_for_human","waiting_for_children","implementing","testing","completed","failed","cancelled"],Be=(()=>{class t{constructor(){this.jobsApi=C(U),this.workflowsApi=C(U$1),this.route=C(W),this.transloco=C(ar),this.destroyRef=C(at),this.pageSize=fe,this.statusOptions=["all",...ae],this.jobs=qo([]),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.statusFilter=qo("all"),this.workflowIdFilter=qo(""),this.showChildJobs=qo(false),this.pageIndex=qo(1),this.total=Hw(()=>{let e=(this.pageIndex()-1)*this.pageSize,i=this.jobs().length;return i<this.pageSize?e+i:e+i+1}),this.loadWorkflows(),this.route.queryParamMap.pipe(Rt(this.destroyRef)).subscribe(e=>{let i=e.get("status");i&&ae.includes(i)?this.statusFilter.set(i):this.statusFilter.set("all"),this.pageIndex.set(1),this.loadJobs();});}statusKey(e){return `jobs.status.${e}`}setStatusFilter(e){this.statusFilter.set(e),this.pageIndex.set(1),this.loadJobs();}setWorkflowIdFilter(e){this.workflowIdFilter.set(e),this.pageIndex.set(1),this.loadJobs();}setShowChildJobs(e){this.showChildJobs.set(e),this.pageIndex.set(1),this.loadJobs();}setPage(e){this.pageIndex.set(e),this.loadJobs();}loadWorkflows(){this.workflowsApi.list().pipe(Rt(this.destroyRef)).subscribe({next:e=>{this.workflows.set(e);},error:()=>{this.workflows.set([]);}});}loadJobs(){let e=this.statusFilter(),i=this.workflowIdFilter();this.loading.set(true),this.loadError.set(null),this.jobsApi.list(s(r(r({topLevelOnly:!this.showChildJobs()},e==="all"?{}:{status:e}),i?{workflowId:i}:{}),{limit:this.pageSize,offset:(this.pageIndex()-1)*this.pageSize})).pipe(Rt(this.destroyRef)).subscribe({next:n=>{this.jobs.set(n),this.loading.set(false);},error:n=>{this.loading.set(false),this.loadError.set(this.errorMessage(n,this.transloco.translate("jobs.list.loadFailed")));}});}errorMessage(e,i){return e instanceof qe||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-list"]],decls:32,vars:22,consts:[["data-testid","jobs-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","start-job"],[1,"filters"],[1,"field"],["data-testid","status-filter",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","workflow-filter",3,"ngModelChange","ngModel"],["nzValue","",3,"nzLabel"],["nz-checkbox","","data-testid","show-child-jobs",1,"child-toggle",3,"ngModelChange","ngModel"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","empty-state",1,"empty"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","empty-start"],[3,"jobs"],["data-testid","jobs-pagination",3,"nzPageIndex","nzPageSize","nzTotal"],["data-testid","jobs-pagination",3,"nzPageIndexChange","nzPageIndex","nzPageSize","nzTotal"]],template:function(i,n){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),_i(8,"div",3)(9,"div",4)(10,"span"),vw(11),Rw(12,"transloco"),Kc(),_i(13,"nz-select",5),gh("ngModelChange",function(u){return n.setStatusFilter(u)}),ND(14,re,3,6,"nz-option",6,SD),Kc(),oE(),Kc(),_i(16,"div",4)(17,"span"),vw(18),Rw(19,"transloco"),Kc(),_i(20,"nz-select",7),gh("ngModelChange",function(u){return n.setWorkflowIdFilter(u)}),lh(21,"nz-option",8),Rw(22,"transloco"),ND(23,le,1,2,"nz-option",6,se),Kc(),oE(),Kc(),_i(25,"label",9),gh("ngModelChange",function(u){return n.setShowChildJobs(u)}),vw(26),Rw(27,"transloco"),Kc(),oE(),Kc(),bD(28,de,3,3,"p",10)(29,pe,2,1,"p",11)(30,me,7,6,"section",12)(31,ge,2,2),Kc()),i&2&&(gI(3),Ph(Ow(4,10,"jobs.list.title")),gI(3),nl(" ",Ow(7,12,"jobs.list.startButton")," "),gI(5),Ph(Ow(12,14,"jobs.list.filterByStatus")),gI(2),ch("ngModel",n.statusFilter()),sE(),gI(),xD(n.statusOptions),gI(4),Ph(Ow(19,16,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",n.workflowIdFilter()),sE(),gI(),ch("nzLabel",Ow(22,18,"jobs.list.filterAll")),gI(2),xD(n.workflows()),gI(2),ch("ngModel",n.showChildJobs()),sE(),gI(),nl(" ",Ow(27,20,"jobs.list.showChildJobs")," "),gI(2),_D(n.loading()?28:n.loadError()?29:n.jobs().length===0?30:31));},dependencies:[Fn,n8,J6,k3,Mt,sd,zc,t7,Fe,oe,wn,Mt$1,$b,V5,D5,vt,ec],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[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem 1.25rem;align-items:flex-end}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;min-width:12rem;max-width:18rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.child-toggle[_ngcontent-%COMP%]{padding-bottom:.35rem}.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}"]});}}return t})();export{fe as JOB_LIST_PAGE_SIZE,Be as JobListComponent};
@@ -1 +1 @@
1
- import {ah as YE,ai as uu,C,cf as oe$1,an as _r,bP as z0,ap as a3,aq as Le,b as at,cE as A,ar as ga,a$ as Le$1,X as rd,R as Rt,cg as St,Q as QE,n as n8,cF as w0,J as J6,k as k3,ak as Z0,aG as BD,g as _i,j as gh,K as Kc,o as oE,l as lh,aX as $D,a4 as Mh,p as gI,w as ch,a5 as ah,x as sE,aJ as Sw,aK as h1,aM as wo,bw as Ih,bx as qD,by as WD,a0 as $0,q as qo,av as Uw,H as Hw,aA as Kf,Y as Bw,N as ND,B as VD,y as xD,v as vw,u as nl}from'./main-5C7K2447.js';var re=["inputElement"],te=["*"],ae=(t,s)=>s.value;function ce(t,s){if(t&1&&(_i(0,"label",0),vw(1),Kc()),t&2){let e=s.$implicit,i=VD(2);ch("nzValue",e.value)("nzName",i.nzName())("nzDisabled",e.disabled||i.finalDisabled()),gI(),nl(" ",e.label," ");}}function le(t,s){if(t&1&&ND(0,ce,2,4,"label",0,ae),t&2){let e=VD();xD(e.normalizedOptions());}}var ie=new A(""),oe=(()=>{class t{ngZone=C(oe$1);elementRef=C(_r);cdr=C(z0);focusMonitor=C(a3);dir=C(Le).valueSignal;destroyRef=C(at);checkboxGroupComponent=C(ie,{optional:true});nzFormStatusService=C(ga,{optional:true});isNzDisableFirstChange=true;onChange=()=>{};onTouched=()=>{};inputElement;nzCheckedChange=new Le$1;nzValue=null;nzAutoFocus=false;nzDisabled=false;nzIndeterminate=false;nzChecked=false;nzId=null;nzName=null;innerCheckedChange(e){!this.nzDisabled&&!this.checkboxGroupComponent?.finalDisabled()&&(this.setValue(e),this.checkboxGroupComponent?.onCheckedChange(this.nzValue,e));}writeValue(e){this.nzChecked=e,this.cdr.markForCheck();}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=false,this.cdr.markForCheck();}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard");}blur(){this.inputElement.nativeElement.blur();}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef);}),this.checkboxGroupComponent&&rd(()=>{let e=this.checkboxGroupComponent.value()||[];this.setValue(e.includes(this.nzValue)),this.cdr.markForCheck();});}ngOnInit(){this.focusMonitor.monitor(this.elementRef,true).pipe(Rt(this.destroyRef)).subscribe(e=>{e||Promise.resolve().then(()=>this.onTouched());}),St(this.elementRef.nativeElement,"click").pipe(Rt(this.destroyRef)).subscribe(e=>{e.preventDefault(),this.focus(),!this.nzDisabled&&this.ngZone.run(()=>{this.innerCheckedChange(!this.nzChecked),this.cdr.markForCheck();});}),St(this.inputElement.nativeElement,"click").pipe(Rt(this.destroyRef)).subscribe(e=>e.stopPropagation());}ngAfterViewInit(){this.nzAutoFocus&&this.focus();}setValue(e){this.nzChecked=e,this.onChange(e),this.nzCheckedChange.emit(e);}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=QE({type:t,selectors:[["","nz-checkbox",""]],viewQuery:function(i,n){if(i&1&&Ih(re,7),i&2){let r;qD(r=WD())&&(n.inputElement=r.first);}},hostAttrs:[1,"ant-checkbox-wrapper"],hostVars:10,hostBindings:function(i,n){i&2&&Mh("ant-checkbox-group-item",!!n.checkboxGroupComponent)("ant-checkbox-wrapper-in-form-item",!!n.nzFormStatusService)("ant-checkbox-wrapper-checked",n.nzChecked)("ant-checkbox-wrapper-disabled",n.nzDisabled||n.checkboxGroupComponent?.finalDisabled())("ant-checkbox-rtl",n.dir()==="rtl");},inputs:{nzValue:"nzValue",nzAutoFocus:[2,"nzAutoFocus","nzAutoFocus",Z0],nzDisabled:[2,"nzDisabled","nzDisabled",Z0],nzIndeterminate:[2,"nzIndeterminate","nzIndeterminate",Z0],nzChecked:[2,"nzChecked","nzChecked",Z0],nzId:"nzId",nzName:"nzName"},outputs:{nzCheckedChange:"nzCheckedChange"},exportAs:["nzCheckbox"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true}])],ngContentSelectors:te,decls:6,vars:12,consts:[["inputElement",""],[1,"ant-checkbox"],["type","checkbox",1,"ant-checkbox-input",3,"ngModelChange","checked","ngModel","disabled"],[1,"ant-checkbox-inner"]],template:function(i,n){i&1&&(BD(),_i(0,"span",1)(1,"input",2,0),gh("ngModelChange",function(se){return n.innerCheckedChange(se)}),Kc(),oE(),lh(3,"span",3),Kc(),_i(4,"span"),$D(5),Kc()),i&2&&(Mh("ant-checkbox-checked",n.nzChecked&&!n.nzIndeterminate)("ant-checkbox-disabled",n.nzDisabled||n.checkboxGroupComponent?.finalDisabled())("ant-checkbox-indeterminate",n.nzIndeterminate),gI(),ch("checked",n.nzChecked)("ngModel",n.nzChecked)("disabled",n.nzDisabled||(n.checkboxGroupComponent?.finalDisabled()??false)),ah("autofocus",n.nzAutoFocus?"autofocus":null)("id",n.nzId)("name",n.nzName||n.checkboxGroupComponent?.nzName()),sE());},dependencies:[n8,w0,J6,k3],encapsulation:2})}return t})(),ue=(()=>{class t{onChange=()=>{};onTouched=()=>{};isDisabledFirstChange=true;dir=C(Le).valueSignal;nzName=$0(null);nzDisabled=$0(false,{transform:Z0});nzOptions=$0([]);value=qo(null);finalDisabled=Uw(()=>this.nzDisabled());normalizedOptions=Hw(()=>de(this.nzOptions()));constructor(){let e=C(_r),i=C(a3),n=C(at);Kf(()=>{i.monitor(e,true).pipe(Rt(n)).subscribe(r=>{r||this.onTouched();}),n.onDestroy(()=>{i.stopMonitoring(e);});});}writeValue(e){Bw(()=>{this.value.set(e);});}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){Bw(()=>{this.finalDisabled.set(this.isDisabledFirstChange&&this.nzDisabled()||e);}),this.isDisabledFirstChange=false;}onCheckedChange(e,i){this.finalDisabled()||(this.value.update(n=>i?n?.concat(e)||[e]:n?.filter(r=>r!==e)||[]),this.onChange(this.value()));}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=QE({type:t,selectors:[["nz-checkbox-group"]],hostAttrs:[1,"ant-checkbox-group"],hostVars:2,hostBindings:function(i,n){i&2&&Mh("ant-checkbox-group-rtl",n.dir()==="rtl");},inputs:{nzName:[1,"nzName"],nzDisabled:[1,"nzDisabled"],nzOptions:[1,"nzOptions"]},exportAs:["nzCheckboxGroup"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true},{provide:ie,useExisting:wo(()=>t)}])],ngContentSelectors:te,decls:2,vars:0,consts:[["nz-checkbox","",3,"nzValue","nzName","nzDisabled"]],template:function(i,n){i&1&&(BD(),$D(0,0,null,le,2,0));},dependencies:[oe],encapsulation:2})}return t})();function de(t){return t.map(s=>typeof s=="string"||typeof s=="number"?{label:`${s}`,value:s}:s)}var Fe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=YE({type:t});static \u0275inj=uu({imports:[oe,ue]})}return t})();export{Fe as F,oe as o};
1
+ import {ah as YE,ai as uu,C,cf as oe$1,an as _r,bP as z0,ap as a3,aq as Le,b as at,cE as A,ar as ga,a$ as Le$1,X as rd,R as Rt,cg as St,Q as QE,n as n8,cF as w0,J as J6,k as k3,ak as Z0,aG as BD,g as _i,j as gh,K as Kc,o as oE,l as lh,aX as $D,a4 as Mh,p as gI,w as ch,a5 as ah,x as sE,aJ as Sw,aK as h1,aM as wo,bw as Ih,bx as qD,by as WD,a0 as $0,q as qo,av as Uw,H as Hw,aA as Kf,Y as Bw,N as ND,B as VD,y as xD,v as vw,u as nl}from'./main-6LDEPJ3H.js';var re=["inputElement"],te=["*"],ae=(t,s)=>s.value;function ce(t,s){if(t&1&&(_i(0,"label",0),vw(1),Kc()),t&2){let e=s.$implicit,i=VD(2);ch("nzValue",e.value)("nzName",i.nzName())("nzDisabled",e.disabled||i.finalDisabled()),gI(),nl(" ",e.label," ");}}function le(t,s){if(t&1&&ND(0,ce,2,4,"label",0,ae),t&2){let e=VD();xD(e.normalizedOptions());}}var ie=new A(""),oe=(()=>{class t{ngZone=C(oe$1);elementRef=C(_r);cdr=C(z0);focusMonitor=C(a3);dir=C(Le).valueSignal;destroyRef=C(at);checkboxGroupComponent=C(ie,{optional:true});nzFormStatusService=C(ga,{optional:true});isNzDisableFirstChange=true;onChange=()=>{};onTouched=()=>{};inputElement;nzCheckedChange=new Le$1;nzValue=null;nzAutoFocus=false;nzDisabled=false;nzIndeterminate=false;nzChecked=false;nzId=null;nzName=null;innerCheckedChange(e){!this.nzDisabled&&!this.checkboxGroupComponent?.finalDisabled()&&(this.setValue(e),this.checkboxGroupComponent?.onCheckedChange(this.nzValue,e));}writeValue(e){this.nzChecked=e,this.cdr.markForCheck();}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=false,this.cdr.markForCheck();}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard");}blur(){this.inputElement.nativeElement.blur();}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef);}),this.checkboxGroupComponent&&rd(()=>{let e=this.checkboxGroupComponent.value()||[];this.setValue(e.includes(this.nzValue)),this.cdr.markForCheck();});}ngOnInit(){this.focusMonitor.monitor(this.elementRef,true).pipe(Rt(this.destroyRef)).subscribe(e=>{e||Promise.resolve().then(()=>this.onTouched());}),St(this.elementRef.nativeElement,"click").pipe(Rt(this.destroyRef)).subscribe(e=>{e.preventDefault(),this.focus(),!this.nzDisabled&&this.ngZone.run(()=>{this.innerCheckedChange(!this.nzChecked),this.cdr.markForCheck();});}),St(this.inputElement.nativeElement,"click").pipe(Rt(this.destroyRef)).subscribe(e=>e.stopPropagation());}ngAfterViewInit(){this.nzAutoFocus&&this.focus();}setValue(e){this.nzChecked=e,this.onChange(e),this.nzCheckedChange.emit(e);}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=QE({type:t,selectors:[["","nz-checkbox",""]],viewQuery:function(i,n){if(i&1&&Ih(re,7),i&2){let r;qD(r=WD())&&(n.inputElement=r.first);}},hostAttrs:[1,"ant-checkbox-wrapper"],hostVars:10,hostBindings:function(i,n){i&2&&Mh("ant-checkbox-group-item",!!n.checkboxGroupComponent)("ant-checkbox-wrapper-in-form-item",!!n.nzFormStatusService)("ant-checkbox-wrapper-checked",n.nzChecked)("ant-checkbox-wrapper-disabled",n.nzDisabled||n.checkboxGroupComponent?.finalDisabled())("ant-checkbox-rtl",n.dir()==="rtl");},inputs:{nzValue:"nzValue",nzAutoFocus:[2,"nzAutoFocus","nzAutoFocus",Z0],nzDisabled:[2,"nzDisabled","nzDisabled",Z0],nzIndeterminate:[2,"nzIndeterminate","nzIndeterminate",Z0],nzChecked:[2,"nzChecked","nzChecked",Z0],nzId:"nzId",nzName:"nzName"},outputs:{nzCheckedChange:"nzCheckedChange"},exportAs:["nzCheckbox"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true}])],ngContentSelectors:te,decls:6,vars:12,consts:[["inputElement",""],[1,"ant-checkbox"],["type","checkbox",1,"ant-checkbox-input",3,"ngModelChange","checked","ngModel","disabled"],[1,"ant-checkbox-inner"]],template:function(i,n){i&1&&(BD(),_i(0,"span",1)(1,"input",2,0),gh("ngModelChange",function(se){return n.innerCheckedChange(se)}),Kc(),oE(),lh(3,"span",3),Kc(),_i(4,"span"),$D(5),Kc()),i&2&&(Mh("ant-checkbox-checked",n.nzChecked&&!n.nzIndeterminate)("ant-checkbox-disabled",n.nzDisabled||n.checkboxGroupComponent?.finalDisabled())("ant-checkbox-indeterminate",n.nzIndeterminate),gI(),ch("checked",n.nzChecked)("ngModel",n.nzChecked)("disabled",n.nzDisabled||(n.checkboxGroupComponent?.finalDisabled()??false)),ah("autofocus",n.nzAutoFocus?"autofocus":null)("id",n.nzId)("name",n.nzName||n.checkboxGroupComponent?.nzName()),sE());},dependencies:[n8,w0,J6,k3],encapsulation:2})}return t})(),ue=(()=>{class t{onChange=()=>{};onTouched=()=>{};isDisabledFirstChange=true;dir=C(Le).valueSignal;nzName=$0(null);nzDisabled=$0(false,{transform:Z0});nzOptions=$0([]);value=qo(null);finalDisabled=Uw(()=>this.nzDisabled());normalizedOptions=Hw(()=>de(this.nzOptions()));constructor(){let e=C(_r),i=C(a3),n=C(at);Kf(()=>{i.monitor(e,true).pipe(Rt(n)).subscribe(r=>{r||this.onTouched();}),n.onDestroy(()=>{i.stopMonitoring(e);});});}writeValue(e){Bw(()=>{this.value.set(e);});}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){Bw(()=>{this.finalDisabled.set(this.isDisabledFirstChange&&this.nzDisabled()||e);}),this.isDisabledFirstChange=false;}onCheckedChange(e,i){this.finalDisabled()||(this.value.update(n=>i?n?.concat(e)||[e]:n?.filter(r=>r!==e)||[]),this.onChange(this.value()));}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=QE({type:t,selectors:[["nz-checkbox-group"]],hostAttrs:[1,"ant-checkbox-group"],hostVars:2,hostBindings:function(i,n){i&2&&Mh("ant-checkbox-group-rtl",n.dir()==="rtl");},inputs:{nzName:[1,"nzName"],nzDisabled:[1,"nzDisabled"],nzOptions:[1,"nzOptions"]},exportAs:["nzCheckboxGroup"],features:[Sw([{provide:h1,useExisting:wo(()=>t),multi:true},{provide:ie,useExisting:wo(()=>t)}])],ngContentSelectors:te,decls:2,vars:0,consts:[["nz-checkbox","",3,"nzValue","nzName","nzDisabled"]],template:function(i,n){i&1&&(BD(),$D(0,0,null,le,2,0));},dependencies:[oe],encapsulation:2})}return t})();function de(t){return t.map(s=>typeof s=="string"||typeof s=="number"?{label:`${s}`,value:s}:s)}var Fe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=YE({type:t});static \u0275inj=uu({imports:[oe,ue]})}return t})();export{Fe as F,oe as o};
@@ -0,0 +1 @@
1
+ import {w as we}from'./chunk-BiwCj5Ed.js';import {C,W,I as ue$1,aZ as U,U as U$3,a as ar,b as at,q as qo,H as Hw,R as Rt,r,a9 as Ng,ab as Dg,c as qe,Q as QE,F as Fn,M as Mt,d as sd,z as zc,e as t7,Z as y7,f as ec,g as _i,m as bD,K as Kc,p as gI,A as _D,v as vw,h as Rw,P as Ph,O as Ow,B as VD,L as LD,j as gh,w as ch,a3 as xw,u as nl,E as Pu,G as Lu,l as lh}from'./main-6LDEPJ3H.js';import {J,K}from'./chunk--huWzdqj.js';import {G as Gn,u as un}from'./chunk-DjcxfmKB.js';import {U as U$1}from'./chunk-CfZWJKlu.js';import {U as U$2}from'./chunk-DkKxPJBS.js';import'./chunk-CIADdbUP.js';import'./chunk-B_0vwfJH.js';import'./chunk-GrrV0ukn.js';var te=i=>["/views",i,"edit"],ie=i=>["/batches",i];function ne(i,c){i&1&&(_i(0,"p",1),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function oe(i,c){if(i&1&&(_i(0,"p",2),vw(1),Kc()),i&2){let e=VD();gI(),Ph(e.loadError());}}function ae(i,c){i&1&&(_i(0,"span",8),vw(1),Kc()),i&2&&(gI(),Ph(c.name));}function le(i,c){i&1&&(_i(0,"a",16),vw(1),Rw(2,"transloco"),Kc()),i&2&&(ch("routerLink",xw(4,ie,c)),gI(),nl(" ",Ow(2,2,"views.detail.openBatch")," "));}function re(i,c){if(i&1&&(lh(0,"nz-alert",15),bD(1,le,3,6,"a",16)),i&2){let e,t=VD(2);ch("nzMessage",t.confirmation()),gI(),_D((e=t.confirmationBatchId())?1:-1,e);}}function se(i,c){i&1&&(_i(0,"p",17),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),nl(" ",Ow(2,1,"views.detail.noBulkWorkflows")," "));}function ce(i,c){if(i&1&&(_i(0,"p",20),vw(1),Kc()),i&2){let e=VD(4);gI(),Ph(e.launchError());}}function de(i,c){if(i&1){let e=LD();_i(0,"p",18),vw(1),Kc(),_i(2,"app-workflow-input-form",19),gh("valuesChange",function(o){Pu(e);let l=VD(3);return Lu(l.setInputValues(o))}),Kc(),bD(3,ce,2,1,"p",20),_i(4,"div",21)(5,"button",22),gh("click",function(){Pu(e);let o=VD(3);return Lu(o.launch())}),vw(6),Rw(7,"transloco"),Kc(),_i(8,"button",23),gh("click",function(){Pu(e);let o=VD(3);return Lu(o.cancelLaunch())}),vw(9),Rw(10,"transloco"),Kc()();}if(i&2){let e=c,t=VD(3);gI(),Ph(e.name),gI(),ch("fields",e.inputSchema)("values",t.inputValues()),gI(),_D(t.launchError()?3:-1),gI(2),ch("nzLoading",t.launching())("disabled",t.launching()),gI(),nl(" ",Ow(7,8,t.launching()?"views.detail.launching":"views.detail.launch")," "),gI(3),nl(" ",Ow(10,10,"views.detail.cancelLaunch")," ");}}function ue(i,c){if(i&1&&(_i(0,"section",12)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),bD(4,se,3,3,"p",17)(5,de,11,12),Kc()),i&2){let e,t=VD(2);gI(2),nl(" ",Ow(3,2,c==="view"?"views.detail.launchViewTitle":"views.detail.launchSelectedTitle")," "),gI(2),_D(t.canBulkLaunch()?(e=t.boundWorkflow())?5:-1:4,e);}}function pe(i,c){i&1&&(_i(0,"p",13),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"views.detail.emptySubjects")));}function me(i,c){if(i&1){let e=LD();_i(0,"app-runnable-items-table",24),gh("rowAction",function(o){Pu(e);let l=VD(2);return Lu(l.onRowAction(o))})("bulkAction",function(o){Pu(e);let l=VD(2);return Lu(l.onBulkAction(o))}),Kc();}if(i&2){let e=VD(2);ch("rows",e.rows())("selectable",true)("showRowAction",e.showRowAction());}}function he(i,c){if(i&1){let e=LD();_i(0,"header",3)(1,"div")(2,"a",4),vw(3),Rw(4,"transloco"),Kc(),_i(5,"h1",5),vw(6),Kc(),_i(7,"p",6)(8,"span",7),vw(9),Rw(10,"transloco"),Kc(),bD(11,ae,2,1,"span",8),Kc()(),_i(12,"a",9),vw(13),Rw(14,"transloco"),Kc()(),_i(15,"section",10)(16,"button",11),gh("click",function(){Pu(e);let o=VD();return Lu(o.beginLaunch("view"))}),vw(17),Rw(18,"transloco"),Kc()(),bD(19,re,2,2),bD(20,ue,6,4,"section",12),bD(21,pe,3,3,"p",13)(22,me,1,3,"app-runnable-items-table",14);}if(i&2){let e,t,o=c,l=VD();gI(3),Ph(Ow(4,11,"views.detail.backToList")),gI(3),Ph(o.name),gI(3),Ph(Ow(10,13,l.subjectTypeKey(o.subjectType))),gI(2),_D((e=l.boundWorkflow())?11:-1,e),gI(),ch("routerLink",xw(19,te,o.id)),gI(),nl(" ",Ow(14,15,"views.detail.edit")," "),gI(3),ch("disabled",!l.canBulkLaunch()),gI(),nl(" ",Ow(18,17,"views.detail.runOnAll")," "),gI(2),_D(l.confirmation()?19:-1),gI(),_D((t=l.launchMode())?20:-1,t),gI(),_D(l.subjects().length===0?21:22);}}var Ne=(()=>{class i{constructor(){this.route=C(W),this.router=C(ue$1),this.viewsApi=C(U),this.workflowsApi=C(U$1),this.batchesApi=C(U$2),this.jobsApi=C(U$3),this.transloco=C(ar),this.destroyRef=C(at),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=Hw(()=>{let e=this.view();return e?this.workflows().find(t=>t.id===e.workflowId)??null:null}),this.canBulkLaunch=Hw(()=>this.boundWorkflow()!=null),this.showRowAction=Hw(()=>this.boundWorkflow()?.subjectHandling==="per-subject"),this.rows=Hw(()=>{let e=this.latestBySubject();return this.subjects().map(t=>({id:t.id,primaryLabel:t.title,subtitle:this.subjectDetails(t),latestJob:e[t.id]??null}))}),this.route.paramMap.pipe(Rt(this.destroyRef)).subscribe(e=>{let t=e.get("id");if(!t){this.loading.set(false),this.loadError.set(this.transloco.translate("views.detail.loadFailed"));return}this.load(t);});}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}subjectDetails(e){if(e.subjectType==="ticket")return [e.status,e.assignee].filter(Boolean).join(" \xB7 ");if(e.subjectType==="pull_request"){let t=`${e.sourceBranch} \u2192 ${e.targetBranch}`;return e.author?`${e.author} \xB7 ${t}`:t}return e.url??""}onBulkAction(e){this.selectedIds.set(e),this.beginLaunch("manual");}onRowAction(e){let t=this.view();t&&this.router.navigate(["/jobs/new"],{queryParams:{workflowId:t.workflowId,subjectId:e}});}beginLaunch(e){e==="manual"&&this.selectedIds().length===0||(this.launchError.set(null),this.confirmation.set(null),this.confirmationBatchId.set(null),this.launchMode.set(e),this.inputValues.set(J(this.boundWorkflow()?.inputSchema??[])));}cancelLaunch(){this.launchMode.set(null),this.launchError.set(null);}setInputValues(e){this.inputValues.set(e);}launch(){let e=this.view(),t=this.boundWorkflow(),o=this.launchMode();if(!e||!t||!o)return;let l=o==="view"?{mode:"view",viewId:e.id}:{mode:"manual",subjectType:e.subjectType,subjectIds:[...this.selectedIds()]};this.launching.set(true),this.launchError.set(null),this.batchesApi.launch({workflowId:t.id,selection:l,triggeredBy:o==="view"?"view_bulk":"multiselect",inputValues:r({},this.inputValues())}).pipe(Rt(this.destroyRef)).subscribe({next:v=>{this.launching.set(false),this.confirmation.set(this.confirmationMessage(v)),this.confirmationBatchId.set(v.kind==="batch"?v.batch.id:null),this.launchMode.set(null),this.refreshLatest(e.workflowId,this.subjects().map(ee=>ee.id));},error:v=>{this.launching.set(false),this.launchError.set(this.errorMessage(v,this.transloco.translate("views.detail.launchFailed")));}});}confirmationMessage(e){return e.kind==="batch"?this.transloco.translate("views.detail.confirmation.batch",{id:e.batch.id,count:e.batch.jobIds.length}):this.transloco.translate("views.detail.confirmation.job",{id:e.job.id})}load(e){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(e),subjects:this.viewsApi.getSubjects(e),workflows:this.workflowsApi.list()}).pipe(Rt(this.destroyRef)).subscribe({next:({view:t,subjects:o,workflows:l})=>{this.view.set(t),this.subjects.set(o),this.workflows.set(l),this.loading.set(false),this.refreshLatest(t.workflowId,o.map(v=>v.id));},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,this.transloco.translate("views.detail.loadFailed")));}});}refreshLatest(e,t){(t.length===0?Dg({}):this.jobsApi.latestBySubject(e,t)).pipe(Rt(this.destroyRef)).subscribe({next:l=>this.latestBySubject.set(l),error:()=>this.latestBySubject.set({})});}errorMessage(e,t){return e instanceof qe||e instanceof Error?e.message:t}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=QE({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"],["routerLink","/views"],["data-testid","view-name"],[1,"meta"],["data-testid","view-subject-type"],["data-testid","bound-workflow"],["nz-button","","data-testid","edit-view",3,"routerLink"],[1,"toolbar"],["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(t,o){if(t&1&&(_i(0,"main",0),bD(1,ne,3,3,"p",1)(2,oe,2,1,"p",2)(3,he,23,21),Kc()),t&2){let l;gI(),_D(o.loading()?1:o.loadError()?2:(l=o.view())?3:-1,l);}},dependencies:[Fn,Mt,Gn,un,sd,zc,t7,y7,K,we,ec],styles:[".detail-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:.25rem 0 0}.meta[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}.toolbar[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem;align-items:flex-end}.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{Ne as ViewDetailComponent};
@@ -1 +1 @@
1
- import {ah as YE,ai as uu,cH as P1,bb as pT,C,bP as z0,aq as Le$1,bc as hT,c1 as Vt,Q as QE,bs as Tt,bt as Ie$1,aF as vr,ak as Z0,aG as BD,m as bD,g as _i,K as Kc,A as _D,p as gI,bF as sw,a4 as Mh,c4 as vh,bx as qD,by as WD,bz as ut,cI as l9,r,b2 as ly,B as VD,aH as nh,w as ch,l as lh,a6 as Nw,aX as $D,N as ND,a7 as MD,y as xD,bd as XE,cC as uh,b3 as _h,bX as el,v as vw,bY as tl,P as Ph,cJ as rh,bw as Ih,bW as Er,S as SD}from'./main-5C7K2447.js';var Ce=["*"];function fe(e,a){if(e&1&&(_i(0,"div",0),lh(1,"nz-skeleton-element",4),Kc()),e&2){let t=VD(2);gI(),ch("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle");}}function _e(e,a){if(e&1&&lh(0,"h3",5),e&2){let t=VD(2);_h("width",t.toCSSUnit(t.title.width));}}function ve(e,a){if(e&1&&lh(0,"li"),e&2){let t=a.$index,n=VD(3);_h("width",n.toCSSUnit(n.widthList[t]));}}function ge(e,a){if(e&1&&(_i(0,"ul",3),ND(1,ve,1,2,"li",6,SD),Kc()),e&2){let t=VD(2);gI(),xD(t.rowsList);}}function he(e,a){if(e&1&&(bD(0,fe,2,2,"div",0),_i(1,"div",1),bD(2,_e,1,2,"h3",2),bD(3,ge,3,0,"ul",3),Kc()),e&2){let t=VD();_D(t.nzAvatar?0:-1),gI(2),_D(t.nzTitle?2:-1),gI(),_D(t.nzParagraph?3:-1);}}function Se(e,a){e&1&&$D(0);}var Te=(()=>{class e{nzActive=false;nzType;nzBlock=false;static \u0275fac=function(n){return new(n||e)};static \u0275dir=XE({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(n,i){n&2&&Mh("ant-skeleton-active",i.nzActive)("ant-skeleton-block",i.nzBlock);},inputs:{nzActive:[2,"nzActive","nzActive",Z0],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",Z0]}})}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=QE({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&&uh(0,"span",0),n&2&&(sw(i.styleMap),Mh("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 l9(t)}getTitleProps(){let t=!!this.nzAvatar,n=!!this.nzParagraph,i="";return !t&&n?i="38%":t&&n&&(i="50%"),r({width:i},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return r({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(r({},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=QE({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(n,i){n&2&&Mh("ant-skeleton-with-avatar",!!i.nzAvatar)("ant-skeleton-active",i.nzActive)("ant-skeleton-round",i.nzRound);},inputs:{nzActive:[2,"nzActive","nzActive",Z0],nzLoading:[2,"nzLoading","nzLoading",Z0],nzRound:[2,"nzRound","nzRound",Z0],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&&(BD(),bD(0,he,4,3)(1,Se,1,0)),n&2&&_D(i.nzLoading?0:1);},dependencies:[Te,ye],encapsulation:2})}return e})(),pe=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({})}return e})();function Ne(e,a){}function ke(e,a){if(e&1&&(_i(0,"div",0),nh(1,Ne,0,0,"ng-template",2),Kc()),e&2){let t=VD();gI(),ch("ngTemplateOutlet",t.nzAvatar);}}function be(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Me(e,a){if(e&1&&(_i(0,"div",3),nh(1,be,2,1,"ng-container",5),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Ae(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzDescription);}}function De(e,a){if(e&1&&(_i(0,"div",4),nh(1,Ae,2,1,"ng-container",5),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzDescription);}}function Ee(e,a){if(e&1&&(_i(0,"div",1),bD(1,Me,2,1,"div",3),bD(2,De,2,1,"div",4),Kc()),e&2){let t=VD();gI(),_D(t.nzTitle?1:-1),gI(),_D(t.nzDescription?2:-1);}}var me=["*"];function we(e,a){e&1&&$D(0);}var Pe=()=>({rows:4});function Be(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Oe(e,a){if(e&1&&(_i(0,"div",6),nh(1,Be,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Fe(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzExtra);}}function Le(e,a){if(e&1&&(_i(0,"div",7),nh(1,Fe,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzExtra);}}function He(e,a){}function Ie(e,a){if(e&1&&nh(0,He,0,0,"ng-template",8),e&2){let t=VD(2);ch("ngTemplateOutlet",t.listOfNzCardTabComponent.template);}}function qe(e,a){if(e&1&&(_i(0,"div",0)(1,"div",5),bD(2,Oe,2,1,"div",6),bD(3,Le,2,1,"div",7),Kc(),bD(4,Ie,1,1,null,8),Kc()),e&2){let t=VD();gI(2),_D(t.nzTitle?2:-1),gI(),_D(t.nzExtra?3:-1),gI(),_D(t.listOfNzCardTabComponent?4:-1);}}function je(e,a){}function Re(e,a){if(e&1&&(_i(0,"div",1),nh(1,je,0,0,"ng-template",8),Kc()),e&2){let t=VD();gI(),ch("ngTemplateOutlet",t.nzCover);}}function Ge(e,a){e&1&&lh(0,"nz-skeleton",3),e&2&&ch("nzActive",true)("nzTitle",false)("nzParagraph",Nw(3,Pe));}function Qe(e,a){e&1&&$D(0);}function Ve(e,a){}function $e(e,a){if(e&1&&(_i(0,"li")(1,"span"),nh(2,Ve,0,0,"ng-template",8),Kc()()),e&2){let t=a.$implicit,n=a.$count;_h("width",100/n,"%"),gI(2),ch("ngTemplateOutlet",t);}}function Ue(e,a){if(e&1&&(_i(0,"ul",4),ND(1,$e,3,3,"li",10,MD),Kc()),e&2){let t=VD();gI(),xD(t.nzActions);}}var We=(()=>{class e{nzHoverable=true;static \u0275fac=function(n){return new(n||e)};static \u0275dir=XE({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(n,i){n&2&&Mh("ant-card-hoverable",i.nzHoverable);},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",Z0]},exportAs:["nzCardGrid"]})}return e})(),Ze=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({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&&(bD(0,ke,2,1,"div",0),bD(1,Ee,3,2,"div",1)),n&2&&(_D(i.nzAvatar?0:-1),gI(),_D(i.nzTitle||i.nzDescription?1:-1));},dependencies:[vr,Tt,Ie$1],encapsulation:2})}return e})(),Je=(()=>{class e{template;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({type:e,selectors:[["nz-card-tab"]],viewQuery:function(n,i){if(n&1&&Ih(Er,7),n&2){let S;qD(S=WD())&&(i.template=S.first);}},exportAs:["nzCardTab"],ngContentSelectors:me,decls:1,vars:0,template:function(n,i){n&1&&(BD(),rh(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=[ut()],n=[ut()],W=[ut()],pT(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),pT(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),pT(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(Le$1).valueSignal;_nzModuleName=ze;nzBordered=hT(this,a,true);nzLoading=(hT(this,t),false);nzHoverable=hT(this,i,false);nzBodyStyle=(hT(this,S),null);nzCover;nzActions=[];nzType=null;nzSize=hT(this,Z,"default");nzTitle=hT(this,J);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;constructor(){Vt(ze,()=>this.cdr.markForCheck());}static \u0275fac=function(r){return new(r||U)};static \u0275cmp=QE({type:U,selectors:[["nz-card"]],contentQueries:function(r,l,K){if(r&1&&vh(K,Je,5)(K,We,4),r&2){let E;qD(E=WD())&&(l.listOfNzCardTabComponent=E.first),qD(E=WD())&&(l.listOfNzCardGridDirective=E);}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(r,l){r&2&&Mh("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",Z0],nzLoading:[2,"nzLoading","nzLoading",Z0],nzHoverable:[2,"nzHoverable","nzHoverable",Z0],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&&(BD(),bD(0,qe,5,3,"div",0),bD(1,Re,2,1,"div",1),_i(2,"div",2),bD(3,Ge,1,4,"nz-skeleton",3)(4,Qe,1,0),Kc(),bD(5,Ue,3,0,"ul",4)),r&2&&(_D(l.nzTitle||l.nzExtra||l.listOfNzCardTabComponent?0:-1),gI(),_D(l.nzCover?1:-1),gI(),sw(l.nzBodyStyle),gI(),_D(l.nzLoading?3:4),gI(2),_D(l.nzActions.length?5:-1));},dependencies:[Tt,Ie$1,vr,pe,ce],encapsulation:2})}})(),Nt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({imports:[Ke,Ze,P1]})}return e})();export{Ke as K,Nt as N};
1
+ import {ah as YE,ai as uu,cH as P1,bb as pT,C,bP as z0,aq as Le$1,bc as hT,c1 as Vt,Q as QE,bs as Tt,bt as Ie$1,aF as vr,ak as Z0,aG as BD,m as bD,g as _i,K as Kc,A as _D,p as gI,bF as sw,a4 as Mh,c4 as vh,bx as qD,by as WD,bz as ut,cI as l9,r,b2 as ly,B as VD,aH as nh,w as ch,l as lh,a6 as Nw,aX as $D,N as ND,a7 as MD,y as xD,bd as XE,cC as uh,b3 as _h,bX as el,v as vw,bY as tl,P as Ph,cJ as rh,bw as Ih,bW as Er,S as SD}from'./main-6LDEPJ3H.js';var Ce=["*"];function fe(e,a){if(e&1&&(_i(0,"div",0),lh(1,"nz-skeleton-element",4),Kc()),e&2){let t=VD(2);gI(),ch("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle");}}function _e(e,a){if(e&1&&lh(0,"h3",5),e&2){let t=VD(2);_h("width",t.toCSSUnit(t.title.width));}}function ve(e,a){if(e&1&&lh(0,"li"),e&2){let t=a.$index,n=VD(3);_h("width",n.toCSSUnit(n.widthList[t]));}}function ge(e,a){if(e&1&&(_i(0,"ul",3),ND(1,ve,1,2,"li",6,SD),Kc()),e&2){let t=VD(2);gI(),xD(t.rowsList);}}function he(e,a){if(e&1&&(bD(0,fe,2,2,"div",0),_i(1,"div",1),bD(2,_e,1,2,"h3",2),bD(3,ge,3,0,"ul",3),Kc()),e&2){let t=VD();_D(t.nzAvatar?0:-1),gI(2),_D(t.nzTitle?2:-1),gI(),_D(t.nzParagraph?3:-1);}}function Se(e,a){e&1&&$D(0);}var Te=(()=>{class e{nzActive=false;nzType;nzBlock=false;static \u0275fac=function(n){return new(n||e)};static \u0275dir=XE({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(n,i){n&2&&Mh("ant-skeleton-active",i.nzActive)("ant-skeleton-block",i.nzBlock);},inputs:{nzActive:[2,"nzActive","nzActive",Z0],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",Z0]}})}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=QE({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&&uh(0,"span",0),n&2&&(sw(i.styleMap),Mh("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 l9(t)}getTitleProps(){let t=!!this.nzAvatar,n=!!this.nzParagraph,i="";return !t&&n?i="38%":t&&n&&(i="50%"),r({width:i},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return r({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(r({},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=QE({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(n,i){n&2&&Mh("ant-skeleton-with-avatar",!!i.nzAvatar)("ant-skeleton-active",i.nzActive)("ant-skeleton-round",i.nzRound);},inputs:{nzActive:[2,"nzActive","nzActive",Z0],nzLoading:[2,"nzLoading","nzLoading",Z0],nzRound:[2,"nzRound","nzRound",Z0],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&&(BD(),bD(0,he,4,3)(1,Se,1,0)),n&2&&_D(i.nzLoading?0:1);},dependencies:[Te,ye],encapsulation:2})}return e})(),pe=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({})}return e})();function Ne(e,a){}function ke(e,a){if(e&1&&(_i(0,"div",0),nh(1,Ne,0,0,"ng-template",2),Kc()),e&2){let t=VD();gI(),ch("ngTemplateOutlet",t.nzAvatar);}}function be(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Me(e,a){if(e&1&&(_i(0,"div",3),nh(1,be,2,1,"ng-container",5),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Ae(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzDescription);}}function De(e,a){if(e&1&&(_i(0,"div",4),nh(1,Ae,2,1,"ng-container",5),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzDescription);}}function Ee(e,a){if(e&1&&(_i(0,"div",1),bD(1,Me,2,1,"div",3),bD(2,De,2,1,"div",4),Kc()),e&2){let t=VD();gI(),_D(t.nzTitle?1:-1),gI(),_D(t.nzDescription?2:-1);}}var me=["*"];function we(e,a){e&1&&$D(0);}var Pe=()=>({rows:4});function Be(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Oe(e,a){if(e&1&&(_i(0,"div",6),nh(1,Be,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Fe(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzExtra);}}function Le(e,a){if(e&1&&(_i(0,"div",7),nh(1,Fe,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzExtra);}}function He(e,a){}function Ie(e,a){if(e&1&&nh(0,He,0,0,"ng-template",8),e&2){let t=VD(2);ch("ngTemplateOutlet",t.listOfNzCardTabComponent.template);}}function qe(e,a){if(e&1&&(_i(0,"div",0)(1,"div",5),bD(2,Oe,2,1,"div",6),bD(3,Le,2,1,"div",7),Kc(),bD(4,Ie,1,1,null,8),Kc()),e&2){let t=VD();gI(2),_D(t.nzTitle?2:-1),gI(),_D(t.nzExtra?3:-1),gI(),_D(t.listOfNzCardTabComponent?4:-1);}}function je(e,a){}function Re(e,a){if(e&1&&(_i(0,"div",1),nh(1,je,0,0,"ng-template",8),Kc()),e&2){let t=VD();gI(),ch("ngTemplateOutlet",t.nzCover);}}function Ge(e,a){e&1&&lh(0,"nz-skeleton",3),e&2&&ch("nzActive",true)("nzTitle",false)("nzParagraph",Nw(3,Pe));}function Qe(e,a){e&1&&$D(0);}function Ve(e,a){}function $e(e,a){if(e&1&&(_i(0,"li")(1,"span"),nh(2,Ve,0,0,"ng-template",8),Kc()()),e&2){let t=a.$implicit,n=a.$count;_h("width",100/n,"%"),gI(2),ch("ngTemplateOutlet",t);}}function Ue(e,a){if(e&1&&(_i(0,"ul",4),ND(1,$e,3,3,"li",10,MD),Kc()),e&2){let t=VD();gI(),xD(t.nzActions);}}var We=(()=>{class e{nzHoverable=true;static \u0275fac=function(n){return new(n||e)};static \u0275dir=XE({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(n,i){n&2&&Mh("ant-card-hoverable",i.nzHoverable);},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",Z0]},exportAs:["nzCardGrid"]})}return e})(),Ze=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({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&&(bD(0,ke,2,1,"div",0),bD(1,Ee,3,2,"div",1)),n&2&&(_D(i.nzAvatar?0:-1),gI(),_D(i.nzTitle||i.nzDescription?1:-1));},dependencies:[vr,Tt,Ie$1],encapsulation:2})}return e})(),Je=(()=>{class e{template;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({type:e,selectors:[["nz-card-tab"]],viewQuery:function(n,i){if(n&1&&Ih(Er,7),n&2){let S;qD(S=WD())&&(i.template=S.first);}},exportAs:["nzCardTab"],ngContentSelectors:me,decls:1,vars:0,template:function(n,i){n&1&&(BD(),rh(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=[ut()],n=[ut()],W=[ut()],pT(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),pT(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),pT(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(Le$1).valueSignal;_nzModuleName=ze;nzBordered=hT(this,a,true);nzLoading=(hT(this,t),false);nzHoverable=hT(this,i,false);nzBodyStyle=(hT(this,S),null);nzCover;nzActions=[];nzType=null;nzSize=hT(this,Z,"default");nzTitle=hT(this,J);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;constructor(){Vt(ze,()=>this.cdr.markForCheck());}static \u0275fac=function(r){return new(r||U)};static \u0275cmp=QE({type:U,selectors:[["nz-card"]],contentQueries:function(r,l,K){if(r&1&&vh(K,Je,5)(K,We,4),r&2){let E;qD(E=WD())&&(l.listOfNzCardTabComponent=E.first),qD(E=WD())&&(l.listOfNzCardGridDirective=E);}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(r,l){r&2&&Mh("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",Z0],nzLoading:[2,"nzLoading","nzLoading",Z0],nzHoverable:[2,"nzHoverable","nzHoverable",Z0],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&&(BD(),bD(0,qe,5,3,"div",0),bD(1,Re,2,1,"div",1),_i(2,"div",2),bD(3,Ge,1,4,"nz-skeleton",3)(4,Qe,1,0),Kc(),bD(5,Ue,3,0,"ul",4)),r&2&&(_D(l.nzTitle||l.nzExtra||l.listOfNzCardTabComponent?0:-1),gI(),_D(l.nzCover?1:-1),gI(),sw(l.nzBodyStyle),gI(),_D(l.nzLoading?3:4),gI(2),_D(l.nzActions.length?5:-1));},dependencies:[Tt,Ie$1,vr,pe,ce],encapsulation:2})}})(),Nt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({imports:[Ke,Ze,P1]})}return e})();export{Ke as K,Nt as N};
@@ -0,0 +1 @@
1
+ import {d as dr,c as ca,r as rr,o as oa,n as na,s as sr,V as Vn,p as pa,a as aa}from'./chunk-CIADdbUP.js';import {a0 as $0,a1 as B0,q as qo,H as Hw,Q as QE,F as Fn,M as Mt,d as sd,z as zc,e as t7,Z as y7,f as ec,g as _i,m as bD,v as vw,h as Rw,K as Kc,N as ND,p as gI,A as _D,w as ch,P as Ph,O as Ow,y as xD,L as LD,j as gh,B as VD,u as nl,a2 as Pw,a3 as xw,a5 as ah,E as Pu,G as Lu}from'./main-6LDEPJ3H.js';var Q=t=>({count:t}),U=t=>["/jobs",t],X=(t,c)=>c.id;function Y(t,c){if(t&1){let e=LD();_i(0,"div",1)(1,"button",4),gh("click",function(){Pu(e);let o=VD();return Lu(o.emitBulk())}),vw(2),Rw(3,"transloco"),Kc()();}if(t&2){let e=VD();gI(),ch("disabled",e.checkedCount()===0),gI(),nl(" ",Pw(3,2,"runnableTable.runSelected",xw(5,Q,e.checkedCount()))," ");}}function Z(t,c){if(t&1){let e=LD();_i(0,"th",5),gh("nzCheckedChange",function(o){Pu(e);let s=VD();return Lu(s.onAllChecked(o))}),Kc();}if(t&2){let e=VD();ch("nzChecked",e.allChecked())("nzIndeterminate",e.someChecked());}}function ee(t,c){t&1&&(_i(0,"th"),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"runnableTable.column.actions")));}function te(t,c){if(t&1){let e=LD();_i(0,"td",12),gh("nzCheckedChange",function(o){Pu(e);let s=VD().$implicit,H=VD();return Lu(H.onItemChecked(s.id,o))}),Kc();}if(t&2){let e=VD().$implicit,n=VD();ch("nzChecked",n.checkedIds().has(e.id)),ah("data-testid","check-"+e.id);}}function ne(t,c){if(t&1&&(_i(0,"span",9),vw(1),Kc()),t&2){let e=VD().$implicit;ah("data-testid","subtitle-"+e.id),gI(),Ph(e.subtitle);}}function ie(t,c){if(t&1&&(_i(0,"a",10),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=c,n=VD().$implicit,o=VD();ch("routerLink",xw(5,U,e.id)),ah("data-testid","latest-"+n.id),gI(),nl(" ",Ow(2,3,o.statusKey(e.status))," ");}}function oe(t,c){if(t&1&&(_i(0,"span",11),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD().$implicit;ah("data-testid","latest-"+e.id),gI(),Ph(Ow(2,2,"runnableTable.neverRun"));}}function ae(t,c){if(t&1){let e=LD();_i(0,"td")(1,"button",13),gh("click",function(){Pu(e);let o=VD().$implicit,s=VD();return Lu(s.emitRow(o.id))}),vw(2),Rw(3,"transloco"),Kc()();}if(t&2){let e=VD().$implicit;gI(),ah("data-testid","run-"+e.id),gI(),nl(" ",Ow(3,2,"runnableTable.run")," ");}}function le(t,c){if(t&1&&(_i(0,"tr"),bD(1,te,1,2,"td",6),_i(2,"td")(3,"div",7)(4,"span",8),vw(5),Kc(),bD(6,ne,2,2,"span",9),Kc()(),_i(7,"td"),bD(8,ie,3,7,"a",10)(9,oe,3,4,"span",11),Kc(),bD(10,ae,4,4,"td"),Kc()),t&2){let e,n=c.$implicit,o=VD();ah("data-testid","row-"+n.id),gI(),_D(o.selectable()?1:-1),gI(3),ah("data-testid","label-"+n.id),gI(),Ph(n.primaryLabel),gI(),_D(n.subtitle?6:-1),gI(2),_D((e=n.latestJob)?8:9,e),gI(2),_D(o.showRowAction()?10:-1);}}var we=(()=>{class t{constructor(){this.rows=$0([]),this.selectable=$0(false),this.showRowAction=$0(true),this.rowAction=B0(),this.bulkAction=B0(),this.checkedIds=qo(new Set),this.checkedCount=Hw(()=>this.checkedIds().size),this.allChecked=Hw(()=>{let e=this.rows();return e.length>0&&e.every(n=>this.checkedIds().has(n.id))}),this.someChecked=Hw(()=>{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=QE({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),bD(1,Y,4,7,"div",1),_i(2,"nz-table",2)(3,"thead")(4,"tr"),bD(5,Z,1,2,"th",3),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc(),bD(12,ee,3,3,"th"),Kc()(),_i(13,"tbody"),ND(14,le,11,7,"tr",null,X),Kc()()()),n&2&&(gI(),_D(o.selectable()?1:-1),gI(),ch("nzData",o.rows())("nzFrontPagination",false)("nzShowPagination",false),gI(3),_D(o.selectable()?5:-1),gI(2),Ph(Ow(8,8,"runnableTable.column.item")),gI(3),Ph(Ow(11,10,"runnableTable.column.latestRun")),gI(2),_D(o.showRowAction()?12:-1),gI(2),xD(o.rows()));},dependencies:[Fn,Mt,sd,zc,t7,y7,dr,ca,rr,oa,na,sr,Vn,pa,aa,ec],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 {ah as YE,ai as uu,C,a_ as XI,an as _r,aq as Le,a$ as Le$1,b0 as N7,b1 as B7,Q as QE,aC as pt,aD as Se,b2 as ly,ak as Z0,aG as BD,aX as $D,m as bD,p as gI,A as _D,j as gh,b3 as _h,a4 as Mh,b4 as fr,b5 as pr,L as LD,g as _i,K as Kc,E as Pu,B as VD,G as Lu}from'./main-5C7K2447.js';var V=["*"];function x(o,A){if(o&1){let n=LD();_i(0,"nz-icon",1),gh("click",function(e){Pu(n);let i=VD();return Lu(i.closeTag(e))}),Kc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Le).valueSignal;nzMode="default";nzColor;nzChecked=false;nzBordered=true;nzOnClose=new Le$1;nzCheckedChange=new Le$1;isPresetColor=false;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked));}closeTag(n){this.nzOnClose.emit(n),n.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el);}clearPresetColor(){let n=new RegExp(`(ant-tag-(?:${[...fr,...pr].join("|")}))`,"g"),t=this.el.classList.toString(),e=[],i=n.exec(t);for(;i!==null;)e.push(i[1]),i=n.exec(t);this.el.classList.remove(...e);}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=N7(this.nzColor)||B7(this.nzColor):this.isPresetColor=false,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`);}ngOnChanges(n){let{nzColor:t}=n;t&&this.setPresetColor();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=QE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&gh("click",function(){return e.updateCheckedStatus()}),t&2&&(_h("background-color",e.isPresetColor?"":e.nzColor),Mh("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir()==="rtl")("ant-tag-borderless",!e.nzBordered));},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",Z0],nzBordered:[2,"nzBordered","nzBordered",Z0]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[ly],ngContentSelectors:V,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(t,e){t&1&&(BD(),$D(0),bD(1,x,1,0,"nz-icon",0)),t&2&&(gI(),_D(e.nzMode==="closeable"?1:-1));},dependencies:[pt,Se],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=YE({type:o});static \u0275inj=uu({imports:[I]})}return o})();export{I,W};
1
+ import {ah as YE,ai as uu,C,a_ as XI,an as _r,aq as Le,a$ as Le$1,b0 as N7,b1 as B7,Q as QE,aC as pt,aD as Se,b2 as ly,ak as Z0,aG as BD,aX as $D,m as bD,p as gI,A as _D,j as gh,b3 as _h,a4 as Mh,b4 as fr,b5 as pr,L as LD,g as _i,K as Kc,E as Pu,B as VD,G as Lu}from'./main-6LDEPJ3H.js';var V=["*"];function x(o,A){if(o&1){let n=LD();_i(0,"nz-icon",1),gh("click",function(e){Pu(n);let i=VD();return Lu(i.closeTag(e))}),Kc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Le).valueSignal;nzMode="default";nzColor;nzChecked=false;nzBordered=true;nzOnClose=new Le$1;nzCheckedChange=new Le$1;isPresetColor=false;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked));}closeTag(n){this.nzOnClose.emit(n),n.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el);}clearPresetColor(){let n=new RegExp(`(ant-tag-(?:${[...fr,...pr].join("|")}))`,"g"),t=this.el.classList.toString(),e=[],i=n.exec(t);for(;i!==null;)e.push(i[1]),i=n.exec(t);this.el.classList.remove(...e);}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=N7(this.nzColor)||B7(this.nzColor):this.isPresetColor=false,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`);}ngOnChanges(n){let{nzColor:t}=n;t&&this.setPresetColor();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=QE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&gh("click",function(){return e.updateCheckedStatus()}),t&2&&(_h("background-color",e.isPresetColor?"":e.nzColor),Mh("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir()==="rtl")("ant-tag-borderless",!e.nzBordered));},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",Z0],nzBordered:[2,"nzBordered","nzBordered",Z0]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[ly],ngContentSelectors:V,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(t,e){t&1&&(BD(),$D(0),bD(1,x,1,0,"nz-icon",0)),t&2&&(gI(),_D(e.nzMode==="closeable"?1:-1));},dependencies:[pt,Se],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=YE({type:o});static \u0275inj=uu({imports:[I]})}return o})();export{I,W};