@whoz-oss/coday-client 0.0.0-workstream-setup.1 → 0.0.0-workstream-setup.2
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-9cpQMoAd.js +1 -0
- package/browser/chunk-B1Nog3dE.js +1 -0
- package/browser/chunk-B7G-MNkT.js +1 -0
- package/browser/chunk-BCJA7bFu.js +1 -0
- package/browser/{chunk-BNj-wCnj.js → chunk-BII6MVUu.js} +1 -1
- package/browser/chunk-BJrwmdl-.js +1 -0
- package/browser/chunk-BKaEMSfP.js +1 -0
- package/browser/chunk-BPjB2rWX.js +1 -0
- package/browser/chunk-BR671ZLY.js +1 -0
- package/browser/chunk-BZjD1zM4.js +1 -0
- package/browser/chunk-Br8oMRUu.js +1 -0
- package/browser/chunk-BwaGDohj.js +1 -0
- package/browser/chunk-C0XiMqTW.js +1 -0
- package/browser/chunk-C14iwT1w.js +1 -0
- package/browser/chunk-C1yvA3jw.js +1 -0
- package/browser/chunk-CHJXG3wJ.js +1 -0
- package/browser/chunk-CHPpcA2G.js +1 -0
- package/browser/chunk-COHjo-Jp.js +1 -0
- package/browser/chunk-COzaHmfp.js +1 -0
- package/browser/chunk-CQ05yOcz.js +1 -0
- package/browser/chunk-CRuhVWpi.js +1 -0
- package/browser/chunk-CU-j5moy.js +2 -0
- package/browser/{chunk-DeU8BNKs.js → chunk-CYL9HTvZ.js} +20 -20
- package/browser/chunk-CdUP0dJ-.js +1 -0
- package/browser/chunk-ClOo1Oze.js +1 -0
- package/browser/chunk-CloBhy8t.js +1 -0
- package/browser/chunk-CnMzeCMs.js +1 -0
- package/browser/chunk-D26Ed-Th.js +2 -0
- package/browser/{chunk-CWBB8w7b.js → chunk-DDYuo5zb.js} +1 -1
- package/browser/chunk-DDa-ifYC.js +1 -0
- package/browser/{chunk-CThY55t_.js → chunk-DEwjKbj3.js} +1 -1
- package/browser/chunk-DUGrrCnI.js +1 -0
- package/browser/chunk-DgOIXCSV.js +1 -0
- package/browser/chunk-DjUwsQik.js +1 -0
- package/browser/chunk-DoMcbTlm.js +1 -0
- package/browser/chunk-DxvXsKS2.js +1 -0
- package/browser/chunk-GiktkthB.js +2 -0
- package/browser/chunk-L2kXgHRq.js +2 -0
- package/browser/chunk-NvEhRz93.js +1 -0
- package/browser/chunk-RArvmBGj.js +1 -0
- package/browser/chunk-_GtPVGB4.js +1 -0
- package/browser/chunk-aLhJF16h.js +1 -0
- package/browser/chunk-bv3j4BcQ.js +1 -0
- package/browser/chunk-feo0yqKD.js +1 -0
- package/browser/chunk-r46KsI6A.js +1 -0
- package/browser/chunk-ui_HO1B0.js +1 -0
- package/browser/index.html +1 -1
- package/browser/main-M4AJNG7R.js +564 -0
- package/package.json +1 -1
- package/browser/chunk-8ziZP6eZ.js +0 -1
- package/browser/chunk-BDLp-ZYV.js +0 -1
- package/browser/chunk-BSoUrKjA.js +0 -1
- package/browser/chunk-BeF06sa8.js +0 -1
- package/browser/chunk-BfnsaKEQ.js +0 -1
- package/browser/chunk-BjWFifLN.js +0 -1
- package/browser/chunk-BpxpsVwc.js +0 -1
- package/browser/chunk-C0FQGAyJ.js +0 -1
- package/browser/chunk-C9impEqR.js +0 -1
- package/browser/chunk-CSHhGArs.js +0 -1
- package/browser/chunk-CUb8DbKD.js +0 -1
- package/browser/chunk-CV-gTKa-.js +0 -1
- package/browser/chunk-CYUbkIam.js +0 -1
- package/browser/chunk-Ccsb_DD4.js +0 -1
- package/browser/chunk-CmjosVBl.js +0 -1
- package/browser/chunk-CwanJrTJ.js +0 -2
- package/browser/chunk-CwfG9zVU.js +0 -1
- package/browser/chunk-CyjSOa0y.js +0 -1
- package/browser/chunk-D-k-td5v.js +0 -1
- package/browser/chunk-D09dkUhb.js +0 -1
- package/browser/chunk-DKxZ6CuQ.js +0 -1
- package/browser/chunk-DP6s4oBJ.js +0 -1
- package/browser/chunk-DQKg5ye0.js +0 -1
- package/browser/chunk-DSpQezoR.js +0 -1
- package/browser/chunk-Dl26A7iW.js +0 -1
- package/browser/chunk-DpwRREpt.js +0 -1
- package/browser/chunk-Dq6EJFcA.js +0 -1
- package/browser/chunk-DqjuLLth.js +0 -1
- package/browser/chunk-DsnC7Igd.js +0 -1
- package/browser/chunk-DuftbzC7.js +0 -1
- package/browser/chunk-FCY6Ge9r.js +0 -1
- package/browser/chunk-Igl-pLIH.js +0 -1
- package/browser/chunk-OK5bFYgh.js +0 -1
- package/browser/chunk-Seecdlmn.js +0 -1
- package/browser/chunk-_d37zVO8.js +0 -1
- package/browser/chunk-i0DUddkK.js +0 -1
- package/browser/chunk-ltBsJxQd.js +0 -1
- package/browser/chunk-mO25lHnl.js +0 -2
- package/browser/chunk-uH70pttg.js +0 -1
- package/browser/chunk-yUuTWtWb.js +0 -1
- package/browser/chunk-yelvfuUJ.js +0 -2
- package/browser/main-TDJVWWJW.js +0 -564
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {v}from'./chunk-DQKg5ye0.js';import {R,q,J}from'./chunk-DKxZ6CuQ.js';import {p,$ as $t,c as It,M as Me,i as ie,E as Mi,F as Sg,x,w,v as vf,z as za,f as dc,r as r_,C as Cf,h as hT,a as yb,I as Iv,d as pT,e as bT,n as yT,J as mT,s as sS,l as lc,N as NT,t as tv,g as cS,o as vT,R as Rf,H as dT,k as ig,m as sg,ag as WT,V as uc}from'./main-TDJVWWJW.js';import {F,v as vt,a as ve,$,U,K as Kn,z as zn,Z as Zn,X as Xn,Y as Ye,e as bt,g as fn,L as Ln,W as Wn,b as pn,V as Vn}from'./chunk-DeU8BNKs.js';import'./chunk-DuftbzC7.js';function se(i,t){i&1&&(za(0,"p",5),r_(1,"Loading\u2026"),Cf());}function ce(i,t){if(i&1&&(za(0,"label",23),lc(1,"input",24),sS(),za(2,"span"),r_(3),Cf()()),i&2){let e=t.$implicit,o=NT(3);yb(),tv("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),cS(),yb(2),Iv(e.label);}}function de(i,t){if(i&1&&(za(0,"fieldset",8)(1,"legend",22),r_(2,"Configuration scope"),Cf(),yT(3,ce,4,4,"label",23,dT().trackByScope,true),Cf()),i&2){let e=NT(2);tv("disabled",e.isEditMode()),yb(3),vT(e.scopeOptions);}}function ue(i,t){if(i&1&&(za(0,"option",13),r_(1),Cf()),i&2){let e=t.$implicit,o=NT(2);tv("value",e),yb(),Iv(o.authTypeLabel[e]);}}function pe(i,t){i&1&&r_(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(za(0,"span",11),r_(1,"*"),Cf());}function me(i,t){if(i&1&&(za(0,"p",28),r_(1),Cf()),i&2){let e=NT(2).$implicit;tv("id","as-hint-"+e.key),yb(),Iv(e.hint);}}function ge(i,t){if(i&1&&(lc(0,"input",27),sS(),hT(1,me,2,2,"p",28)),i&2){let e=NT().$implicit;WT("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),tv("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),uc("aria-describedby",e.hint?"as-hint-"+e.key:null),cS(),yb(),pT(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(za(0,"div",9)(1,"label",26),r_(2),hT(3,he,2,0,"span",11),Cf(),hT(4,ge,2,9),Cf()),i&2){let e,o=t.$implicit,l=NT(3);yb(),tv("for","as-cred-"+o.key),yb(),Rf(" ",o.label," "),yb(),pT(o.required?3:-1),yb(),pT((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(za(0,"fieldset",18)(1,"legend",22),r_(2,"Credentials"),Cf(),za(3,"p",25),r_(4," Values are stored encrypted and masked on read. "),hT(5,pe,1,0),Cf(),yT(6,Ce,5,4,"div",9,dT().trackByField,true),Cf()),i&2){let e=NT(2);yb(5),pT(e.isEditMode()?5:-1),yb(),vT(e.credentialFields());}}function ye(i,t){if(i&1){let e=bT();za(0,"form",7),dc("ngSubmit",function(){ig(e);let l=NT();return sg(l.submit())}),hT(1,de,5,1,"fieldset",8),za(2,"div",9)(3,"label",10),r_(4,"Auth type "),za(5,"span",11),r_(6,"*"),Cf()(),za(7,"select",12),yT(8,ue,2,2,"option",13,mT),Cf(),sS(),Cf(),za(10,"div",9)(11,"label",14),r_(12,"Name "),za(13,"span",11),r_(14,"*"),Cf()(),lc(15,"input",15),sS(),Cf(),za(16,"div",9)(17,"label",16),r_(18,"Description"),Cf(),lc(19,"input",17),sS(),Cf(),hT(20,fe,8,1,"fieldset",18),za(21,"div",19)(22,"button",20),r_(23),Cf(),za(24,"button",21),dc("click",function(){ig(e);let l=NT();return sg(l.cancel())}),r_(25,"Cancel"),Cf()()();}if(i&2){let e=NT();tv("formGroup",e.form),yb(),pT(e.isPlatformMode?-1:1),yb(6),tv("formControl",e.authTypeControl),cS(),yb(),vT(e.authTypeOptions),yb(7),tv("formControl",e.nameControl),cS(),yb(4),tv("formControl",e.descriptionControl),cS(),yb(),pT(e.credentialFields().length>0?20:-1),yb(2),tv("disabled",e.form.invalid||e.isSubmitting()),yb(),Rf(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=p($t);router=p(It);destroyRef=p(Me);state=p(R);namespaceRole=p(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?ie(true):F(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new vt("",{nonNullable:true,validators:[ve.required,ve.minLength(1)]});descriptionControl=new vt(null);authTypeControl=new vt("ApiKeyAuthSetting",{nonNullable:true,validators:[ve.required]});scopeControl=new vt("namespace",{nonNullable:true});form=new $({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new vt("",{nonNullable:true});usernameControl=new vt("",{nonNullable:true});passwordControl=new vt("",{nonNullable:true});tokenControl=new vt("",{nonNullable:true});discoveryUrlControl=new vt("",{nonNullable:true});authorizationUrlControl=new vt("",{nonNullable:true});tokenUrlControl=new vt("",{nonNullable:true});clientIdControl=new vt("",{nonNullable:true});clientSecretControl=new vt("",{nonNullable:true});scopesControl=new vt("",{nonNullable:true});resourceUrlControl=new vt("",{nonNullable:true});selectedAuthType=F(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=Mi(()=>Se[this.selectedAuthType()]);isEditMode=ie(false);isSubmitting=ie(false);isLoading=ie(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Sg(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return x(w({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=vf({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],template:function(e,o){e&1&&(za(0,"div",0)(1,"header",1)(2,"button",2),dc("click",function(){return o.cancel()}),za(3,"span",3),r_(4,"\u2190"),Cf(),r_(5," Auth Settings "),Cf(),za(6,"h1",4),r_(7),Cf()(),hT(8,se,2,0,"p",5)(9,ye,26,8,"form",6),Cf()),e&2&&(yb(7),Iv(o.isEditMode()?"Edit auth setting":"New auth setting"),yb(),pT(o.isLoading()?8:9));},dependencies:[Kn,zn,Zn,Xn,Ye,bt,fn,Ln,Wn,pn,Vn],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
|
|
2
|
-
export{le as AuthSettingFormComponent};
|