@whoz-oss/coday-client 0.0.0-workstream-forge.65 → 0.0.0-workstream-forge.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/browser/{chunk-D0USK5Yq.js → chunk-2t-QHl0W.js} +1 -1
  2. package/browser/{chunk-B_8TDKeE.js → chunk-AHK6HGPe.js} +1 -1
  3. package/browser/{chunk-D6hGJ6YX.js → chunk-ATgNOWkK.js} +1 -1
  4. package/browser/{chunk-CsMUwwcd.js → chunk-B-mj1HR1.js} +1 -1
  5. package/browser/{chunk-BOcnunjn.js → chunk-B7yxQyAn.js} +1 -1
  6. package/browser/{chunk-C-6RTgAZ.js → chunk-B83JWOtZ.js} +1 -1
  7. package/browser/{chunk-BSmepPVh.js → chunk-BDeYSkN4.js} +1 -1
  8. package/browser/{chunk-BZjVerRG.js → chunk-BEuXdJQf.js} +1 -1
  9. package/browser/{chunk-CwxxXcFZ.js → chunk-BF3foyjU.js} +1 -1
  10. package/browser/{chunk-GlF4inb-.js → chunk-BIRzexGn.js} +1 -1
  11. package/browser/{chunk-anDGeyE3.js → chunk-BNay3e-G.js} +1 -1
  12. package/browser/{chunk-DbHxgnUq.js → chunk-BOPHsR1_.js} +1 -1
  13. package/browser/{chunk-B-6WAFA-.js → chunk-Blt2T5wZ.js} +1 -1
  14. package/browser/{chunk-CZ12Yv_M.js → chunk-Boh9u1mY.js} +1 -1
  15. package/browser/{chunk-COHuUt5B.js → chunk-BopO6pgk.js} +1 -1
  16. package/browser/{chunk-CuuXR9YP.js → chunk-BylXhJTe.js} +1 -1
  17. package/browser/{chunk-DUFmnFdi.js → chunk-C0vyhlhc.js} +1 -1
  18. package/browser/{chunk-GS9_9ceN.js → chunk-C2C1pjWU.js} +1 -1
  19. package/browser/{chunk-DO7TwkAq.js → chunk-C2xywUSG.js} +1 -1
  20. package/browser/{chunk-JtTqbSid.js → chunk-C4RSgmrG.js} +1 -1
  21. package/browser/{chunk-DYiBOnOJ.js → chunk-C57FBJtd.js} +1 -1
  22. package/browser/{chunk-Dk8r5H0q.js → chunk-C713_252.js} +1 -1
  23. package/browser/{chunk-CdQCwGFV.js → chunk-C9UO1QNG.js} +1 -1
  24. package/browser/chunk-CCEcMZYC.js +1 -0
  25. package/browser/{chunk-CVRxFUyf.js → chunk-CCwVrfaD.js} +1 -1
  26. package/browser/{chunk-BMnuN14O.js → chunk-CKxonl8C.js} +1 -1
  27. package/browser/{chunk-jIfw_PC_.js → chunk-CLBOwqh3.js} +1 -1
  28. package/browser/{chunk-BOAI5ge0.js → chunk-CXLS6Iv7.js} +1 -1
  29. package/browser/{chunk-IYxRUup1.js → chunk-CY_CLbWU.js} +1 -1
  30. package/browser/{chunk-CwuipI7Z.js → chunk-C_zIRflT.js} +1 -1
  31. package/browser/{chunk-B-DS6ki3.js → chunk-Ca4haLWd.js} +1 -1
  32. package/browser/{chunk-C5JU9a2o.js → chunk-Cb3kK_XC.js} +1 -1
  33. package/browser/{chunk-CBH8wibm.js → chunk-ChOdWe6r.js} +1 -1
  34. package/browser/{chunk-BCttGDXW.js → chunk-CktM4P55.js} +1 -1
  35. package/browser/{chunk-4K5hHib_.js → chunk-CrRrVDt5.js} +1 -1
  36. package/browser/{chunk-BYw5USy3.js → chunk-CsTVgFLH.js} +1 -1
  37. package/browser/{chunk-C8IZyYcB.js → chunk-Csr7VIHh.js} +1 -1
  38. package/browser/{chunk-D79OOapI.js → chunk-CtRSSD3G.js} +1 -1
  39. package/browser/{chunk-CqRTqd6Z.js → chunk-CvMcXodM.js} +1 -1
  40. package/browser/{chunk-BgRJISk_.js → chunk-CzFepzGx.js} +1 -1
  41. package/browser/{chunk-D1iVqkC-.js → chunk-D2-aqky2.js} +1 -1
  42. package/browser/chunk-D4OxjDZx.js +1 -0
  43. package/browser/{chunk-B1oPfGcw.js → chunk-DBc83clG.js} +1 -1
  44. package/browser/{chunk-MPwVPAEF.js → chunk-DHGT679z.js} +1 -1
  45. package/browser/{chunk-azyy6zJZ.js → chunk-DHXcTJd4.js} +1 -1
  46. package/browser/{chunk-R6nJn7U7.js → chunk-DIbyq-pi.js} +1 -1
  47. package/browser/{chunk-CyGjNyw-.js → chunk-DJmDymTy.js} +1 -1
  48. package/browser/{chunk-Dc4-4Yrs.js → chunk-DJqicwZR.js} +1 -1
  49. package/browser/{chunk-B0cVxbzt.js → chunk-DSp3HWcz.js} +1 -1
  50. package/browser/{chunk-2YKAEvke.js → chunk-DTMu0pNZ.js} +1 -1
  51. package/browser/{chunk-B9ncNn10.js → chunk-DTSe8Y8G.js} +1 -1
  52. package/browser/{chunk-CyicveV7.js → chunk-DWrbjO-p.js} +3 -3
  53. package/browser/{chunk-D4C0ng3W.js → chunk-DmTbxvkY.js} +1 -1
  54. package/browser/{chunk-b73fer0C.js → chunk-Dn6iylsP.js} +1 -1
  55. package/browser/{chunk-CnfwYCgY.js → chunk-Do4XyiHj.js} +1 -1
  56. package/browser/{chunk-9aXAYZyt.js → chunk-DqrHPt-q.js} +1 -1
  57. package/browser/{chunk-DgaUbtqk.js → chunk-Dsoq_6o1.js} +1 -1
  58. package/browser/{chunk-DqNTiY_9.js → chunk-Dt-BGR_Q.js} +1 -1
  59. package/browser/{chunk-B-oXmITo.js → chunk-DxhC1knR.js} +1 -1
  60. package/browser/{chunk-DKixWkg0.js → chunk-DyZlB6KT.js} +1 -1
  61. package/browser/{chunk-CEBB3ofc.js → chunk-DzjCayGU.js} +1 -1
  62. package/browser/{chunk-_YlUuoZh.js → chunk-E-3poV_C.js} +1 -1
  63. package/browser/{chunk-D57U8fQt.js → chunk-G_g3MZNN.js} +1 -1
  64. package/browser/{chunk-BkR1JSfR.js → chunk-JMhwx22q.js} +1 -1
  65. package/browser/{chunk-BlWKAatb.js → chunk-bWcTAN0r.js} +1 -1
  66. package/browser/{chunk-CPWQzRgy.js → chunk-cgQrnfiy.js} +1 -1
  67. package/browser/{chunk-D5sNDeNr.js → chunk-fsNuuRJ2.js} +1 -1
  68. package/browser/{chunk-CoWTfQzy.js → chunk-gzI6XL5J.js} +1 -1
  69. package/browser/{chunk-DrAmLY--.js → chunk-iDWpy9Dk.js} +1 -1
  70. package/browser/{chunk-BhVB1n2Z.js → chunk-qPQUT1Yt.js} +1 -1
  71. package/browser/{chunk-CFh1rBhG.js → chunk-uBSfW6h7.js} +1 -1
  72. package/browser/index.html +1 -1
  73. package/browser/{main-WZWRVXRT.js → main-56O5AYOU.js} +1 -1
  74. package/package.json +1 -1
  75. package/browser/chunk-B8RPMVfN.js +0 -1
  76. package/browser/chunk-CuwxO_DS.js +0 -1
