@whoz-oss/coday-client 0.0.0-workstream-forge.164 → 0.0.0-workstream-forge.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-CDenpy3I.js → chunk-07cABOuE.js} +1 -1
- package/browser/{chunk-DhVxqqFl.js → chunk-6y7X56N-.js} +1 -1
- package/browser/{chunk-CubEcxsT.js → chunk-BCTOO0sd.js} +1 -1
- package/browser/{chunk-BO1HGYJ3.js → chunk-BHL5GPnd.js} +1 -1
- package/browser/{chunk-O-V09dXj.js → chunk-BSOvj60j.js} +1 -1
- package/browser/{chunk-BdAw3RVr.js → chunk-BUpnTqhN.js} +1 -1
- package/browser/{chunk-Bu3U66-H.js → chunk-BV9HafIV.js} +1 -1
- package/browser/{chunk-CsSaiA1P.js → chunk-B_g94LB4.js} +1 -1
- package/browser/{chunk-DHFl5v8y.js → chunk-Bi-OJi4d.js} +1 -1
- package/browser/{chunk-BIqQDrzJ.js → chunk-BruN4Ygt.js} +1 -1
- package/browser/{chunk-KPQ2pP66.js → chunk-BrwfhHfU.js} +1 -1
- package/browser/{chunk-G9dv78Yj.js → chunk-BtZ9cLEE.js} +1 -1
- package/browser/{chunk-CV3K5zNT.js → chunk-C0tL91fL.js} +1 -1
- package/browser/{chunk-BVdMofRH.js → chunk-C60uSYX_.js} +1 -1
- package/browser/chunk-CIu6oHxa.js +1 -0
- package/browser/{chunk-BPDyUW9C.js → chunk-CdzHCJJW.js} +1 -1
- package/browser/{chunk-Cc6IKSyC.js → chunk-CkzP7cbT.js} +1 -1
- package/browser/{chunk-C1QfCycr.js → chunk-CnGzNl4j.js} +1 -1
- package/browser/{chunk-QZ9v-olu.js → chunk-CnsEAvOg.js} +1 -1
- package/browser/{chunk-D0Fm138-.js → chunk-CpzRn9vv.js} +1 -1
- package/browser/{chunk-LDlaL5qr.js → chunk-D2CCGovn.js} +1 -1
- package/browser/{chunk-BQtSIe5T.js → chunk-D5L7ZbF8.js} +1 -1
- package/browser/{chunk-33f1Bq4d.js → chunk-D8P0Thd0.js} +1 -1
- package/browser/{chunk-BJT1pT3j.js → chunk-D8R-IYf6.js} +1 -1
- package/browser/{chunk-Dnq1VkLC.js → chunk-D9TvysVF.js} +1 -1
- package/browser/{chunk-Cml5V2VG.js → chunk-DBduIsNL.js} +1 -1
- package/browser/chunk-DJoWmwH1.js +1 -0
- package/browser/{chunk-CDsD_Pfd.js → chunk-DMIAR02j.js} +1 -1
- package/browser/{chunk-CUjEhdzX.js → chunk-DV1krtUK.js} +1 -1
- package/browser/{chunk-C6LQzD3M.js → chunk-DXoZwcP3.js} +1 -1
- package/browser/{chunk-HGFAbUg7.js → chunk-DYfghRw7.js} +1 -1
- package/browser/{chunk-C4HOlFhc.js → chunk-DaQaZP7k.js} +1 -1
- package/browser/{chunk-DFXEWELG.js → chunk-DhvBJFk_.js} +1 -1
- package/browser/{chunk-DAFgF2zk.js → chunk-Dp6dZbkN.js} +1 -1
- package/browser/{chunk-BUHpp4JE.js → chunk-DvPrgp7o.js} +1 -1
- package/browser/{chunk-DqhsOOSW.js → chunk-DyfWdeL4.js} +1 -1
- package/browser/{chunk-CbxILJkh.js → chunk-I9EkqAaW.js} +1 -1
- package/browser/{chunk-03YpIQRe.js → chunk-QSOz9DjP.js} +1 -1
- package/browser/{chunk-CDzMjHDI.js → chunk-TjH-tsTZ.js} +1 -1
- package/browser/{chunk-CkucggC3.js → chunk-Yq0DwJ_V.js} +1 -1
- package/browser/{chunk-ILOTMMoB.js → chunk-dapg20ng.js} +1 -1
- package/browser/{chunk-BfnsSzkw.js → chunk-fzl9AQUk.js} +1 -1
- package/browser/{chunk-BVM48Akd.js → chunk-rLD7OBxU.js} +1 -1
- package/browser/{chunk-Btu4vlJn.js → chunk-v6qcikkG.js} +3 -3
- package/browser/{chunk-O3MeTbDv.js → chunk-wFeeL7zD.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-ITBV6BE5.js → main-BGDYLHDQ.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-BXDdc4SZ.js +0 -1
- package/browser/chunk-CrJHMDmB.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {o}from'./chunk-Cc6IKSyC.js';import {i,O,h as vi,x as xi,C as Ci,P,M}from'./chunk-Btu4vlJn.js';import {p,g as It,H as Me,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,x as xf,C as CT,o as sg,q as ag,u as uc}from'./main-ITBV6BE5.js';var I=(n,t)=>t.id??t.name;function j(n,t){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let e=MT();yb(),Iv(e.deletion.error());}}function K(n,t){n&1&&(za(0,"p",4),n_(1,"Loading skills\u2026"),Sf());}function A(n,t){n&1&&(za(0,"p",5),n_(1,"No platform skills defined yet."),Sf());}function B(n,t){n&1&&(za(0,"p",4),n_(1,"No skills match the current filter."),Sf());}function H(n,t){n&1&&(za(0,"ds-tag",15),n_(1,"SKILL.md"),Sf());}function U(n,t){if(n&1){let e=CT();za(0,"button",21),dc("click",function(){sg(e);let c=MT(2).$implicit,d=MT(2);return ag(d.edit(c))}),n_(1,"Edit"),Sf();}if(n&2){let e=MT(2).$implicit;uc("aria-label","Edit "+e.name);}}function G(n,t){if(n&1){let e=CT();za(0,"button",21),dc("click",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.inspect(c))}),n_(1,"View"),Sf(),fT(2,U,2,1,"button",22);}if(n&2){let e=MT().$implicit;uc("aria-label","View "+e.name),yb(2),hT(e.readOnly?-1:2);}}function J(n,t){if(n&1){let e=CT();za(0,"agentos-row-delete-action",23),dc("deleteRequested",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.deletion.request(c.id))})("deleteConfirmed",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.confirmDelete(c))})("deleteCancelled",function(){sg(e);let c=MT(3);return ag(c.deletion.cancel())}),Sf();}if(n&2){let e=MT().$implicit,a=MT(2);tv("rowKey",e.id)("rowLabel",e.name)("state",a.deletion);}}function Q(n,t){if(n&1&&(za(0,"tr",9)(1,"td",12)(2,"div",13)(3,"span",14),n_(4),Sf(),fT(5,H,2,0,"ds-tag",15),Sf()(),za(6,"td",16),n_(7),Sf(),za(8,"td",17),n_(9),Sf(),za(10,"td",18)(11,"div",19),fT(12,G,3,2),fT(13,J,1,3,"agentos-row-delete-action",20),Sf()()()),n&2){let e=t.$implicit,a=MT(2);yb(4),Iv(e.name),yb(),hT(e.readOnly?5:-1),yb(2),xf(" ",e.description||"\u2014"," "),yb(2),Iv(a.resourceCount(e)),yb(3),hT(a.deletion.confirmingId()!==e.id?12:-1),yb(),hT(!e.readOnly&&e.id?13:-1);}}function W(n,t){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Description"),Sf(),za(8,"th",10),n_(9,"Resources"),Sf(),za(10,"th",10)(11,"span",11),n_(12,"Actions"),Sf()()()(),za(13,"tbody",8),mT(14,Q,14,6,"tr",9,I),Sf()()()),n&2){let e=MT();yb(14),yT(e.rowFilter.filteredRows());}}var z=class n{router=p(It);destroyRef=p(Me);skillState=p(o);refresh$=new De(void 0);isLoading=se(true);deletion=i();skills=se([]);rowFilter=O(this.skills,t=>[t.name,t.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.skillState.listPlatform())),U$1(this.destroyRef)).subscribe({next:t=>{this.skills.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}resourceCount(t){return Object.keys(t.resources??{}).length}openCreateForm(){this.router.navigate(["/agentos","admin","skills","new"]);}inspect(t){t.id&&this.router.navigate(["/agentos","admin","skills",t.id,"inspect"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","skills",t.id,"edit"]);}confirmDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.skillState.delete(t.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:e=>e.status===403?`Deleting "${t.name}" requires platform administrator rights.`:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-skills"]],decls:9,vars:3,consts:[["title","Platform skills","description","Skills shared across every namespace."],["label","Filter skills","placeholder","Filter skills\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform skills"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__tags"],[1,"settings-table__name"],["variant","neutral"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Resources"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(e,a){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(d){return a.rowFilter.query.set(d)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New skill"),Sf()(),fT(4,j,2,1,"p",3),fT(5,K,2,0,"p",4)(6,A,2,0,"p",5)(7,B,2,0,"p",4)(8,W,16,0,"div",6)),e&2&&(yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.skills().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{z as PlatformSkillsComponent};
|
|
1
|
+
import {o}from'./chunk-CkzP7cbT.js';import {i,O,h as vi,x as xi,C as Ci,P,M}from'./chunk-v6qcikkG.js';import {p,g as It,H as Me,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,x as xf,C as CT,o as sg,q as ag,u as uc}from'./main-BGDYLHDQ.js';var I=(n,t)=>t.id??t.name;function j(n,t){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let e=MT();yb(),Iv(e.deletion.error());}}function K(n,t){n&1&&(za(0,"p",4),n_(1,"Loading skills\u2026"),Sf());}function A(n,t){n&1&&(za(0,"p",5),n_(1,"No platform skills defined yet."),Sf());}function B(n,t){n&1&&(za(0,"p",4),n_(1,"No skills match the current filter."),Sf());}function H(n,t){n&1&&(za(0,"ds-tag",15),n_(1,"SKILL.md"),Sf());}function U(n,t){if(n&1){let e=CT();za(0,"button",21),dc("click",function(){sg(e);let c=MT(2).$implicit,d=MT(2);return ag(d.edit(c))}),n_(1,"Edit"),Sf();}if(n&2){let e=MT(2).$implicit;uc("aria-label","Edit "+e.name);}}function G(n,t){if(n&1){let e=CT();za(0,"button",21),dc("click",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.inspect(c))}),n_(1,"View"),Sf(),fT(2,U,2,1,"button",22);}if(n&2){let e=MT().$implicit;uc("aria-label","View "+e.name),yb(2),hT(e.readOnly?-1:2);}}function J(n,t){if(n&1){let e=CT();za(0,"agentos-row-delete-action",23),dc("deleteRequested",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.deletion.request(c.id))})("deleteConfirmed",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.confirmDelete(c))})("deleteCancelled",function(){sg(e);let c=MT(3);return ag(c.deletion.cancel())}),Sf();}if(n&2){let e=MT().$implicit,a=MT(2);tv("rowKey",e.id)("rowLabel",e.name)("state",a.deletion);}}function Q(n,t){if(n&1&&(za(0,"tr",9)(1,"td",12)(2,"div",13)(3,"span",14),n_(4),Sf(),fT(5,H,2,0,"ds-tag",15),Sf()(),za(6,"td",16),n_(7),Sf(),za(8,"td",17),n_(9),Sf(),za(10,"td",18)(11,"div",19),fT(12,G,3,2),fT(13,J,1,3,"agentos-row-delete-action",20),Sf()()()),n&2){let e=t.$implicit,a=MT(2);yb(4),Iv(e.name),yb(),hT(e.readOnly?5:-1),yb(2),xf(" ",e.description||"\u2014"," "),yb(2),Iv(a.resourceCount(e)),yb(3),hT(a.deletion.confirmingId()!==e.id?12:-1),yb(),hT(!e.readOnly&&e.id?13:-1);}}function W(n,t){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Description"),Sf(),za(8,"th",10),n_(9,"Resources"),Sf(),za(10,"th",10)(11,"span",11),n_(12,"Actions"),Sf()()()(),za(13,"tbody",8),mT(14,Q,14,6,"tr",9,I),Sf()()()),n&2){let e=MT();yb(14),yT(e.rowFilter.filteredRows());}}var z=class n{router=p(It);destroyRef=p(Me);skillState=p(o);refresh$=new De(void 0);isLoading=se(true);deletion=i();skills=se([]);rowFilter=O(this.skills,t=>[t.name,t.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.skillState.listPlatform())),U$1(this.destroyRef)).subscribe({next:t=>{this.skills.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}resourceCount(t){return Object.keys(t.resources??{}).length}openCreateForm(){this.router.navigate(["/agentos","admin","skills","new"]);}inspect(t){t.id&&this.router.navigate(["/agentos","admin","skills",t.id,"inspect"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","skills",t.id,"edit"]);}confirmDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.skillState.delete(t.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:e=>e.status===403?`Deleting "${t.name}" requires platform administrator rights.`:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-skills"]],decls:9,vars:3,consts:[["title","Platform skills","description","Skills shared across every namespace."],["label","Filter skills","placeholder","Filter skills\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform skills"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__tags"],[1,"settings-table__name"],["variant","neutral"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Resources"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(e,a){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(d){return a.rowFilter.query.set(d)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New skill"),Sf()(),fT(4,j,2,1,"p",3),fT(5,K,2,0,"p",4)(6,A,2,0,"p",5)(7,B,2,0,"p",4)(8,W,16,0,"div",6)),e&2&&(yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.skills().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{z as PlatformSkillsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p,aI as be,Z as R}from'./main-
|
|
1
|
+
import {p,aI as be,Z as R}from'./main-BGDYLHDQ.js';var o=class r{skillController=p(be);getById(l){return this.skillController.getByIdSkill(l)}listPlatform(){return this.skillController.listPlatformSkill()}listByNamespace(l){return this.skillController.listByParentSkill(l)}listEffective(l){return this.skillController.listEffectiveSkill(l)}create(l){return this.skillController.createSkill(l)}update(l,e){return this.skillController.updateSkill(l,e)}delete(l){return this.skillController.deleteSkill(l)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=R({token:r,factory:r.\u0275fac,providedIn:"root"})};export{o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-33f1Bq4d.js';import {O}from'./chunk-BdAw3RVr.js';import {p,$ as $t,g as It,H as Me,F as G,s as se,U as U$1,aA as j,a8 as Ae,a as Ef,a3 as _,z as za,L as dc,S as Sf,n as n_,f as fT,O as tv,y as yb,h as hT,k as MT,I as Iv,m as mT,d as yT,x as xf,C as CT,o as sg,q as ag}from'./main-ITBV6BE5.js';import {i,O as O$1,h as vi,x as xi,C as Ci,P,M}from'./chunk-Btu4vlJn.js';import'./chunk-CrJHMDmB.js';var J=(n,e)=>e.key;function U(n,e){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let t=MT();yb(),Iv(t.deletion.error());}}function Q(n,e){n&1&&(za(0,"p",4),n_(1,"Loading integrations\u2026"),Sf());}function W(n,e){n&1&&(za(0,"p",5),n_(1,"No integrations available."),Sf());}function X(n,e){n&1&&(za(0,"p",4),n_(1,"No integrations match the current filter."),Sf());}function Z(n,e){n&1&&(za(0,"ds-tag",19),n_(1,"YAML"),Sf(),za(2,"ds-tag",20),n_(3,"Read-only"),Sf());}function ee(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let s=MT().$implicit,c=MT(2);return ag(c.view(s))}),n_(1,"View"),Sf();}}function te(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let s=MT(2).$implicit,c=MT(2);return ag(c.edit(s))}),n_(1,"Edit"),Sf();}}function ne(n,e){if(n&1){let t=CT();za(0,"agentos-row-delete-action",24),dc("deleteRequested",function(){sg(t);let s=MT(2).$implicit,c=MT(2);return ag(c.deletion.request(s.key))})("deleteConfirmed",function(){sg(t);let s=MT(2).$implicit,c=MT(2);return ag(c.confirmDelete(s))})("deleteCancelled",function(){sg(t);let s=MT(4);return ag(s.deletion.cancel())}),Sf();}if(n&2){let t=MT(2).$implicit,a=MT(2);tv("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function oe(n,e){n&1&&(za(0,"button",23),n_(1,"Inherited"),Sf());}function ie(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let s=MT().$implicit,c=MT(2);return ag(c.duplicate(s))}),n_(1,"Duplicate"),Sf(),fT(2,te,2,0,"button",18),fT(3,ne,1,3,"agentos-row-delete-action",22),fT(4,oe,2,0,"button",23);}if(n&2){let t=MT().$implicit;yb(2),hT(t.canEdit?2:-1),yb(),hT(t.canDelete?3:-1),yb(),hT(!t.canEdit&&!t.canDelete?4:-1);}}function ae(n,e){if(n&1&&(za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14)(6,"div",15)(7,"ds-tag",16),n_(8),Sf(),fT(9,Z,4,0),Sf()(),za(10,"td",17),fT(11,ee,2,0,"button",18)(12,ie,5,3),Sf()()),n&2){let t=e.$implicit;yb(2),Iv(t.config.name),yb(2),Iv(t.config.integrationType),yb(3),tv("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),yb(),xf(" ",t.scopeLabel," "),yb(),hT(t.source==="FILESYSTEM"?9:-1),yb(2),hT(t.source==="FILESYSTEM"?11:12);}}function re(n,e){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Type"),Sf(),za(8,"th",10),n_(9,"Scope"),Sf(),za(10,"th",10)(11,"span",11),n_(12,"Actions"),Sf()()()(),za(13,"tbody",8),mT(14,ae,13,6,"tr",9,J),Sf()()()),n&2){let t=MT();yb(14),yT(t.rowFilter.filteredRows());}}var B=class n$1{route=p($t);router=p(It);destroyRef=p(Me);state=p(O);namespaceRole=p(v);namespaceApi=p(G);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=se("this namespace");isAdmin=se(false);isLoading=se(true);rows=se([]);deletion=i();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),this.route.paramMap.pipe(j(e=>e.get("namespaceId")??""),Ae(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let a=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:a,template:e.config.id,templateScope:e.scope}});}confirmDelete(e){!e.canDelete||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e$1,t,a,s){return e$1.map((c,H)=>{let v=e(c),w=v==="NEO4J"&&!s;return {key:`${t}:${c.id??H}`,config:c,scope:t,scopeLabel:a,source:v,canEdit:w,canDelete:w}})}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=Ef({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:9,vars:4,consts:[["title","Integrations",3,"description"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["type","button",1,"integrations__new",3,"click"],["role","alert",1,"integrations__error"],["role","status",1,"integrations__status"],[1,"integrations__status"],[1,"integrations__table-wrap"],["dsTable","","role","table","aria-label","Integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"integrations__name"],["role","cell","data-label","Type",1,"integrations__type"],["role","cell","data-label","Scope"],[1,"integrations__tags"],[3,"variant"],["role","cell","data-label","Actions","data-actions","",1,"integrations__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["deleteClass","integrations__delete",3,"rowKey","rowLabel","state"],["type","button","disabled",""],["deleteClass","integrations__delete",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,a){t&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return a.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New integration"),Sf()(),fT(4,U,2,1,"p",3),fT(5,Q,2,0,"p",4)(6,W,2,0,"p",5)(7,X,2,0,"p",4)(8,re,16,0,"div",6)),t&2&&(tv("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.integrations__new[_ngcontent-%COMP%]{white-space:nowrap;padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.integrations__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.integrations__error[_ngcontent-%COMP%]{margin:0 0 .75rem;color:var(--color-error)}.integrations__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.integrations__name[_ngcontent-%COMP%]{font-weight:500}.integrations__type[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integrations__tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.integrations__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.integrations__actions[_ngcontent-%COMP%] .integrations__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}']})};export{B as IntegrationsAllScopesComponent};
|
|
1
|
+
import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-D8P0Thd0.js';import {O}from'./chunk-BUpnTqhN.js';import {p,$ as $t,g as It,H as Me,F as G,s as se,U as U$1,aA as j,a8 as Ae,a as Ef,a3 as _,z as za,L as dc,S as Sf,n as n_,f as fT,O as tv,y as yb,h as hT,k as MT,I as Iv,m as mT,d as yT,x as xf,C as CT,o as sg,q as ag}from'./main-BGDYLHDQ.js';import {i,O as O$1,h as vi,x as xi,C as Ci,P,M}from'./chunk-v6qcikkG.js';import'./chunk-DJoWmwH1.js';var J=(n,e)=>e.key;function U(n,e){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let t=MT();yb(),Iv(t.deletion.error());}}function Q(n,e){n&1&&(za(0,"p",4),n_(1,"Loading integrations\u2026"),Sf());}function W(n,e){n&1&&(za(0,"p",5),n_(1,"No integrations available."),Sf());}function X(n,e){n&1&&(za(0,"p",4),n_(1,"No integrations match the current filter."),Sf());}function Z(n,e){n&1&&(za(0,"ds-tag",19),n_(1,"YAML"),Sf(),za(2,"ds-tag",20),n_(3,"Read-only"),Sf());}function ee(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let s=MT().$implicit,c=MT(2);return ag(c.view(s))}),n_(1,"View"),Sf();}}function te(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let s=MT(2).$implicit,c=MT(2);return ag(c.edit(s))}),n_(1,"Edit"),Sf();}}function ne(n,e){if(n&1){let t=CT();za(0,"agentos-row-delete-action",24),dc("deleteRequested",function(){sg(t);let s=MT(2).$implicit,c=MT(2);return ag(c.deletion.request(s.key))})("deleteConfirmed",function(){sg(t);let s=MT(2).$implicit,c=MT(2);return ag(c.confirmDelete(s))})("deleteCancelled",function(){sg(t);let s=MT(4);return ag(s.deletion.cancel())}),Sf();}if(n&2){let t=MT(2).$implicit,a=MT(2);tv("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function oe(n,e){n&1&&(za(0,"button",23),n_(1,"Inherited"),Sf());}function ie(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let s=MT().$implicit,c=MT(2);return ag(c.duplicate(s))}),n_(1,"Duplicate"),Sf(),fT(2,te,2,0,"button",18),fT(3,ne,1,3,"agentos-row-delete-action",22),fT(4,oe,2,0,"button",23);}if(n&2){let t=MT().$implicit;yb(2),hT(t.canEdit?2:-1),yb(),hT(t.canDelete?3:-1),yb(),hT(!t.canEdit&&!t.canDelete?4:-1);}}function ae(n,e){if(n&1&&(za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14)(6,"div",15)(7,"ds-tag",16),n_(8),Sf(),fT(9,Z,4,0),Sf()(),za(10,"td",17),fT(11,ee,2,0,"button",18)(12,ie,5,3),Sf()()),n&2){let t=e.$implicit;yb(2),Iv(t.config.name),yb(2),Iv(t.config.integrationType),yb(3),tv("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),yb(),xf(" ",t.scopeLabel," "),yb(),hT(t.source==="FILESYSTEM"?9:-1),yb(2),hT(t.source==="FILESYSTEM"?11:12);}}function re(n,e){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Type"),Sf(),za(8,"th",10),n_(9,"Scope"),Sf(),za(10,"th",10)(11,"span",11),n_(12,"Actions"),Sf()()()(),za(13,"tbody",8),mT(14,ae,13,6,"tr",9,J),Sf()()()),n&2){let t=MT();yb(14),yT(t.rowFilter.filteredRows());}}var B=class n$1{route=p($t);router=p(It);destroyRef=p(Me);state=p(O);namespaceRole=p(v);namespaceApi=p(G);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=se("this namespace");isAdmin=se(false);isLoading=se(true);rows=se([]);deletion=i();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),this.route.paramMap.pipe(j(e=>e.get("namespaceId")??""),Ae(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let a=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:a,template:e.config.id,templateScope:e.scope}});}confirmDelete(e){!e.canDelete||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e$1,t,a,s){return e$1.map((c,H)=>{let v=e(c),w=v==="NEO4J"&&!s;return {key:`${t}:${c.id??H}`,config:c,scope:t,scopeLabel:a,source:v,canEdit:w,canDelete:w}})}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=Ef({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:9,vars:4,consts:[["title","Integrations",3,"description"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["type","button",1,"integrations__new",3,"click"],["role","alert",1,"integrations__error"],["role","status",1,"integrations__status"],[1,"integrations__status"],[1,"integrations__table-wrap"],["dsTable","","role","table","aria-label","Integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"integrations__name"],["role","cell","data-label","Type",1,"integrations__type"],["role","cell","data-label","Scope"],[1,"integrations__tags"],[3,"variant"],["role","cell","data-label","Actions","data-actions","",1,"integrations__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["deleteClass","integrations__delete",3,"rowKey","rowLabel","state"],["type","button","disabled",""],["deleteClass","integrations__delete",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,a){t&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return a.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New integration"),Sf()(),fT(4,U,2,1,"p",3),fT(5,Q,2,0,"p",4)(6,W,2,0,"p",5)(7,X,2,0,"p",4)(8,re,16,0,"div",6)),t&2&&(tv("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.integrations__new[_ngcontent-%COMP%]{white-space:nowrap;padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.integrations__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.integrations__error[_ngcontent-%COMP%]{margin:0 0 .75rem;color:var(--color-error)}.integrations__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.integrations__name[_ngcontent-%COMP%]{font-weight:500}.integrations__type[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integrations__tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.integrations__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.integrations__actions[_ngcontent-%COMP%] .integrations__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}']})};export{B as IntegrationsAllScopesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {R}from'./chunk-HGFAbUg7.js';import {p,g as It,H as Me,a7 as De,s as se,a8 as Ae,M as Mi,U,a as Ef,ak as mc,al as N$,z as za,n as n_,S as Sf,f as fT,y as yb,I as Iv,h as hT,L as dc,am as Jy,O as tv,k as MT,u as uc,x as xf,C as CT,l as lc,an as kT,o as sg,q as ag,ao as w_}from'./main-ITBV6BE5.js';import {i,O,o as Vi,r as qe,s as gi,h as vi,P as P$1}from'./chunk-Btu4vlJn.js';import'./chunk-CrJHMDmB.js';function W(n,e){if(n&1&&(za(0,"span",4),n_(1),Sf()),n&2){let t=MT();uc("data-variant",t.badge().variant)("aria-label",t.badge().ariaLabel),yb(),xf(" ",t.badge().label," ");}}function J(n,e){if(n&1){let t=CT();za(0,"span",7),n_(1,"Delete?"),Sf(),za(2,"ds-icon-button",8),dc("action",function(){sg(t);let l=MT();return ag(l.onDeleteConfirmed())}),Sf(),za(3,"ds-icon-button",9),dc("action",function(){sg(t);let l=MT();return ag(l.onDeleteCancelled())}),Sf();}if(n&2){let t=MT();yb(2),tv("title",t.isDeleting()?"Deleting\u2026":"Confirm deletion")("disabled",t.isDeleting()),yb(),tv("disabled",t.isDeleting());}}function Q(n,e){if(n&1){let t=CT();za(0,"ds-kebab-menu",12),dc("itemSelected",function(l){sg(t);let b=MT(2);return ag(b.onMenuAction(l))}),Sf();}if(n&2){let t=MT(2);tv("items",t.menuItems());}}function X(n,e){if(n&1){let t=CT();za(0,"ds-icon-button",10),dc("action",function(){sg(t);let l=MT();return ag(l.onDuplicate())}),Sf(),fT(1,Q,1,1,"ds-kebab-menu",11);}if(n&2){let t=MT();yb(),hT(t.readOnly()?-1:1);}}var Y=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),P=class n{config=mc.required();scope=mc.required();readOnly=mc(false);showBadge=mc(true);deleteState=mc(null);editRequested=N$();deleteRequested=N$();duplicateRequested=N$();pendingDelete=se(false);isConfirmingDelete=Mi(()=>this.deleteState()?this.deleteState().confirmingId()===this.config().id:this.pendingDelete());isDeleting=Mi(()=>this.deleteState()?.deletingId()===this.config().id);badge=Mi(()=>Y[this.scope()]);menuItems=Mi(()=>[{key:"edit",label:"Edit auth setting",icon:"edit"},{key:"delete",label:"Delete auth setting",icon:"delete",variant:"danger"}]);onMenuAction(e){switch(e){case "edit":this.editRequested.emit(this.config());break;case "delete":{let t=this.deleteState(),i=this.config().id;t&&i?t.request(i):this.pendingDelete.set(true);break}}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.deleteState()||this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.deleteState()?this.deleteState().cancel():this.pendingDelete.set(false);}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-auth-setting-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"],deleteState:[1,"deleteState"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:11,vars:4,consts:[["role","listitem",1,"auth-setting-item"],[1,"auth-setting-item__body"],[1,"auth-setting-item__heading"],[1,"auth-setting-item__name"],[1,"auth-setting-item__badge"],[1,"auth-setting-item__type"],[1,"auth-setting-item__actions"],[1,"auth-setting-item__confirm-label"],["icon","check","variant","danger",3,"action","title","disabled"],["icon","close","title","Cancel deletion",3,"action","disabled"],["icon","content_copy","title","Duplicate this auth setting",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(t,i){t&1&&(za(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),n_(4),Sf(),fT(5,W,2,3,"span",4),Sf(),za(6,"span",5),n_(7),Sf()(),za(8,"div",6),fT(9,J,4,3)(10,X,2,1),Sf()()),t&2&&(yb(4),Iv(i.config().name),yb(),hT(i.showBadge()?5:-1),yb(2),Iv(i.config().authType),yb(2),hT(i.isConfirmingDelete()?9:10));},dependencies:[Vi,qe],styles:[".auth-setting-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.auth-setting-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.auth-setting-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.auth-setting-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.auth-setting-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.auth-setting-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.auth-setting-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.auth-setting-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.auth-setting-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.auth-setting-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover .auth-setting-item__actions[_ngcontent-%COMP%], .auth-setting-item[_ngcontent-%COMP%]:focus-within .auth-setting-item__actions[_ngcontent-%COMP%]{opacity:1}.auth-setting-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"]})};function Z(n,e){if(n&1&&(za(0,"p",4),n_(1),Sf()),n&2){let t=MT();yb(),Iv(t.deletion.error());}}function tt(n,e){n&1&&(za(0,"p",5),n_(1,"No auth settings match the current filter."),Sf());}function et(n,e){if(n&1&&lc(0,"ds-entity-list",6),n&2){let t=MT(),i=kT(8);tv("hideTitle",true)("hideToolbar",true)("items",t.settingItems())("loading",t.isLoading())("showCreate",false)("itemTemplate",i);}}function nt(n,e){if(n&1){let t=CT();za(0,"agentos-auth-setting-item",8),dc("editRequested",function(l){sg(t);let b=MT(2);return ag(b.onEdit(l))})("deleteRequested",function(l){sg(t);let b=MT(2);return ag(b.onDelete(l))}),Sf();}if(n&2){let t=MT(2);tv("config",e)("showBadge",false)("deleteState",t.deletion);}}function it(n,e){if(n&1&&fT(0,nt,1,3,"agentos-auth-setting-item",7),n&2){let t,i=e.$implicit,l=MT();hT((t=l.resolveSetting(i.id))?0:-1,t);}}var K=class n{router=p(It);destroyRef=p(Me);state=p(R);refresh$=new De(void 0);isLoading=se(true);deletion=i();settings$=this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.state.loadPlatformSettings())));settings=se([]);rowFilter=O(this.settings,e=>[e.name,e.authType].filter(Boolean).join(" "));settingItems=Mi(()=>this.rowFilter.filteredRows().map(e=>({id:e.id??"",name:e.name,description:e.authType})));settingsById=new Map;constructor(){this.settings$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.settings.set(e),this.settingsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","auth-settings","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","auth-settings",e.id,"edit"]);}onDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.state.delete(e.id,"platform").pipe(U(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}resolveSetting(e){return this.settingsById.get(e)??null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-auth-settings"]],decls:9,vars:3,consts:[["authSettingItemTpl",""],["title","Platform Auth Settings"],["label","Filter auth settings","placeholder","Filter auth settings\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],["title","Platform Auth Settings","emptyMessage","No platform auth settings defined yet.","cardMinWidth","400px",1,"platform-auth-settings__content",3,"hideTitle","hideToolbar","items","loading","showCreate","itemTemplate"],["scope","namespace",3,"config","showBadge","deleteState"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge","deleteState"]],template:function(t,i){t&1&&(za(0,"ds-section-header",1)(1,"agentos-table-filter",2),dc("queryChange",function(b){return i.rowFilter.query.set(b)}),Sf(),za(2,"button",3),dc("click",function(){return i.openCreateForm()}),n_(3,"New auth setting"),Sf()(),fT(4,Z,2,1,"p",4),fT(5,tt,2,0,"p",5)(6,et,1,6,"ds-entity-list",6),Jy(7,it,1,1,"ng-template",null,0,w_)),t&2&&(yb(),tv("query",i.rowFilter.query()),yb(3),hT(i.deletion.error()?4:-1),yb(),hT(!i.isLoading()&&i.settings().length>0&&i.rowFilter.filteredRows().length===0?5:6));},dependencies:[gi,vi,P$1,P],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{K as PlatformAuthSettingsComponent};
|
|
1
|
+
import {R}from'./chunk-DYfghRw7.js';import {p,g as It,H as Me,a7 as De,s as se,a8 as Ae,M as Mi,U,a as Ef,ak as mc,al as N$,z as za,n as n_,S as Sf,f as fT,y as yb,I as Iv,h as hT,L as dc,am as Jy,O as tv,k as MT,u as uc,x as xf,C as CT,l as lc,an as kT,o as sg,q as ag,ao as w_}from'./main-BGDYLHDQ.js';import {i,O,o as Vi,r as qe,s as gi,h as vi,P as P$1}from'./chunk-v6qcikkG.js';import'./chunk-DJoWmwH1.js';function W(n,e){if(n&1&&(za(0,"span",4),n_(1),Sf()),n&2){let t=MT();uc("data-variant",t.badge().variant)("aria-label",t.badge().ariaLabel),yb(),xf(" ",t.badge().label," ");}}function J(n,e){if(n&1){let t=CT();za(0,"span",7),n_(1,"Delete?"),Sf(),za(2,"ds-icon-button",8),dc("action",function(){sg(t);let l=MT();return ag(l.onDeleteConfirmed())}),Sf(),za(3,"ds-icon-button",9),dc("action",function(){sg(t);let l=MT();return ag(l.onDeleteCancelled())}),Sf();}if(n&2){let t=MT();yb(2),tv("title",t.isDeleting()?"Deleting\u2026":"Confirm deletion")("disabled",t.isDeleting()),yb(),tv("disabled",t.isDeleting());}}function Q(n,e){if(n&1){let t=CT();za(0,"ds-kebab-menu",12),dc("itemSelected",function(l){sg(t);let b=MT(2);return ag(b.onMenuAction(l))}),Sf();}if(n&2){let t=MT(2);tv("items",t.menuItems());}}function X(n,e){if(n&1){let t=CT();za(0,"ds-icon-button",10),dc("action",function(){sg(t);let l=MT();return ag(l.onDuplicate())}),Sf(),fT(1,Q,1,1,"ds-kebab-menu",11);}if(n&2){let t=MT();yb(),hT(t.readOnly()?-1:1);}}var Y=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),P=class n{config=mc.required();scope=mc.required();readOnly=mc(false);showBadge=mc(true);deleteState=mc(null);editRequested=N$();deleteRequested=N$();duplicateRequested=N$();pendingDelete=se(false);isConfirmingDelete=Mi(()=>this.deleteState()?this.deleteState().confirmingId()===this.config().id:this.pendingDelete());isDeleting=Mi(()=>this.deleteState()?.deletingId()===this.config().id);badge=Mi(()=>Y[this.scope()]);menuItems=Mi(()=>[{key:"edit",label:"Edit auth setting",icon:"edit"},{key:"delete",label:"Delete auth setting",icon:"delete",variant:"danger"}]);onMenuAction(e){switch(e){case "edit":this.editRequested.emit(this.config());break;case "delete":{let t=this.deleteState(),i=this.config().id;t&&i?t.request(i):this.pendingDelete.set(true);break}}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.deleteState()||this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.deleteState()?this.deleteState().cancel():this.pendingDelete.set(false);}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-auth-setting-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"],deleteState:[1,"deleteState"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:11,vars:4,consts:[["role","listitem",1,"auth-setting-item"],[1,"auth-setting-item__body"],[1,"auth-setting-item__heading"],[1,"auth-setting-item__name"],[1,"auth-setting-item__badge"],[1,"auth-setting-item__type"],[1,"auth-setting-item__actions"],[1,"auth-setting-item__confirm-label"],["icon","check","variant","danger",3,"action","title","disabled"],["icon","close","title","Cancel deletion",3,"action","disabled"],["icon","content_copy","title","Duplicate this auth setting",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(t,i){t&1&&(za(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),n_(4),Sf(),fT(5,W,2,3,"span",4),Sf(),za(6,"span",5),n_(7),Sf()(),za(8,"div",6),fT(9,J,4,3)(10,X,2,1),Sf()()),t&2&&(yb(4),Iv(i.config().name),yb(),hT(i.showBadge()?5:-1),yb(2),Iv(i.config().authType),yb(2),hT(i.isConfirmingDelete()?9:10));},dependencies:[Vi,qe],styles:[".auth-setting-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.auth-setting-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.auth-setting-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.auth-setting-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.auth-setting-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.auth-setting-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.auth-setting-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.auth-setting-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.auth-setting-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.auth-setting-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover .auth-setting-item__actions[_ngcontent-%COMP%], .auth-setting-item[_ngcontent-%COMP%]:focus-within .auth-setting-item__actions[_ngcontent-%COMP%]{opacity:1}.auth-setting-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"]})};function Z(n,e){if(n&1&&(za(0,"p",4),n_(1),Sf()),n&2){let t=MT();yb(),Iv(t.deletion.error());}}function tt(n,e){n&1&&(za(0,"p",5),n_(1,"No auth settings match the current filter."),Sf());}function et(n,e){if(n&1&&lc(0,"ds-entity-list",6),n&2){let t=MT(),i=kT(8);tv("hideTitle",true)("hideToolbar",true)("items",t.settingItems())("loading",t.isLoading())("showCreate",false)("itemTemplate",i);}}function nt(n,e){if(n&1){let t=CT();za(0,"agentos-auth-setting-item",8),dc("editRequested",function(l){sg(t);let b=MT(2);return ag(b.onEdit(l))})("deleteRequested",function(l){sg(t);let b=MT(2);return ag(b.onDelete(l))}),Sf();}if(n&2){let t=MT(2);tv("config",e)("showBadge",false)("deleteState",t.deletion);}}function it(n,e){if(n&1&&fT(0,nt,1,3,"agentos-auth-setting-item",7),n&2){let t,i=e.$implicit,l=MT();hT((t=l.resolveSetting(i.id))?0:-1,t);}}var K=class n{router=p(It);destroyRef=p(Me);state=p(R);refresh$=new De(void 0);isLoading=se(true);deletion=i();settings$=this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.state.loadPlatformSettings())));settings=se([]);rowFilter=O(this.settings,e=>[e.name,e.authType].filter(Boolean).join(" "));settingItems=Mi(()=>this.rowFilter.filteredRows().map(e=>({id:e.id??"",name:e.name,description:e.authType})));settingsById=new Map;constructor(){this.settings$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.settings.set(e),this.settingsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","auth-settings","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","auth-settings",e.id,"edit"]);}onDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.state.delete(e.id,"platform").pipe(U(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}resolveSetting(e){return this.settingsById.get(e)??null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-auth-settings"]],decls:9,vars:3,consts:[["authSettingItemTpl",""],["title","Platform Auth Settings"],["label","Filter auth settings","placeholder","Filter auth settings\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],["title","Platform Auth Settings","emptyMessage","No platform auth settings defined yet.","cardMinWidth","400px",1,"platform-auth-settings__content",3,"hideTitle","hideToolbar","items","loading","showCreate","itemTemplate"],["scope","namespace",3,"config","showBadge","deleteState"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge","deleteState"]],template:function(t,i){t&1&&(za(0,"ds-section-header",1)(1,"agentos-table-filter",2),dc("queryChange",function(b){return i.rowFilter.query.set(b)}),Sf(),za(2,"button",3),dc("click",function(){return i.openCreateForm()}),n_(3,"New auth setting"),Sf()(),fT(4,Z,2,1,"p",4),fT(5,tt,2,0,"p",5)(6,et,1,6,"ds-entity-list",6),Jy(7,it,1,1,"ng-template",null,0,w_)),t&2&&(yb(),tv("query",i.rowFilter.query()),yb(3),hT(i.deletion.error()?4:-1),yb(),hT(!i.isLoading()&&i.settings().length>0&&i.rowFilter.filteredRows().length===0?5:6));},dependencies:[gi,vi,P$1,P],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{K as PlatformAuthSettingsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {O,h as vi,x as xi,C as Ci,P}from'./chunk-
|
|
1
|
+
import {O,h as vi,x as xi,C as Ci,P}from'./chunk-v6qcikkG.js';import {p,$ as $t,g as It,H as Me,ap as N,aj as k,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,ae as pw,af as Wn,a3 as _,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,m as mT,k as MT,d as yT,x as xf,I as Iv,C as CT,o as sg,q as ag}from'./main-BGDYLHDQ.js';var H=(o,e)=>e.key;function J(o,e){o&1&&(za(0,"p",3),n_(1,"Loading AI models\u2026"),Sf());}function U(o,e){o&1&&(za(0,"p",4),n_(1,"No AI models configured."),Sf());}function G(o,e){o&1&&(za(0,"p",3),n_(1,"No AI models match the current filter."),Sf());}function K(o,e){o&1&&(za(0,"ds-tag",17),n_(1,"Read-only"),Sf());}function Q(o,e){if(o&1){let t=CT();za(0,"button",20),dc("click",function(){sg(t);let c=MT().$implicit,s=MT(2);return ag(s.edit(c))}),n_(1,"Edit"),Sf(),za(2,"button",21),dc("click",function(){sg(t);let c=MT().$implicit,s=MT(2);return ag(s.delete(c))}),n_(3,"Delete"),Sf();}}function W(o,e){o&1&&(za(0,"button",19),n_(1,"Inherited"),Sf());}function X(o,e){if(o&1&&(za(0,"tr",8)(1,"td",11),n_(2),Sf(),za(3,"td",12),n_(4),Sf(),za(5,"td",13),n_(6),Sf(),za(7,"td",14)(8,"div",15)(9,"ds-tag",16),n_(10),Sf(),fT(11,K,2,0,"ds-tag",17),Sf()(),za(12,"td",18),fT(13,Q,4,0)(14,W,2,0,"button",19),Sf()()),o&2){let t=e.$implicit;yb(2),xf(" ",t.model.alias??t.model.apiModelName," "),yb(2),Iv(t.providerName),yb(2),Iv(t.model.apiModelName),yb(3),tv("variant",t.scope==="platform"?"neutral":"accent"),yb(),Iv(t.scope==="platform"?"Platform":"Namespace"),yb(),hT(t.scope==="platform"?11:-1),yb(2),hT(t.scope==="namespace"?13:14);}}function Y(o,e){if(o&1&&(za(0,"div",5)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th",9),n_(5,"Name"),Sf(),za(6,"th",9),n_(7,"Provider"),Sf(),za(8,"th",9),n_(9,"API model name"),Sf(),za(10,"th",9),n_(11,"Scope"),Sf(),za(12,"th",9)(13,"span",10),n_(14,"Actions"),Sf()()()(),za(15,"tbody",7),mT(16,X,15,7,"tr",8,H),Sf()()()),o&2){let t=MT();yb(16),yT(t.rowFilter.filteredRows());}}var B=class o{route=p($t);router=p(It);destroyRef=p(Me);aiModelController=p(N);aiProviderController=p(k);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new De(void 0);isLoading=se(true);rows=se([]);rowFilter=O(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),pw({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(Wn(()=>_([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(Ae(({namespace:e,platform:t,providers:r})=>{let c=[...new Set([...t,...e].map(s=>s.aiProviderId))];return pw({namespace:_(e),platform:_(t),providers:_(r),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:c,withRemoved:false}).pipe(Wn(()=>_([])))})})))));constructor(){this.data$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:r,referencedProviders:c})=>{let s=new Map([...c,...r].map(l=>[l.id??"",l.name]));this.rows.set([...t.map((l,C)=>({key:`platform:${l.id??C}`,model:l,providerName:s.get(l.aiProviderId)??l.aiProviderId,scope:"platform"})),...e.map((l,C)=>({key:`namespace:${l.id??C}`,model:l,providerName:s.get(l.aiProviderId)??l.aiProviderId,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}edit(e){e.scope==="platform"||!e.model.id||this.router.navigate(["/agentos",this.namespaceId,"ai-models",e.model.id,"edit"]);}delete(e){e.scope==="platform"||!e.model.id||!confirm(`Delete AI model \u201C${e.model.alias??e.model.apiModelName}\u201D?`)||this.aiModelController.deleteAiModel(e.model.id).pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Ef({type:o,selectors:[["agentos-namespace-ai-models"]],decls:8,vars:2,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["type","button",1,"ai-models__new",3,"click"],["role","status",1,"ai-models__status"],[1,"ai-models__status"],[1,"ai-models__table-wrap"],["dsTable","","role","table","aria-label","AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"ai-models__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"ai-models__secondary"],["role","cell","data-label","Scope"],[1,"ai-models__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions","",1,"ai-models__actions"],["type","button","disabled",""],["type","button",3,"click"],["type","button",1,"ai-models__delete",3,"click"]],template:function(t,r){t&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(s){return r.rowFilter.query.set(s)}),Sf(),za(2,"button",2),dc("click",function(){return r.openCreateForm()}),n_(3,"New AI model"),Sf()(),fT(4,J,2,0,"p",3)(5,U,2,0,"p",4)(6,G,2,0,"p",3)(7,Y,18,0,"div",5)),t&2&&(yb(),tv("query",r.rowFilter.query()),yb(3),hT(r.isLoading()?4:r.rows().length===0?5:r.rowFilter.filteredRows().length===0?6:7));},dependencies:[vi,xi,Ci,P],styles:['.ai-models__new[_ngcontent-%COMP%]{white-space:nowrap;padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.ai-models__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.ai-models__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.ai-models__name[_ngcontent-%COMP%]{font-weight:500}.ai-models__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.ai-models__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.ai-models__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.ai-models__actions[_ngcontent-%COMP%] .ai-models__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}']})};export{B as NamespaceAiModelsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p,aH as de,Z as R}from'./main-
|
|
1
|
+
import {p,aH as de,Z as R}from'./main-BGDYLHDQ.js';var c=class r{api=p(de);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=R({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-C6dIhkYp.js';import {O as O$1}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-C6dIhkYp.js';import {O as O$1}from'./chunk-BUpnTqhN.js';import {p,$ as $t,H as Me,s as se,U,a as Ef,z as za,n as n_,S as Sf,f as fT,y as yb,h as hT,k as MT,I as Iv}from'./main-BGDYLHDQ.js';import {C as Ci}from'./chunk-v6qcikkG.js';import'./chunk-DJoWmwH1.js';function S(a,e){a&1&&(za(0,"p",2),n_(1,"Loading integration\u2026"),Sf());}function I(a,e){a&1&&(za(0,"p",3),n_(1,"Failed to load this integration configuration."),Sf());}function O(a,e){a&1&&(za(0,"ds-tag",8),n_(1,"YAML"),Sf(),za(2,"ds-tag",9),n_(3,"Read-only"),Sf());}function b(a,e){if(a&1&&(za(0,"section",4)(1,"div",5)(2,"h2"),n_(3,"General"),Sf(),fT(4,O,4,0),Sf(),za(5,"dl")(6,"dt"),n_(7,"Name"),Sf(),za(8,"dd"),n_(9),Sf(),za(10,"dt"),n_(11,"Type"),Sf(),za(12,"dd",6),n_(13),Sf(),za(14,"dt"),n_(15,"Description"),Sf(),za(16,"dd"),n_(17),Sf(),za(18,"dt"),n_(19,"Scope"),Sf(),za(20,"dd"),n_(21),Sf(),za(22,"dt"),n_(23,"Source"),Sf(),za(24,"dd"),n_(25),Sf(),za(26,"dt"),n_(27,"Auto grant"),Sf(),za(28,"dd"),n_(29),Sf(),za(30,"dt"),n_(31,"Auth setting"),Sf(),za(32,"dd"),n_(33),Sf()()(),za(34,"section",4)(35,"h2"),n_(36,"Parameters"),Sf(),za(37,"p",7),n_(38,"Sensitive values are always redacted."),Sf(),za(39,"pre"),n_(40),Sf()()),a&2){let o=e,r=MT();yb(4),hT(r.source()==="FILESYSTEM"?4:-1),yb(5),Iv(o.name),yb(4),Iv(o.integrationType),yb(4),Iv(o.description||"\u2014"),yb(4),Iv(r.scopeOf(o)),yb(4),Iv(r.source()),yb(4),Iv(o.autoGrant?"Enabled":"Disabled"),yb(4),Iv(o.authSettingName||"None"),yb(7),Iv(r.parameters());}}var h="\u2022\u2022\u2022\u2022\u2022\u2022",M=/(?:api[-_]?key|token|secret|password|passphrase|credential|private[-_]?key|client[-_]?secret|authorization|cookie)/i,E=class a{route=p($t);destroyRef=p(Me);state=p(O$1);integrationId=this.route.snapshot.params.integrationId;isLoading=se(true);hasError=se(false);config=se(null);source=se("NEO4J");parameters=se("{}");ngOnInit(){this.state.getById(this.integrationId).pipe(U(this.destroyRef)).subscribe({next:e$1=>{this.config.set(e$1),this.source.set(e(e$1)),this.parameters.set(JSON.stringify(this.redact(e$1.parameters),null,2)),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}scopeOf(e){let o=e.userId?e.namespaceId?"userOnNs":"userGlobal":e.namespaceId?"namespace":"platform";return {platform:"Platform",namespace:"Namespace",userOnNs:"Personal on namespace",userGlobal:"Personal global"}[o]}redact(e,o=""){return M.test(o)?h:e===null||typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?this.containsCredential(e)?h:e:Array.isArray(e)?e.map(r=>this.redact(r,o)):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([r,g])=>[r,this.redact(g,r)])):String(e??"")}containsCredential(e){return /^(?:bearer\s+|basic\s+|sk[-_]|gh[opusr]_|xox[baprs]-|-----begin (?:rsa |ec |openssh )?private key-----)/i.test(e.trim())}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=Ef({type:a,selectors:[["agentos-integration-config-view"]],decls:7,vars:1,consts:[[1,"integration-view"],[1,"integration-view__header"],["role","status",1,"integration-view__status"],[1,"integration-view__error"],[1,"integration-view__section"],[1,"integration-view__section-title"],[1,"integration-view__mono"],[1,"integration-view__hint"],["variant","neutral"],["variant","outline"]],template:function(o,r){if(o&1&&(za(0,"div",0)(1,"header",1)(2,"h1"),n_(3,"Integration configuration"),Sf()(),fT(4,S,2,0,"p",2)(5,I,2,0,"p",3)(6,b,41,9),Sf()),o&2){let g;yb(4),hT(r.isLoading()?4:r.hasError()?5:(g=r.config())?6:-1,g);}},dependencies:[Ci],styles:[".integration-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;max-width:760px;margin:0 auto;padding:24px 8px}.integration-view__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.integration-view__header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;color:var(--color-text);font-family:var(--font-heading);font-size:24px}.integration-view__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px;border:1px solid var(--color-divider)}.integration-view__section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.integration-view__section[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--color-text);font-family:var(--font-heading);font-size:16px}.integration-view[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 20px;margin:0}.integration-view[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px;font-weight:600}.integration-view[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;color:var(--color-text);overflow-wrap:anywhere}.integration-view__mono[_ngcontent-%COMP%], .integration-view[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{font-family:monospace}.integration-view__hint[_ngcontent-%COMP%], .integration-view__status[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary)}.integration-view__error[_ngcontent-%COMP%]{margin:0;color:var(--color-error)}.integration-view[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{max-height:440px;margin:0;padding:14px;text-wrap:wrap;overflow:auto;background:var(--color-bg-hover);color:var(--color-text);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:600px){.integration-view[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:4px}.integration-view[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin-bottom:8px}}"]})};export{E as IntegrationConfigViewComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {l}from'./chunk-
|
|
1
|
+
import {l}from'./chunk-v6qcikkG.js';import {p,aC as ae,aD as T,a3 as _,a8 as Ae,aE as gw,Z as R,aA as j,af as Wn}from'./main-BGDYLHDQ.js';var v=class i{userState=p(l);membership=p(ae);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return _(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(Ae(a=>a?a.isAdmin?_(true):this.membership.getMembersNamespaceMembership(e).pipe(j(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),Wn(()=>_(false))):_(false)),gw({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=R({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {S}from'./chunk-
|
|
1
|
+
import {S}from'./chunk-v6qcikkG.js';import {a as Ef,V as Ph,z as za,l as lc,S as Sf,O as tv}from'./main-BGDYLHDQ.js';var r=class e{groups=[{label:"Access",items:[{label:"Users & Groups",commands:["users"]},{label:"Auth settings",commands:["auth-settings"]}]},{label:"Connections",items:[{label:"Platform integrations",commands:["integration-configs"]}]},{label:"AI",items:[{label:"Platform agents",commands:["agent-configs"]},{label:"Platform AI providers",commands:["ai-providers"]},{label:"Platform AI models",commands:["ai-models"]},{label:"Platform skills",commands:["skills"]},{label:"Platform prompts",commands:["prompts"]}]},{label:"Automation",items:[{label:"Scheduled prompts",commands:["scheduled-prompts"]},{label:"Tool invoke",commands:["tool-invoke"]}]}];static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Ef({type:e,selectors:[["agentos-admin-settings-layout"]],decls:2,vars:1,consts:[["title","Admin \xB7 Configuration","mark","A","navigationLabel","Admin settings",3,"groups"]],template:function(t,g){t&1&&(za(0,"agentos-settings-layout",0),lc(1,"router-outlet"),Sf()),t&2&&tv("groups",g.groups);},dependencies:[Ph,S],styles:["nav[settingsBreadcrumb][_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}nav[settingsBreadcrumb][_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-accent-700);text-decoration:none}nav[settingsBreadcrumb][_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}nav[settingsBreadcrumb][_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}"]})};export{r as AdminSettingsLayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {O}from'./chunk-BdAw3RVr.js';import {p,g as It,H as Me,a6 as D,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,u as uc,o as sg,q as ag}from'./main-ITBV6BE5.js';import {i,O as O$1,h as vi,x as xi,P,M}from'./chunk-Btu4vlJn.js';import'./chunk-CrJHMDmB.js';var N=(e,t)=>t.id??t.name;function z(e,t){if(e&1&&(za(0,"p",3),n_(1),Sf()),e&2){let n=MT();yb(),Iv(n.deletion.error());}}function j(e,t){e&1&&(za(0,"p",4),n_(1,"Loading integrations\u2026"),Sf());}function A(e,t){e&1&&(za(0,"p",5),n_(1,"No platform integrations defined yet."),Sf());}function K(e,t){e&1&&(za(0,"p",4),n_(1,"No integrations match the current filter."),Sf());}function B(e,t){if(e&1){let n=CT();za(0,"button",18),dc("click",function(){sg(n);let c=MT().$implicit,d=MT(2);return ag(d.edit(c))}),n_(1,"Edit"),Sf();}if(e&2){let n=MT().$implicit;uc("aria-label","Edit "+n.name);}}function H(e,t){if(e&1){let n=CT();za(0,"agentos-row-delete-action",19),dc("deleteRequested",function(){sg(n);let c=MT().$implicit,d=MT(2);return ag(d.deletion.request(c.id))})("deleteConfirmed",function(){sg(n);let c=MT().$implicit,d=MT(2);return ag(d.confirmDelete(c))})("deleteCancelled",function(){sg(n);let c=MT(3);return ag(c.deletion.cancel())}),Sf();}if(e&2){let n=MT().$implicit,a=MT(2);tv("rowKey",n.id)("rowLabel",n.name)("state",a.deletion);}}function U(e,t){if(e&1&&(za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14)(6,"div",15),fT(7,B,2,1,"button",16),fT(8,H,1,3,"agentos-row-delete-action",17),Sf()()()),e&2){let n=t.$implicit,a=MT(2);yb(2),Iv(n.name),yb(2),Iv(n.integrationType),yb(3),hT(a.deletion.confirmingId()!==n.id?7:-1),yb(),hT(n.id?8:-1);}}function G(e,t){if(e&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Type"),Sf(),za(8,"th",10)(9,"span",11),n_(10,"Actions"),Sf()()()(),za(11,"tbody",8),mT(12,U,9,4,"tr",9,N),Sf()()()),e&2){let n=MT();yb(12),yT(n.rowFilter.filteredRows());}}var V=class e{router=p(It);destroyRef=p(Me);state=p(O);integrationConfigController=p(D);refresh$=new De(void 0);isLoading=se(true);deletion=i();configs=se([]);rowFilter=O$1(this.configs,t=>[t.name,t.integrationType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())),U$1(this.destroyRef)).subscribe({next:t=>{this.configs.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}edit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"]);}confirmDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.integrationConfigController.deleteIntegrationConfig(t.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ef({type:e,selectors:[["agentos-platform-integration-configs"]],decls:9,vars:3,consts:[["title","Platform integrations","description","Integration configurations shared across every namespace."],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(n,a){n&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(d){return a.rowFilter.query.set(d)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New integration"),Sf()(),fT(4,z,2,1,"p",3),fT(5,j,2,0,"p",4)(6,A,2,0,"p",5)(7,K,2,0,"p",4)(8,G,14,0,"div",6)),n&2&&(yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{V as PlatformIntegrationConfigsComponent};
|
|
1
|
+
import {O}from'./chunk-BUpnTqhN.js';import {p,g as It,H as Me,a6 as D,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,u as uc,o as sg,q as ag}from'./main-BGDYLHDQ.js';import {i,O as O$1,h as vi,x as xi,P,M}from'./chunk-v6qcikkG.js';import'./chunk-DJoWmwH1.js';var N=(e,t)=>t.id??t.name;function z(e,t){if(e&1&&(za(0,"p",3),n_(1),Sf()),e&2){let n=MT();yb(),Iv(n.deletion.error());}}function j(e,t){e&1&&(za(0,"p",4),n_(1,"Loading integrations\u2026"),Sf());}function A(e,t){e&1&&(za(0,"p",5),n_(1,"No platform integrations defined yet."),Sf());}function K(e,t){e&1&&(za(0,"p",4),n_(1,"No integrations match the current filter."),Sf());}function B(e,t){if(e&1){let n=CT();za(0,"button",18),dc("click",function(){sg(n);let c=MT().$implicit,d=MT(2);return ag(d.edit(c))}),n_(1,"Edit"),Sf();}if(e&2){let n=MT().$implicit;uc("aria-label","Edit "+n.name);}}function H(e,t){if(e&1){let n=CT();za(0,"agentos-row-delete-action",19),dc("deleteRequested",function(){sg(n);let c=MT().$implicit,d=MT(2);return ag(d.deletion.request(c.id))})("deleteConfirmed",function(){sg(n);let c=MT().$implicit,d=MT(2);return ag(d.confirmDelete(c))})("deleteCancelled",function(){sg(n);let c=MT(3);return ag(c.deletion.cancel())}),Sf();}if(e&2){let n=MT().$implicit,a=MT(2);tv("rowKey",n.id)("rowLabel",n.name)("state",a.deletion);}}function U(e,t){if(e&1&&(za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14)(6,"div",15),fT(7,B,2,1,"button",16),fT(8,H,1,3,"agentos-row-delete-action",17),Sf()()()),e&2){let n=t.$implicit,a=MT(2);yb(2),Iv(n.name),yb(2),Iv(n.integrationType),yb(3),hT(a.deletion.confirmingId()!==n.id?7:-1),yb(),hT(n.id?8:-1);}}function G(e,t){if(e&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Type"),Sf(),za(8,"th",10)(9,"span",11),n_(10,"Actions"),Sf()()()(),za(11,"tbody",8),mT(12,U,9,4,"tr",9,N),Sf()()()),e&2){let n=MT();yb(12),yT(n.rowFilter.filteredRows());}}var V=class e{router=p(It);destroyRef=p(Me);state=p(O);integrationConfigController=p(D);refresh$=new De(void 0);isLoading=se(true);deletion=i();configs=se([]);rowFilter=O$1(this.configs,t=>[t.name,t.integrationType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())),U$1(this.destroyRef)).subscribe({next:t=>{this.configs.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}edit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"]);}confirmDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.integrationConfigController.deleteIntegrationConfig(t.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ef({type:e,selectors:[["agentos-platform-integration-configs"]],decls:9,vars:3,consts:[["title","Platform integrations","description","Integration configurations shared across every namespace."],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(n,a){n&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(d){return a.rowFilter.query.set(d)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New integration"),Sf()(),fT(4,z,2,1,"p",3),fT(5,j,2,0,"p",4)(6,A,2,0,"p",5)(7,K,2,0,"p",4)(8,G,14,0,"div",6)),n&2&&(yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{V as PlatformIntegrationConfigsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,O,h as vi,x as xi,C as Ci,P,M}from'./chunk-Btu4vlJn.js';import {c}from'./chunk-LDlaL5qr.js';import {p,g as It,H as Me,s as se,U as U$1,ab as Ee,ag as Se,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,o as sg,q as ag,u as uc}from'./main-ITBV6BE5.js';var I=(n,e)=>e.id??e.name;function z(n,e){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let t=MT();yb(),Iv(t.deletion.error());}}function K(n,e){n&1&&(za(0,"p",4),n_(1,"Loading scheduled prompts\u2026"),Sf());}function j(n,e){n&1&&(za(0,"p",5),n_(1,"No platform scheduled prompts defined yet."),Sf());}function A(n,e){n&1&&(za(0,"p",4),n_(1,"No scheduled prompts match the current filter."),Sf());}function U(n,e){if(n&1&&(za(0,"span",14),n_(1),Sf()),n&2){let t=MT().$implicit;yb(),Iv(t.description);}}function W(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.toggle(d))}),n_(1),Sf(),za(2,"button",21),dc("click",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.edit(d))}),n_(3,"Edit"),Sf();}if(n&2){let t=MT().$implicit;yb(),Iv(t.enabled?"Disable":"Enable"),yb(),uc("aria-label","Edit "+t.name);}}function B(n,e){if(n&1){let t=CT();za(0,"agentos-row-delete-action",22),dc("deleteRequested",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.deletion.request(d.id))})("deleteConfirmed",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.confirmDelete(d))})("deleteCancelled",function(){sg(t);let d=MT(3);return ag(d.deletion.cancel())}),Sf();}if(n&2){let t=MT().$implicit,o=MT(2);tv("rowKey",t.id)("rowLabel",t.name)("state",o.deletion);}}function H(n,e){if(n&1&&(za(0,"tr",9)(1,"td",12)(2,"span",13),n_(3),Sf(),fT(4,U,2,1,"span",14),Sf(),za(5,"td",15),n_(6),Sf(),za(7,"td",16)(8,"ds-tag",17),n_(9),Sf()(),za(10,"td",18)(11,"div",19),fT(12,W,4,2),fT(13,B,1,3,"agentos-row-delete-action",20),Sf()()()),n&2){let t=e.$implicit,o=MT(2);yb(3),Iv(t.name),yb(),hT(t.description?4:-1),yb(2),Iv(o.scheduleLabel(t)),yb(2),tv("variant",t.enabled?"accent":"outline"),yb(),Iv(t.enabled?"Enabled":"Disabled"),yb(3),hT(o.deletion.confirmingId()!==t.id?12:-1),yb(),hT(t.id?13:-1);}}function Y(n,e){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Schedule"),Sf(),za(8,"th",10),n_(9,"Status"),Sf(),za(10,"th",10)(11,"span",11),n_(12,"Actions"),Sf()()()(),za(13,"tbody",8),mT(14,H,14,7,"tr",9,I),Sf()()()),n&2){let t=MT();yb(14),yT(t.rowFilter.filteredRows());}}var N=class n{router=p(It);destroyRef=p(Me);state=p(c);prompts=se([]);isLoading=se(true);deletion=i();rowFilter=O(this.prompts,e=>[e.name,e.description,this.scheduleLabel(e),e.enabled?"Enabled":"Disabled"].filter(Boolean).join(" "));constructor(){this.state.listPlatform().pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.prompts.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}scheduleLabel(e){let{recurrence:t}=e,o=t.unit===Ee.WEEK?"week":"month",d=t.unit===Ee.WEEK&&t.days?.length?` (${t.days.map(c=>Se[c]??c).join(", ")})`:"";return `Every ${o}${d} at ${t.timeUtc} UTC`}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","scheduled-prompts",e.id,"edit"]);}toggle(e){(e.enabled?this.state.disable(e.id??""):this.state.enable(e.id??"")).pipe(U$1(this.destroyRef)).subscribe(o=>this.patchPrompt(o));}confirmDelete(e){if(!e.id)return;let t=e.id;this.deletion.execute(t,{request$:this.state.delete(t).pipe(U$1(this.destroyRef)),onSuccess:()=>this.prompts.update(o=>o.filter(d=>d.id!==t)),errorMessage:`Deleting "${e.name}" failed. Try again.`});}patchPrompt(e){this.prompts.update(t=>t.map(o=>o.id===e.id?e:o));}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-scheduled-prompts"]],decls:9,vars:3,consts:[["title","Platform scheduled prompts","description","Scheduled prompts shared across every namespace."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,o){t&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return o.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return o.openCreateForm()}),n_(3,"New scheduled prompt"),Sf()(),fT(4,z,2,1,"p",3),fT(5,K,2,0,"p",4)(6,j,2,0,"p",5)(7,A,2,0,"p",4)(8,Y,16,0,"div",6)),t&2&&(yb(),tv("query",o.rowFilter.query()),yb(3),hT(o.deletion.error()?4:-1),yb(),hT(o.isLoading()?5:o.prompts().length===0?6:o.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{N as PlatformScheduledPromptsComponent};
|
|
1
|
+
import {i,O,h as vi,x as xi,C as Ci,P,M}from'./chunk-v6qcikkG.js';import {c}from'./chunk-D2CCGovn.js';import {p,g as It,H as Me,s as se,U as U$1,ab as Ee,ag as Se,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,o as sg,q as ag,u as uc}from'./main-BGDYLHDQ.js';var I=(n,e)=>e.id??e.name;function z(n,e){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let t=MT();yb(),Iv(t.deletion.error());}}function K(n,e){n&1&&(za(0,"p",4),n_(1,"Loading scheduled prompts\u2026"),Sf());}function j(n,e){n&1&&(za(0,"p",5),n_(1,"No platform scheduled prompts defined yet."),Sf());}function A(n,e){n&1&&(za(0,"p",4),n_(1,"No scheduled prompts match the current filter."),Sf());}function U(n,e){if(n&1&&(za(0,"span",14),n_(1),Sf()),n&2){let t=MT().$implicit;yb(),Iv(t.description);}}function W(n,e){if(n&1){let t=CT();za(0,"button",21),dc("click",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.toggle(d))}),n_(1),Sf(),za(2,"button",21),dc("click",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.edit(d))}),n_(3,"Edit"),Sf();}if(n&2){let t=MT().$implicit;yb(),Iv(t.enabled?"Disable":"Enable"),yb(),uc("aria-label","Edit "+t.name);}}function B(n,e){if(n&1){let t=CT();za(0,"agentos-row-delete-action",22),dc("deleteRequested",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.deletion.request(d.id))})("deleteConfirmed",function(){sg(t);let d=MT().$implicit,c=MT(2);return ag(c.confirmDelete(d))})("deleteCancelled",function(){sg(t);let d=MT(3);return ag(d.deletion.cancel())}),Sf();}if(n&2){let t=MT().$implicit,o=MT(2);tv("rowKey",t.id)("rowLabel",t.name)("state",o.deletion);}}function H(n,e){if(n&1&&(za(0,"tr",9)(1,"td",12)(2,"span",13),n_(3),Sf(),fT(4,U,2,1,"span",14),Sf(),za(5,"td",15),n_(6),Sf(),za(7,"td",16)(8,"ds-tag",17),n_(9),Sf()(),za(10,"td",18)(11,"div",19),fT(12,W,4,2),fT(13,B,1,3,"agentos-row-delete-action",20),Sf()()()),n&2){let t=e.$implicit,o=MT(2);yb(3),Iv(t.name),yb(),hT(t.description?4:-1),yb(2),Iv(o.scheduleLabel(t)),yb(2),tv("variant",t.enabled?"accent":"outline"),yb(),Iv(t.enabled?"Enabled":"Disabled"),yb(3),hT(o.deletion.confirmingId()!==t.id?12:-1),yb(),hT(t.id?13:-1);}}function Y(n,e){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Schedule"),Sf(),za(8,"th",10),n_(9,"Status"),Sf(),za(10,"th",10)(11,"span",11),n_(12,"Actions"),Sf()()()(),za(13,"tbody",8),mT(14,H,14,7,"tr",9,I),Sf()()()),n&2){let t=MT();yb(14),yT(t.rowFilter.filteredRows());}}var N=class n{router=p(It);destroyRef=p(Me);state=p(c);prompts=se([]);isLoading=se(true);deletion=i();rowFilter=O(this.prompts,e=>[e.name,e.description,this.scheduleLabel(e),e.enabled?"Enabled":"Disabled"].filter(Boolean).join(" "));constructor(){this.state.listPlatform().pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.prompts.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}scheduleLabel(e){let{recurrence:t}=e,o=t.unit===Ee.WEEK?"week":"month",d=t.unit===Ee.WEEK&&t.days?.length?` (${t.days.map(c=>Se[c]??c).join(", ")})`:"";return `Every ${o}${d} at ${t.timeUtc} UTC`}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","scheduled-prompts",e.id,"edit"]);}toggle(e){(e.enabled?this.state.disable(e.id??""):this.state.enable(e.id??"")).pipe(U$1(this.destroyRef)).subscribe(o=>this.patchPrompt(o));}confirmDelete(e){if(!e.id)return;let t=e.id;this.deletion.execute(t,{request$:this.state.delete(t).pipe(U$1(this.destroyRef)),onSuccess:()=>this.prompts.update(o=>o.filter(d=>d.id!==t)),errorMessage:`Deleting "${e.name}" failed. Try again.`});}patchPrompt(e){this.prompts.update(t=>t.map(o=>o.id===e.id?e:o));}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-scheduled-prompts"]],decls:9,vars:3,consts:[["title","Platform scheduled prompts","description","Scheduled prompts shared across every namespace."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,o){t&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return o.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return o.openCreateForm()}),n_(3,"New scheduled prompt"),Sf()(),fT(4,z,2,1,"p",3),fT(5,K,2,0,"p",4)(6,j,2,0,"p",5)(7,A,2,0,"p",4)(8,Y,16,0,"div",6)),t&2&&(yb(),tv("query",o.rowFilter.query()),yb(3),hT(o.deletion.error()?4:-1),yb(),hT(o.isLoading()?5:o.prompts().length===0?6:o.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{N as PlatformScheduledPromptsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a8 as Ae,aE as gw,af as Wn,a3 as _}from'./main-BGDYLHDQ.js';function i(t,o,p){return t.pipe(Ae(()=>o().pipe(Wn(()=>_(p)))),gw({bufferSize:1,refCount:true}))}export{i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i}from'./chunk-
|
|
1
|
+
import {i}from'./chunk-DJoWmwH1.js';import {l}from'./chunk-v6qcikkG.js';import {p,aj as k,a7 as De,as as Ms,a8 as Ae,aE as gw,a3 as _,Y as Le,J as w,Z as R,af as Wn,aA as j}from'./main-BGDYLHDQ.js';var g="none",N="me",O=class p$1{nsController=p(k);userState=p(l);refresh$=new De(void 0);namespaceId$=new De(null);vm$=Ms([this.namespaceId$,this.refresh$]).pipe(Ae(([e])=>{let r=this.loadPlatformProviders().pipe(Wn(()=>_([])));return e?Ms([r,this.loadNamespaceProviders(e).pipe(Wn(()=>_([]))),this.loadUserProviders(e).pipe(Wn(()=>_([]))),this.loadUserProviders("global").pipe(Wn(()=>_([])))]).pipe(j(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Ms([r,this.loadNamespaceProviders("").pipe(Wn(()=>_([]))),this.loadUserProviders("global").pipe(Wn(()=>_([])))]).pipe(j(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),gw({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):_([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(Le(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(Le(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=w({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(Le(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(Le(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p$1)};static \u0275prov=R({token:p$1,factory:p$1.\u0275fac,providedIn:"root"})};export{O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,O,h as vi,x as xi,P,M}from'./chunk-Btu4vlJn.js';import {p,g as It,H as Me,a9 as $$1,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,x as xf,C as CT,o as sg,q as ag,u as uc}from'./main-ITBV6BE5.js';var $=(n,t)=>t.id??t.name;function I(n,t){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let e=MT();yb(),Iv(e.deletion.error());}}function z(n,t){n&1&&(za(0,"p",4),n_(1,"Loading agent configs\u2026"),Sf());}function j(n,t){n&1&&(za(0,"p",5),n_(1,"No platform agent configs defined yet."),Sf());}function K(n,t){n&1&&(za(0,"p",4),n_(1,"No agent configs match the current filter."),Sf());}function B(n,t){if(n&1){let e=CT();za(0,"button",19),dc("click",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.inspect(c))}),n_(1," Inspect "),Sf(),za(2,"button",19),dc("click",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.edit(c))}),n_(3,"Edit"),Sf();}if(n&2){let e=MT().$implicit;uc("aria-label","Inspect "+e.name),yb(2),uc("aria-label","Edit "+e.name);}}function H(n,t){if(n&1){let e=CT();za(0,"agentos-row-delete-action",20),dc("deleteRequested",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.deletion.request(c.id))})("deleteConfirmed",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.confirmDelete(c))})("deleteCancelled",function(){sg(e);let c=MT(3);return ag(c.deletion.cancel())}),Sf();}if(n&2){let e=MT().$implicit,a=MT(2);tv("rowKey",e.id)("rowLabel",e.name)("state",a.deletion);}}function U(n,t){if(n&1&&(za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14),n_(6),Sf(),za(7,"td",15),n_(8),Sf(),za(9,"td",16)(10,"div",17),fT(11,B,4,2),fT(12,H,1,3,"agentos-row-delete-action",18),Sf()()()),n&2){let e=t.$implicit,a=MT(2);yb(2),Iv(e.name),yb(2),xf(" ",e.description||"\u2014"," "),yb(2),Iv(e.modelName||"\u2014"),yb(2),Iv(a.mode(e)),yb(3),hT(a.deletion.confirmingId()!==e.id?11:-1),yb(),hT(e.id?12:-1);}}function G(n,t){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Description"),Sf(),za(8,"th",10),n_(9,"Model"),Sf(),za(10,"th",10),n_(11,"Execution mode"),Sf(),za(12,"th",10)(13,"span",11),n_(14,"Actions"),Sf()()()(),za(15,"tbody",8),mT(16,U,13,6,"tr",9,$),Sf()()()),n&2){let e=MT();yb(16),yT(e.rowFilter.filteredRows());}}var N=class n{router=p(It);destroyRef=p(Me);agentConfigController=p($$1);refresh$=new De(void 0);isLoading=se(true);deletion=i();configs=se([]);rowFilter=O(this.configs,t=>[t.name,t.description,t.modelName,this.mode(t)].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))),U$1(this.destroyRef)).subscribe({next:t=>{this.configs.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}mode(t){return t.executionMode??(t.advancedExecution?"ADVANCED":"SIMPLE")}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}inspect(t){t.id&&this.router.navigate(["/agentos","admin","agent-configs",t.id,"inspect"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","agent-configs",t.id,"edit"]);}confirmDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.agentConfigController.deleteAgentConfig(t.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-agent-configs"]],decls:9,vars:3,consts:[["title","Platform agents","description","Agent configurations shared across every namespace."],["label","Filter agent configs","placeholder","Filter agent configs\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform agents"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Model"],["role","cell","data-label","Execution mode"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(e,a){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(d){return a.rowFilter.query.set(d)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New agent config"),Sf()(),fT(4,I,2,1,"p",3),fT(5,z,2,0,"p",4)(6,j,2,0,"p",5)(7,K,2,0,"p",4)(8,G,18,0,"div",6)),e&2&&(yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{N as PlatformAgentConfigsComponent};
|
|
1
|
+
import {i,O,h as vi,x as xi,P,M}from'./chunk-v6qcikkG.js';import {p,g as It,H as Me,a9 as $$1,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,x as xf,C as CT,o as sg,q as ag,u as uc}from'./main-BGDYLHDQ.js';var $=(n,t)=>t.id??t.name;function I(n,t){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let e=MT();yb(),Iv(e.deletion.error());}}function z(n,t){n&1&&(za(0,"p",4),n_(1,"Loading agent configs\u2026"),Sf());}function j(n,t){n&1&&(za(0,"p",5),n_(1,"No platform agent configs defined yet."),Sf());}function K(n,t){n&1&&(za(0,"p",4),n_(1,"No agent configs match the current filter."),Sf());}function B(n,t){if(n&1){let e=CT();za(0,"button",19),dc("click",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.inspect(c))}),n_(1," Inspect "),Sf(),za(2,"button",19),dc("click",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.edit(c))}),n_(3,"Edit"),Sf();}if(n&2){let e=MT().$implicit;uc("aria-label","Inspect "+e.name),yb(2),uc("aria-label","Edit "+e.name);}}function H(n,t){if(n&1){let e=CT();za(0,"agentos-row-delete-action",20),dc("deleteRequested",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.deletion.request(c.id))})("deleteConfirmed",function(){sg(e);let c=MT().$implicit,d=MT(2);return ag(d.confirmDelete(c))})("deleteCancelled",function(){sg(e);let c=MT(3);return ag(c.deletion.cancel())}),Sf();}if(n&2){let e=MT().$implicit,a=MT(2);tv("rowKey",e.id)("rowLabel",e.name)("state",a.deletion);}}function U(n,t){if(n&1&&(za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14),n_(6),Sf(),za(7,"td",15),n_(8),Sf(),za(9,"td",16)(10,"div",17),fT(11,B,4,2),fT(12,H,1,3,"agentos-row-delete-action",18),Sf()()()),n&2){let e=t.$implicit,a=MT(2);yb(2),Iv(e.name),yb(2),xf(" ",e.description||"\u2014"," "),yb(2),Iv(e.modelName||"\u2014"),yb(2),Iv(a.mode(e)),yb(3),hT(a.deletion.confirmingId()!==e.id?11:-1),yb(),hT(e.id?12:-1);}}function G(n,t){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Description"),Sf(),za(8,"th",10),n_(9,"Model"),Sf(),za(10,"th",10),n_(11,"Execution mode"),Sf(),za(12,"th",10)(13,"span",11),n_(14,"Actions"),Sf()()()(),za(15,"tbody",8),mT(16,U,13,6,"tr",9,$),Sf()()()),n&2){let e=MT();yb(16),yT(e.rowFilter.filteredRows());}}var N=class n{router=p(It);destroyRef=p(Me);agentConfigController=p($$1);refresh$=new De(void 0);isLoading=se(true);deletion=i();configs=se([]);rowFilter=O(this.configs,t=>[t.name,t.description,t.modelName,this.mode(t)].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))),U$1(this.destroyRef)).subscribe({next:t=>{this.configs.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}mode(t){return t.executionMode??(t.advancedExecution?"ADVANCED":"SIMPLE")}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}inspect(t){t.id&&this.router.navigate(["/agentos","admin","agent-configs",t.id,"inspect"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","agent-configs",t.id,"edit"]);}confirmDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.agentConfigController.deleteAgentConfig(t.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-platform-agent-configs"]],decls:9,vars:3,consts:[["title","Platform agents","description","Agent configurations shared across every namespace."],["label","Filter agent configs","placeholder","Filter agent configs\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform agents"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Model"],["role","cell","data-label","Execution mode"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(e,a){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(d){return a.rowFilter.query.set(d)}),Sf(),za(2,"button",2),dc("click",function(){return a.openCreateForm()}),n_(3,"New agent config"),Sf()(),fT(4,I,2,1,"p",3),fT(5,z,2,0,"p",4)(6,j,2,0,"p",5)(7,K,2,0,"p",4)(8,G,18,0,"div",6)),e&2&&(yb(),tv("query",a.rowFilter.query()),yb(3),hT(a.deletion.error()?4:-1),yb(),hT(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{N as PlatformAgentConfigsComponent};
|