PageSourceSearch

https://www.meaers.com/request/chunk-QZU6NVZE.js

js meaers.com collected 2026-10-08 15:21:05 UTC 13,611 bytes, 1 lines download raw bytes

1import{a as le}from"./chunk-HYEIEUC6.js";import"./chunk-U62OBZW7.js";import{Aa as K,B as w,Ba as X,Ca as Z,Fa as ee,G as U,Ga as te,H as D,J as E,N as A,O as q,P as G,Q as H,S as Y,Sa as ie,Ta as ne,V as $,X as Q,_ as W,aa as J,cb as T,db as oe,j,l as _,lb as ae,t as B,tb as re,v as g,vb as se,w as me,x,z as I}from"./chunk-K5NDTWFS.js";import"./chunk-2PPFUFFT.js";import{m as V}from"./chunk-AM75J5OE.js";import{Gb as s,Mb as M,Rb as o,Sb as r,Tb as C,Xb as h,ac as p,cc as v,fb as l,hc as L,ic as k,jc as P,lb as c,nc as u,oa as d,oc as z,pa as m,pc as N,sb as S,vc as O,zb as b}from"./chunk-QIRGFYLA.js";import"./chunk-3ENMYILF.js";import{a as R,h as de}from"./chunk-TWZW5B45.js";var pe=de(me());function Se(a,e){if(a&1){let i=h();o(0,"app-button",11),p("click",function(){d(i);let n=v();return m(n.saveAndAdd())}),r()}a&2&&s("type","submit")("text","Save & Add New")("btnId","primary")}function be(a,e){if(a&1){let i=h();o(0,"app-button",11),p("click",function(){d(i);let n=v();return m(n.save())}),r()}a&2&&s("type","submit")("text","Save")("btnId","primary")}function _e(a,e){if(a&1){let i=h();o(0,"app-button",11),p("click",function(){d(i);let n=v();return m(n.update())}),r()}a&2&&s("type","submit")("text","Update")("btnId","primary")}var F=class a{constructor(e,i,t,n,f,y,Ee){this.httpService=e;this.cmnService=i;this.toastService=t;this.router=n;this.route=f;this.dialogRef=y;this.data=Ee}isEditMode=!1;form=new H({name:new Y("",[A.required,A.minLength(1),A.maxLength(100)])});countryId;ngOnInit(){this.data?.action=="Edit"&&(this.isEditMode=!0,this.form.patchValue(this.data?.formData))}countryDetails;getCountryDetails(){this.cmnService.setLoading(!0),this.httpService.postData(`${g.MASTERS.COUNTRY.VIEW}${this.countryId}`,{}).subscribe({next:e=>{this.cmnService.setLoading(!1),e?.success&&e?.data&&this.form.patchValue({name:e.data.name})},error:e=>{this.cmnService.setLoading(!1),this.cmnService.handleErrorMessage(e)}})}submit(){this.form.valid&&(this.cmnService.setLoading(!0),this.isEditMode?this.update():this.save())}saveAndAdd(){this.httpService.postData(`${g.MASTERS.COUNTRY.ADD}`,this.form.value).subscribe({next:e=>{this.cmnService.setLoading(!1),this.toastService.success(e.message),this.data.callback({success:!0}),this.form.reset(),this.form.updateValueAndValidity},error:e=>{this.cmnService.setLoading(!1),this.dialogRef.close({success:!1}),this.cmnService.handleErrorMessage(e)}})}save(){this.httpService.postData(`${g.MASTERS.COUNTRY.ADD}`,this.form.value).subscribe({next:e=>{this.cmnService.setLoading(!1),this.toastService.success(e.message),this.dialogRef.close({success:!0})},error:e=>{this.cmnService.setLoading(!1),this.dialogRef.close({success:!1}),this.cmnService.handleErrorMessage(e)}})}close(){this.dialogRef.close({success:!1})}update(){this.httpService.postData(`${g.MASTERS.COUNTRY.UPDATE}${this.data?.id}`,this.form.value).subscribe({next:e=>{this.cmnService.setLoading(!1),this.toastService.success(e.message),this.dialogRef.close({success:!0})},error:e=>{this.cmnService.setLoading(!1),this.dialogRef.close({success:!1}),this.cmnService.handleErrorMessage(e)}})}onNoClick(){this.dialogRef.close()}static \u0275fac=function(i){return new(i||a)(c(I),c(w),c(x),c(_),c(j),c(K),c(X))};static \u0275cmp=S({type:a,selectors:[["app-country-form"]],decls:17,vars:8,consts:[[1,"custom-modal-header"],[1,"modal-header-title"],["mat-icon-button","",1,"custom-icon-btn","cancel-button",3,"click"],[1,"dialog-close-icon"],["mat-dialog-content",""],[3,"formGroup"],[1,"row"],[1,"col-md-6"],["formControlName","name",1,"property-form",3,"label","placeholder","maxlength"],["mat-dialog-actions","",2,"display","flex","justify-content","end","gap","5px"],["class","lgf-btn","value","Submit",3,"type","text","btnId","click",4,"ngIf"],["value","Submit",1,"lgf-btn",3,"click","type","text","btnId"]],template:function(i,t){i&1&&(o(0,"section")(1,"div",0)(2,"div",1),u(3),r(),o(4,"button",2),p("click",function(){return t.close()}),o(5,"mat-icon",3),u(6,"cancel"),r()()(),o(7,"div",4)(8,"div")(9,"form",5)(10,"div",6)(11,"div",7),C(12,"app-text-field",8),r()()()()(),o(13,"div",9),b(14,Se,1,3,"app-button",10)(15,be,1,3,"app-button",10)(16,_e,1,3,"app-button",10),r()()),i&2&&(l(3),z(t.data==null?null:t.data.title),l(6),s("formGroup",t.form),l(3),s("label","Country Name")("placeholder","Enter Country Name")("maxlength",100),l(2),s("ngIf",t.data.action=="Add"),l(),s("ngIf",t.data.action=="Add"),l(),s("ngIf",t.data.action=="Edit"))},dependencies:[T,V,$,q,G,J,Q,W,U,D,te,ee,E,ae],styles:[".card.custom-card[_ngcontent-%COMP%]{overflow:hidden;border-radius:0!important;border:0;margin-bottom:12px}.log-a-call-h[_ngcontent-%COMP%]{font-size:16px;font-weight:500;padding:10px;display:block;color:#333;background-color:#e2eeff}"]})};var xe=["fileInput"],Ie=()=>[];function we(a,e){a&1&&(o(0,"mat-icon"),u(1," attach_file "),r(),u(2," \xA0 "))}function De(a,e){if(a&1){let i=h();o(0,"mat-icon",15),p("click",function(){d(i);let n=v();return m(n.removeFile())}),u(1," close "),r(),u(2," \xA0 ")}a&2&&s("matTooltip","Remove Selected File")}var ce=class a{constructor(e,i,t,n,f){this.http=e;this.router=i;this.cmnService=t;this.toasterService=n;this.dialog=f;this.frameworkComponents={buttonRenderer:le}}frameworkComponents=null;selRecordForEdit=null;rowData=[];countryId;paginationData=B;length=this.paginationData.pagination.length;limit=this.paginationData.pagination.pageSize;offset=this.paginationData.pagination.offset;pageSize=this.paginationData.pagination.pageSize;pageIndex=this.paginationData.pagination.pageIndex;pageSizeOptions=this.paginationData.pagination.pageSizeOptions;hidePageSize=!1;showPageSizeOptions=!0;showFirstLastButtons=!0;disabled=!1;selectedFile=null;displayedColumns=[{headerName:"SL# ",field:"position",maxWidth:100,valueGetter:e=>e?.node?.rowIndex+this.pageIndex*this.pageSize+1,cellStyle:{textAlign:"center",display:"flex","justify-content":"center","align-items":"center ",curs
1or:"pointer"}},{headerName:"Country Name",field:"name",cellClass:"cell-hyperlink-style",onCellClicked:e=>{console.log("event",e),this.countryId=e?.data?.id,this.cmnService.navigate(`/master-management/manage-state/${this.countryId}`)}},{headerName:"Action",field:"action",maxWidth:180,cellRenderer:"buttonRenderer",cellStyle:{textAlign:"end"},cellRendererParams:{onClick:this.onTableButtonsClick.bind(this),label:"Action",action:"editAndDelete"}}];requestPayload={searchString:"",pagination:{page:this.pageIndex,size:this.pageSize},sorting:[{orderBy:"name",order:"asc"}]};ngOnInit(){this.getCountryList()}handlePageEvent(e){this.length=e.length,this.pageSize=e.pageSize,this.pageIndex=e.pageIndex,this.offset=e.pageIndex*e.pageSize,this.limit=e.pageSize,this.updateRequestPayload({pagination:{page:this.pageIndex,size:this.pageSize}}),this.getCountryList()}getCountryList(){this.cmnService.setLoading(!0),this.http.postData(g.MASTERS.COUNTRY.LIST,this.requestPayload).subscribe({next:e=>{this.cmnService.setLoading(!1),e?.success&&(this.rowData=e?.data,this.setPaginationResponse(e?.pagination)),this.rowData?.length==0&&this.resetPaginationData()},error:e=>{this.rowData=[],this.cmnService.setLoading(!1),console.error("Error fetching user list:",e)}})}resetPaginationData(){this.length=this.paginationData.pagination.length,this.pageSize=this.paginationData.pagination.pageSize,this.pageIndex=this.paginationData.pagination.pageIndex,this.offset=this.paginationData.pagination.offset,this.limit=this.paginationData.pagination.pageSize}setPaginationResponse(e){this.length=e?.totalElements,this.pageSize=e?.size,this.pageIndex=e?.page,this.offset=e?.page*e?.size,this.limit=e?.size}updateRequestPayload(e){this.requestPayload=R(R({},this.requestPayload),e)}dialogRef;addAction(){this.openDialog("Add","Add Country")}openDialog(e,i,t,n){this.dialogRef=this.dialog.open(F,{width:"800px",data:{title:i,action:e,id:t,formData:n,callback:this.dialogCallBack.bind(this)}}),this.dialogRef.afterClosed().subscribe(f=>{f?.success&&this.getCountryList()})}dialogCallBack(e){e?.success&&this.getCountryList()}navigate(){this.router.navigate(["/user-management/add-new-user"])}onTableButtonsClick(e){if(e&&e?.action==="editAndDelete"){let i=e?.data?.id;e.customAction=="edit"?(console.log("formdata",e?.data),this.openDialog("Edit","Edit Country",i,e?.data)):pe.default.fire({icon:"warning",text:"Are you sure, you want to DELETE the selected record ?",showDenyButton:!0,confirmButtonText:"Yes",confirmButtonColor:"#198754",denyButtonText:"No !",denyButtonColor:"#bb2d3b",allowOutsideClick:!1}).then(t=>{t.isConfirmed&&(this.cmnService.setLoading(!0),this.http.postData(g.MASTERS.COUNTRY.DELETE+i,{}).subscribe({next:n=>{this.cmnService.setLoading(!1),n?.success&&(this.toasterService.success(n?.message||"User deleted successfully.."),this.getCountryList())},error:n=>{this.cmnService.setLoading(!1),this.cmnService.handleErrorMessage(n)}}))})}}uploadedFile;uploadedFileName="";fileInput;onFileChange(e){let i=e?.target?.files[0];console.log("file",i);let t=i?.size/1024/1024;i&&t>10?(this.toasterService.warning("File Size cannot be greater than 10 MB"),this.uploadedFile="",this.fileInput.nativeElement.value=""):(this.uploadedFile=i,console.log("uploadedFilePrimary",this.uploadedFile),this.uploadedFileName=i?.name)}removeFile(){this.uploadedFile="",this.fileInput.nativeElement.value="",this.uploadedFileName=""}importAction(){!this.uploadedFile&&!this.uploadedFileName||(this.cmnService.setLoading(!0),this.http.uplaodDemographyFile(`${g.IMPORT.DEMOGRAPHY}`,this.uploadedFile).subscribe({next:e=>{this.cmnService.setLoading(!1),e?.success&&(this.toasterService.success(e?.message),this.getCountryList(),this.removeFile())},error:e=>{this.cmnService.setLoading(!1),this.cmnService.handleErrorMessage(e)}}))}downloadSampleFile(){let e="assets/sample_demography.xlsx",i=document.createElement("a");i.href=e,i.download="sample_demography.xlsx",i.click()}static \u0275fac=function(i){return new(i||a)(c(I),c(_),c(w),c(x),c(Z))};static \u0275cmp=S({type:a,selectors:[["app-country-list"]],viewQuery:function(i,t){if(i&1&&L(xe,5),i&2){let n;
1k(n=P())&&(t.fileInput=n.first)}},decls:23,vars:23,consts:[["fileInput",""],["paginator",""],[1,"container","list-container"],[3,"title"],[3,"onClickAction","customClasses","btnId","text","type"],[3,"isSearchRequired"],[1,"file-upload-container"],[1,"info-section"],[1,"upload-text"],["href","javascript:void(0)",1,"sample-link",3,"click"],[1,"import-section"],["for","fileInput",1,"custom-file-upload"],["type","file","id","fileInput","multiple","false","hidden","",3,"change"],[3,"columnDefs","rowData","frameworkComponents"],["aria-label","Select page",1,"paginator",3,"page","length","pageSize","disabled","showFirstLastButtons","pageSizeOptions","hidePageSize","pageIndex"],[2,"cursor","pointer",3,"click","matTooltip"]],template:function(i,t){if(i&1){let n=h();o(0,"div",2)(1,"app-common-page-header",3)(2,"app-button",4),p("onClickAction",function(){return d(n),m(t.addAction())}),r()(),C(3,"app-table-actions",5),o(4,"div",6)(5,"div",7)(6,"span",8),u(7," Add Demography Data or Upload Excel. For sample "),r(),o(8,"span",8)(9,"a",9),p("click",function(){return d(n),m(t.downloadSampleFile())}),u(10,"Click Here"),r()()(),o(11,"div",10)(12,"label",11),b(13,we,3,0)(14,De,3,1),o(15,"span"),u(16),r()(),o(17,"input",12,0),p("change",function(y){return d(n),m(t.onFileChange(y))}),r(),o(19,"app-button",4),p("onClickAction",function(){return d(n),m(t.importAction())}),r()()(),C(20,"app-ag-table",13),o(21,"mat-paginator",14,1),p("page",function(y){return d(n),m(t.handlePageEvent(y))}),r()()}i&2&&(l(),s("title","Country Listing"),l(),s("customClasses","btn-rounded-border-action btn-rounded-border-bg--primary")("btnId","")("text","Add New Country")("type","button"),l(),s("isSearchRequired",!1),l(10),M(t.uploadedFile?t.uploadedFile?14:-1:13),l(3),N(" ",t.uploadedFileName?t.uploadedFileName:"Choose File",""),l(3),s("customClasses","btn-rounded-border-action btn-rounded-border-bg--primary")("btnId","")("text","Import")("type","button"),l(),s("columnDefs",t.displayedColumns)("rowData",t.rowData)("frameworkComponents",t.frameworkComponents),l(),s("length",t.length)("pageSize",t.pageSize)("disabled",t.disabled)("showFirstLastButtons",t.showFirstLastButtons)("pageSizeOptions",t.showPageSizeOptions?t.pageSizeOptions:O(22,Ie))("hidePageSize",t.hidePageSize)("pageIndex",t.pageIndex))},dependencies:[T,D,ne,ie,oe,re,E,se],styles:['.custom-file-upload[_ngcontent-%COMP%]{color:#0f56b3;padding:10px 20px;border:1px solid #1677FF80;border-radius:99px;cursor:pointer;text-align:center;display:flex;align-items:center;justify-content:center;gap:4px}.file-name[_ngcontent-%COMP%]{margin-top:10px;font-size:14px;color:#333}.file-upload-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;background-color:#fff;padding:8px}.upload-text[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;line-height:1.2;color:#333}.import-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;justify-content:center}.info-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;justify-content:flex-start}.sample-text[_ngcontent-%COMP%]{font-size:12px;color:#555}.sample-link[_ngcontent-%COMP%]{position:relative;color:#0f56b3;cursor:pointer;font-size:14px;text-decoration:none;padding-bottom:2px}.sample-link[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;bottom:0;width:0%;height:1px;background-color:#0f56b3;transition:width .3s ease}.sample-link[_ngcontent-%COMP%]:hover:after{width:100%}.sample-link[_ngcontent-%COMP%]:hover{color:#09429e}']})};export{ce as CountryListComponent};

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.