@@ -1 +1 @@
1
- import {O}from'./chunk-B1oPfGcw.js';import {N as N$1}from'./chunk-BMnuN14O.js';import {g,G,C as Ce,d9 as D,aJ as Tr,a as Gi,bS as va,r as re,b as U,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-WZWRVXRT.js';import'./chunk-CyicveV7.js';import {$ as $n,S as Se}from'./chunk-D6hGJ6YX.js';import'./chunk-B-6WAFA-.js';import'./chunk-4K5hHib_.js';import'./chunk-CuwxO_DS.js';import'./chunk-JtTqbSid.js';var F=()=>[];function N(i,t){if(i&1){let e=lC();ws(0,"agentos-integration-config-item",4),Rg("editRequested",function(n){If(e);let f=gC(2);return wf(f.onEdit(n))})("deleteRequested",function(n){If(e);let f=gC(2);return wf(f.deleteConfig(n))}),pl();}i&2&&bg("config",t);}function j(i,t){if(i&1&&Jw(0,N,1,1,"agentos-integration-config-item",3),i&2){let e,o=t.$implicit,n=gC();eC((e=n.resolveConfig(o.id))?0:-1,e);}}var V=class i{router=g(G);destroyRef=g(Ce);state=g(N$1);integrationConfigController=g(D);refresh$=new Tr(void 0);isLoading=Gi(true);configs$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())));configItems$=this.configs$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"]);}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-platform-integration-configs"]],decls:5,vars:7,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(e,o){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return o.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(3,j,1,1,"ng-template",null,0,fT)),e&2){let n=CC(4);bg("items",uT(1,4,o.configItems$)??rT(6,F))("loading",o.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[$n,O,Se,xb],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{V as PlatformIntegrationConfigsComponent};
1
+ import {O}from'./chunk-DBc83clG.js';import {N as N$1}from'./chunk-CKxonl8C.js';import {g,G,C as Ce,d9 as D,aJ as Tr,a as Gi,bS as va,r as re,b as U,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-56O5AYOU.js';import'./chunk-DWrbjO-p.js';import {$ as $n,S as Se}from'./chunk-ATgNOWkK.js';import'./chunk-Blt2T5wZ.js';import'./chunk-CrRrVDt5.js';import'./chunk-CCEcMZYC.js';import'./chunk-C4RSgmrG.js';var F=()=>[];function N(i,t){if(i&1){let e=lC();ws(0,"agentos-integration-config-item",4),Rg("editRequested",function(n){If(e);let f=gC(2);return wf(f.onEdit(n))})("deleteRequested",function(n){If(e);let f=gC(2);return wf(f.deleteConfig(n))}),pl();}i&2&&bg("config",t);}function j(i,t){if(i&1&&Jw(0,N,1,1,"agentos-integration-config-item",3),i&2){let e,o=t.$implicit,n=gC();eC((e=n.resolveConfig(o.id))?0:-1,e);}}var V=class i{router=g(G);destroyRef=g(Ce);state=g(N$1);integrationConfigController=g(D);refresh$=new Tr(void 0);isLoading=Gi(true);configs$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())));configItems$=this.configs$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"]);}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-platform-integration-configs"]],decls:5,vars:7,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(e,o){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return o.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(3,j,1,1,"ng-template",null,0,fT)),e&2){let n=CC(4);bg("items",uT(1,4,o.configItems$)??rT(6,F))("loading",o.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[$n,O,Se,xb],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{V as PlatformIntegrationConfigsComponent};
@@ -1 +1 @@
1
- import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-9aXAYZyt.js';import {O}from'./chunk-B1oPfGcw.js';import {N}from'./chunk-BMnuN14O.js';import {g,ao as V,G,C as Ce,a as Gi,r as re,b as U$1,bS as va,W as br,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,n as GC,X as XE,a8 as Yg,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-WZWRVXRT.js';import'./chunk-CyicveV7.js';import {$ as $n,S as Se}from'./chunk-D6hGJ6YX.js';import'./chunk-B-6WAFA-.js';import'./chunk-4K5hHib_.js';import'./chunk-CuwxO_DS.js';import'./chunk-JtTqbSid.js';var z=()=>[];function W(o,e){if(o&1&&(ws(0,"p",3),GC(1),pl()),o&2){let t=gC().$implicit;XE(),Yg(t.name);}}function U(o,e){if(o&1){let t=lC();ws(0,"agentos-integration-config-item",5),Rg("editRequested",function(){let i=If(t),r=gC(2);return wf(r.onEdit(i))})("deleteRequested",function(){let i=If(t),r=gC(2);return wf(r.onDelete(i))})("duplicateRequested",function(){let i=If(t),r=gC(2);return wf(r.onDuplicate(i))}),pl();}if(o&2){let t=e,n=gC(2);bg("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!n.isAdmin());}}function X(o,e){if(o&1&&Jw(0,W,2,1,"p",3)(1,U,1,3,"agentos-integration-config-item",4),o&2){let t,n=e.$implicit,i=gC();eC(i.isEmptyPlaceholder(n.id)?0:(t=i.resolve(n.id))?1:-1,t);}}var k=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class o{route=g(V);router=g(G);destroyRef=g(Ce);state=g(N);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Gi(false);listItems$=this.state.vm$.pipe(re(e=>this.toListItems(e)));isLoading=Gi(true);resolved=new Map;ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(re(e=>e.get("namespaceId")??""),va(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe(e=>{this.isLoading.set(false);let t=new Map;e.platform.forEach(n=>{n.id&&t.set(this.itemKey("platform",n.id),{config:n,scope:"platform"});}),e.namespace.forEach(n=>{n.id&&t.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"});}),e.userOnNs.forEach(n=>{n.id&&t.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"});}),e.userGlobal.forEach(n=>{n.id&&t.set(this.itemKey("userGlobal",n.id),{config:n,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,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}onEdit(e){let t=e.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",t,"edit"],{queryParams:{scope:e.scope}});}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(U$1(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${e.scope}:${t}:`,n);}});}onDuplicate(e){if(!e.config.id)return;let n=(e.scope==="namespace"||e.scope==="platform")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,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:"Aucune configuration",groupKey:e,groupLabel:k[e]}]:t.filter(n=>!!n.id).map(n=>({id:this.itemKey(e,n.id),name:n.name,description:n.integrationType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:7,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,n){if(t&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return n.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return n.goBack()}),pl()(),Eg(3,X,2,1,"ng-template",null,0,fT)),t&2){let i=CC(4);bg("items",uT(1,4,n.listItems$)??rT(6,z))("loading",n.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,O,Se,xb],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"]})};export{j as IntegrationsAllScopesComponent};
1
+ import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-DqrHPt-q.js';import {O}from'./chunk-DBc83clG.js';import {N}from'./chunk-CKxonl8C.js';import {g,ao as V,G,C as Ce,a as Gi,r as re,b as U$1,bS as va,W as br,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,n as GC,X as XE,a8 as Yg,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-56O5AYOU.js';import'./chunk-DWrbjO-p.js';import {$ as $n,S as Se}from'./chunk-ATgNOWkK.js';import'./chunk-Blt2T5wZ.js';import'./chunk-CrRrVDt5.js';import'./chunk-CCEcMZYC.js';import'./chunk-C4RSgmrG.js';var z=()=>[];function W(o,e){if(o&1&&(ws(0,"p",3),GC(1),pl()),o&2){let t=gC().$implicit;XE(),Yg(t.name);}}function U(o,e){if(o&1){let t=lC();ws(0,"agentos-integration-config-item",5),Rg("editRequested",function(){let i=If(t),r=gC(2);return wf(r.onEdit(i))})("deleteRequested",function(){let i=If(t),r=gC(2);return wf(r.onDelete(i))})("duplicateRequested",function(){let i=If(t),r=gC(2);return wf(r.onDuplicate(i))}),pl();}if(o&2){let t=e,n=gC(2);bg("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!n.isAdmin());}}function X(o,e){if(o&1&&Jw(0,W,2,1,"p",3)(1,U,1,3,"agentos-integration-config-item",4),o&2){let t,n=e.$implicit,i=gC();eC(i.isEmptyPlaceholder(n.id)?0:(t=i.resolve(n.id))?1:-1,t);}}var k=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class o{route=g(V);router=g(G);destroyRef=g(Ce);state=g(N);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Gi(false);listItems$=this.state.vm$.pipe(re(e=>this.toListItems(e)));isLoading=Gi(true);resolved=new Map;ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(re(e=>e.get("namespaceId")??""),va(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe(e=>{this.isLoading.set(false);let t=new Map;e.platform.forEach(n=>{n.id&&t.set(this.itemKey("platform",n.id),{config:n,scope:"platform"});}),e.namespace.forEach(n=>{n.id&&t.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"});}),e.userOnNs.forEach(n=>{n.id&&t.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"});}),e.userGlobal.forEach(n=>{n.id&&t.set(this.itemKey("userGlobal",n.id),{config:n,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,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}onEdit(e){let t=e.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",t,"edit"],{queryParams:{scope:e.scope}});}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(U$1(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${e.scope}:${t}:`,n);}});}onDuplicate(e){if(!e.config.id)return;let n=(e.scope==="namespace"||e.scope==="platform")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,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:"Aucune configuration",groupKey:e,groupLabel:k[e]}]:t.filter(n=>!!n.id).map(n=>({id:this.itemKey(e,n.id),name:n.name,description:n.integrationType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:7,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,n){if(t&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return n.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return n.goBack()}),pl()(),Eg(3,X,2,1,"ng-template",null,0,fT)),t&2){let i=CC(4);bg("items",uT(1,4,n.listItems$)??rT(6,z))("loading",n.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,O,Se,xb],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"]})};export{j as IntegrationsAllScopesComponent};
@@ -1 +1 @@
1
- import {P}from'./chunk-DqNTiY_9.js';import {g,ao as V$1,G as G$1,C as Ce,da as $,aJ as Tr,a as Gi,bS as va,Q as By,a7 as ya,W as br,r as re,b as U$1,e as xw,aK as xb,k as ws,bf as aT,q as Rg,n as GC,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-WZWRVXRT.js';import {$ as $n}from'./chunk-D6hGJ6YX.js';import'./chunk-B-6WAFA-.js';import'./chunk-4K5hHib_.js';var U=()=>[];function V(i,t){if(i&1){let n=lC();ws(0,"agentos-agent-config-item",4),Rg("deleteRequested",function(o){If(n);let F=gC(2);return wf(F.deleteConfig(o))}),pl();}if(i&2){let n=gC().$implicit,e=gC();bg("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id));}}function j(i,t){if(i&1&&Jw(0,V,1,3,"agentos-agent-config-item",3),i&2){let n,e=t.$implicit,o=gC();eC((n=o.resolveConfig(e.id))?0:-1,n);}}var G="namespace",K="platform",q=class i{route=g(V$1);router=g(G$1);destroyRef=g(Ce);agentConfigController=g($);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Gi(true);allConfigs$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),By({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(ya(()=>br([])))}))));configItems$=this.allConfigs$.pipe(re(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:K,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U$1(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||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:7,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","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&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return e.openCreateForm()}),ws(2,"button",2),Rg("click",function(){return e.goBack()}),GC(3," \u2190 Namespaces "),pl()(),Eg(4,j,1,1,"ng-template",null,0,fT)),n&2){let o=CC(5);bg("items",uT(1,4,e.configItems$)??rT(6,U))("loading",e.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[$n,P,xb],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}"]})};export{q as NamespaceAgentConfigsComponent};
1
+ import {P}from'./chunk-Dt-BGR_Q.js';import {g,ao as V$1,G as G$1,C as Ce,da as $,aJ as Tr,a as Gi,bS as va,Q as By,a7 as ya,W as br,r as re,b as U$1,e as xw,aK as xb,k as ws,bf as aT,q as Rg,n as GC,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-56O5AYOU.js';import {$ as $n}from'./chunk-ATgNOWkK.js';import'./chunk-Blt2T5wZ.js';import'./chunk-CrRrVDt5.js';var U=()=>[];function V(i,t){if(i&1){let n=lC();ws(0,"agentos-agent-config-item",4),Rg("deleteRequested",function(o){If(n);let F=gC(2);return wf(F.deleteConfig(o))}),pl();}if(i&2){let n=gC().$implicit,e=gC();bg("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id));}}function j(i,t){if(i&1&&Jw(0,V,1,3,"agentos-agent-config-item",3),i&2){let n,e=t.$implicit,o=gC();eC((n=o.resolveConfig(e.id))?0:-1,n);}}var G="namespace",K="platform",q=class i{route=g(V$1);router=g(G$1);destroyRef=g(Ce);agentConfigController=g($);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Gi(true);allConfigs$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),By({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(ya(()=>br([])))}))));configItems$=this.allConfigs$.pipe(re(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:K,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U$1(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||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:7,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","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&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return e.openCreateForm()}),ws(2,"button",2),Rg("click",function(){return e.goBack()}),GC(3," \u2190 Namespaces "),pl()(),Eg(4,j,1,1,"ng-template",null,0,fT)),n&2){let o=CC(5);bg("items",uT(1,4,e.configItems$)??rT(6,U))("loading",e.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[$n,P,xb],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}"]})};export{q as NamespaceAgentConfigsComponent};
@@ -1 +1 @@
1
- import {i}from'./chunk-CuwxO_DS.js';import {l}from'./chunk-CyicveV7.js';import {g as g$1,df as N$1,aJ as Tr,aD as Ly,bS as va,a7 as ya,W as br,r as re,cE as Ad,bU as Od,w,Y as x}from'./main-WZWRVXRT.js';var g="none",N="me",O=class p{nsController=g$1(N$1);userState=g$1(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Ly([this.namespaceId$,this.refresh$]).pipe(va(([e])=>{let r=this.loadPlatformProviders().pipe(ya(()=>br([])));return e?Ly([r,this.loadNamespaceProviders(e).pipe(ya(()=>br([]))),this.loadUserProviders(e).pipe(ya(()=>br([]))),this.loadUserProviders("global").pipe(ya(()=>br([])))]).pipe(re(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Ly([r,this.loadNamespaceProviders("").pipe(ya(()=>br([]))),this.loadUserProviders("global").pipe(ya(()=>br([])))]).pipe(re(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),Ad({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):br([])}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(Od(()=>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(Od(()=>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(Od(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(Od(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
1
+ import {i}from'./chunk-CCEcMZYC.js';import {l}from'./chunk-DWrbjO-p.js';import {g as g$1,df as N$1,aJ as Tr,aD as Ly,bS as va,a7 as ya,W as br,r as re,cE as Ad,bU as Od,w,Y as x}from'./main-56O5AYOU.js';var g="none",N="me",O=class p{nsController=g$1(N$1);userState=g$1(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Ly([this.namespaceId$,this.refresh$]).pipe(va(([e])=>{let r=this.loadPlatformProviders().pipe(ya(()=>br([])));return e?Ly([r,this.loadNamespaceProviders(e).pipe(ya(()=>br([]))),this.loadUserProviders(e).pipe(ya(()=>br([]))),this.loadUserProviders("global").pipe(ya(()=>br([])))]).pipe(re(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Ly([r,this.loadNamespaceProviders("").pipe(ya(()=>br([]))),this.loadUserProviders("global").pipe(ya(()=>br([])))]).pipe(re(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),Ad({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):br([])}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(Od(()=>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(Od(()=>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(Od(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(Od(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};