@whoz-oss/coday-client 0.243.0 → 0.244.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-TRFKVZGV.js → chunk-2QDRHKK5.js} +1 -1
- package/browser/{chunk-JCKKIKVU.js → chunk-4CNY7Z64.js} +1 -1
- package/browser/{chunk-NEVEN2BG.js → chunk-4FGWE3EW.js} +1 -1
- package/browser/{chunk-HN4TBO7J.js → chunk-5N6DUZII.js} +1 -1
- package/browser/{chunk-IN5SVY4U.js → chunk-5OGZHNUE.js} +1 -1
- package/browser/{chunk-6BMCL5TR.js → chunk-5PVR7BPQ.js} +1 -1
- package/browser/{chunk-36EOCF7B.js → chunk-5Y2Q6WKL.js} +1 -1
- package/browser/{chunk-MZBZJFIH.js → chunk-76HYDFUL.js} +1 -1
- package/browser/{chunk-62AZ3TER.js → chunk-7H4TBVB7.js} +1 -1
- package/browser/{chunk-P3AFMA53.js → chunk-7O6TY5IW.js} +1 -1
- package/browser/{chunk-LU3ZSYWJ.js → chunk-ADEIEQGJ.js} +1 -1
- package/browser/{chunk-PXY6PLET.js → chunk-AK746XRX.js} +1 -1
- package/browser/{chunk-KKYAHLLD.js → chunk-BWBZLC7A.js} +1 -1
- package/browser/{chunk-GBTVBYVO.js → chunk-CSHG3PLJ.js} +1 -1
- package/browser/{chunk-AV3U5ZDG.js → chunk-CU7SABOQ.js} +1 -1
- package/browser/{chunk-WH2T6TJR.js → chunk-ECISS7V2.js} +1 -1
- package/browser/{chunk-QCC2HSMN.js → chunk-ENRRDIUM.js} +1 -1
- package/browser/{chunk-ZS3GOED4.js → chunk-F4ZRQ6MH.js} +1 -1
- package/browser/chunk-FA2MVU23.js +1 -0
- package/browser/{chunk-GWUHK3IY.js → chunk-GLFQ37PU.js} +1 -1
- package/browser/{chunk-YGBFW4ZS.js → chunk-GS2CQHR7.js} +1 -1
- package/browser/{chunk-KH3XUBG3.js → chunk-GSUU7JSY.js} +1 -1
- package/browser/{chunk-6UXZYGDR.js → chunk-H6NBS4JE.js} +1 -1
- package/browser/{chunk-FV7MYI7I.js → chunk-I4RHXOIC.js} +1 -1
- package/browser/{chunk-KZ2MXYPS.js → chunk-KJJPVCIH.js} +1 -1
- package/browser/chunk-KWJJEVAI.js +1 -0
- package/browser/{chunk-QA4DQZOM.js → chunk-LHKOA7FX.js} +1 -1
- package/browser/{chunk-FOUZFGE6.js → chunk-LUB22VNT.js} +1 -1
- package/browser/{chunk-6QIZQ7GE.js → chunk-MFSY4HYK.js} +1 -1
- package/browser/{chunk-LYXZJWHW.js → chunk-MIAKSSSF.js} +1 -1
- package/browser/{chunk-XFS5RNFU.js → chunk-N2NJQ7DJ.js} +1 -1
- package/browser/{chunk-HY5SN7AG.js → chunk-NNUJIQ6R.js} +1 -1
- package/browser/{chunk-TMQGM3DO.js → chunk-NYUYHMIH.js} +1 -1
- package/browser/{chunk-JMRUD2BW.js → chunk-ONZVOEJQ.js} +1 -1
- package/browser/chunk-P6WNH2KJ.js +1 -0
- package/browser/{chunk-VNLBXJU6.js → chunk-QTXEWRHZ.js} +1 -1
- package/browser/{chunk-OY6A2XLL.js → chunk-QXBTTCPM.js} +1 -1
- package/browser/{chunk-NIV7FMON.js → chunk-RQKLSUW5.js} +1 -1
- package/browser/{chunk-UU5QELSX.js → chunk-S5QSZK6N.js} +1 -1
- package/browser/chunk-SFQE4GQ6.js +1 -0
- package/browser/{chunk-RGGNQESF.js → chunk-SZM3NJVZ.js} +1 -1
- package/browser/{chunk-UAHVURDD.js → chunk-TNSH3NBF.js} +1 -1
- package/browser/{chunk-IV7SJSBN.js → chunk-U3AHBQTX.js} +1 -1
- package/browser/{chunk-IYEDRCU5.js → chunk-U7ZJFIOR.js} +1 -1
- package/browser/{chunk-D5BPAYOR.js → chunk-UO7SKQEC.js} +1 -1
- package/browser/{chunk-BLRBIAYK.js → chunk-UQTA3ACH.js} +1 -1
- package/browser/{chunk-35S3IW2A.js → chunk-UWYJO2DN.js} +1 -1
- package/browser/{chunk-M5ZWYOBX.js → chunk-VLDPXI7G.js} +1 -1
- package/browser/{chunk-R2NWLPS6.js → chunk-VVFVGWIQ.js} +1 -1
- package/browser/{chunk-MQEDNZF7.js → chunk-VZOBZ3DD.js} +1 -1
- package/browser/chunk-W7A7CPWM.js +1 -0
- package/browser/{chunk-N2F3TQJA.js → chunk-WMHS3NSI.js} +1 -1
- package/browser/{chunk-4T6SALXS.js → chunk-X5ZRXGFA.js} +1 -1
- package/browser/{chunk-5IIN2VT5.js → chunk-X73LZ3QV.js} +1 -1
- package/browser/{chunk-3MTFWGAR.js → chunk-XAEUGARN.js} +1 -1
- package/browser/chunk-XJYEZL5J.js +1 -0
- package/browser/{chunk-Y37OZMXI.js → chunk-XZRVHU66.js} +1 -1
- package/browser/{chunk-FELLJOVH.js → chunk-ZQZHBROX.js} +1 -1
- package/browser/{chunk-3MREZSO7.js → chunk-ZXQEKBPA.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-YKFAFCDV.js → main-JHPNU2VL.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-57XIXFX3.js +0 -1
- package/browser/chunk-EAVXJ7QN.js +0 -1
- package/browser/chunk-LQOQ3VK5.js +0 -1
- package/browser/chunk-MH3KTYRA.js +0 -1
- package/browser/chunk-QBT6LKOQ.js +0 -1
- package/browser/chunk-TET2CIOZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P,b as O}from"./chunk-
|
|
1
|
+
import{a as P,b as O}from"./chunk-UWYJO2DN.js";import{a as x}from"./chunk-VZOBZ3DD.js";import{d as S}from"./chunk-YFCRBVWD.js";import{b as C,c as M}from"./chunk-6XX7GME4.js";import{Db as d,Fb as y,Ka as _,Tb as u,Vb as T,Wa as c,ca as s,lb as b,mb as f,mc as p,rb as v,sb as a,ta as g,tb as l,ub as m}from"./chunk-CHEXA6RY.js";function N(o,e){if(o&1&&u(0),o&2){let t=y();T(" ",t.userInitials()," ")}}function V(o,e){o&1&&u(0," \u2022\u2022\u2022 ")}var h=class o{router=s(M);userState=s(x);themePort=s(S);namespaceState=s(P);menuOpen=g(!1);isAdmin=p(()=>this.userState.currentUser()?.isAdmin===!0);isDark=p(()=>{let{mode:e}=this.themePort.theme();return e==="dark"?!0:e==="light"?!1:typeof document<"u"&&document.documentElement.getAttribute("data-theme")?.includes("dark")===!0});themeVariant=p(()=>this.themePort.theme().variant);userInitials=p(()=>{let e=this.userState.currentUser();if(!e)return"";let t=e.firstname?.[0]??"",n=e.lastname?.[0]??"";return(t+n).toUpperCase()||e.email?.[0]?.toUpperCase()||""});showTechnical=g(!1);navigateHome(){let e=this.namespaceState.activeNamespaceId();this.router.navigate(["/agentos/home"],e?{queryParams:{ns:e}}:{})}toggleMenu(e){e.stopPropagation(),this.menuOpen.update(t=>!t)}closeMenu(e){e.stopPropagation(),this.menuOpen.set(!1)}onNavigate(e){this.menuOpen.set(!1),this.router.navigate([e])}onThemeToggle(){this.menuOpen.set(!1);let e=this.isDark()?"light":"dark";this.themePort.setTheme({variant:this.themePort.theme().variant,mode:e})}onThemeVariantChanged(e){this.menuOpen.set(!1);let t=this.themePort.theme();this.themePort.setTheme({variant:e,mode:t.mode})}onLogsToggle(){this.menuOpen.set(!1)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=c({type:o,selectors:[["agentos-shell-topbar"]],decls:10,vars:6,consts:[[1,"shell-topbar"],["type","button","title","Home",1,"shell-topbar__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"shell-topbar__logo-img"],[1,"shell-topbar__logo-text"],[1,"shell-topbar__user-menu"],["type","button","title","Menu",1,"shell-topbar__user-btn",3,"click"],["variant","topbar",3,"navigateTo","themeToggled","themeVariantChanged","logsToggled","closed","open","isAdmin","isDark","themeVariant","showTechnical"]],template:function(t,n){t&1&&(a(0,"div",0)(1,"button",1),d("click",function(){return n.navigateHome()}),m(2,"img",2),a(3,"span",3),u(4,"Coday"),l()(),a(5,"div",4)(6,"button",5),d("click",function(r){return n.toggleMenu(r)}),b(7,N,1,1)(8,V,1,0),l(),a(9,"agentos-shell-user-menu",6),d("navigateTo",function(r){return n.onNavigate(r)})("themeToggled",function(){return n.onThemeToggle()})("themeVariantChanged",function(r){return n.onThemeVariantChanged(r)})("logsToggled",function(){return n.onLogsToggle()})("closed",function(r){return n.closeMenu(r)}),l()()()),t&2&&(_(7),f(n.userInitials()?7:8),_(2),v("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("themeVariant",n.themeVariant())("showTechnical",n.showTechnical()))},dependencies:[O],styles:[".shell-topbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 12px;border-bottom:1px solid var(--color-divider);background:var(--color-bg);flex-shrink:0}.shell-topbar__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:0;border:none;background:transparent;cursor:pointer;transition:opacity .14s ease}.shell-topbar__brand[_ngcontent-%COMP%]:hover{opacity:.8}.shell-topbar__logo-img[_ngcontent-%COMP%]{height:28px;width:auto;object-fit:contain;display:block;flex:none}.shell-topbar__logo-text[_ngcontent-%COMP%]{font-weight:700;font-size:18px;color:var(--color-text);letter-spacing:-.02em;white-space:nowrap}.shell-topbar__user-menu[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.shell-topbar__user-btn[_ngcontent-%COMP%]{width:32px;height:32px;flex:none;display:grid;place-items:center;border:1px solid var(--color-divider);background:var(--color-surface);font-family:var(--font-heading);font-weight:600;font-size:13px;color:var(--color-accent-700);cursor:pointer;transition:border-color .14s;border-radius:0}.shell-topbar__user-btn[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}"],changeDetection:0})};var k=class o{static \u0275fac=function(t){return new(t||o)};static \u0275cmp=c({type:o,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(t,n){t&1&&(a(0,"div",0),m(1,"agentos-shell-topbar"),a(2,"main",1),m(3,"router-outlet"),l()())},dependencies:[C,h],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-OY6A2XLL.js";import{c as te}from"./chunk-N2F3TQJA.js";import{a as Z}from"./chunk-LU3ZSYWJ.js";import"./chunk-NWFFZ2FW.js";import{c as X}from"./chunk-RB7N2NWN.js";import{a as W}from"./chunk-MQEDNZF7.js";import{d as Q}from"./chunk-YFCRBVWD.js";import"./chunk-BLRBIAYK.js";import{c as N}from"./chunk-6XX7GME4.js";import{s as q}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as k,c as K}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import{F as J,c as B,g as R,h as A,i as L,l as O,n as j,v as Y,w as H}from"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as f,Db as c,Fb as l,Hc as $,Ka as _,Rb as E,Tb as r,Ub as u,Vb as S,Wa as z,ca as x,ga as p,ha as m,jb as P,kb as w,lb as g,ma as G,mb as v,mc as T,pb as b,qb as h,rb as U,sb as n,t as F,ta as y,tb as t,u as I,ub as M}from"./chunk-CHEXA6RY.js";var V=(o,i)=>i.value;function ie(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function oe(o,i){if(o&1){let e=f();n(0,"button",18),c("click",function(){let s=p(e).$implicit,d=l(2);return m(d.setThemeVariant(s.value))}),n(1,"span",19),r(2),t(),n(3,"span",20),r(4),t()()}if(o&2){let e=i.$implicit,a=l(2);E("user-profile__theme-variant--active",a.themeVariant()===e.value),P("aria-pressed",a.themeVariant()===e.value),_(2),u(e.label),_(2),u(e.description)}}function re(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let s=p(e).$implicit,d=l(2);return m(d.setTheme(s.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=l(2);E("user-profile__segmented-option--active",a.themeMode()===e.value),P("aria-pressed",a.themeMode()===e.value),_(),S(" ",e.label," ")}}function ae(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let s=p(e).$implicit,d=l(2);return m(d.setEnterKeyBehavior(s.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=l(2);E("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),P("aria-pressed",a.enterKeyBehavior()===e.value),_(),S(" ",e.label," ")}}function le(o,i){if(o&1){let e=f();n(0,"form",22),c("ngSubmit",function(){p(e);let s=l(2);return m(s.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",23),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",23),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",24),r(19,"First name"),t(),M(20,"input",25),t(),n(21,"div",7)(22,"label",26),r(23,"Last name"),t(),M(24,"input",27),t(),n(25,"div",7)(26,"label",28),r(27,"Bio"),t(),M(28,"textarea",29),t()(),n(29,"div",30)(30,"button",31),r(31),t(),n(32,"button",32),c("click",function(){p(e);let s=l(2);return m(s.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=l(),a=l();U("formGroup",a.form),_(8),u(e.email),_(5),u(e.externalId),_(17),U("disabled",a.isSaving()),_(),S(" ",a.isSaving()?"Saving\u2026":"Save changes"," ")}}function se(o,i){o&1&&(n(0,"p",40),r(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),t())}function _e(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.confirmDelete(s))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let s=l(7);return m(s.cancelDelete())}),r(5," Cancel "),t()}}function de(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.armDelete(s))}),r(1," Delete "),t()}}function ce(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,_e,6,0)(6,de,2,0,"button",46),t()),o&2){let e=i.$implicit,a=l(6);_(2),u(e.name),_(2),u(e.subtitle),_(),v(a.isPendingDelete(e)?5:6)}}function pe(o,i){if(o&1&&(n(0,"h3",41),r(1,"Integrations"),t(),n(2,"ul",42),b(3,ce,7,3,"li",43,w().trackEntry,!0),t()),o&2){let e=l(5);_(3),h(e.recap().integrations)}}function me(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.confirmDelete(s))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let s=l(7);return m(s.cancelDelete())}),r(5," Cancel "),t()}}function ue(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.armDelete(s))}),r(1," Delete "),t()}}function fe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,me,6,0)(6,ue,2,0,"button",46),t()),o&2){let e=i.$implicit,a=l(6);_(2),u(e.name),_(2),u(e.subtitle),_(),v(a.isPendingDelete(e)?5:6)}}function Ce(o,i){if(o&1&&(n(0,"h3",41),r(1,"AI Providers"),t(),n(2,"ul",42),b(3,fe,7,3,"li",43,w().trackEntry,!0),t()),o&2){let e=l(5);_(3),h(e.recap().aiProviders)}}function ge(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.confirmDelete(s))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let s=l(7);return m(s.cancelDelete())}),r(5," Cancel "),t()}}function ve(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.armDelete(s))}),r(1," Delete "),t()}}function xe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,ge,6,0)(6,ve,2,0,"button",46),t()),o&2){let e=i.$implicit,a=l(6);_(2),u(e.name),_(2),u(e.subtitle),_(),v(a.isPendingDelete(e)?5:6)}}function be(o,i){if(o&1&&(n(0,"h3",41),r(1,"My global auth settings"),t(),n(2,"ul",42),b(3,xe,7,3,"li",43,w().trackEntry,!0),t()),o&2){let e=l(5);_(3),h(e.recap().authSettings)}}function he(o,i){if(o&1&&(g(0,pe,5,0),g(1,Ce,5,0),g(2,be,5,0)),o&2){let e=l(4);v(e.recap().integrations.length>0?0:-1),_(),v(e.recap().aiProviders.length>0?1:-1),_(),v(e.recap().authSettings.length>0?2:-1)}}function ye(o,i){if(o&1&&g(0,se,2,0,"p",40)(1,he,3,3),o&2){let e=l(3);v(e.recap().total===0?0:1)}}function Pe(o,i){if(o&1){let e=f();n(0,"div",17)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",33),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",33),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",33),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",33),r(26),t()(),n(27,"div",34)(28,"span",8),r(29,"Bio"),t(),n(30,"span",33),r(31),t()()(),n(32,"div",30)(33,"button",35),c("click",function(){p(e);let s=l(2);return m(s.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",36)(36,"button",37),c("click",function(){p(e);let s=l(2);return m(s.toggleOverrides())}),n(37,"span",38),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",39),r(41),t()(),g(42,ye,2,1),t()()}if(o&2){let e=l(),a=l();_(8),u(e.email),_(5),u(e.externalId),_(8),u(e.firstname||"\u2014"),_(5),u(e.lastname||"\u2014"),_(5),u(e.bio||"\u2014"),_(5),P("aria-expanded",a.isOverridesExpanded()),_(),E("user-profile__overrides-arrow--open",a.isOverridesExpanded()),_(4),S("(",a.recap().total,")"),_(),v(a.isOverridesExpanded()?42:-1)}}function Ee(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Skin"),t(),n(6,"div",9),b(7,oe,5,5,"button",10,V),t()(),n(9,"div",7)(10,"span",8),r(11,"Mode"),t(),n(12,"div",11),b(13,re,2,4,"button",12,V),t()()(),n(15,"div",5)(16,"h2",6),r(17,"Composer"),t(),n(18,"div",7)(19,"span",8),r(20,"Enter key"),t(),n(21,"div",13)(22,"div",14),b(23,ae,2,4,"button",12,V),t(),n(25,"p",15),r(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(27,le,34,5,"form",16)(28,Pe,43,10,"div",17)),o&2){let e=l();_(7),h(e.themeVariantOptions),_(6),h(e.themeOptions),_(10),h(e.enterKeyOptions),_(4),v(e.isEditing()?27:28)}}function Se(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var ne=class o{userState=x(W);router=x(N);location=x($);destroyRef=x(G);integrationState=x(Z);providerState=x(ee);authSettingState=x(te);themePort=x(Q);preferencesPort=x(X);isEditing=y(!1);isLoading=y(!1);isSaving=y(!1);isOverridesExpanded=y(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=T(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=T(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new L({firstname:new O("",{nonNullable:!0}),lastname:new O("",{nonNullable:!0}),bio:new O("",{nonNullable:!0})});recap=K(I([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(F(([i,e,a])=>{let s=i.map(C=>({category:"integration",id:C.id??"",name:C.name,subtitle:C.integrationType})),d=e.map(C=>({category:"aiProvider",id:C.id??"",name:C.name,subtitle:C.apiType})),D=a.map(C=>({category:"authSetting",id:C.id??"",name:C.name,subtitle:C.authType}));return{integrations:s,aiProviders:d,authSettings:D,total:s.length+d.length+D.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(k(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i})}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode})}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(k(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=y(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(k(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=z({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return a.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,ie,2,0,"p",4)(6,Ee,29,1)(7,Se,2,0,"p",4),t()),e&2){let s;_(5),v(a.isLoading()?5:(s=a.currentUser())?6:7,s)}},dependencies:[J,j,B,R,A,H,Y,q],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"],changeDetection:0})};export{ne as UserProfileComponent};
|
|
1
|
+
import{a as ee}from"./chunk-QXBTTCPM.js";import{c as te}from"./chunk-WMHS3NSI.js";import{a as Z}from"./chunk-ADEIEQGJ.js";import"./chunk-NWFFZ2FW.js";import{c as X}from"./chunk-RB7N2NWN.js";import{a as W}from"./chunk-VZOBZ3DD.js";import{d as Q}from"./chunk-YFCRBVWD.js";import"./chunk-UQTA3ACH.js";import{c as N}from"./chunk-6XX7GME4.js";import{s as q}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as k,c as K}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import{F as J,c as B,g as R,h as A,i as L,l as O,n as j,v as Y,w as H}from"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as f,Db as c,Fb as l,Hc as $,Ka as _,Rb as E,Tb as r,Ub as u,Vb as S,Wa as z,ca as x,ga as p,ha as m,jb as P,kb as w,lb as g,ma as G,mb as v,mc as T,pb as b,qb as h,rb as U,sb as n,t as F,ta as y,tb as t,u as I,ub as M}from"./chunk-CHEXA6RY.js";var V=(o,i)=>i.value;function ie(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function oe(o,i){if(o&1){let e=f();n(0,"button",18),c("click",function(){let s=p(e).$implicit,d=l(2);return m(d.setThemeVariant(s.value))}),n(1,"span",19),r(2),t(),n(3,"span",20),r(4),t()()}if(o&2){let e=i.$implicit,a=l(2);E("user-profile__theme-variant--active",a.themeVariant()===e.value),P("aria-pressed",a.themeVariant()===e.value),_(2),u(e.label),_(2),u(e.description)}}function re(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let s=p(e).$implicit,d=l(2);return m(d.setTheme(s.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=l(2);E("user-profile__segmented-option--active",a.themeMode()===e.value),P("aria-pressed",a.themeMode()===e.value),_(),S(" ",e.label," ")}}function ae(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let s=p(e).$implicit,d=l(2);return m(d.setEnterKeyBehavior(s.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=l(2);E("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),P("aria-pressed",a.enterKeyBehavior()===e.value),_(),S(" ",e.label," ")}}function le(o,i){if(o&1){let e=f();n(0,"form",22),c("ngSubmit",function(){p(e);let s=l(2);return m(s.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",23),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",23),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",24),r(19,"First name"),t(),M(20,"input",25),t(),n(21,"div",7)(22,"label",26),r(23,"Last name"),t(),M(24,"input",27),t(),n(25,"div",7)(26,"label",28),r(27,"Bio"),t(),M(28,"textarea",29),t()(),n(29,"div",30)(30,"button",31),r(31),t(),n(32,"button",32),c("click",function(){p(e);let s=l(2);return m(s.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=l(),a=l();U("formGroup",a.form),_(8),u(e.email),_(5),u(e.externalId),_(17),U("disabled",a.isSaving()),_(),S(" ",a.isSaving()?"Saving\u2026":"Save changes"," ")}}function se(o,i){o&1&&(n(0,"p",40),r(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),t())}function _e(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.confirmDelete(s))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let s=l(7);return m(s.cancelDelete())}),r(5," Cancel "),t()}}function de(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.armDelete(s))}),r(1," Delete "),t()}}function ce(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,_e,6,0)(6,de,2,0,"button",46),t()),o&2){let e=i.$implicit,a=l(6);_(2),u(e.name),_(2),u(e.subtitle),_(),v(a.isPendingDelete(e)?5:6)}}function pe(o,i){if(o&1&&(n(0,"h3",41),r(1,"Integrations"),t(),n(2,"ul",42),b(3,ce,7,3,"li",43,w().trackEntry,!0),t()),o&2){let e=l(5);_(3),h(e.recap().integrations)}}function me(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.confirmDelete(s))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let s=l(7);return m(s.cancelDelete())}),r(5," Cancel "),t()}}function ue(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.armDelete(s))}),r(1," Delete "),t()}}function fe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,me,6,0)(6,ue,2,0,"button",46),t()),o&2){let e=i.$implicit,a=l(6);_(2),u(e.name),_(2),u(e.subtitle),_(),v(a.isPendingDelete(e)?5:6)}}function Ce(o,i){if(o&1&&(n(0,"h3",41),r(1,"AI Providers"),t(),n(2,"ul",42),b(3,fe,7,3,"li",43,w().trackEntry,!0),t()),o&2){let e=l(5);_(3),h(e.recap().aiProviders)}}function ge(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.confirmDelete(s))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let s=l(7);return m(s.cancelDelete())}),r(5," Cancel "),t()}}function ve(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let s=l().$implicit,d=l(6);return m(d.armDelete(s))}),r(1," Delete "),t()}}function xe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,ge,6,0)(6,ve,2,0,"button",46),t()),o&2){let e=i.$implicit,a=l(6);_(2),u(e.name),_(2),u(e.subtitle),_(),v(a.isPendingDelete(e)?5:6)}}function be(o,i){if(o&1&&(n(0,"h3",41),r(1,"My global auth settings"),t(),n(2,"ul",42),b(3,xe,7,3,"li",43,w().trackEntry,!0),t()),o&2){let e=l(5);_(3),h(e.recap().authSettings)}}function he(o,i){if(o&1&&(g(0,pe,5,0),g(1,Ce,5,0),g(2,be,5,0)),o&2){let e=l(4);v(e.recap().integrations.length>0?0:-1),_(),v(e.recap().aiProviders.length>0?1:-1),_(),v(e.recap().authSettings.length>0?2:-1)}}function ye(o,i){if(o&1&&g(0,se,2,0,"p",40)(1,he,3,3),o&2){let e=l(3);v(e.recap().total===0?0:1)}}function Pe(o,i){if(o&1){let e=f();n(0,"div",17)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",33),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",33),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",33),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",33),r(26),t()(),n(27,"div",34)(28,"span",8),r(29,"Bio"),t(),n(30,"span",33),r(31),t()()(),n(32,"div",30)(33,"button",35),c("click",function(){p(e);let s=l(2);return m(s.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",36)(36,"button",37),c("click",function(){p(e);let s=l(2);return m(s.toggleOverrides())}),n(37,"span",38),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",39),r(41),t()(),g(42,ye,2,1),t()()}if(o&2){let e=l(),a=l();_(8),u(e.email),_(5),u(e.externalId),_(8),u(e.firstname||"\u2014"),_(5),u(e.lastname||"\u2014"),_(5),u(e.bio||"\u2014"),_(5),P("aria-expanded",a.isOverridesExpanded()),_(),E("user-profile__overrides-arrow--open",a.isOverridesExpanded()),_(4),S("(",a.recap().total,")"),_(),v(a.isOverridesExpanded()?42:-1)}}function Ee(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Skin"),t(),n(6,"div",9),b(7,oe,5,5,"button",10,V),t()(),n(9,"div",7)(10,"span",8),r(11,"Mode"),t(),n(12,"div",11),b(13,re,2,4,"button",12,V),t()()(),n(15,"div",5)(16,"h2",6),r(17,"Composer"),t(),n(18,"div",7)(19,"span",8),r(20,"Enter key"),t(),n(21,"div",13)(22,"div",14),b(23,ae,2,4,"button",12,V),t(),n(25,"p",15),r(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(27,le,34,5,"form",16)(28,Pe,43,10,"div",17)),o&2){let e=l();_(7),h(e.themeVariantOptions),_(6),h(e.themeOptions),_(10),h(e.enterKeyOptions),_(4),v(e.isEditing()?27:28)}}function Se(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var ne=class o{userState=x(W);router=x(N);location=x($);destroyRef=x(G);integrationState=x(Z);providerState=x(ee);authSettingState=x(te);themePort=x(Q);preferencesPort=x(X);isEditing=y(!1);isLoading=y(!1);isSaving=y(!1);isOverridesExpanded=y(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=T(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=T(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new L({firstname:new O("",{nonNullable:!0}),lastname:new O("",{nonNullable:!0}),bio:new O("",{nonNullable:!0})});recap=K(I([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(F(([i,e,a])=>{let s=i.map(C=>({category:"integration",id:C.id??"",name:C.name,subtitle:C.integrationType})),d=e.map(C=>({category:"aiProvider",id:C.id??"",name:C.name,subtitle:C.apiType})),D=a.map(C=>({category:"authSetting",id:C.id??"",name:C.name,subtitle:C.authType}));return{integrations:s,aiProviders:d,authSettings:D,total:s.length+d.length+D.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(k(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i})}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode})}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(k(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=y(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(k(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=z({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return a.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,ie,2,0,"p",4)(6,Ee,29,1)(7,Se,2,0,"p",4),t()),e&2){let s;_(5),v(a.isLoading()?5:(s=a.currentUser())?6:7,s)}},dependencies:[J,j,B,R,A,H,Y,q],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"],changeDetection:0})};export{ne as UserProfileComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-NYUYHMIH.js";import"./chunk-UWYJO2DN.js";import"./chunk-VZOBZ3DD.js";import"./chunk-YFCRBVWD.js";import"./chunk-UQTA3ACH.js";import"./chunk-6XX7GME4.js";import"./chunk-CHEXA6RY.js";export{a as LayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./chunk-
|
|
1
|
+
import{c as a}from"./chunk-7H4TBVB7.js";import"./chunk-X73LZ3QV.js";import"./chunk-5N6DUZII.js";import"./chunk-H6NBS4JE.js";import"./chunk-UQTA3ACH.js";import"./chunk-6XX7GME4.js";import"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import"./chunk-CHEXA6RY.js";export{a as AdminUsersGroupsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk-NWFFZ2FW.js";import{a as f}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-NWFFZ2FW.js";import{a as f}from"./chunk-VZOBZ3DD.js";import{d as m}from"./chunk-UQTA3ACH.js";import{D as a,P as h,S as A,V as d,Z as b,a as P,ca as c,i as v,m as o,t as u,u as l}from"./chunk-CHEXA6RY.js";var g="none",N="me",O=class p{nsController=c(m);userState=c(f);refresh$=new v(void 0);namespaceId$=new v(null);vm$=l([this.namespaceId$,this.refresh$]).pipe(A(([e])=>{let r=this.loadPlatformProviders().pipe(a(()=>o([])));return e?l([r,this.loadNamespaceProviders(e).pipe(a(()=>o([]))),this.loadUserProviders(e).pipe(a(()=>o([]))),this.loadUserProviders("global").pipe(a(()=>o([])))]).pipe(u(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):l([r,this.loadNamespaceProviders("").pipe(a(()=>o([]))),this.loadUserProviders("global").pipe(a(()=>o([])))]).pipe(u(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),h({bufferSize:1,refCount:!0}));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$=y(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):o([])}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(d(()=>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(d(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=P({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(d(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(d(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=b({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-KB2ABAWC.js";import{b as B}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-KB2ABAWC.js";import{b as B}from"./chunk-UQTA3ACH.js";import{c as x}from"./chunk-6XX7GME4.js";import{s as $,z as k}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as l}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as b,Db as s,Fb as m,Lc as T,Pb as P,S as d,Wa as y,ab as h,ca as r,cc as w,fc as I,ga as C,gc as M,ha as _,i as p,jc as R,lb as v,ma as u,mb as A,rb as g,sb as a,t as c,tb as f}from"./chunk-CHEXA6RY.js";var S=()=>[];function F(n,t){if(n&1){let e=b();a(0,"agentos-agent-config-item",4),s("deleteRequested",function(o){C(e);let E=m(2);return _(E.deleteConfig(o))}),f()}n&2&&g("config",t)("platformMode",!0)}function L(n,t){if(n&1&&v(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,i=t.$implicit,o=m();A((e=o.resolveConfig(i.id))?0:-1,e)}}var q=class n{router=r(x);destroyRef=r(u);agentConfigController=r(B);refresh$=new p(void 0);configs$=this.refresh$.pipe(d(()=>this.agentConfigController.listPlatformAgentsAgentConfig(!0)));configItems$=this.configs$.pipe(c(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(l(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(l(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:6,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,i){if(e&1&&(a(0,"ds-entity-list",1),I(1,"async"),s("createRequested",function(){return i.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return i.goBack()}),f()(),h(3,L,1,1,"ng-template",null,0,R)),e&2){let o=P(4);g("items",M(1,3,i.configItems$)??w(5,S))("showCreate",!0)("itemTemplate",o)}},dependencies:[k,D,$,T],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as PlatformAgentConfigsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./chunk-KB2ABAWC.js";import{b as O}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-KB2ABAWC.js";import{b as O}from"./chunk-UQTA3ACH.js";import{a as E,c as $}from"./chunk-6XX7GME4.js";import{z as D}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as c}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as x,D as u,Db as p,Fb as r,Lc as T,Pb as N,S as _,Tb as w,Wa as b,ab as v,ca as a,cc as M,fc as P,ga as y,gc as B,ha as h,i as f,jc as k,lb as I,m as l,ma as A,mb as R,rb as g,sb as s,t as d,tb as m,z as C}from"./chunk-CHEXA6RY.js";var F=()=>[];function U(o,t){if(o&1){let n=x();s(0,"agentos-agent-config-item",4),p("deleteRequested",function(i){y(n);let q=r(2);return h(q.deleteConfig(i))}),m()}if(o&2){let n=r().$implicit,e=r();g("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id))}}function V(o,t){if(o&1&&I(0,U,1,3,"agentos-agent-config-item",3),o&2){let n,e=t.$implicit,i=r();R((n=i.resolveConfig(e.id))?0:-1,n)}}var j="namespace",G="platform",S=class o{route=a(E);router=a($);destroyRef=a(A);agentConfigController=a(O);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new f(void 0);allConfigs$=this.refresh$.pipe(_(()=>C({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(u(()=>l([])))})));configItems$=this.allConfigs$.pipe(d(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(c(this.destroyRef)).subscribe(({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(c(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.namespaceConfigsById.get(t)??this.platformConfigsById.get(t)??null}isPlatformConfig(t){return this.platformConfigsById.has(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=b({type:o,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId","readOnly"],[3,"deleteRequested","config","namespaceId","readOnly"]],template:function(n,e){if(n&1&&(s(0,"ds-entity-list",1),P(1,"async"),p("createRequested",function(){return e.openCreateForm()}),s(2,"button",2),p("click",function(){return e.goBack()}),w(3," \u2190 Namespaces "),m()(),v(4,V,1,1,"ng-template",null,0,k)),n&2){let i=N(5);g("items",B(1,3,e.configItems$)??M(5,F))("showCreate",!0)("itemTemplate",i)}},dependencies:[D,L,T],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{S as NamespaceAgentConfigsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as l,Xc as u,Z as g,ca as m,m as c,t as p}from"./chunk-CHEXA6RY.js";var f=class s{http=m(u);agentsCache=new Map;getAgents(e){let t=this.agentsCache.get(e);return t?c(t):this.http.get(`/api/projects/${e}/agents`).pipe(l(o=>{this.agentsCache.set(e,o)}))}getAgentsAutocomplete(e,t){return this.getAgents(e).pipe(p(o=>{if(!t)return o;let i=t.toLowerCase(),a=r=>{let n=r.name.toLowerCase();return n.startsWith(i)?0:n.includes(i)?1:2};return o.filter(r=>{let n=r.name.toLowerCase(),h=r.description?.toLowerCase()||"";return n.includes(i)||h.includes(i)}).sort((r,n)=>a(r)-a(n))}))}clearCache(e){this.agentsCache.delete(e)}clearAllCache(){this.agentsCache.clear()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=g({token:s,factory:s.\u0275fac,providedIn:"root"})};export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
1
|
+
import{b as a}from"./chunk-XZRVHU66.js";import"./chunk-Y42FQQZC.js";import"./chunk-UQTA3ACH.js";import"./chunk-6XX7GME4.js";import"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import"./chunk-CHEXA6RY.js";export{a as NamespaceListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-AIC4U2MU.js";import{a as B}from"./chunk-TFW43ZTS.js";import{c as K}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-AIC4U2MU.js";import{a as B}from"./chunk-TFW43ZTS.js";import{c as K}from"./chunk-WMHS3NSI.js";import{a as V}from"./chunk-KJJPVCIH.js";import"./chunk-NWFFZ2FW.js";import"./chunk-VZOBZ3DD.js";import"./chunk-UQTA3ACH.js";import{a as N,c as $}from"./chunk-6XX7GME4.js";import{s as L,z as P}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as l}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as b,Db as u,Fb as o,Ka as A,Lc as M,Pb as x,S as f,Tb as E,Ub as w,Wa as v,ab as C,ca as a,cc as D,fc as O,ga as c,gc as T,ha as m,jc as q,lb as I,m as _,ma as S,mb as R,rb as h,sb as p,t as g,ta as y,tb as d}from"./chunk-CHEXA6RY.js";var W=()=>[];function z(s,e){if(s&1&&(p(0,"p",3),E(1),d()),s&2){let t=o().$implicit;A(),w(t.name)}}function U(s,e){if(s&1){let t=b();p(0,"agentos-auth-setting-item",5),u("editRequested",function(){let n=c(t),r=o(2);return m(r.onEdit(n))})("deleteRequested",function(){let n=c(t),r=o(2);return m(r.onDelete(n))})("duplicateRequested",function(){let n=c(t),r=o(2);return m(r.onDuplicate(n))}),d()}if(s&2){let t=e,i=o(2);h("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!i.isAdmin())}}function X(s,e){if(s&1&&I(0,z,2,1,"p",3)(1,U,1,3,"agentos-auth-setting-item",4),s&2){let t,i=e.$implicit,n=o();R(n.isEmptyPlaceholder(i.id)?0:(t=n.resolve(i.id))?1:-1,t)}}var k=Object.freeze({platform:"Platform (read-only)",namespace:"Auth Settings du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class s{route=a(N);router=a($);destroyRef=a(S);state=a(K);namespaceRole=a(V);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=y(!1);listItems$=this.state.vm$.pipe(g(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(l(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(g(e=>e.get("namespaceId")??""),f(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(!1)),l(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(l(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(i=>{i.id&&t.set(this.itemKey("platform",i.id),{config:i,scope:"platform"})}),e.namespace.forEach(i=>{i.id&&t.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),e.userOnNs.forEach(i=>{i.id&&t.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),e.userGlobal.forEach(i=>{i.id&&t.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"auth-settings","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"auth-settings",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(l(this.destroyRef)).subscribe({error:i=>{console.error(`[AuthSettingsAllScopes] Delete failed for ${e.scope}:${t}:`,i)}})}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="platform"||e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"auth-settings","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucun Auth Setting",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.authType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=v({type:s,selectors:[["agentos-auth-settings-all-scopes"]],decls:5,vars:6,consts:[["authSettingItemTpl",""],["title","Auth Settings","emptyMessage","No auth settings available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"auth-settings-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,i){if(t&1&&(p(0,"ds-entity-list",1),O(1,"async"),u("createRequested",function(){return i.openCreateForm()}),p(2,"ds-icon-button",2),u("action",function(){return i.goBack()}),d()(),C(3,X,2,1,"ng-template",null,0,q)),t&2){let n=x(4);h("items",T(1,3,i.listItems$)??D(5,W))("showCreate",!0)("itemTemplate",n)}},dependencies:[P,B,L,M],encapsulation:2,changeDetection:0})};export{j as AuthSettingsAllScopesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./chunk-
|
|
1
|
+
import{a as I}from"./chunk-76HYDFUL.js";import{a as T}from"./chunk-UO7SKQEC.js";import"./chunk-UQTA3ACH.js";import{c as w}from"./chunk-6XX7GME4.js";import{s as x,z as q}from"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import{a as p}from"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import{Bb as C,Db as c,Fb as s,Pb as S,Wa as P,ab as b,ca as m,ga as d,ha as a,jc as v,lb as g,ma as f,mb as y,mc as R,rb as u,sb as l,ta as h,tb as _}from"./chunk-CHEXA6RY.js";function M(i,e){if(i&1){let t=C();l(0,"agentos-scheduled-prompt-item",4),c("enableRequested",function(n){d(t);let r=s(2);return a(r.enablePrompt(n))})("disableRequested",function(n){d(t);let r=s(2);return a(r.disablePrompt(n))})("deleteRequested",function(n){d(t);let r=s(2);return a(r.deletePrompt(n))}),_()}i&2&&u("definition",e)("platformMode",!0)}function E(i,e){if(i&1&&g(0,M,1,2,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=s();y((t=n.resolvePrompt(o.id))?0:-1,t)}}var D=class i{router=m(w);destroyRef=m(f);state=m(T);prompts=h([]);promptItems=R(()=>this.prompts().map(e=>({id:e.id??"",name:e.name,description:e.description,badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]})));constructor(){this.state.listPlatform().pipe(p(this.destroyRef)).subscribe(e=>this.prompts.set(e))}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"])}enablePrompt(e){this.state.enable(e.id??"").pipe(p(this.destroyRef)).subscribe(t=>this.patchPrompt(t))}disablePrompt(e){this.state.disable(e.id??"").pipe(p(this.destroyRef)).subscribe(t=>this.patchPrompt(t))}deletePrompt(e){let t=e.id??"";this.state.delete(t).pipe(p(this.destroyRef)).subscribe(()=>this.prompts.update(o=>o.filter(n=>n.id!==t)))}resolvePrompt(e){return this.prompts().find(t=>t.id===e)??null}patchPrompt(e){this.prompts.update(t=>t.map(o=>o.id===e.id?e:o))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=P({type:i,selectors:[["agentos-platform-scheduled-prompts"]],decls:4,vars:3,consts:[["scheduledPromptItemTpl",""],["title","Platform Scheduled Prompts","emptyMessage","No platform scheduled prompts defined yet. Add one above.","cardMinWidth","420px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"definition","platformMode"],[3,"enableRequested","disableRequested","deleteRequested","definition","platformMode"]],template:function(t,o){if(t&1&&(l(0,"ds-entity-list",1),c("createRequested",function(){return o.openCreateForm()}),l(1,"ds-icon-button",2),c("action",function(){return o.goBack()}),_()(),b(2,E,1,1,"ng-template",null,0,v)),t&2){let n=S(3);u("items",o.promptItems())("showCreate",!0)("itemTemplate",n)}},dependencies:[q,I,x],encapsulation:2,changeDetection:0})};export{D as PlatformScheduledPromptsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-MIAKSSSF.js";import"./chunk-5N6DUZII.js";import"./chunk-UQTA3ACH.js";import"./chunk-6XX7GME4.js";import"./chunk-VNO76B3S.js";import"./chunk-E6T6QLQT.js";import"./chunk-SPV5SLNS.js";import"./chunk-VMYKE4ZC.js";import"./chunk-AS2L77JV.js";import"./chunk-7OGOI6WM.js";import"./chunk-G5RWG2GK.js";import"./chunk-CHEXA6RY.js";export{a as UserGroupFormComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a}from"./chunk-
|
|
1
|
+
import{n as a}from"./chunk-UQTA3ACH.js";import{Z as d,ca as l}from"./chunk-CHEXA6RY.js";var c=class r{api=l(a);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=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
|