1import'./chunk-DedQC7Yn.js';import {n as ne,J,_ as _1e,fY as Ge,h3 as Yi$1,S as SW,T,b,X,p as pe,P as Pe,e as e$1,t as Ob,a as P,N as N$1,be as An,c as Se,o as od,f as Xt,O as Oe,D as Dt,g as Rn,d as ce,K as Ki$1,k as ko,L as Lb,M as Mu,b6 as A3e,f_ as ci,R,B as Be,C as Au,bw as Kt,m as Dn,z,bV as Yt,i as hc,u as ue,h4 as Ot,j as zn,bC as Zo,F as Fe,cu as x,s as p,r as B,v as Ss,b5 as vp,E as q,aI as os,G as xZ,H as NZ,I as _Z,aM as Tu,Q as hZ,U as ec,V as jCe,Y as wu,aO as ns,$ as $9,bh as GF,bi as Du,Z as RQ,a0 as pMe,a1 as xMe,a2 as MMe,a3 as NMe,a4 as AMe,a5 as TMe,a6 as PMe,a7 as RMe,a8 as OMe,a9 as FMe,aa as LMe,ab as fv,ac as bW,ad as W8,ae as w,ag as Ee,ah as S$1,bk as sa,bl as Td,ai as Ce,aj as be,ak as em,al as Ht,am as tm,an as Fq,ao as le,ap as E,as as Uw,bm as ca,aq as ye,ar as Lt,at as Bq,au as et,av as q$1,aw as $,ax as g,ay as iD,az as vn,aB as x$1,aC as Z_e,aD as t1,aE as W_e,aF as Y_e,cd as _1,aG as eu,aH as mY,dv as lO,d6 as z8,aJ as kL,aK as rZ,aL as FZ,cm as hDe,cn as vF,co as jK,aN as Cb,aP as nb,bG as ob,aR as N4,aS as F4,aX as Y,aU as Tr,aV as Ae,af as he,aA as Ve,aY as Ml,br as Ge$1,aZ as X$1,aW as Rq,aT as Zn,dL as Rd,a_ as gn,a$ as Ct,b0 as wt}from'./main-IZHJ2OCR.js';import {s}from'./chunk-i66OAyKa.js';import'./chunk-CNlunSl3.js';import'./chunk-CWv-OwU7.js';import'./chunk-CnxuHBAx.js';import'./chunk-BSCCaqP7.js';import'./chunk-QQwpGhEE.js';import'./chunk-BG6Y4irt.js';import'./chunk-A10Z6-W8.js';import'./chunk-B5dBYwcC.js';var We=(()=>{class e extends X{constructor(t,r){super(t,r);}generateCachedSearchResults(){}static{this.\u0275fac=function(r){return new(r||e)(pe(Ge),pe(q))};}static{this.\u0275prov=Pe({token:e,factory:e.\u0275fac});}}return e})();var hi=["searchEventType"],vi=e=>["/transformers",e],Zt=e=>({"oppt-hide":e}),yi=()=>["new"],gi=(e,c)=>["/transformers",e,"events",c];function Ci(e,c){if(e&1&&(w(0,"mat-option",7),Ee(1),S$1()),e&2){let t=c.$implicit;le("value",t),E(),Ge$1(t);}}function bi(e,c){if(e&1&&(w(0,"button",25)(1,"mat-icon"),Ee(2,"add"),S$1()()),e&2){let t=X$1();Lt(Uw(3,Zt,t.childActive)),le("routerLink",Rq(5,yi));}}function Ti(e,c){if(e&1&&(w(0,"th",26),Ee(1),S$1()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("transformerEventTypeCode")," ");}}function Ei(e,c){if(e&1&&(w(0,"td",27),Ee(1),S$1()),e&2){let t=c.$implicit;E(),Zn(" ",t.transformerEventTypeCode," ");}}function Si(e,c){if(e&1&&(w(0,"th",26),Ee(1),S$1()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("eventDate")," ");}}function _i(e,c){if(e&1&&(w(0,"td",27),Ee(1),S$1()),e&2){let t=c.$implicit;E(),Zn(" ",t.eventDate," ");}}function xi(e,c){if(e&1&&(w(0,"th",26),Ee(1),S$1()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("referenceDocument")," ");}}function Ii(e,c){if(e&1&&(w(0,"td",27),Ee(1),S$1()),e&2){let t=c.$implicit;E(),Zn(" ",t.referenceDocument," ");}}function wi(e,c){if(e&1&&(w(0,"th",26),Ee(1),S$1()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("notes")," ");}}function Di(e,c){if(e&1&&(w(0,"td",27),Ee(1),S$1()),e&2){let t=c.$implicit;E(),Zn(" ",t.notes," ");}}function Fi(e,c){e&1&&Ce(0,"tr",28);}function Mi(e,c){if(e&1&&Ce(0,"tr",29),e&2){let t=c.$implicit;le("routerLink",Rd(2,gi,t.transformerId,t.transformerEventId))("routerLinkActive","mat-row-selected");}}function ki(e,c){e&1&&Ce(0,"oppt-not-found-state",24);}var Xe=(()=>{class e{get transformerId(){return Ob.getParam(this.route,"transformerId")}get orderBy(){return this.searchService.getOrderByClause(this.sort)}set orderBy(t){this.searchService.setMatSort(this.sort,t);}constructor(t,r,i,s,g,F){this.route=t,this.transformer=r,this.searchService=i,this.session=s,this.changeRef=g,this.tenantCodeLookup=F,this.ngUnsubscribe=new P,this.displayedColumns=["transformerEventTypeCode","eventDate","referenceDocument","notes"],this.busy=true,this.showList=false,this.showNotFoundState=false,this.transformerEventTypeCodeOptions=[],this.canCreate=false,this.setState=(_,h)=>{if(this.busy=_,_||this.searchService.criteria===null){this.showNotFoundState&&(this.showNotFoundState=false),this.showList&&(this.showList=false);return}h?(this.showList||(this.showList=true),this.showNotFoundState&&(this.showNotFoundState=false)):(this.showList&&(this.showList=false),this.showNotFoundState||(this.showNotFoundState=true));},this.setCriteria=(_=false)=>{let h=this.getCriteria();return _?(this.searchService.criteria=h,true):(N$1.isShallowEqual(h,this.searchService.criteria)||(this.searchService.criteria=h),true)},this.getCriteria=()=>
1{if(N$1.isNull(this.transformer.entity))return null;let _=this.transformer.entity.transformerId;if(N$1.isNull(_))return null;let h=null;return h=new Ot,h.defaultSearch=this.search.opptSearchText,h.transformerEventTypeCodes=this.searchEventType.value,h.transformerId=_,h.systemId=this.session.systemId,h.orderBy=this.orderBy,h.pageSize=this.pager.pageSize,h.pageIndex=this.pager.pageIndex,h};}ngAfterViewInit(){this.searchService.metadata().pipe(od(0),Be(1)).subscribe(t=>{this.meta=t,N$1.isNotNull(this.searchService.criteria)&&(this.search.opptSearchText=this.searchService.criteria.defaultSearch,this.searchEventType.value=this.searchService.criteria.transformerEventTypeCodes,this.orderBy=this.searchService.criteria.orderBy,this.pager.pageSize=this.searchService.criteria.pageSize,this.pager.pageIndex=this.searchService.criteria.pageIndex),this.setCriteria();}),this.session.systemIdObserver.pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(t=>{this.canCreate=this.session.claimCheck(hc.TransformerEdit,t),this.searchService.criteria&&this.searchService.criteria.systemId!==t&&(this.pager.pageIndex=0,this.setCriteria(true));}),Kt(this.search.opptSearchTextChange,this.transformer.entityChanges,this.searchEventType.selectionChange).pipe(zn(400),Oe(this.ngUnsubscribe)).subscribe(()=>{this.pager.pageIndex=0,this.setCriteria(true),this.changeRef.detectChanges();}),this.sort.sortChange.pipe(zn(200),Oe(this.ngUnsubscribe)).subscribe(t=>{this.pager.pageIndex=0,this.setCriteria();}),this.pager.page.pipe(zn(200),Oe(this.ngUnsubscribe)).subscribe(()=>{this.setCriteria();}),this.session.systemIdObserver.pipe(od(100),Zo(),Xt(t=>this.tenantCodeLookup.list().pipe(Oe(this.ngUnsubscribe),ue(r=>r.reduce((s,g)=>(g.codeType==="Transformer event type"&&(g.systemId==null||g.systemId===t)&&s.push(g.code),s),[])))),Oe(this.ngUnsubscribe),od(0)).subscribe(t=>{this.transformerEventTypeCodeOptions=t;}),Dn([this.searchService.busy,this.searchService.anyResults]).pipe(zn(10),Oe(this.ngUnsubscribe)).subscribe(t=>{this.setState(t[0],t[1]);});}trackTransformerEventBy(t,r){return r?r.transformerEventId:void 0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(ce(ko),ce(ci),ce(We),ce(Lb),ce(Fe),ce(x))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event-list"]],viewQuery:function(r,i){if(r&1&&et(RQ,5)($9,5)(_Z,5)(hi,5),r&2){let s;q$1(s=$())&&(i.sort=s.first),q$1(s=$())&&(i.pager=s.first),q$1(s=$())&&(i.search=s.first),q$1(s=$())&&(i.searchEventType=s.first);}},inputs:{childActive:"childActive"},standalone:false,decls:37,vars:23,consts:[["searchEventType",""],["paginator",""],["opptToolbarColor","primary",1,"oppt-host",3,"opptBusy","opptMaxWidth"],["opptToolbarLeft","","mat-icon-button","","type","menu",3,"routerLink"],["opptToolbarRight","",1,"flex-row","flex-self-center","oppt-mr10"],["appearance","fill",1,"oppt-toolbar-select","no-subscript"],["multiple","true","placeholder","Any type"],[3,"value"],["opptToolbarRight",""],["opptBottomRightFab","","mat-fab","","color","accent","aria-label","Create a new event","type","button",3,"class","routerLink"],["heading","Transformer events",3,"asside","showBorder"],[1,"flex-column"],["mat-table","","matSort","",1,"oppt-table",3,"dataSource","trackBy"],["matColumnDef","transformerEventTypeCode"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","eventDate"],["matColumnDef","referenceDocument"],["matColumnDef","notes"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink","routerLinkActive",4,"matRowDef","matRowDefColumns"],[3,"hidden"],["pageIndex","0","pageSize","session.pageSize",3,"length"],[1,"oppt-fab-space"],["titleCaption","No transformer events found for this search"],["opptBottomRightFab","","mat-fab","","color","accent","aria-label","Create a new event","type","button",3,"routerLink"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink","routerLinkActive"]],template:function(r,i){r&1&&(w(0,"oppt-section",2)(1,"button",3)(2,"mat-icon"),Ee(3,"arrow_back"),S$1()(),w(4,"div",4)(5,"mat-form-field",5)(6,"mat-select",6,0),sa(8,Ci,2,2,"mat-option",7,Td),S$1()()(),Ce(10,"oppt-toolbar-search",8),be(11,bi,3,6,"button",9),Ce(12,"oppt-table-header",10),w(13,"div",11)(14,"div")(15,"table",12),em(16,13),Ht(1
17,Ti,2,1,"th",14)(18,Ei,2,1,"td",15),tm(),em(19,16),Ht(20,Si,2,1,"th",14)(21,_i,2,1,"td",15),tm(),em(22,17),Ht(23,xi,2,1,"th",14)(24,Ii,2,1,"td",15),tm(),em(25,18),Ht(26,wi,2,1,"th",14)(27,Di,2,1,"td",15),tm(),Ht(28,Fi,1,0,"tr",19)(29,Mi,1,5,"tr",20),S$1(),w(30,"div",21),Fq(31,"async"),Ce(32,"mat-paginator",22,1),Fq(34,"async"),S$1(),Ce(35,"div",23),S$1()(),be(36,ki,1,0,"oppt-not-found-state",24),S$1()),r&2&&(le("opptBusy",i.busy)("opptMaxWidth",1400),E(),le("routerLink",Uw(19,vi,i.transformerId)),E(7),ca(i.transformerEventTypeCodeOptions),E(3),ye(i.canCreate?11:-1),E(),le("asside",i.searchService.resultsText)("showBorder",!i.showList),E(2),Lt(Uw(21,Zt,!i.showList)),E(),le("dataSource",i.searchService)("trackBy",i.trackTransformerEventBy),E(13),le("matHeaderRowDef",i.displayedColumns),E(),le("matRowDefColumns",i.displayedColumns),E(),le("hidden",Bq(31,15,i.searchService.noPaging)),E(2),le("length",Bq(34,17,i.searchService.totalRecords)),E(4),ye(i.showNotFoundState?36:-1));},dependencies:[os,xZ,NZ,_Z,Tu,hZ,ec,jCe,wu,ns,$9,GF,Du,RQ,pMe,xMe,MMe,NMe,AMe,TMe,PMe,RMe,OMe,FMe,LMe,fv,bW,W8],styles:[".mat-column-referenceDocument[_ngcontent-%COMP%], .mat-column-notes[_ngcontent-%COMP%]{display:none}@media(min-width:600px){.mat-column-referenceDocument[_ngcontent-%COMP%]{display:table-cell}}@media(min-width:1280px){.mat-column-notes[_ngcontent-%COMP%]{display:table-cell}}"],changeDetection:1});}}return e})();var Ni=e=>({"oppt-hide-lt-lg":e}),Oi=e=>({"oppt-hide":e}),ei=(()=>{class e{constructor(){}static{this.\u0275fac=function(r){return new(r||e)};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-events"]],standalone:false,decls:9,vars:10,consts:[["outlet","outlet"],[1,"oppt-host","flex-row"],[1,"flex-fill-gap"],[1,"oppt-host","flex-list-detail"],[1,"oppt-host","flex-list"],[1,"oppt-host",3,"childActive"],[1,"oppt-host","flex-detail"],[1,"oppt-host"]],template:function(r,i){if(r&1&&(w(0,"div",1),Ce(1,"div",2),w(2,"div",3)(3,"article",4),Ce(4,"oppt-transformer-event-list",5),S$1(),w(5,"aside",6),Ce(6,"router-outlet",7,0),S$1()(),Ce(8,"div",2),S$1()),r&2){let s=vn(7);E(3),Lt(Uw(6,Ni,s.isActivated)),E(),le("childActive",s.isActivated),E(),Lt(Uw(8,Oi,!s.isActivated)),le("@growIn",s.isActivated);}},dependencies:[iD,Xe],encapsulation:2,data:{animation:[g]},changeDetection:1});}}return e})();var S=(()=>{class e extends z{get identifyingFieldsDisabled(){return this._identifyingFieldsDisabled}set identifyingFieldsDisabled(t){this._identifyingFieldsDisabled=t,this.afterDisabledChanged();}constructor(t,r,i,s,g){super(),this.service=t,this.session=r,this.transformerService=i,this.lookup=s,this.tenantCodeLookup=g,this.ngUnsubscribe=new P,this._identifyingFieldsDisabled=false,this.canDelete=new Yt(false),this.serverService=t,this.formFields=["transformerEventTypeCode","eventDate","referenceDocument","notes","customText1","customText2","customText3","customText4","customText5"],Dn([this.formChanges,this.transformerService.entityChanges]).pipe(Oe(this.ngUnsubscribe)).subscribe(F=>{let _=F[1];if(N$1.isNull(this.entity)||N$1.isNull(_)||!_.canEditEvents||!this.session.claimCheck(hc.TransformerEdit,_.systemId)){this.canEdit.next(false),this.canDelete.next(false);return}this.canEdit.next(true),this.canDelete.next(true);}),this.initializeLookups();}initializeLookups(){this.transformerEventTypeCodeOptionsObserver=this.formChanges.pipe(Xt(t=>N$1.isNull(t)?An:this.tenantCodeLookup.list()),ue(t=>{let r=t.reduce((i,s)=>(s.codeType==="Transformer event type"&&i.push(s.code),i),[]);return N$1.isNotNullOrEmpty(this.entity.transformerEventTypeCode)&&r.findIndex(i=>i===this.entity.transformerEventTypeCode)<0&&r.push(this.entity.transformerEventTypeCode),r}));}afterDisabledChanged(){N$1.isNull(this.form);}addCustomValidators(){}ngOnDestroy(){super.ngOnDestroy(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(pe(Yi$1),pe(Lb),pe(ci),pe(A3e),pe(x))};}static{this.\u0275prov=Pe({token:e,factory:e.\u0275fac});}}return e})();var Ri=["formRef"],Bi=["transformerEventTypeSelect"],ji=["eventDateTextRef"];
1function Ui(e,c){if(e&1&&(w(0,"mat-option",18),Ee(1),S$1()),e&2){let t=c.$implicit;le("value",t),E(),Ge$1(t);}}function Ai(e,c){e&1&&(w(0,"oppt-form-field",19)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",20),N4(),S$1()()),e&2&&(E(3),F4());}function Vi(e,c){e&1&&(w(0,"oppt-form-field",19)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",21),N4(),S$1()()),e&2&&(E(3),F4());}function Pi(e,c){e&1&&(w(0,"oppt-form-field",19)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",22),N4(),S$1()()),e&2&&(E(3),F4());}function Qi(e,c){e&1&&(w(0,"oppt-form-field",19)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",23),N4(),S$1()()),e&2&&(E(3),F4());}function zi(e,c){e&1&&(w(0,"oppt-form-field",6)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",24),N4(),S$1()()),e&2&&(E(3),F4());}var ae=(()=>{class e{get form(){return this.service.form}get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(t,r,i,s,g){this.dialog=t,this.transformer=r,this.service=i,this.changeRef=s,this.lookup=g,this.ngUnsubscribe=new P,this.minDate=p.minDate,this.maxDate=p.maxDate,this.save=new B,this.transformerEventTypeOptions=[];}ngAfterViewInit(){this.service.transformerEventTypeCodeOptionsObserver.pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(t=>{this.transformerEventTypeOptions=t,this.changeRef.detectChanges();}),Ss(this.formRef.nativeElement,"submit").pipe(zn(100),Oe(this.ngUnsubscribe)).subscribe(t=>{this.save&&this.save.emit(this.meta);}),this.service.formChanges.pipe(zn(10),Oe(this.ngUnsubscribe)).subscribe(t=>{N$1.isNull(t)||!t.enabled||(this.entity.entityAction==="Create"?this.transformerEventTypeSelect.focus():Ob.setFocusAndSelect(this.eventDateTextRef),this.changeRef.detectChanges());});}ngOnDestroy(){this.save.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(ce(vp),ce(ci),ce(S),ce(Fe),ce(A3e))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event-form"]],viewQuery:function(r,i){if(r&1&&et(Ri,5)(Bi,5)(ji,5),r&2){let s;q$1(s=$())&&(i.formRef=s.first),q$1(s=$())&&(i.transformerEventTypeSelect=s.first),q$1(s=$())&&(i.eventDateTextRef=s.first);}},inputs:{formId:"formId"},outputs:{save:"save"},standalone:false,decls:33,vars:16,consts:[["formRef",""],["transformerEventTypeSelect",""],["eventDateTextRef",""],["eventDateRef",""],["novalidate","",3,"formGroup","formMetadata","id"],[1,"flex-form"],[1,"flex-100p"],["formControlName","transformerEventTypeCode"],[3,"value",4,"ngFor","ngForOf"],[1,"flex-160"],["matInput","","formControlName","eventDate","autocomplete","off","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],[1,"flex-min-150"],["matInput","","type","text","maxLength","50","autocomplete","off","formControlName","referenceDocument"],["matInput","","type","text","maxLength","200","autocomplete","off","formControlName","notes"],["class","flex-min-150 flex-100p-lt-sm",4,"ngIf"],["class","flex-100p",4,"ngIf"],[3,"value"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","customText1","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText2","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText3","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText4","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText5","type","text","maxLength","200","autocomplete","off"]],template:function(r,i){if(r&1&&(w(0,"form",4,0)(2,"div",5)(3,"oppt-form-field",6)(4,"mat-form-field"),Ce(5,"mat-label"),w(6,"mat-select",7,1),Ht(8,Ui,2,2,"mat-option",8),Fq(9,"async"),S$1(),N4(),S$1()(),w(10,"oppt-form-field",9)(11,"mat-form-field"),Ce(12,"mat-label")(13,"input",10,2),N4(),Ce(15,"mat-datepicker-toggle",11)(16,"mat-datepicker",12,3),S$1()(),w(18,"oppt-form-field",13)(19,"mat-form-field"),Ce(20,"mat-label")(21,"input",14),N4(),S$1()(),w(22,"oppt-form-field",6)(23,"mat-form-field"),Ce(24,"mat-label")(25,"input",15),N4(),S$1()()(),w(26,"div",5),Ht(27,Ai,4,0,"oppt-form-field",16)(28,Vi,4,0,"oppt-form-field",16),S$1(),w(29,"div",5),Ht(30,Pi,4,0,"oppt-form-field",16)(31,Qi,4,0,"oppt-form-field",16)(32,zi,4,0,"oppt-form-field",17),S$1()()),r&2){let s=vn(17);le("formGroup",i.form)("formMetadata",i.meta)("id",i.formId)("@fadeIn",void 0),E(6),F4(),E(2),le("ngForOf",Bq(9,14,i.service.transformerEventTypeCodeOptionsObserver)),E(5),le("min",i.minDate)("max",i.maxDate)("matDatepicker",s),F4(),E(2),le("for",s),E(6),F4(),E(4),F4(),E(2),le("ngIf",i.meta.showField("customText1")),E(),le("ngIf",i.meta.showField("customText2")),E(2),le("ngIf",i.meta.showField("customText3")),E(),le("ngIf",i.meta.showField("customText4")),E(),le("ngIf",i.meta.showField("customText5"));}},dependencies:[Z_e,t1,W_e,Y_e,_1,eu,mY,lO,z8,os,kL,rZ,FZ,Tu,hDe,vF,jK,Cb,ns,nb,ob,GF,Du,W8],styles:["mat-chip[_ngcontent-%COMP%]{text-align:center}.oppt-width-spacer[_ngcontent-%COMP%]{height:0;margin:0;padding:0}"],data:{animation:[x$1]},changeDetection:1});}}return e})();
1function Wi(e,c){if(e&1&&(w(0,"button",3),Fq(1,"async"),Ee(2,"Save"),S$1()),e&2){let t=X$1();le("disabled",Bq(1,1,t.cannotSave));}}function qi(e,c){if(e&1){let t=gn();w(0,"oppt-transformer-event-form",6),he("save",function(){Ct(t);let i=X$1();return wt(i.save())}),S$1();}}var ri=(()=>{class e extends e$1{get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(t,r,i,s,g,F,_){super(g),this.router=t,this.route=r,this.session=i,this.dialog=s,this.lookup=F,this.transformerService=_,this.ngUnsubscribe=new P,this.initialize=()=>{let h=this.transformerService.entity;if(N$1.isNull(h))return An;if(!h.canEditEvents)return this.close(),An;let et=this.service.getNewEntity();return et.transformerId=h.transformerId,this.service.resolveNew(et)},this.close=()=>{this.router.navigate(["/transformers",this.transformerId,"events"]);},this.onBeforeChangeSystemId=h=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){h.cancel("Busy, please wait");return}this.service.form.dirty&&h.cancel("Unsaved changes");}},this.service.disabled=false;}ngAfterViewInit(){this.transformerService.entityChanges.pipe(Se(N$1.isNotNull),od(0),Xt(this.initialize),Oe(this.ngUnsubscribe)).subscribe(t=>{},t=>{console.log(t),this.close();}
1),this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}save(){this.service.save().pipe(Dt(t=>t.resultType==="Failure"?An:(this.service.showForm.next(false),Y(t))),od(100),Dt(t=>t.resultType==="Failure"?An:this.initialize())).subscribe(t=>{this.transformerService.updateStatistics.next(void 0);},t=>{console.log(t),this.close();});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardNew().pipe(Oe(this.ngUnsubscribe),Rn(t=>{let r=this.service.entity;t&&N$1.isNotNull(r)&&this.service.clear();})):true}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(ce(Ki$1),ce(ko),ce(Lb),ce(Mu),ce(S),ce(A3e),ce(ci))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event-new"]],standalone:false,features:[Ve([S]),Ae],decls:12,vars:10,consts:[["opptToolbarColor","primary-darker",1,"oppt-host",3,"opptBusy","opptMaxWidth"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"click"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-flat-button","","color","accent","type","submit","form","transformerEventEdit",3,"disabled"],[1,"page-content",3,"keydown.control.enter","keydown.escape"],["formId","transformerEventEdit"],["formId","transformerEventEdit",3,"save"]],template:function(r,i){r&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1),he("click",function(){return i.close()}),w(3,"mat-icon"),Ee(4,"close"),S$1()(),w(5,"h3",2),Ee(6,"Transformer event"),S$1(),be(7,Wi,3,3,"button",3),Fq(8,"async"),w(9,"div",4),he("keydown.control.enter",function(){return i.save()})("keydown.escape",function(){return i.close()}),be(10,qi,1,0,"oppt-transformer-event-form",5),Fq(11,"async"),S$1()()),r&2&&(le("opptBusy",Bq(1,4,i.busy))("opptMaxWidth",820),E(7),ye(Bq(8,6,i.showForm)?7:-1),E(3),ye(Bq(11,8,i.showForm)?10:-1));},dependencies:[hZ,Tr,ec,wu,ae,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:16px 8px 16px 16px}"],changeDetection:1});}}return e})();var ni=(()=>{class e{get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(t,r,i,s,g){this.service=t,this.transformer=r,this.session=i,this.router=s,this.route=g,this.ngUnsubscribe=new P,this.onBeforeChangeSystemId=F=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){F.cancel("Busy, please wait");return}this.service.form.dirty&&F.cancel("Unsaved changes");}},t.disabled=true;}ngAfterViewInit(){Dn([this.route.params,this.transformer.entityChanges.pipe(Se(N$1.isNotNull))]).pipe(od(0),Dt(t=>this.service.resolve(t[0].transformerEventId)),Oe(this.ngUnsubscribe)).subscribe(t=>{},t=>{console.log(t),this.router.navigate(["/transformers",this.transformerId,"events"]);}
1),this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(ce(S),ce(ci),ce(Lb),ce(Ki$1),ce(ko))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event"]],standalone:false,features:[Ve([S])],decls:1,vars:0,consts:[[1,"oppt-host"]],template:function(r,i){r&1&&Ce(0,"router-outlet",0);},dependencies:[iD],encapsulation:2,changeDetection:1});}}return e})();var Hi=e=>["/transformers",e,"events"],$i=()=>["./edit"];function Gi(e,c){e&1&&(w(0,"button",3)(1,"mat-icon"),Ee(2,"mode_edit"),S$1()()),e&2&&le("routerLink",Rq(1,$i));}function Yi(e,c){if(e&1){let t=gn();w(0,"button",6),Fq(1,"async"),he("click",function(){Ct(t);let i=X$1();return wt(i.delete())}),w(2,"mat-icon"),Ee(3,"delete"),S$1()();}if(e&2){let t=X$1();le("disabled",Bq(1,1,t.busy));}}function Ji(e,c){e&1&&Ce(0,"oppt-transformer-event-form");}var oi=(()=>{class e extends e$1{get canDelete(){return this.service.canDelete}get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(t,r,i,s,g,F){super(g),this.router=t,this.route=r,this.handler=i,this.transformer=s,this.dialog=F,this.ngUnsubscribe=new P,this.service.disabled=true;}ngAfterViewInit(){this.service.formChanges.pipe(Oe(this.ngUnsubscribe)).subscribe(t=>{if(N$1.isNull(this.service.entity))return;let r=this.service.entity.entityError;N$1.isNullOrEmpty(r)||this.handler.showMessage(r);});}delete(){this.service.canDelete.pipe(Be(1),Xt(t=>t?this.dialog.Confirm("Delete transformer event?","Are you sure you want to delete this transformer event?","Delete","Cancel"):An),Oe(this.ngUnsubscribe),Xt(t=>t?this.service.delete():Y({resultType:"Failure",entity:null}))).subscribe(t=>{t.resultType!=="Failure"&&(this.transformer.updateStatistics.next(void 0),this.router.navigate(["/transformers",this.transformerId,"events"]));});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:!this.service.busy.getValue()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(ce(Ki$1),ce(ko),ce(Au),ce(ci),ce(S),ce(Mu))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event-detail"]],standalone:false,features:[Ae],decls:14,vars:16,consts:[["opptToolbarColor","primary-darker",1,"oppt-host",3,"opptBusy","opptMaxWidth"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Delete transformer event",3,"disabled"],[1,"page-content"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Delete transformer event",3,"click","disabled"]],template:function(r,i){r&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1)(3,"mat-icon"),Ee(4,"close"),S$1()(),w(5,"h3",2),Ee(6,"Transformer event"),S$1(),be(7,Gi,3,2,"button",3),Fq(8,"async"),be(9,Yi,4,3,"button",4),Fq(10,"async"),w(11,"div",5),be(12,Ji,1,0,"oppt-transformer-event-form"),Fq(13,"async"),S$1()()),r&2&&(le("opptBusy",Bq(1,6,i.busy))("opptMaxWidth",820),E(2),le("routerLink",Uw(14,Hi,i.transformerId)),E(5),ye(Bq(8,8,i.canEdit)?7:-1),E(2),ye(Bq(10,10,i.canDelete)?9:-1),E(3),ye(Bq(13,12,i.showForm)?12:-1));},dependencies:[hZ,ec,wu,Ml,fv,ae,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:16px 8px 16px 16px}"],changeDetection:1});}}return e})();function Ki(e,c){if(e&1&&(w(0,"button",3),Fq(1,"async"),Ee(2,"Save"),S$1()),e&2){let t=X$1();le("disabled",Bq(1,1,t.cannotSave));}}function Xi(e,c){if(e&1){let t=gn();w(0,"oppt-transformer-event-form",6),he("save",function(){Ct(t);let i=X$1();return wt(i.save())}),S$1();}}var ai=(()=>{class e extends e$1{get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(t,r,i,s,g){super(s),this.router=t,this.route=r,this.transformer=i,this.dialog=g,this.ngUnsubscribe=new P,this.service.disabled=false,this.service.identifyingFieldsDisabled=true;}ngAfterViewInit(){Kt(this.service.formChanges,this.transformer.entityChanges).pipe(Oe(this.ngUnsubscribe)).subscribe(t=>{N$1.isNull(this.transformer.entity)||N$1.isNull(this.service.entity)||this.service.canEdit.getValue()||this.close();});}close(){this.router.navigate(["/transformers",this.transformerId,"events"]);}save(){this.service.save().subscribe(t=>{t.resultType!=="Failure"&&(this.transformer.updateStatistics.next(void 0),this.close());});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardChanges().pipe(Rn(t=>{let r=this.service.entity;t&&N$1.isNotNull(r)&&this.service.clear();})):true}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(r){return new(r||e)(ce(Ki$1),ce(ko),ce(ci),ce(S),ce(Mu))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event-edit"]],standalone:false,features:[Ae],decls:12,vars:10,consts:[["opptToolbarColor","primary-darker",1,"oppt-host",3,"opptBusy","opptMaxWidth"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"click"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-flat-button","","color","accent","type","submit","form","transformerEventEdit",3,"disabled"],[1,"page-content",3,"keydown.control.enter","keydown.escape"],["formId","transformerEventEdit"],["formId","transformerEventEdit",3,"save"]],template:function(r,i){r&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1),he("click",function(){return i.close()}),w(3,"mat-icon"),Ee(4,"close"),S$1()(),w(5,"h3",2),Ee(6,"Transformer event"),S$1(),be(7,Ki,3,3,"button",3),Fq(8,"async"),w(9,"div",4),he("keydown.control.enter",function(){return i.save()})("keydown.escape",function(){return i.close()}),be(10,Xi,1,0,"oppt-transformer-event-form",5),Fq(11,"async"),S$1()()),r&2&&(le("opptBusy",Bq(1,4,i.busy))("opptMaxWidth",820),E(7),ye(Bq(8,6,i.showForm)?7:-1),E(3),ye(Bq(11,8,i.showForm)?10:-1));},dependencies:[hZ,Tr,ec,wu,ae,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:16px 8px 16px 16px}"],changeDetection:1});}}return e})();var Zi=[{path:"",component:ei,children:[{path:"new",component:ri,canDeactivate:[b],
1canActivate:[T],canActivateChild:[T],data:{claim:["TransformerEdit","Transformer"]}},{path:":transformerEventId",component:ni,children:[{path:"",pathMatch:"full",component:oi,canDeactivate:[b]},{path:"edit",component:ai,canDeactivate:[b],canActivate:[T],canActivateChild:[T],data:{claim:["TransformerEdit","Transformer"]}},{path:"**",redirectTo:""}]}]}],si=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)};}static{this.\u0275mod=ne({type:e});}static{this.\u0275inj=J({imports:[SW.forChild(Zi),SW]});}}return e})();var On=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)};}static{this.\u0275mod=ne({type:e});}static{this.\u0275inj=J({providers:[Ge,We,Yi$1],imports:[_1e,si,s]});}}return e})();export{On as TransformerEventsModule};
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.