1(self.webpackChunkloocalio=self.webpackChunkloocalio||[]).push([[4833],{94506:(t,e,i)=>{"use strict";i.d(e,{r:()=>l});var o=i(79765),s=i(46782),n=i(37716),a=i(46289),r=i(19657);const c=["*"];let l=(()=>{class t{constructor(t){this.platformService=t,this.platformWidth="xl",this.destroy$=new o.xQ}ngOnInit(){this.platformService.width$.pipe((0,s.R)(this.destroy$)).subscribe(t=>{this.platformWidth=t})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}isPlatformWidthDense(){return this.platformService.isWidth("lt-md",this.platformWidth)}}return t.\u0275fac=function(e){return new(e||t)(n.Y36(a.m))},t.\u0275cmp=n.Xpm({type:t,selectors:[["loc-card-crud"]],hostVars:2,hostBindings:function(t,e){2&t&&n.ekj("loc-card-crud--dense",e.isPlatformWidthDense())},inputs:{platformWidth:"platformWidth"},ngContentSelectors:c,decls:2,vars:0,template:function(t,e){1&t&&(n.F$t(),n.TgZ(0,"loc-list"),n.Hsn(1),n.qZA())},directives:[r.n],styles:[".loc-card-crud--dense[_nghost-%COMP%] .loc-card-crud__container{max-width:100%;margin:0;border-radius:0;border:none;box-shadow:none} .loc-card-crud__container{max-width:700px;margin:16px} .loc-card-crud__container ion-card-content{padding:16px 0} .loc-card-crud__container ion-searchbar{--box-shadow:none;--border-radius:6px;padding:16px} .loc-card-crud__container ion-searchbar .searchbar-input-container{border:1px solid #0000001a;border-radius:6px;box-shadow:none} .loc-card-crud__header{--background:#00000005;--inner-padding-top:8px;--inner-padding-bottom:8px} .loc-card-crud__header ion-label h2{font-weight:500} .loc-card-crud__header ion-label p{opacity:.8;font-size:13px}"]}),t})()},19657:(t,e,i)=>{"use strict";i.d(e,{n:()=>n});var o=i(37716);const s=["*"];let n=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Xpm({type:t,selectors:[["loc-list"]],ngContentSelectors:s,decls:1,vars:0,template:function(t,e){1&t&&(o.F$t(),o.Hsn(0))},styles:["[_nghost-%COMP%] mat-form-field:not(.mat-paginator-page-size-select){padding:0 16px;width:100%}[_nghost-%COMP%] mat-form-field:not(.mat-paginator-page-size-select) .mat-form-field-suffix{top:0!important}[_nghost-%COMP%] ion-item-divider{margin-bottom:20px;background-color:#00000008;text-transform:uppercase;font-size:13px;font-weight:500;letter-spacing:1px}[_nghost-%COMP%] ion-item-divider ion-button[slot=end]{margin-right:16px}[_nghost-%COMP%] ion-reorder[slot=start]{margin-right:20px}[_nghost-%COMP%] ion-list ion-item ion-label h3{font-weight:500}[_nghost-%COMP%] ion-list ion-item ion-label p{opacity:.8;font-size:13px}[_nghost-%COMP%] .loc-list__actions{margin-bottom:20px;margin-top:10px}[_nghost-%COMP%] .loc-list__block-button{margin-bottom:16px;padding-left:16px}[_nghost-%COMP%] .loc-list__right-inline-button{margin-left:-14px;margin-top:-31px}"]}),t})()},15665:(t,e,i)=>{"use strict";i.d(e,{z:()=>l});var o=i(38583),s=i(15566),n=i(94490),a=i(29790),r=i(84419),c=i(37716);let l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=c.oAB({type:t}),t.\u0275inj=c.cJS({imports:[[o.ez,s.o9,n.Pc,r.p,a.aw]]}),t})()},31871:(t,e,i)=>{"use strict";i.d(e,{o:()=>l});var o=i(65353),s=i(75319),n=i(37716),a=i(38583),r=i(94490),c=i(63423);let l=(()=>{class t{constructor(t,e,i,o,n,a){this.location=t,this.alertController=e,this.modalController=i,this.popoverController=o,this.actionSheetController=n,this.router=a,this.isDismissOnLocationChangeEnabled=!1,this.overlayDismissSubscription=s.w.EMPTY}enableDismissOnLocationChange(){this.isDismissOnLocationChangeEnabled||(this.overlayDismissSubscription=this.location.subscribe(t=>{this.dismissTopOverlay()}),this.isDismissOnLocationChangeEnabled=!0)}disableDismissOnLocationChange(){this.overlayDismissSubscription.unsubscribe(),this.isDismissOnLocationChangeEnabled=!1}dismissTopOverlay(){return(0,o.mG)(this,void 0,void 0,function*(){const t=yield this.alertController.getTop();t?t.dismiss():this.dismissTopPopover()})}dismissTopActionSheet(){return(0,o.mG)(this,void 0,void 0,function*(){const t=yield this.actionSheetController.getTop();t?t.dismiss():this.dismissTopModal()})}dismissTopPopover(){return(0,o.mG)(this,void 0,void 0,function*(){const t=yield this.popoverController.getTop();t?t.dismiss():this.dismissTopActionSheet()})}dismissTopModal(){return(0,o.mG)(this,void 0,void 0,function*(){const t=yield this.modalController.getTop();t&&t.dismiss()})}present(t){return(0,o.mG)(this,void 0,void 0,function*(){this.enableDismissOnLocationChange();const e=t.present();return e.then(e=>{const i=Math.random().toString(36).substring(2);t.onDidDismiss().then(t=>{this.router.url.includes(`#${i}`)&&(this.router.navigate([this.router.url.split("#")[0]]),history.back())}),this.router.navigate([this.router.url.split("#")[0]],{fragment:i})}),yield e})}ngOnDestroy(){this.disableDismissOnLocationChange()}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(a.Ye),n.LFG(r.Br),n.LFG(r.IN),n.LFG(r.Dh),n.LFG(r.BX),n.LFG(c.F0))},t.\u0275prov=n.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},54833:(t,e,i)=>{"use strict";i.r(e),i.d(e,{PagesCrudPageModule:()=>K});var o=i(38583),s=i(3679),n=i(94490),a=i(63423),r=i(37716),c=i(94506),l=i(65353),d=i(99692),p=i(11494),u=i(79765),m=i(66682),h=i(93342),g=i(4105
1),f=i(83348),b=i(68896),v=i(19657),_=i(98295),y=i(83166),C=i(96109),Z=i(35618);function x(t,e){1&t&&(r.TgZ(0,"mat-error"),r._uU(1,"Pole wymagane"),r.qZA())}function S(t,e){1&t&&(r.TgZ(0,"mat-error"),r._uU(1,"Pole wymagane"),r.qZA())}function w(t,e){1&t&&(r.TgZ(0,"mat-error"),r._uU(1,"Pole wymagane"),r.qZA())}let A=(()=>{class t{constructor(t,e,i,o){this.formBuilder=t,this.pagesService=e,this.loadingService=i,this.modalController=o,this.type="create",this.pageCreated=new r.vpe}ngOnInit(){this.setupForm(),"update"===this.type&&this.page&&this.updateForm()}setupForm(){this.pageForm=this.formBuilder.group({name:["",[s.kI.required]],key:["",[s.kI.required]],title:[""],description:[""]})}updateForm(){this.pageForm.patchValue(this.page)}save(){for(const t in this.pageForm.controls)t&&this.pageForm.controls[t].markAsTouched();if(this.pageForm.valid){const t={};t.name=this.pageForm.value.name,t.key=this.pageForm.value.key,t.title=this.pageForm.value.title,t.description=this.pageForm.value.description,"create"===this.type?(this.loadingService.showLoadingAlert(),this.pagesService.createPage(t).subscribe(t=>{console.log(t),this.loadingService.closeLoadingAlert(),this.pageCreated.emit(t.id),this.modalController.dismiss("saved")})):"update"===this.type&&(this.page&&this.page.id&&(t.id=this.page.id),this.loadingService.showLoadingAlert(),this.pagesService.updatePage(t).subscribe(t=>{console.log(t),this.loadingService.closeLoadingAlert(),this.pageCreated.emit(t.id),this.modalController.dismiss("saved")}))}}}return t.\u0275fac=function(e){return new(e||t)(r.Y36(s.qu),r.Y36(g.j),r.Y36(f.b),r.Y36(n.IN))},t.\u0275cmp=r.Xpm({type:t,selectors:[["loc-page-save"]],inputs:{type:"type",page:"page"},outputs:{pageCreated:"pageCreated"},decls:22,vars:5,consts:[[3,"title"],[3,"formGroup"],["appearance","outline"],["matInput","","formControlName","name"],["input",""],[4,"ngIf"],["formControlName","title","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5"],["formControlName","description","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5"],["fxLayoutAlign","center center",1,"loc-list__actions"],["shape","round","size","default",3,"click"]],template:function(t,e){1&t&&(r.TgZ(0,"loc-modal",0),r.TgZ(1,"loc-list",1),r.TgZ(2,"ion-list"),r.TgZ(3,"mat-form-field",2),r.TgZ(4,"mat-label"),r._uU(5,"Nazwa"),r.qZA(),r._UZ(6,"input",3,4),r.YNc(8,x,2,0,"mat-error",5),r.qZA(),r.TgZ(9,"mat-form-field",2),r.TgZ(10,"mat-label"),r._uU(11,"Tytu\u0142 (SEO)"),r.qZA(),r._UZ(12,"textarea",6),r.YNc(13,S,2,0,"mat-error",5),r.qZA(),r.TgZ(14,"mat-form-field",2),r.TgZ(15,"mat-label"),r._uU(16,"Opis (SEO)"),r.qZA(),r._UZ(17,"textarea",7),r.YNc(18,w,2,0,"mat-error",5),r.qZA(),r.qZA(),r.TgZ(19,"div",8),r.TgZ(20,"ion-button",9),r.NdJ("click",function(){return e.save()}),r._uU(21," Zapisz "),r.qZA(),r.qZA(),r.qZA(),r.qZA()),2&t&&(r.Q6J("title","create"===e.type?"Dodaj":"Edytuj"),r.xp6(1),r.Q6J("formGroup",e.pageForm),r.xp6(7),r.Q6J("ngIf",e.pageForm.get("name").invalid),r.xp6(5),r.Q6J("ngIf",e.pageForm.get("title").invalid),r.xp6(5),r.Q6J("ngIf",e.pageForm.get("description").invalid))},directives:[b.z,v.n,s.JL,s.sg,n.q_,_.KE,_.hX,y.Nt,s.Fj,s.JJ,s.u,o.O5,C.IC,Z.Wh,n.YG,_.TO],styles:["ion-list[_ngcontent-%COMP%]{padding-top:16px}"]}),t})();var T=i(5304),O=i(68939),D=i(26215),P=i(25917);class k{constructor(t){this.pagesService=t,this.pagesSubject=new D.X([]),this.loadingSubject=new D.X(!1),this.loading$=this.loadingSubject.asObservable(),this.totalItemsCountSubject=new D.X(0),this.totalItemsCount$=this.totalItemsCountSubject.asObservable()}connect(t){return this.pagesSubject.asObservable()}disconnect(t){this.pagesSubject.complete(),this.loadingSubject.complete(),this.totalItemsCountSubject.complete()}loadPages(t){this.loadingSubject.next(!0),this.pagesService.getPages(t||null).pipe((0,T.K)(()=>(0,P.of)([])),(0,O.x)(()=>this.loadingSubject.next(!1))).subscribe(t=>{this.totalItemsCountSubject.next(t.meta.total),this.pagesSubject.next(t.data)})}}var q=i(31871),z=i(32789);function I(t,e){1&t&&(r.TgZ(0,"th",12),r._uU(1,"Nazwa"),r.qZA())}function F(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"td",13),r.NdJ("click",function(){const e=r.CHM(t).$implicit;return r.oxw().showPageUpdateModal(e)}),r._uU(1),r.qZA()}if(2&t){const t=e.$implicit;r.xp6(1),r.hij(" ",t.name," ")}}function M(t,e){1&t&&(r.TgZ(0,"th",14),r._uU(1,"Akcje"),r.qZA())}function j(t,e){1&t&&(r.TgZ(0,"td",15),r._UZ(1,"div",16),r.qZA())}function U(t,e){1&t&&r._UZ(0,"tr",17)}function N(t,e){1&t&&r._UZ(0,"tr",18)}
1function Y(t,e){1&t&&(r.TgZ(0,"div",19),r._UZ(1,"ion-spinner"),r.qZA())}const L=function(){return[5,10,20]};let G=(()=>{class t{constructor(t,e,i){this.pagesService=t,this.modalController=e,this.overlayController=i,this.displayedColumns=["name"],this.destroy$=new u.xQ}ngOnInit(){this.dataSource=new k(this.pagesService)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.fetchData(),this.paginator._intl.itemsPerPageLabel="",this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),(0,m.T)(this.sort.sortChange,this.paginator.page).pipe((0,h.b)(()=>this.fetchData())).subscribe()}fetchData(){this.sort&&this.paginator&&this.dataSource.loadPages({sortOrder:this.sort.direction,sortField:this.sort.active,pageNumber:this.paginator.pageIndex,pageSize:this.paginator.pageSize})}showPageUpdateModal(t){return(0,l.mG)(this,void 0,void 0,function*(){const e=yield this.modalController.create({component:A,componentProps:{type:"update",page:t},cssClass:"pxc-modal--lg"});yield this.overlayController.present(e);const{data:i}=yield e.onDidDismiss();"saved"===i&&this.fetchData()})}}return t.\u0275fac=function(e){return new(e||t)(r.Y36(g.j),r.Y36(n.IN),r.Y36(q.o))},t.\u0275cmp=r.Xpm({type:t,selectors:[["loc-pages-table"]],viewQuery:function(t,e){if(1&t&&(r.Gf(d.NW,5),r.Gf(p.YE,5)),2&t){let t;r.iGM(t=r.CRH())&&(e.paginator=t.first),r.iGM(t=r.CRH())&&(e.sort=t.first)}},decls:14,vars:13,consts:[[1,"loc-table"],["mat-table","","matSort","","matSortDisableClear","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["class","loc-table__link-cell","mat-cell","","style","font-weight: 500 !important",3,"click",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["class","loc-table__actions-cell","mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","pxc-table__spinner",4,"ngIf"],[1,"loc-table__paginator",3,"length","pageSize","pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",1,"loc-table__link-cell",2,"font-weight","500 !important",3,"click"],["mat-header-cell",""],["mat-cell","",1,"loc-table__actions-cell"],[1,"loc-table__actions"],["mat-header-row",""],["mat-row",""],[1,"pxc-table__spinner"]],template:function(t,e){1&t&&(r.TgZ(0,"div",0),r.TgZ(1,"table",1),r.ynx(2,2),r.YNc(3,I,2,0,"th",3),r.YNc(4,F,2,1,"td",4),r.BQk(),r.ynx(5,5),r.YNc(6,M,2,0,"th",6),r.YNc(7,j,2,0,"td",7),r.BQk(),r.YNc(8,U,1,0,"tr",8),r.YNc(9,N,1,0,"tr",9),r.qZA(),r.qZA(),r.YNc(10,Y,2,0,"div",10),r.ALo(11,"async"),r._UZ(12,"mat-paginator",11),r.ALo(13,"async")),2&t&&(r.xp6(1),r.Q6J("dataSource",e.dataSource),r.xp6(7),r.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",!0),r.xp6(1),r.Q6J("matRowDefColumns",e.displayedColumns),r.xp6(1),r.Q6J("ngIf",r.lcZ(11,8,e.dataSource.loading$)),r.xp6(2),r.Q6J("length",r.lcZ(13,10,e.dataSource.totalItemsCount$))("pageSize",10)("pageSizeOptions",r.DdM(12,L)))},directives:[z.BZ,p.YE,z.w1,z.fO,z.Dz,z.as,z.nj,o.O5,d.NW,z.ge,p.nU,z.ev,z.XQ,z.Gk,n.PQ],pipes:[o.Ov],styles:[""]}),t})();const J=[{path:"",component:(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Xpm({type:t,selectors:[["loc-pages-crud"]],decls:10,vars:0,consts:[["slot","start"],[1,"loc-card-crud__container"]],template:function(t,e){1&t&&(r.TgZ(0,"ion-header"),r.TgZ(1,"ion-toolbar"),r.TgZ(2,"ion-buttons",0),r._UZ(3,"ion-menu-button"),r.qZA(),r.TgZ(4,"ion-title"),r._uU(5,"Strony"),r.qZA(),r.qZA(),r.qZA(),r.TgZ(6,"ion-content"),r.TgZ(7,"loc-card-crud"),r.TgZ(8,"ion-card",1),r._UZ(9,"loc-pages-table"),r.qZA(),r.qZA(),r.qZA())},directives:[n.Gu,n.sr,n.Sm,n.fG,n.wd,n.W2,c.r,n.PM,G],styles:[""]}),t})()}];let Q=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[a.Bz.forChild(J)],a.Bz]}),t})();var $=i(21482),B=i(84419),R=i(15566),X=i(22832),E=i(15665);let W=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[o.ez,E.z,X.p,n.Pc,_.lN,s.UX,y.c,B.p,C.Ky,R.o9]]}),t})(),H=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[o.ez,n.Pc,z.p0,d.TU,p.JX,W,B.p]]}),t})(),K=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[o.ez,s.u5,n.Pc,$.i,H,Q]]}),t})()}}]);
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.