diff --git a/dist/599.1192fda69cdd6559.js b/dist/599.1192fda69cdd6559.js new file mode 100644 index 00000000..17d3d79e --- /dev/null +++ b/dist/599.1192fda69cdd6559.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[599],{62810:(U,A,i)=>{i.d(A,{E:()=>b});var _,M=i(97582),f=i(96814),l=i(56223),h=i(32296),d=i(17700),a=i(64170),p=i(2032),m=i(98525),g=i(75986),I=i(42346),E=i(86806),S=i(30977),T=i(78791),e=i(67961),y=i(41609),C=i(94664),t=i(65879),x=i(65763);function u(c,s){if(1&c&&(t.TgZ(0,"mat-form-field",11)(1,"mat-label"),t._uU(2),t.ALo(3,"transloco"),t.qZA(),t._UZ(4,"input",12),t.qZA()),2&c){const o=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,"path")),t.xp6(2),t.Q6J("formControl",o.storagePath)}}function n(c,s){if(1&c&&(t.ynx(0),t.YNc(1,u,5,4,"mat-form-field",10),t.BQk()),2&c){const o=t.oxw();t.xp6(1),t.Q6J("ngIf",!o.storageServiceId||!o.storageServiceId.getRawValue())}}function r(c,s){if(1&c){const o=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(o);const v=t.oxw(2);return t.KtG(v.deleteCache())}),t._uU(1),t.ALo(2,"transloco"),t.qZA()}2&c&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"scripts.deleteCache")," "))}function D(c,s){if(1&c){const o=t.EpF();t.TgZ(0,"div",13)(1,"button",14),t.NdJ("click",function(){t.CHM(o);const v=t.oxw();return t.KtG(v.viewLatest())}),t._uU(2),t.ALo(3,"transloco"),t.qZA(),t.YNc(4,r,3,3,"button",15),t.qZA()}if(2&c){const o=t.oxw();t.xp6(1),t.Q6J("disabled",!o.storageServiceId||!o.storageServiceId.getRawValue()),t.xp6(1),t.hij(" ",t.lcZ(3,3,"scripts.viewLatest")," "),t.xp6(2),t.Q6J("ngIf",o.cache)}}function Z(c,s){1&c&&(t.TgZ(0,"span"),t._uU(1,"Script Contents"),t.qZA())}i(6625);let b=((_=class{constructor(s,o,O,v,P){this.dialog=s,this.fileService=o,this.cacheService=O,this.baseService=v,this.themeService=P,this.storageServices=[],this.checked=!1,this.isDarkMode=this.themeService.darkMode$,this.baseService.getAll({additionalParams:[{key:"group",value:"source control,file"}]}).subscribe(R=>{this.storageServices=R.services})}ngOnInit(){this.storageServiceId.getRawValue()&&this.storagePath.addValidators([l.kI.required]),this.storageServiceId.valueChanges.subscribe(s=>{this.storagePath.reset(),s?this.storagePath.addValidators([l.kI.required]):this.storagePath.hasValidator(l.kI.required)&&this.storagePath.removeValidators([l.kI.required]),this.storagePath.updateValueAndValidity()})}fileUpload(s){const o=s.target;o.files&&(0,S.Vu)(o.files[0]).subscribe(O=>{this.content.setValue(O)})}githubImport(){this.dialog.open(e.e).afterClosed().subscribe(o=>{o&&this.content.setValue(window.atob(o.data.content))})}viewLatest(){const s=`${this.storageServices.find(o=>o.id===this.storageServiceId.getRawValue())?.name}/${this.storagePath.getRawValue()}`;s.endsWith(".json")?this.fileService.downloadJson(s).subscribe(o=>this.content.setValue(o)):this.fileService.downloadFile(s).pipe((0,C.w)(o=>(0,S.Vu)(o))).subscribe(o=>this.content.setValue(o))}deleteCache(){this.cache&&this.cacheService.delete(`_event/${this.cache}`,{snackbarSuccess:"scripts.deleteCacheSuccessMsg"}).subscribe()}}).\u0275fac=function(s){return new(s||_)(t.Y36(d.uw),t.Y36(E.PA),t.Y36(E.OP),t.Y36(E.PA),t.Y36(x.F))},_.\u0275cmp=t.Xpm({type:_,selectors:[["df-script-editor"]],inputs:{isScript:"isScript",cache:"cache",type:"type",storageServiceId:"storageServiceId",storagePath:"storagePath",content:"content"},standalone:!0,features:[t.jDz],decls:18,vars:18,consts:[[1,"details-section"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],["type","button","mat-flat-button","",1,"save-btn",3,"disabled","click"],[3,"ngModel","ngModelChange"],[4,"ngIf"],["class","actions",4,"ngIf"],[1,"content"],[1,"full-width",3,"formControl","mode"],["class","full-width","subscriptSizing","dynamic",4,"ngIf"],["subscriptSizing","dynamic",1,"full-width"],["matInput","",3,"formControl"],[1,"actions"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["mat-flat-button","","color","primary","type","button",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button",3,"click"]],template:function(s,o){if(1&s){const O=t.EpF();t.TgZ(0,"div",0),t.ALo(1,"async"),t.TgZ(2,"div",1)(3,"input",2,3),t.NdJ("change",function(P){return o.fileUpload(P)}),t.qZA(),t.TgZ(5,"button",4),t.NdJ("click",function(){t.CHM(O);const P=t.MAs(4);return t.KtG(P.click())}),t._uU(6),t.ALo(7,"transloco"),t.qZA(),t.TgZ(8,"button",4),t.NdJ("click",function(){return o.githubImport()}),t._uU(9),t.ALo(10,"transloco"),t.qZA()(),t.TgZ(11,"mat-checkbox",5),t.NdJ("ngModelChange",function(P){return o.checked=P}),t._uU(12," Add path to file"),t.qZA(),t.YNc(13,n,2,1,"ng-container",6),t.YNc(14,D,5,5,"div",7),t.TgZ(15,"div",8),t.YNc(16,Z,2,0,"span",6),t._UZ(17,"df-ace-editor",9),t.qZA()()}2&s&&(t.Tol(t.lcZ(1,12,o.isDarkMode)?"dark-theme":""),t.xp6(5),t.Q6J("disabled",!o.storageServiceId),t.xp6(1),t.hij(" ",t.lcZ(7,14,"desktopFile")," "),t.xp6(2),t.Q6J("disabled",!o.storageServiceId),t.xp6(1),t.hij(" ",t.lcZ(10,16,"githubFile")," "),t.xp6(2),t.Q6J("ngModel",o.checked),t.xp6(2),t.Q6J("ngIf",o.checked),t.xp6(1),t.Q6J("ngIf",o.storageServiceId.getRawValue()),t.xp6(2),t.Q6J("ngIf",o.isScript),t.xp6(1),t.Q6J("formControl",o.content)("mode",o.type.getRawValue()))},dependencies:[h.ot,h.lW,I.Ot,f.O5,a.lN,a.KE,a.hX,m.LD,g.p9,g.oG,l.u5,l.Fj,l.JJ,l.On,d.Is,p.c,p.Nt,y.C,f.Ov,l.UX,l.oH],styles:[".actions[_ngcontent-%COMP%]{display:flex;gap:16px}.content[_ngcontent-%COMP%]{margin-top:8px;display:flex;flex-direction:column;gap:6px;width:100%}.content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:20px}"]}),_);b=(0,M.gn)([(0,T.c)({checkProperties:!0})],b)},67961:(U,A,i)=>{i.d(A,{e:()=>_});var C,M=i(97582),f=i(17700),l=i(32296),h=i(2032),d=i(64170),a=i(56223),p=i(26306),m=i(58504),g=i(96814),I=i(42346),E=i(86806),S=i(78791),e=i(65879);function t(u,n){1&u&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&u&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"scripts.errors.githubImport")," "))}function x(u,n){1&u&&(e.TgZ(0,"mat-form-field")(1,"mat-label"),e._uU(2,"GitHub Username"),e.qZA(),e._UZ(3,"input",9),e.qZA())}function L(u,n){1&u&&(e.TgZ(0,"mat-form-field")(1,"mat-label"),e._uU(2,"GitHub Token"),e.qZA(),e._UZ(3,"input",10),e.qZA())}i(6625);let _=((C=class{constructor(n,r,D){this.githubService=n,this.formBuilder=r,this.dialogRef=D,this.isGitRepoPrivate=!1,this.formGroup=r.group({url:["",[a.kI.required,this.urlValidator]]})}ngOnInit(){this.formGroup.controls.url.valueChanges.subscribe(n=>{if(function T(u){let n;try{n=new URL(u)}catch{return!1}return"http:"===n.protocol||"https:"===n.protocol}(n)&&(n.indexOf(".js")>0||n.indexOf(".py")>0||n.indexOf(".php")>0||n.indexOf(".txt")>0)&&n.includes("github")){const D=n.substring(n.indexOf(".com/")+5).split("/");this.repoOwner=D[0],this.repoName=D[1],this.fileName=D[4],this.githubService.get(`${this.repoOwner}/${this.repoName}`,{snackbarError:"server",snackbarSuccess:"getScriptSuccessMsg",includeCacheControl:!1}).pipe((0,p.K)(b=>(this.isGitRepoPrivate=!0,this.formGroup.addControl("username",this.formBuilder.control("",a.kI.required)),this.formGroup.addControl("password",this.formBuilder.control("",a.kI.required)),(0,m._)(()=>new Error(b))))).subscribe(b=>{this.isGitRepoPrivate=b.private})}})}urlValidator(n){const r=n.value;return(r.indexOf(".js")>0||r.indexOf(".py")>0||r.indexOf(".php")>0||r.indexOf(".txt")>0)&&r.includes("github")?null:{invalidUrl:!0}}onFileUrlChange(n){}onUpload(){this.formGroup.invalid||this.githubService.getFileContent(`${this.repoOwner}/${this.repoName}/contents/${this.fileName}`,this.formGroup.value.username,this.formGroup.value.password).subscribe(r=>{this.dialogRef.close({data:r})})}}).\u0275fac=function(n){return new(n||C)(e.Y36(E.mx),e.Y36(a.qu),e.Y36(f.so))},C.\u0275cmp=e.Xpm({type:C,selectors:[["df-scripts-github-dialog"]],standalone:!0,features:[e.jDz],decls:18,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"details-section",3,"formGroup"],["subscriptSizing","dynamic"],["matInput","","formControlName","url","placeholder","https://github.com/user/repo/blob/file.json"],[4,"ngIf"],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close",""],["mat-flat-button","","color","primary",3,"click"],["matInput","","formControlName","username","placeholder","Username","type","text"],["matInput","","formControlName","password","placeholder","Personal Access Token","type","text"]],template:function(n,r){1&n&&(e.TgZ(0,"h1",0),e._uU(1,"Import a script file from GitHub"),e.qZA(),e.TgZ(2,"div",1)(3,"form",2)(4,"mat-form-field",3)(5,"mat-label"),e._uU(6,"GitHub File URL"),e.qZA(),e._UZ(7,"input",4),e.YNc(8,t,3,3,"mat-error",5),e.qZA(),e.YNc(9,x,4,0,"mat-form-field",5),e.YNc(10,L,4,0,"mat-form-field",5),e.qZA()(),e.TgZ(11,"div",6)(12,"button",7),e._uU(13),e.ALo(14,"transloco"),e.qZA(),e.TgZ(15,"button",8),e.NdJ("click",function(){return r.onUpload()}),e._uU(16),e.ALo(17,"transloco"),e.qZA()()),2&n&&(e.xp6(3),e.Q6J("formGroup",r.formGroup),e.xp6(5),e.Q6J("ngIf",null==r.formGroup.controls.url.errors?null:r.formGroup.controls.url.errors.invalidUrl),e.xp6(1),e.Q6J("ngIf",r.formGroup.contains("username")),e.xp6(1),e.Q6J("ngIf",r.formGroup.contains("password")),e.xp6(3),e.Oqu(e.lcZ(14,6,"close")),e.xp6(3),e.hij(" ",e.lcZ(17,8,"upload")," "))},dependencies:[l.ot,l.lW,f.Is,f.ZT,f.uh,f.xY,f.H8,d.lN,d.KE,d.hX,d.TO,h.c,h.Nt,a.UX,a._Y,a.Fj,a.JJ,a.JL,a.sg,a.u,g.O5,I.Ot]}),C);_=(0,M.gn)([(0,S.c)({checkProperties:!0})],_)},15711:(U,A,i)=>{i.d(A,{H:()=>l,p:()=>f});var M=i(94517);function f(h){return Object.values((0,M.sh)(h)).flatMap(d=>Object.entries(d).map(([a,p])=>{let m=[];return m=p.parameter?p.endpoints.flatMap(g=>{const I=g.match(/{(.*?)}/);if(I){const E=I[1];return[g,...(p.parameter?.[E]||[]).map(T=>g.replace(`{${E}}`,T))]}return g}):p.endpoints,{name:a,endpoints:[...new Set(m)]}}))}function l(h){const d=[],a=new Set;for(const p of h){const m=p.split(".")[0];a.has(m)||(a.add(m),d.push(`${m}.*`)),d.push(p)}return d}}}]); \ No newline at end of file diff --git a/dist/599.b5c04ae4eb4e596b.js b/dist/599.b5c04ae4eb4e596b.js deleted file mode 100644 index 5ff9ab8e..00000000 --- a/dist/599.b5c04ae4eb4e596b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[599],{62810:(U,A,i)=>{i.d(A,{E:()=>C});var _,M=i(97582),f=i(96814),c=i(56223),g=i(32296),d=i(17700),a=i(64170),p=i(2032),m=i(98525),v=i(75986),I=i(42346),D=i(86806),S=i(30977),T=i(78791),e=i(67961),y=i(41609),b=i(94664),t=i(65879),x=i(65763);function u(l,s){if(1&l&&(t.TgZ(0,"mat-form-field",11)(1,"mat-label"),t._uU(2),t.ALo(3,"transloco"),t.qZA(),t._UZ(4,"input",12),t.qZA()),2&l){const o=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,"path")),t.xp6(2),t.Q6J("formControl",o.storagePath)}}function n(l,s){if(1&l&&(t.ynx(0),t.YNc(1,u,5,4,"mat-form-field",10),t.BQk()),2&l){const o=t.oxw();t.xp6(1),t.Q6J("ngIf",!o.storageServiceId||!o.storageServiceId.getRawValue())}}function r(l,s){if(1&l){const o=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(o);const E=t.oxw(2);return t.KtG(E.deleteCache())}),t._uU(1),t.ALo(2,"transloco"),t.qZA()}2&l&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"scripts.deleteCache")," "))}function h(l,s){if(1&l){const o=t.EpF();t.TgZ(0,"div",13)(1,"button",14),t.NdJ("click",function(){t.CHM(o);const E=t.oxw();return t.KtG(E.viewLatest())}),t._uU(2),t.ALo(3,"transloco"),t.qZA(),t.YNc(4,r,3,3,"button",15),t.qZA()}if(2&l){const o=t.oxw();t.xp6(1),t.Q6J("disabled",!o.storageServiceId||!o.storageServiceId.getRawValue()),t.xp6(1),t.hij(" ",t.lcZ(3,3,"scripts.viewLatest")," "),t.xp6(2),t.Q6J("ngIf",o.cache)}}function Z(l,s){1&l&&(t.TgZ(0,"span"),t._uU(1,"Script Contents"),t.qZA())}i(6625);let C=((_=class{constructor(s,o,P,E,O){this.dialog=s,this.fileService=o,this.cacheService=P,this.baseService=E,this.themeService=O,this.storageServices=[],this.checked=!1,this.isDarkMode=this.themeService.darkMode$,this.baseService.getAll({additionalParams:[{key:"group",value:"source control,file"}]}).subscribe(L=>{this.storageServices=L.services})}ngOnInit(){this.storageServiceId.getRawValue()&&this.storagePath.addValidators([c.kI.required]),this.storageServiceId.valueChanges.subscribe(s=>{this.storagePath.reset(),s?this.storagePath.addValidators([c.kI.required]):this.storagePath.hasValidator(c.kI.required)&&this.storagePath.removeValidators([c.kI.required]),this.storagePath.updateValueAndValidity()})}fileUpload(s){const o=s.target;o.files&&(0,S.Vu)(o.files[0]).subscribe(P=>{this.content.setValue(P)})}githubImport(){this.dialog.open(e.e).afterClosed().subscribe(o=>{o&&this.content.setValue(window.atob(o.data.content))})}viewLatest(){const s=`${this.storageServices.find(o=>o.id===this.storageServiceId.getRawValue())?.name}/${this.storagePath.getRawValue()}`;s.endsWith(".json")?this.fileService.downloadJson(s).subscribe(o=>this.content.setValue(o)):this.fileService.downloadFile(s).pipe((0,b.w)(o=>(0,S.Vu)(o))).subscribe(o=>this.content.setValue(o))}deleteCache(){this.cache&&this.cacheService.delete(`_event/${this.cache}`,{snackbarSuccess:"scripts.deleteCacheSuccessMsg"}).subscribe()}}).\u0275fac=function(s){return new(s||_)(t.Y36(d.uw),t.Y36(D.PA),t.Y36(D.OP),t.Y36(D.PA),t.Y36(x.F))},_.\u0275cmp=t.Xpm({type:_,selectors:[["df-script-editor"]],inputs:{isScript:"isScript",cache:"cache",type:"type",storageServiceId:"storageServiceId",storagePath:"storagePath",content:"content"},standalone:!0,features:[t.jDz],decls:18,vars:18,consts:[[1,"details-section"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],["type","button","mat-flat-button","",1,"save-btn",3,"disabled","click"],[3,"ngModel","ngModelChange"],[4,"ngIf"],["class","actions",4,"ngIf"],[1,"content"],[1,"full-width",3,"formControl","mode"],["class","full-width","subscriptSizing","dynamic",4,"ngIf"],["subscriptSizing","dynamic",1,"full-width"],["matInput","",3,"formControl"],[1,"actions"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["mat-flat-button","","color","primary","type","button",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button",3,"click"]],template:function(s,o){if(1&s){const P=t.EpF();t.TgZ(0,"div",0),t.ALo(1,"async"),t.TgZ(2,"div",1)(3,"input",2,3),t.NdJ("change",function(O){return o.fileUpload(O)}),t.qZA(),t.TgZ(5,"button",4),t.NdJ("click",function(){t.CHM(P);const O=t.MAs(4);return t.KtG(O.click())}),t._uU(6),t.ALo(7,"transloco"),t.qZA(),t.TgZ(8,"button",4),t.NdJ("click",function(){return o.githubImport()}),t._uU(9),t.ALo(10,"transloco"),t.qZA()(),t.TgZ(11,"mat-checkbox",5),t.NdJ("ngModelChange",function(O){return o.checked=O}),t._uU(12," Add path to file"),t.qZA(),t.YNc(13,n,2,1,"ng-container",6),t.YNc(14,h,5,5,"div",7),t.TgZ(15,"div",8),t.YNc(16,Z,2,0,"span",6),t._UZ(17,"df-ace-editor",9),t.qZA()()}2&s&&(t.Tol(t.lcZ(1,12,o.isDarkMode)?"dark-theme":""),t.xp6(5),t.Q6J("disabled",!o.storageServiceId),t.xp6(1),t.hij(" ",t.lcZ(7,14,"desktopFile")," "),t.xp6(2),t.Q6J("disabled",!o.storageServiceId),t.xp6(1),t.hij(" ",t.lcZ(10,16,"githubFile")," "),t.xp6(2),t.Q6J("ngModel",o.checked),t.xp6(2),t.Q6J("ngIf",o.checked),t.xp6(1),t.Q6J("ngIf",o.storageServiceId.getRawValue()),t.xp6(2),t.Q6J("ngIf",o.isScript),t.xp6(1),t.Q6J("formControl",o.content)("mode",o.type.getRawValue()))},dependencies:[g.ot,g.lW,I.Ot,f.O5,a.lN,a.KE,a.hX,m.LD,v.p9,v.oG,c.u5,c.Fj,c.JJ,c.On,d.Is,p.c,p.Nt,y.C,f.Ov,c.UX,c.oH],styles:[".actions[_ngcontent-%COMP%]{display:flex;gap:16px}.content[_ngcontent-%COMP%]{margin-top:8px;display:flex;flex-direction:column;gap:6px;width:100%}.content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:20px}"]}),_);C=(0,M.gn)([(0,T.c)({checkProperties:!0})],C)},67961:(U,A,i)=>{i.d(A,{e:()=>_});var b,M=i(97582),f=i(17700),c=i(32296),g=i(2032),d=i(64170),a=i(56223),p=i(26306),m=i(58504),v=i(96814),I=i(42346),D=i(86806),S=i(78791),e=i(65879);function t(u,n){1&u&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"transloco"),e.qZA()),2&u&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"scripts.errors.githubImport")," "))}function x(u,n){1&u&&(e.TgZ(0,"mat-form-field")(1,"mat-label"),e._uU(2,"GitHub Username"),e.qZA(),e._UZ(3,"input",9),e.qZA())}function R(u,n){1&u&&(e.TgZ(0,"mat-form-field")(1,"mat-label"),e._uU(2,"GitHub Password"),e.qZA(),e._UZ(3,"input",10),e.qZA())}i(6625);let _=((b=class{constructor(n,r,h){this.githubService=n,this.formBuilder=r,this.dialogRef=h,this.isGitRepoPrivate=!1,this.formGroup=r.group({url:["",[a.kI.required,this.urlValidator]]})}ngOnInit(){this.formGroup.controls.url.valueChanges.subscribe(n=>{if(function T(u){let n;try{n=new URL(u)}catch{return!1}return"http:"===n.protocol||"https:"===n.protocol}(n)&&(n.indexOf(".js")>0||n.indexOf(".py")>0||n.indexOf(".php")>0||n.indexOf(".txt")>0)&&n.includes("github")){const h=n.substring(n.indexOf(".com/")+5).split("/");this.repoOwner=h[0],this.repoName=h[1],this.fileName=h[4],this.githubService.get(`${this.repoOwner}/${this.repoName}`,{snackbarError:"server",snackbarSuccess:"getScriptSuccessMsg",includeCacheControl:!1}).pipe((0,p.K)(C=>(this.isGitRepoPrivate=!0,this.formGroup.addControl("username",this.formBuilder.control("",a.kI.required)),this.formGroup.addControl("password",this.formBuilder.control("",a.kI.required)),(0,m._)(()=>new Error(C))))).subscribe(C=>{this.isGitRepoPrivate=C.private})}})}urlValidator(n){const r=n.value;return(r.indexOf(".js")>0||r.indexOf(".py")>0||r.indexOf(".php")>0||r.indexOf(".txt")>0)&&r.includes("github")?null:{invalidUrl:!0}}onFileUrlChange(n){}onUpload(){if(this.formGroup.invalid)return;const n=`${this.repoOwner}/${this.repoName}/contents/${this.fileName}`,r=window.btoa(this.formGroup.value.username+":"+this.formGroup.value.password);this.githubService.get(n,{additionalParams:[{key:"ref",value:"main"}],additionalHeaders:[...this.isGitRepoPrivate?[{key:"Authorization",value:`Basic ${r}`}]:[]]}).subscribe(Z=>{this.dialogRef.close({data:Z})})}}).\u0275fac=function(n){return new(n||b)(e.Y36(D.mx),e.Y36(a.qu),e.Y36(f.so))},b.\u0275cmp=e.Xpm({type:b,selectors:[["df-scripts-github-dialog"]],standalone:!0,features:[e.jDz],decls:18,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"details-section",3,"formGroup"],["subscriptSizing","dynamic"],["matInput","","formControlName","url","placeholder","https://github.com/user/repo/blob/file.json"],[4,"ngIf"],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close",""],["mat-flat-button","","color","primary",3,"click"],["matInput","","formControlName","username","placeholder","Username","type","text"],["matInput","","formControlName","password","placeholder","Password","type","password"]],template:function(n,r){1&n&&(e.TgZ(0,"h1",0),e._uU(1,"Import a script file from GitHub"),e.qZA(),e.TgZ(2,"div",1)(3,"form",2)(4,"mat-form-field",3)(5,"mat-label"),e._uU(6,"GitHub File URL"),e.qZA(),e._UZ(7,"input",4),e.YNc(8,t,3,3,"mat-error",5),e.qZA(),e.YNc(9,x,4,0,"mat-form-field",5),e.YNc(10,R,4,0,"mat-form-field",5),e.qZA()(),e.TgZ(11,"div",6)(12,"button",7),e._uU(13),e.ALo(14,"transloco"),e.qZA(),e.TgZ(15,"button",8),e.NdJ("click",function(){return r.onUpload()}),e._uU(16),e.ALo(17,"transloco"),e.qZA()()),2&n&&(e.xp6(3),e.Q6J("formGroup",r.formGroup),e.xp6(5),e.Q6J("ngIf",null==r.formGroup.controls.url.errors?null:r.formGroup.controls.url.errors.invalidUrl),e.xp6(1),e.Q6J("ngIf",r.formGroup.contains("username")),e.xp6(1),e.Q6J("ngIf",r.formGroup.contains("password")),e.xp6(3),e.Oqu(e.lcZ(14,6,"close")),e.xp6(3),e.hij(" ",e.lcZ(17,8,"upload")," "))},dependencies:[c.ot,c.lW,f.Is,f.ZT,f.uh,f.xY,f.H8,d.lN,d.KE,d.hX,d.TO,g.c,g.Nt,a.UX,a._Y,a.Fj,a.JJ,a.JL,a.sg,a.u,v.O5,I.Ot]}),b);_=(0,M.gn)([(0,S.c)({checkProperties:!0})],_)},15711:(U,A,i)=>{i.d(A,{H:()=>c,p:()=>f});var M=i(94517);function f(g){return Object.values((0,M.sh)(g)).flatMap(d=>Object.entries(d).map(([a,p])=>{let m=[];return m=p.parameter?p.endpoints.flatMap(v=>{const I=v.match(/{(.*?)}/);if(I){const D=I[1];return[v,...(p.parameter?.[D]||[]).map(T=>v.replace(`{${D}}`,T))]}return v}):p.endpoints,{name:a,endpoints:[...new Set(m)]}}))}function c(g){const d=[],a=new Set;for(const p of g){const m=p.split(".")[0];a.has(m)||(a.add(m),d.push(`${m}.*`)),d.push(p)}return d}}}]); \ No newline at end of file diff --git a/dist/common.aa3f69fe9e8f582e.js b/dist/common.12915839e1cb637e.js similarity index 97% rename from dist/common.aa3f69fe9e8f582e.js rename to dist/common.12915839e1cb637e.js index d0e64149..fe78e579 100644 --- a/dist/common.aa3f69fe9e8f582e.js +++ b/dist/common.12915839e1cb637e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[8592],{73991:(h,r,n)=>{n.d(r,{U:()=>m});var s=n(42346),e=n(65879);const o=["calendlyWidget"];let m=(()=>{class c{ngAfterViewInit(){window.Calendly.initInlineWidget({url:"https://calendly.com/dreamfactory-platform/unlock-all-features",parentElement:this.calendlyWidget.nativeElement,autoLoad:!1})}}return c.\u0275fac=function(i){return new(i||c)},c.\u0275cmp=e.Xpm({type:c,selectors:[["df-paywall"]],viewQuery:function(i,p){if(1&i&&e.Gf(o,5),2&i){let g;e.iGM(g=e.CRH())&&(p.calendlyWidget=g.first)}},standalone:!0,features:[e.jDz],decls:35,vars:27,consts:[[1,"paywall-container"],[1,"details-section"],[1,"info-columns"],[1,"info-column"],[3,"innerHTML"],[1,"calendly-inline-widget"],["calendlyWidget",""],[1,"paywall-contact"],["href","tel:+1 415-993-5877"],["href","mailto:info@dreamfactory.com"]],template:function(i,p){1&i&&(e.TgZ(0,"div",0)(1,"h2"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"h2"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"div",1)(8,"div",2)(9,"div",3)(10,"h4"),e._uU(11),e.ALo(12,"transloco"),e.qZA(),e._UZ(13,"p",4),e.ALo(14,"transloco"),e.qZA(),e.TgZ(15,"div",3)(16,"h4"),e._uU(17),e.ALo(18,"transloco"),e.qZA(),e.TgZ(19,"p"),e._uU(20),e.ALo(21,"transloco"),e.qZA()()()(),e.TgZ(22,"h2"),e._uU(23),e.ALo(24,"transloco"),e.qZA()(),e._UZ(25,"div",5,6),e.TgZ(27,"h3",7)(28,"a",8),e._uU(29),e.ALo(30,"transloco"),e.qZA(),e._uU(31," | "),e.TgZ(32,"a",9),e._uU(33),e.ALo(34,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,9,"paywall.header")),e.xp6(3),e.Oqu(e.lcZ(6,11,"paywall.subheader")),e.xp6(6),e.Oqu(e.lcZ(12,13,"paywall.hostedTrial")),e.xp6(2),e.Q6J("innerHTML",e.lcZ(14,15,"paywall.bookTime"),e.oJD),e.xp6(4),e.Oqu(e.lcZ(18,17,"paywall.learnMoreTitle")),e.xp6(3),e.Oqu(e.lcZ(21,19,"paywall.gain")),e.xp6(3),e.Oqu(e.lcZ(24,21,"paywall.speakToHuman")),e.xp6(6),e.hij("",e.lcZ(30,23,"phone"),": +1 415-993-5877"),e.xp6(4),e.hij("",e.lcZ(34,25,"email"),": info@dreamfactory.com"))},dependencies:[s.Ot],styles:[".paywall-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;max-width:1200px;margin:0 auto;padding:20px}.calendly-inline-widget[_ngcontent-%COMP%]{min-width:320px;width:100%;height:700px;margin:20px 0}.details-section[_ngcontent-%COMP%]{margin:32px 0;max-width:690px;width:100%}.info-columns[_ngcontent-%COMP%]{display:flex;gap:32px;justify-content:space-between}@media (max-width: 768px){.info-columns[_ngcontent-%COMP%]{flex-direction:column}}.info-column[_ngcontent-%COMP%]{flex:1;min-width:0}.paywall-contact[_ngcontent-%COMP%]{width:100%;text-align:center;padding:32px 0;margin-top:20px}"]}),c})()},75058:(h,r,n)=>{n.d(r,{M:()=>y});var f,s=n(97582),e=n(96814),o=n(56223),m=n(64170),c=n(98525),u=n(42346),i=n(92596),p=n(45597),g=n(90590),E=n(78791),t=n(65879),O=n(65763),P=n(23680);function T(_,l){if(1&_&&(t.TgZ(0,"mat-label"),t._uU(1),t.qZA()),2&_){const a=t.oxw();t.xp6(1),t.Oqu(a.schema.label)}}function A(_,l){if(1&_&&(t.TgZ(0,"mat-option",5),t._uU(1),t.qZA()),2&_){const a=l.$implicit;t.Q6J("value",a.value),t.xp6(1),t.hij(" ",a.label," ")}}function C(_,l){if(1&_&&t._UZ(0,"fa-icon",6),2&_){const a=t.oxw();t.Q6J("icon",a.faCircleInfo)("matTooltip",a.schema.description)}}let y=((f=class{constructor(l,a){this.controlDir=l,this.themeService=a,this.type="verb",this.showLabel=!0,this.faCircleInfo=g.DBf,this.control=new o.NI,this.verbs=[{value:1,altValue:"GET",label:(0,u.Iu)("verbs.get")},{value:2,altValue:"POST",label:(0,u.Iu)("verbs.post")},{value:4,altValue:"PUT",label:(0,u.Iu)("verbs.put")},{value:8,altValue:"PATCH",label:(0,u.Iu)("verbs.patch")},{value:16,altValue:"DELETE",label:(0,u.Iu)("verbs.delete")}],this.isDarkMode=this.themeService.darkMode$,l.valueAccessor=this}ngDoCheck(){this.controlDir.control instanceof o.NI&&this.controlDir.control.hasValidator(o.kI.required)&&this.control.addValidators(o.kI.required)}writeValue(l){if(l)if("number"===this.type&&"number"==typeof l){const a=this.verbs.filter(d=>(l&d.value)===d.value).map(d=>d.value);this.control.setValue(a,{emitEvent:!1})}else this.control.setValue("verb"===this.type&&"string"==typeof l?this.verbs.find(a=>a.altValue===l)?.value??"":l.map(a=>this.verbs.find(d=>d.altValue===a)?.value??0),{emitEvent:!1})}registerOnChange(l){this.onChange=l,this.control.valueChanges.subscribe(a=>{const d="number"===this.type?(a||[]).reduce((v,D)=>v|D,0):"verb_multiple"===this.type?(a||[]).map(v=>this.verbs.find(D=>D.value===v)?.altValue??""):this.verbs.find(v=>v.value===a)?.altValue??"";this.onChange(d)})}registerOnTouched(l){this.onTouched=l}setDisabledState(l){l?this.control.disable():this.control.enable()}}).\u0275fac=function(l){return new(l||f)(t.Y36(o.a5,2),t.Y36(O.F))},f.\u0275cmp=t.Xpm({type:f,selectors:[["df-verb-picker"]],inputs:{type:"type",schema:"schema",showLabel:"showLabel"},standalone:!0,features:[t.jDz],decls:7,vars:10,consts:[["subscriptSizing","dynamic","appearance","outline"],[4,"ngIf"],[3,"formControl","multiple"],[3,"value",4,"ngFor","ngForOf"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],[3,"value"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"]],template:function(l,a){1&l&&(t.TgZ(0,"div"),t.ALo(1,"async"),t.TgZ(2,"mat-form-field",0),t.YNc(3,T,2,1,"mat-label",1),t.TgZ(4,"mat-select",2),t.YNc(5,A,2,2,"mat-option",3),t.qZA(),t.YNc(6,C,1,2,"fa-icon",4),t.qZA()()),2&l&&(t.Tol(t.lcZ(1,8,a.isDarkMode)?"dark-theme":""),t.xp6(3),t.Q6J("ngIf",a.showLabel),t.xp6(1),t.Q6J("formControl",a.control)("multiple","verb_multiple"===a.type||"number"===a.type),t.uIk("aria-label",a.schema.label),t.xp6(1),t.Q6J("ngForOf",a.verbs),t.xp6(1),t.Q6J("ngIf",a.schema.description))},dependencies:[c.LD,m.KE,m.hX,m.R9,c.gD,P.ey,m.lN,o.UX,o.JJ,o.oH,e.ax,e.O5,i.AV,i.gM,p.uH,p.BN,e.Ov],encapsulation:2}),f);y=(0,s.gn)([(0,E.c)({checkProperties:!0})],y)},52002:(h,r,n)=>{n.d(r,{h:()=>s});const s=["csv","json","xml"]},45696:(h,r,n)=>{n.d(r,{B:()=>s});const s=[{columnDef:"active",cell:e=>e.active,header:"active"},{columnDef:"email",cell:e=>e.email,header:"email"},{columnDef:"displayName",cell:e=>e.displayName,header:"name"},{columnDef:"firstName",cell:e=>e.firstName,header:"firstName"},{columnDef:"lastName",cell:e=>e.lastName,header:"lastName"},{columnDef:"registration",cell:e=>e.registration,header:"registration"},{columnDef:"actions"}]},22873:(h,r,n)=>{n.d(r,{_:()=>e});var s=n(15861);function e(m,c){return o.apply(this,arguments)}function o(){return(o=(0,s.Z)(function*(m,c){const i=(new TextEncoder).encode(`${m}${c}${Date.now()}`),p=yield crypto.subtle.digest("SHA-256",i);return Array.from(new Uint8Array(p)).map(t=>t.toString(16).padStart(2,"0")).join("")})).apply(this,arguments)}},35326:(h,r,n)=>{function s(e){if(e.value.length>0)try{JSON.parse(e.value)}catch{return{jsonInvalid:!0}}return null}n.d(r,{U:()=>s})}}]); \ No newline at end of file +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[8592],{73991:(h,r,n)=>{n.d(r,{U:()=>m});var s=n(42346),e=n(65879);const o=["calendlyWidget"];let m=(()=>{class c{ngAfterViewInit(){window.Calendly.initInlineWidget({url:"https://calendly.com/dreamfactory-platform/unlock-all-features",parentElement:this.calendlyWidget.nativeElement,autoLoad:!1})}}return c.\u0275fac=function(i){return new(i||c)},c.\u0275cmp=e.Xpm({type:c,selectors:[["df-paywall"]],viewQuery:function(i,p){if(1&i&&e.Gf(o,5),2&i){let g;e.iGM(g=e.CRH())&&(p.calendlyWidget=g.first)}},standalone:!0,features:[e.jDz],decls:35,vars:27,consts:[[1,"paywall-container"],[1,"details-section"],[1,"info-columns"],[1,"info-column"],[3,"innerHTML"],[1,"calendly-inline-widget"],["calendlyWidget",""],[1,"paywall-contact"],["href","tel:+1 415-993-5877"],["href","mailto:info@dreamfactory.com"]],template:function(i,p){1&i&&(e.TgZ(0,"div",0)(1,"h2"),e._uU(2),e.ALo(3,"transloco"),e.qZA(),e.TgZ(4,"h2"),e._uU(5),e.ALo(6,"transloco"),e.qZA(),e.TgZ(7,"div",1)(8,"div",2)(9,"div",3)(10,"h4"),e._uU(11),e.ALo(12,"transloco"),e.qZA(),e._UZ(13,"p",4),e.ALo(14,"transloco"),e.qZA(),e.TgZ(15,"div",3)(16,"h4"),e._uU(17),e.ALo(18,"transloco"),e.qZA(),e.TgZ(19,"p"),e._uU(20),e.ALo(21,"transloco"),e.qZA()()()(),e.TgZ(22,"h2"),e._uU(23),e.ALo(24,"transloco"),e.qZA()(),e._UZ(25,"div",5,6),e.TgZ(27,"h3",7)(28,"a",8),e._uU(29),e.ALo(30,"transloco"),e.qZA(),e._uU(31," | "),e.TgZ(32,"a",9),e._uU(33),e.ALo(34,"transloco"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,9,"paywall.header")),e.xp6(3),e.Oqu(e.lcZ(6,11,"paywall.subheader")),e.xp6(6),e.Oqu(e.lcZ(12,13,"paywall.hostedTrial")),e.xp6(2),e.Q6J("innerHTML",e.lcZ(14,15,"paywall.bookTime"),e.oJD),e.xp6(4),e.Oqu(e.lcZ(18,17,"paywall.learnMoreTitle")),e.xp6(3),e.Oqu(e.lcZ(21,19,"paywall.gain")),e.xp6(3),e.Oqu(e.lcZ(24,21,"paywall.speakToHuman")),e.xp6(6),e.hij("",e.lcZ(30,23,"phone"),": +1 415-993-5877"),e.xp6(4),e.hij("",e.lcZ(34,25,"email"),": info@dreamfactory.com"))},dependencies:[s.Ot],styles:[".paywall-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;max-width:1200px;margin:0 auto;padding:20px}.calendly-inline-widget[_ngcontent-%COMP%]{min-width:320px;width:100%;height:700px;margin:20px 0}.details-section[_ngcontent-%COMP%]{margin:32px 0;max-width:690px;width:100%}.info-columns[_ngcontent-%COMP%]{display:flex;gap:32px;justify-content:space-between}@media (max-width: 768px){.info-columns[_ngcontent-%COMP%]{flex-direction:column}}.info-column[_ngcontent-%COMP%]{flex:1;min-width:0}.paywall-contact[_ngcontent-%COMP%]{width:100%;text-align:center;padding:32px 0;margin-top:20px}"]}),c})()},75058:(h,r,n)=>{n.d(r,{M:()=>y});var f,s=n(97582),e=n(96814),o=n(56223),m=n(64170),c=n(98525),u=n(42346),i=n(92596),p=n(45597),g=n(90590),E=n(78791),t=n(65879),O=n(65763),P=n(23680);function T(_,l){if(1&_&&(t.TgZ(0,"mat-label"),t._uU(1),t.qZA()),2&_){const a=t.oxw();t.xp6(1),t.Oqu(a.schema.label)}}function b(_,l){if(1&_&&(t.TgZ(0,"mat-option",5),t._uU(1),t.qZA()),2&_){const a=l.$implicit;t.Q6J("value",a.value),t.xp6(1),t.hij(" ",a.label," ")}}function A(_,l){if(1&_&&t._UZ(0,"fa-icon",6),2&_){const a=t.oxw();t.Q6J("icon",a.faCircleInfo)("matTooltip",a.schema.description)}}let y=((f=class{constructor(l,a){this.controlDir=l,this.themeService=a,this.type="verb",this.showLabel=!0,this.faCircleInfo=g.DBf,this.control=new o.NI,this.verbs=[{value:1,altValue:"GET",label:(0,u.Iu)("verbs.get")},{value:2,altValue:"POST",label:(0,u.Iu)("verbs.post")},{value:4,altValue:"PUT",label:(0,u.Iu)("verbs.put")},{value:8,altValue:"PATCH",label:(0,u.Iu)("verbs.patch")},{value:16,altValue:"DELETE",label:(0,u.Iu)("verbs.delete")}],this.isDarkMode=this.themeService.darkMode$,l.valueAccessor=this}ngDoCheck(){this.controlDir.control instanceof o.NI&&this.controlDir.control.hasValidator(o.kI.required)&&this.control.addValidators(o.kI.required)}writeValue(l){if(l)if("number"===this.type&&"number"==typeof l){const a=this.verbs.filter(d=>(l&d.value)===d.value).map(d=>d.value);this.control.setValue(a,{emitEvent:!1})}else this.control.setValue("verb"===this.type&&"string"==typeof l?this.verbs.find(a=>a.altValue===l)?.value??"":l.map(a=>this.verbs.find(d=>d.altValue===a)?.value??0),{emitEvent:!1})}registerOnChange(l){this.onChange=l,this.control.valueChanges.subscribe(a=>{const d="number"===this.type?(a||[]).reduce((v,D)=>v|D,0):"verb_multiple"===this.type?(a||[]).map(v=>this.verbs.find(D=>D.value===v)?.altValue??""):this.verbs.find(v=>v.value===a)?.altValue??"";this.onChange(d)})}registerOnTouched(l){this.onTouched=l}setDisabledState(l){l?this.control.disable():this.control.enable()}}).\u0275fac=function(l){return new(l||f)(t.Y36(o.a5,2),t.Y36(O.F))},f.\u0275cmp=t.Xpm({type:f,selectors:[["df-verb-picker"]],inputs:{type:"type",schema:"schema",showLabel:"showLabel"},standalone:!0,features:[t.jDz],decls:7,vars:10,consts:[["subscriptSizing","dynamic","appearance","outline"],[4,"ngIf"],[3,"formControl","multiple"],[3,"value",4,"ngFor","ngForOf"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],[3,"value"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"]],template:function(l,a){1&l&&(t.TgZ(0,"div"),t.ALo(1,"async"),t.TgZ(2,"mat-form-field",0),t.YNc(3,T,2,1,"mat-label",1),t.TgZ(4,"mat-select",2),t.YNc(5,b,2,2,"mat-option",3),t.qZA(),t.YNc(6,A,1,2,"fa-icon",4),t.qZA()()),2&l&&(t.Tol(t.lcZ(1,8,a.isDarkMode)?"dark-theme":""),t.xp6(3),t.Q6J("ngIf",a.showLabel),t.xp6(1),t.Q6J("formControl",a.control)("multiple","verb_multiple"===a.type||"number"===a.type),t.uIk("aria-label",a.schema.label),t.xp6(1),t.Q6J("ngForOf",a.verbs),t.xp6(1),t.Q6J("ngIf",a.schema.description))},dependencies:[c.LD,m.KE,m.hX,m.R9,c.gD,P.ey,m.lN,o.UX,o.JJ,o.oH,e.ax,e.O5,i.AV,i.gM,p.uH,p.BN,e.Ov],encapsulation:2}),f);y=(0,s.gn)([(0,E.c)({checkProperties:!0})],y)},52002:(h,r,n)=>{n.d(r,{h:()=>s});const s=["csv","json","xml"]},45696:(h,r,n)=>{n.d(r,{B:()=>s});const s=[{columnDef:"active",cell:e=>e.active,header:"active"},{columnDef:"email",cell:e=>e.email,header:"email"},{columnDef:"displayName",cell:e=>e.displayName,header:"name"},{columnDef:"firstName",cell:e=>e.firstName,header:"firstName"},{columnDef:"lastName",cell:e=>e.lastName,header:"lastName"},{columnDef:"registration",cell:e=>e.registration,header:"registration"},{columnDef:"actions"}]},22873:(h,r,n)=>{n.d(r,{_:()=>e});var s=n(15861);function e(m,c){return o.apply(this,arguments)}function o(){return(o=(0,s.Z)(function*(m,c){const i=(new TextEncoder).encode(`${m}${c}${Date.now()}`),p=yield crypto.subtle.digest("SHA-256",i);return Array.from(new Uint8Array(p)).map(t=>t.toString(16).padStart(2,"0")).join("")})).apply(this,arguments)}},35326:(h,r,n)=>{function s(e){if(e.value.length>0)try{JSON.parse(e.value)}catch{return{jsonInvalid:!0}}return null}n.d(r,{U:()=>s})}}]); \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index 2be66d27..7a3d5bdf 100644 --- a/dist/index.html +++ b/dist/index.html @@ -9,5 +9,5 @@