1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="763bd629-397f-5af7-afc7-824c61a527dd")}catch(e){}}(); 3import{a as ht}from"./chunk-OPQ7PRFO.js";import{a as G}from"./chunk-T2W4342Q.js";import"./chunk-JRHQOV6G.js";import{a as pt,b as ct,c as bt}from"./chunk-XHPBKMRW.js";import{a as lt,b as mt}from"./chunk-FMAAPPZH.js";import{a as ft,c as ut}from"./chunk-P5F2LIXZ.js";import{a as Xe,b as Ze,c as et,e as tt,f as at,h as it,i as nt,k as ot,l as rt,n as st,p as dt}from"./chunk-IZJQTZVB.js";import"./chunk-77KO6I45.js";import"./chunk-R7MSJQOC.js";import"./chunk-6UNLROVI.js";import{a as We,c as Je,d as Qe,e as Ye}from"./chunk-C5T7GUT6.js";import"./chunk-DSHWJW7U.js";import{a as ze}from"./chunk-FLZNG7WM.js";import{b as je}from"./chunk-Y53ZYOIU.js";import"./chunk-3YM57F2T.js";import{a as He,c as qe}from"./chunk-4OKMPB3H.js";import{a as $e}from"./chunk-AGVOJNE2.js";import{c as Ge}from"./chunk-CN4EGA4I.js";import{a as Oe}from"./chunk-TNAGEFXD.js";import"./chunk-56LBQIQP.js";import{a as Ue}from"./chunk-5K5PYV5V.js";import{a as Ae}from"./chunk-TDGVUJZJ.js";import{a as ce,b as be,d as he,e as fe,f as ue,g as _e,h as Ce,i as ge}from"./chunk-MWF7JXGK.js";import{a as Ke,b as Ne}from"./chunk-KS3Q7H57.js";import{a as Ve}from"./chunk-MGCQ5S6F.js";import"./chunk-MJXNRHWH.js";import"./chunk-BUOPWRDV.js";import{d as K,e as N}from"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import{b as U,d as O}from"./chunk-CNRKNNWP.js";import{d as B}from"./chunk-L6Z7ZO7O.js";import"./chunk-TLCCWCNW.js";import{a as P}from"./chunk-5SJALNJN.js";import{a as L,b as ke,c as Be,d as Le,e as Re,i as R}from"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import"./chunk-56KVT3OQ.js";import{C as Te,D as Ee,G as Ie,H as we,I as Fe,b as V,d as y,g as k,h as Me,n as De,o as ve,p as Se,r as xe,u as ye}from"./chunk-MF7VZYLI.js";import{a as I,b as w,e as F}from"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import{a as Pe,b as A}from"./chunk-B5YZVWIB.js";import"./chunk-HCSN2NMS.js";import"./chunk-FDIRDMLL.js";import"./chunk-XQLUXGKM.js";import"./chunk-3JHJJCIF.js";import"./chunk-J4X36CU5.js";import"./chunk-X3ZU2Z3D.js";import"./chunk-QZXCI4ZV.js";import"./chunk-VO633UWN.js";import"./chunk-XIKGSSI2.js";import"./chunk-MNZQGPDO.js";import"./chunk-NK2KZLT6.js";import"./chunk-MU5APV2L.js";import"./chunk-KRFZY2QT.js";import"./chunk-DFSGG2NH.js";import"./chunk-MREDPIUE.js";import"./chunk-BWICLBYB.js";import{e as pe}from"./chunk-TYTNPDEC.js";import"./chunk-WAPZ5LEW.js";import{B as le,L as me}from"./chunk-746D4QTP.js";import{Ac as p,Dc as c,Gd as de,Ib as E,Lc as ae,M as H,Mc as ie,Nc as ne,Ob as f,R as q,Sc as o,Tc as oe,Ua as Z,Uc as b,Vc as re,Yc as j,Zc as z,_c as W,a as T,cc as u,dc as _,f as $,gc as ee,hc as te,hd as se,ic as h,jc as i,kc as a,lc as m,nd as J,pc as C,pd as Q,qa as M,qb as d,qc as g,uc as x,va as D,wa as v,xa as X}from"./chunk-BZJI6Z2X.js";import"./chunk-CS7K6LXP.js";var xt=(t,r)=>r.value;function yt(t,r){if(t&1&&(i(0,"mat-option",8),o(1),a()),t&2){let e=r.$implicit;h("value",e.value),d(),b(" ",e.viewValue," ")}}function Tt(t,r){if(t&1&&(i(0,"div",6)(1,"p"),o(2),a()()),t&2){let e=c();d(2),re("Note: You are editing ",e.dashboard==null?null:e.dashboard.identifies_type," with id: ",e.dashboard==null?null:e.dashboard.identifies_id)}}function Et(t,r){t&1&&(i(0,"div",9)(1,"mat-form-field")(2,"mat-label"),o(3,"Identifies key"),a(),m(4,"input",25),a()())}function It(t,r){if(t&1){let e=x();i(0,"div",9)(1,"app-brand-picker",26),p("brandChange",function(n){D(e);let l=c();return v(l.onSelectBrand(n))}),a()()}if(t&2){let e=c();d(),h("brand",e.defaultBrand)("required",!0)}}function wt(t,r){t&1&&(i(0,"mat-error"),o(1," Please enter a valid JSON "),a())}var Y=(()=>{class t{fb=M(Ie);adminService=M(G);dialogRef=M(ce);editMode=!1;dashboard;defaultBrand;dashboardTypes=[{value:"recordLevel",viewValue:"Record Level"},{value:"platformLevel",viewValue:"Platform Level"},{value:"globalLevel",viewValue:"Global Level"}];metabaseForm=this.fb.group({dashboardType:["",y.required],identifiesType:["",y.required],identifiesKey:[""],brandId:[null],name:["",y.required],description:[""],dashboardId:["",y.required],dashboardRank:[""],payload:["{}",[Ve.jsonValidator]]});processing=!1;editorOptions={theme:"vs-light",language:"json",automaticLayout:!0,minimap:{enabled:!1},wordWrap:"on",wrappingIndent:"indent"};subscriptions=new T;data=M(be);ngOnInit(){this.subscriptions.add(this.metabaseForm.controls.dashboardType.valueChanges.subscribe(e=>{e==="recordLevel"?(this.metabaseForm.controls.identifiesKey.setValidators(y.required),this.metabaseForm.controls.identifiesKey.updateV
3alueAndValidity()):(this.metabaseForm.controls.identifiesKey.clearValidators(),this.metabaseForm.controls.identifiesKey.updateValueAndValidity()),e==="platformLevel"?(this.metabaseForm.controls.brandId.setValidators(y.required),this.metabaseForm.controls.brandId.updateValueAndValidity()):(this.metabaseForm.controls.brandId.clearValidators(),this.metabaseForm.controls.brandId.updateValueAndValidity())})),this.data?.element?.id?(this.editMode=!0,this.dashboard=this.data.element,this.data.element.brand_id&&(this.defaultBrand={id:this.data.element.brand_id,name:this.data.element.brand_name}),this.setFormValues()):(this.editMode=!1,this.metabaseForm.controls.dashboardType.setValue(this.dashboardTypes[0].value))}ngOnDestroy(){this.subscriptions.unsubscribe()}createUpdateDashboard(){if(this.metabaseForm.invalid)return;this.processing=!0;let e={metabase_dashboard:{name:this.metabaseForm.value.name,description:this.metabaseForm.value.description,dashboard_id:this.metabaseForm.value.dashboardId,rank:this.metabaseForm.value.dashboardRank,dashboard_payload:JSON.parse(this.metabaseForm.value.payload||"{}"),brand_id:this.metabaseForm.value.brandId}},s;this.editMode?s=this.adminService.updateMetabase(this.dashboard.id,e):(e.metabase_dashboard.identifies_type=this.metabaseForm.value.identifiesType,e.metabase_dashboard.identifies_key=this.metabaseForm.value.identifiesKey,s=this.adminService.createMetabase(e)),s.subscribe({next:n=>{this.processing=!1,this.dialogRef.close(n)},error:()=>{this.processing=!1}})}onEditorInit(e){e.getAction("editor.action.formatDocument").run(),e.setValue(this.metabaseForm.controls.payload.value||""),e.onDidChangeModelContent(()=>{let s=e.getValue();this.metabaseForm.patchValue({payload:s},{emitEvent:!0})}),this.subscriptions.add(this.metabaseForm.controls.payload.valueChanges.subscribe(s=>{s!==e.getValue()&&e.setValue(s||"")}))}onSelectBrand(e){this.metabaseForm.controls.brandId.setValue(e.id)}setFormValues(){let e={name:this.dashboard.name,description:this.dashboard.description,dashboardId:this.dashboard.dashboard_id,dashboardRank:this.dashboard.rank,payload:JSON.stringify(this.dashboard.dashboard_payload||{},null,2),identifiesType:this.dashboard.identifies_type};this.dashboard.identifies_type&&this.dashboard.identifies_id?(e.dashboardType="recordLevel",e.identifiesKey=this.dashboard.identifies_id):this.dashboard.brand_id?(e.dashboardType="platformLevel",e.brandId=this.dashboard.brand_id):e.dashboardType="globalLevel",this.metabaseForm.patchValue(e),this.metabaseForm.controls.identifiesType.disable(),this.metabaseForm.controls.identifiesKey.disable(),this.metabaseForm.controls.dashboardType.disable()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=E({type:t,selectors:[["app-create-update-metabase-dialog"]],decls:60,vars:11,consts:[["mat-dialog-title",""],["mat-dialog-close","","mat-icon-button","","aria-label","close dialog",1,"dialog-close"],[1,"fa-solid","fa-times"],["appScrollToFirstInvalid","",3,"ngSubmit","formGroup"],["appDialogScroll",""],[1,"row"],[1,"col-12"],["formControlName","dashboardType"],[3,"value"],[1,"col-12","col-md-6"],["formControlName","identifiesType"],["value","GivingEvent"],["value","CommunityPage"],["value","GroupPage"],["type","text","id","name","matInput","","formControlName","name","autocomplete","off"],["appearance","outline"],["matInput","","formControlName","description","maxlength","255"],["align","end"],["type","number","id","dashboardId","matInput","","formControlName","dashboardId","inputmode","numeric","pattern","[0-9]*","autocomplete","off"],["type","number","id","dashboardRank","matInput","","formControlName","dashboardRank","inputmode","numeric","pattern","[0-9]*","autocomplete","off"],[1,"mb-1"],["id","payload",3,"onInit","options"],[1,"align","end"],["mat-button","","color","accent",1,"custom","auto",3,"mat-dialog-close"],["mat-raised-button","","type","submit","appLoadingBtn","",1,"custom","auto",3,"active"],["type","text","id","identifiesKey","matInput","","formControlName","identifiesKey","autocomplete","off"],[3,"brandChange","brand","required"]],template:function(s,n){s&1&&(i(0,"h3",0),o(1),a(),i(2,"button",1),m(3,"i",2),a(),i(4,"form",3),p("ngSubmit",function(){return n.createUpdateDashboard()}),i(5,"mat-dialog-content",4)(6,"div",5)(7,"div",6)(8,"mat-form-field")(9,"mat-label"),o(10,"Dashboard Type"),a(),i(11,"mat-select",7),ee(12,yt,2,2,"mat-option",8,xt),a()()(),u(14,Tt,3,2,"div",6),i(15,"div",9)(16,"mat-form-field")(17,"mat-label"),o(18,"Identifies Type"),a(),i(19,"mat-select",10)(20,"mat-option",11),o(21,"Giving Event"),a(),i(22,"mat-option",12),o(23,"Community"),a(),i(24,"mat-option",13),o(25,"Group"),a()()()(),u(26,Et,5,0,"div",9),u(27,It,2,2,"div",9),i(28,"div",6)(29,"mat-form-field")(30,"mat-label"),o(31,"Name"),a(),m(32,"input",14),a()(),i(33,"div",6)(34,"mat-form-field",15)(35,"mat-label"),o(36,"Description"),a(),m(37,"textarea",16),i(38,"mat-hint",17),o(39),a()()(),i(40,"div",9)(41,"mat-form-field")(42,"mat-label"),o(43,"Dashboard Id"),a(),m(44,"input",18),a()(),i(45,"div",9)(46,"mat-form-field")(47,"mat-label"),o(48,"Dashboard Rank"),a(),m(49,"input",19),a()(),i(50,"div",6)(51,"p",20),o(52,"Payload"),a(),i(53,"ngx-monaco-editor",21),p("onInit",function(S){return n.onEditorInit(S)}),a(),u(54,wt,2,0,"mat-error"),a()()(),i(55,"mat-dialog-actions",22)(56,"button",23),o(57,"Cancel"),a(),i(58,"button",24),o(59),a()()()),s&2&&(d(),oe(n.editMode?"Edit Metabase dashboard":"Create Metabase dashboard"),d(3),h("formGroup",n.metabaseForm),d(8),te(n.dashboardTypes),d(2),_(n.editMode?14:-1),d(12),_(n.metabaseForm.controls.dashboardType.value==="recordLevel"?26:-1),d(),_(n.metabaseForm.controls.dashboardType.value==="platformLevel"?27:-1),d(12),b("",(n.metabaseForm.controls.description.value==null?null:n.metabaseForm.controls.description.value.length)||0," / 255"),d(14),h("options",n.editorOptions),d(),_(n.metabaseForm.controls.payload.hasError("invalidJSON")?54:-1),d(2),h("mat-dialog-close",!1),d(2),h("active",n.processing),d(),b(" ",n.editMode?"Update":"Create"," "))},dependencies:[Fe,ve,V,Se,k,Me,Te,Ee,xe,ye,ge,fe,ue,Ce,_e,F,w,I,P,R,L,Be,ke,N,K,O,U,B,A,ht,ut,ft,Oe,Ae,Ue],styles:["ngx-monaco-editor[_ng
3content-%COMP%]{border:1px solid #ccc;max-height:150px}"]})}return t})();var Ft=["analyticsIframe"],Vt=()=>[5,10,25,50];function kt(t,r){if(t&1){let e=x();i(0,"mat-icon",24),p("click",function(){D(e);let n=c();return v(n.onBrandSearchTextChange.next(""))}),a()}}function Bt(t,r){if(t&1){let e=x();i(0,"mat-icon",24),p("click",function(){D(e);let n=c(2);return v(n.onIdentifiesKeyChange.next(""))}),a()}}function Lt(t,r){if(t&1){let e=x();i(0,"div",13)(1,"mat-form-field")(2,"mat-label"),o(3,"Search identifies key"),a(),i(4,"input",25),W("ngModelChange",function(n){D(e);let l=c();return z(l.metabaseDashboard.identifiesKey,n)||(l.metabaseDashboard.identifiesKey=n),v(n)}),p("ngModelChange",function(n){D(e);let l=c();return v(l.onIdentifiesKeyChange.next(n))}),a(),m(5,"mat-icon",20),u(6,Bt,1,0,"mat-icon",21),a()()}if(t&2){let e=c();d(4),j("ngModel",e.metabaseDashboard.identifiesKey),d(2),_(e.metabaseDashboard.identifiesKey?6:-1)}}function Rt(t,r){t&1&&(i(0,"section")(1,"div",26)(2,"content-loader",27),X(),m(3,"rect",28),a()()())}function Pt(t,r){t&1&&(i(0,"th",51),o(1,"ID"),a())}function At(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.id," ")}}function Kt(t,r){t&1&&(i(0,"th",51),o(1,"Identifies Type"),a())}function Nt(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.identifies_type," ")}}function Ut(t,r){t&1&&(i(0,"th",51),o(1,"Identifies Id"),a())}function Ot(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.identifies_id," ")}}function Gt(t,r){t&1&&(i(0,"th",51),o(1,"Name"),a())}function $t(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.name," ")}}function Ht(t,r){t&1&&(i(0,"th",51),o(1,"Description"),a())}function qt(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.description," ")}}function jt(t,r){t&1&&(i(0,"th",51),o(1,"Dashboard Id"),a())}function zt(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.dashboard_id," ")}}function Wt(t,r){t&1&&(i(0,"th",51),o(1,"Rank"),a())}function Jt(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.rank," ")}}function Qt(t,r){t&1&&(i(0,"th",51),o(1,"Brand Id"),a())}function Yt(t,r){if(t&1&&(i(0,"td",52),o(1),a()),t&2){let e=r.$implicit;d(),b(" ",e.brand_id," ")}}function Xt(t,r){t&1&&(i(0,"th",51),o(1,"Created At"),a())}function Zt(t,r){if(t&1&&(i(0,"td",52),o(1),J(2,"date"),a()),t&2){let e=r.$implicit;d(),b(" ",Q(2,1,e.created_at,"MMM. dd, yyyy")," ")}}function ea(t,r){t&1&&(i(0,"th",51),o(1,"Updated At"),a())}function ta(t,r){if(t&1&&(i(0,"td",52),o(1),J(2,"date"),a()),t&2){let e=r.$implicit;d(),b(" ",Q(2,1,e.updated_at,"MMM. dd, yyyy")," ")}}function aa(t,r){t&1&&(i(0,"th",53),m(1,"i",54),a())}function ia(t,r){if(t&1){let e=x();i(0,"td",52)(1,"div",null,0)(3,"button",55),m(4,"i",56),a(),i(5,"mat-menu",57,1)(7,"button",58),p("click",function(){let n=D(e).$implicit,l=c(2);return v(l.editMetabase(n))}),i(8,"span",10),m(9,"i",59),a(),i(10,"span",60),o(11,"Edit"),a()(),i(12,"button",61),p("click",function(){let n=D(e).$implicit,l=c(2);return v(l.deleteMetabase(n))}),i(13,"span",10),m(14,"i",62),a(),i(15,"span",60),o(16,"Delete"),a()()()()()}if(t&2){let e=ne(6);d(3),h("matMenuTriggerFor",e)}}function na(t,r){t&1&&m(0,"tr",63)}function oa(t,r){t&1&&m(0,"tr",64)}function ra(t,r){t&1&&(i(0,"div",48)(1,"p"),o(2,"No Metabase Dashboards have been created yet."),a()())}function sa(t,r){t&1&&(i(0,"div",49)(1,"div",65),m(2,"mat-spinner",66),a()())}function da(t,r){if(t&1){let e=x();i(0,"section")(1,"div",29)(2,"div",30)(3,"table",31),p("matSortChange",function(n){D(e);let l=c();return v(l.onSortChange(n))}),C(4,32),f(5,Pt,2,0,"th",33)(6,At,2,1,"td",34),g(),C(7,35),f(8,Kt,2,0,"th",33)(9,Nt,2,1,"td",34),g(),C(10,36),f(11,Ut,2,0,"th",33)(12,Ot,2,1,"td",34),g(),C(13,37),f(14,Gt,2,0,"th",33)(15,$t,2,1,"td",34),g(),C(16,38),f(17,Ht,2,0,"th",33)(18,qt,2,1,"td",34),g(),C(19,39),f(20,jt,2,0,"th",33)(21,zt,2,1,"td",34),g(),C(22,40),f(23,Wt,2,0,"th",33)(24,Jt,2,1,"td",34),g(),C(25,41),f(26,Qt,2,0,"th",33)(27,Yt,2,1,"td",34),g(),C(28,42),f(29,Xt,2,0,"th",33)(30,Zt,3,4,"td",34),g(),C(31,43),f(32,ea,2,0,"th",33)(33,ta,3,4,"td",34),g(),C(34,44),f(35,aa,2,0,"th",45)(36,ia,17,1,"td",34),g(),f(37,na,1,0,"tr",46)(38,oa,1,0,"tr",47),a()(),u(39,ra,3,0,"div",48),u(40,sa,3,0,"div",49),i(41,"mat-paginator",50),p("page",function(n){D(e);let l=c();return v(l.onPageChange(n))}),a()()()}if(t&2){let e=c();d(3),h("dataSource",e.metabaseDashboard.data),d(34),h("matHeaderRowDef",e.metabaseColumns),d(),h("matRowDefColumns",e.metabaseColumns),d(),_((e.metabaseDashboard.data==null?null:e.metabaseDashboard.data.length)===0?39:-1),d(),_(e.spinner.metabaseDashboard?40:-1),d(),h("length",e.metabaseDashboard&&e.metabaseDashboard.totalCount)("pageSize",e.metabaseDashboard.perPage)("pageSizeOptions",se(8,Vt))}}var di=(()=>{class t{dialog=M(he);adminService=M(G);snackBar=M(Ge);sanitizer=M(pe);iframeElements=de("analyticsIframe");contentLoading=!0;analyticsIframeUrl;iframeUrls=[];metabaseDashboard={data:null,totalCount:0,page:1,perPage:10,sortBy:"created_at",sortOrder:"desc",identifiesType:"all",identifiesKey:"",brandSearchText:""};spinner={metabaseDashboard:!1};metabaseColumns=["id","identifies_type","identifies_id","name","description","dashboard_id","rank","brandId","created_at","updated_at","actions"];onIdentifiesKeyChange=new $;onBrandSearchTextChange=new $;subscription=new T;platformId=M(Z);ngOnInit(){me(this.platformId)&&(this.contentLoading=!1,this.getMetabaseDashboards(),this.subscription.add(this.onIdentifiesKeyChange.pipe(H(500),q()).subscribe(e=>{e!==null&&(this.metabaseDashboard.page=1,this.metabaseDashboard.identifiesKey=e,this.getMetabaseDashboards())})),this.subscription.add(this.onBrandSearchTextChange.pipe(H(500),q()).subscribe(e=>{e!==null&&(this.metabaseDashboard.page=1,this.metabaseDashboard.brandSearchText=e,this.getMetabaseDashboards())})))}getMetabaseDashboards(){let e={page:this.metabaseDashboard.page,per_page:this.metabaseDashboard.perPage,sort_by:this.metabaseDashboard.sortBy,sort_order:this.metabaseDashboard.sortOrder,identifies_type:this.metabaseDashboard.identifiesType,identifies_key:this.metabaseDashboard.identifiesKey,brand_search_text:this.metabaseDashboard.brandSearchText?this.metabaseDashboard.brandSearchText:""};this.spinner.metabaseDashboard=!0,this.adminService.listMetabaseDashboards(e).subscribe({next:s=>{this.metabaseDashboard.data=s.dashboards,this.metabaseDashboard.totalCount=s.total_count,this.spinner.metabaseDashboard=!1},error:s=>{this.spinner.metabaseDashboard=!1}})}createMetabase(){this.dialog.open(Y).afterClosed().subscribe(s=>{s&&(this.getMetabaseDashboards(),this.snackBar.open("Metabase Dashboard created successfully","",{duration:3e3}))})}editMetabase(e){let s={element:e};this.dialog.open(Y,{data:s}).afterClosed().subscribe(l=>{l&&(this.getMetabaseDashboards(),this.snackBar.open("Metabase Dashboard updated successfully","",{duration:3e3}))})}deleteMetabase(e){this.dialog.open($e,{data:{title:"Are you sure?",confirmButtonText:"Confirm",cancelButtonText:"Cancel"}}).afterClosed().subscribe(n=>{n&&this.adminService.deleteMetabase(e.id).subscribe(()=>{this.snackBar.open("Metabase Dashboard deleted successfully","",{duration:3e3}),this.getMetabaseDashboards()})})}getIframeUrl(e){this.adminService.getIframeUrl(e.id).subscribe({next:s=>{s&&(this.analyticsIframeUrl=this.sanitizer.bypassSecurityTrustResourceUrl(`${s.iframe_url}&refresh=120`),this.getMetabaseDashboards())}})}onPageChange(e){this.metabaseDashboard.page=e.pageIndex+1,this.metabaseDashboard.perPage=e.pageSize,this.getMetabaseDashboards()}onSortChange(e){this.metabaseDashboard.sortBy=e.active,this.metabaseDashboard.sortOrder=e.direction,this.getMetabaseDashboards()}onIdentifiesTypeChange(e){this.metabaseDashboard.identifiesType=e.value,this.getMetabaseDashboards()}clearAllFilters(){this.metabaseDashboard.page=1,this.metabaseDashboard.perPage=5,this.metabaseDashboard.identifiesKey="",this.metabaseDashboard.sortBy="created_at",this.metabaseDashboard.sortOrder="desc",this.metabaseDashboard.identifiesType="all",this.metabaseDashboard.identifiesKey="",this.metabaseDashboard.brandSearchText="",this.onBrandSearchTextChange.next(null),this.onIdentifiesKeyChange.next(null),this.getMetabaseDashboards()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=E({type:t,selectors:[["app-metabase-dashboards"]],viewQuery:function(s,n){s&1&&ae(n.iframeElements,Ft,5),s&2&&ie()},decls:43,vars:5,consts:[["metabaseActionBtn",""],["metabaseActionMenu","matMenu"],[1,"min-vh-100"],[1,"dashboard-container-fluid"],[1,"row"],[1,"col-12"],[1,"d-flex","flex-wrap","justify-content-between","align-items-center","admins-header"],[1,"dashboard-heading","mb-2"],[1,"actions"],["mat-button","","color","accent",1,"custom",3,"click"],[1,"left-icon"],[1,"fal","fa-plus"],[1,"row","align-items-center","mb-4"],[1,"col-12","col-md-4"],[3,"selectionChange","value"],["value","all"],["value","G
3ivingEvent"],["value","CommunityPage"],["value","GroupPage"],["type","text","matInput","","placeholder","Enter brand id or name",3,"ngModelChange","ngModel"],["matPrefix","","fontSet","fa-solid","fontIcon","fa-search"],["matSuffix","","fontSet","fa-solid","fontIcon","fa-times-circle"],[1,"col-12","col-md-4","text-end"],[1,"fa-solid","fa-eraser"],["matSuffix","","fontSet","fa-solid","fontIcon","fa-times-circle",3,"click"],["type","text","matInput","","placeholder","Filter by identifies key",3,"ngModelChange","ngModel"],[1,"mb-2"],["viewBox","0 0 100 25"],["x","0","y","0","rx","3","ry","3","width","100%","height","100%"],[1,"table-wrapper","mb-3"],[1,"table-responsive"],["mat-table","","matSort","",3,"matSortChange","dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","identifies_type"],["matColumnDef","identifies_id"],["matColumnDef","name"],["matColumnDef","description"],["matColumnDef","dashboard_id"],["matColumnDef","rank"],["matColumnDef","brandId"],["matColumnDef","created_at"],["matColumnDef","updated_at"],["matColumnDef","actions"],["mat-header-cell","","style","justify-content: flex-end",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"table-no-results"],[1,"update-overlay"],["showFirstLastButtons","",3,"page","length","pageSize","pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",2,"justify-content","flex-end"],[1,"fal","fa-tools"],["mat-icon-button","","aria-label","Metabase Actions","matTooltip","Options",1,"sm",3,"matMenuTriggerFor"],[1,"fas","fa-ellipsis-v"],[1,"auto-width","shadow-lg"],["mat-menu-item","","aria-label","edit",3,"click"],[1,"fal","fa-pencil"],[1,"ps-1"],["mat-menu-item","","aria-label","delete",3,"click"],[1,"fal","fa-trash-alt"],["mat-header-row",""],["mat-row",""],[1,"spinner"],["diameter","50"]],template:function(s,n){s&1&&(i(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h1",7),o(6,"Metabase Dashboards"),a(),i(7,"div",8)(8,"button",9),p("click",function(){return n.createMetabase()}),i(9,"span",10),m(10,"i",11),a(),i(11,"span"),o(12,"Create"),a()()()()()(),i(13,"div",12)(14,"div",13)(15,"mat-form-field")(16,"mat-label"),o(17,"Identifies Type"),a(),i(18,"mat-select",14),p("selectionChange",function(S){return n.onIdentifiesTypeChange(S)}),i(19,"mat-option",15),o(20,"All"),a(),i(21,"mat-option",16),o(22,"Giving Event"),a(),i(23,"mat-option",17),o(24,"Community"),a(),i(25,"mat-option",18),o(26,"Group"),a()()()(),i(27,"div",13)(28,"mat-form-field")(29,"mat-label"),o(30,"Search by Brand"),a(),i(31,"input",19),W("ngModelChange",function(S){return z(n.metabaseDashboard.brandSearchText,S)||(n.metabaseDashboard.brandSearchText=S),S}),p("ngModelChange",function(S){return n.onBrandSearchTextChange.next(S)}),a(),m(32,"mat-icon",20),u(33,kt,1,0,"mat-icon",21),a()(),i(34,"div",22)(35,"button",9),p("click",function(){return n.clearAllFilters()}),i(36,"span",10),m(37,"i",23),a(),i(38,"span"),o(39,"Clear all filters"),a()()(),u(40,Lt,7,2,"div",13),a(),u(41,Rt,4,0,"section")(42,da,42,9,"section"),a()()),s&2&&(d(18),h("value",n.metabaseDashboard.identifiesType),d(13),j("ngModel",n.metabaseDashboard.brandSearchText),d(2),_(n.metabaseDashboard.brandSearchText?33:-1),d(7),_(n.metabaseDashboard.identifiesType!=="all"?40:-1),d(),_(n.contentLoading?41:42))},dependencies:[we,V,k,De,F,w,I,P,R,L,Le,Re,O,U,B,N,K,A,Pe,dt,Xe,et,nt,tt,Ze,ot,at,it,rt,st,bt,pt,ct,Ye,Je,We,Qe,Ne,Ke,mt,lt,ze,je,qe,He,le],encapsulation:2})}return t})();export{di as MetabaseDashboardsComponent}; 4 5//# debugId=763bd629-397f-5af7-afc7-824c61a527dd
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.