dealpostools 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"dealpostools","version":"2.5.5"}
1
+ {"name":"dealpostools","version":"2.5.6"}
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[572],{4572:(B,u,r)=>{r.r(u),r.d(u,{ProductComponent:()=>O});var l=r(6814),t=r(5879),m=r(4387),M=r(2596),p=r(7081),P=r(5619),Z=r(7398),T=r(2181),v=r(6328),h=r(9887),_=r(5986),d=r(6223),y=r(2425),A=r(7700),I=r(3988),N=r(6493),f=r(8745),S=r(8017);let x=(()=>{var n;class s{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=(0,t.f3M)(S.O)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.http.post(`${this.domain}/api/image/ProductImage`,e)}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/ProductImage`,{Images:e})}migrateAsync(e){const i={...e,Host:`${localStorage.getItem("Domain")}`};return this.http.post("/api/MigrateImage/ProductImage",i)}}return(n=s).\u0275fac=function(e){return new(e||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac}),s})();function $(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"button",17),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().ngIf,i=t.oxw();return t.KtG(i.onMigrate(o))}),t._uU(2," Migrate "),t.qZA(),t.BQk()}}function b(n,s){if(1&n){const a=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.onMigrateAsync())}),t._uU(1," Migrate Async "),t.qZA()}}function U(n,s){if(1&n&&(t.ynx(0),t.YNc(1,$,3,0,"ng-container",15),t.YNc(2,b,2,0,"ng-template",null,16,t.W1O),t.BQk()),2&n){const a=t.MAs(3),e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.totalSelected()>0)("ngIfElse",a)}}function J(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"mat-checkbox",19),t.NdJ("change",function(o){const c=t.CHM(a).ngIf,g=t.oxw();return t.KtG(g.onSelectAll(o,c))}),t.qZA(),t.BQk()}}function F(n,s){1&n&&(t.ynx(0),t.TgZ(1,"th"),t._uU(2,"New URL"),t.qZA(),t.BQk())}function Q(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",23)(2,"span",24),t._uU(3),t.qZA()(),t.BQk()),2&n){const a=t.oxw(2).$implicit;t.xp6(3),t.Oqu(a.Message)}}function L(n,s){if(1&n&&(t.TgZ(0,"a",21),t._uU(1),t.qZA()),2&n){const a=t.oxw(2).$implicit;t.Q6J("href",a.CloudflareURL,t.LSH),t.xp6(1),t.hij(" ",a.CloudflareURL," ")}}function R(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"td"),t.YNc(2,Q,4,1,"ng-container",15),t.YNc(3,L,2,2,"ng-template",null,22,t.W1O),t.qZA(),t.BQk()),2&n){const a=t.MAs(4),e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",e.Message)("ngIfElse",a)}}function w(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",20),t.NdJ("ngModelChange",function(o){const c=t.CHM(a).$implicit;return t.KtG(c.selected=o)})("ngModelChange",function(){const i=t.CHM(a).ngForOf,c=t.oxw();return t.KtG(c.onSelect(i))}),t.qZA()(),t.TgZ(4,"td")(5,"a",21),t._uU(6),t.qZA()(),t.YNc(7,R,5,2,"ng-container",5),t.ALo(8,"async"),t.TgZ(9,"td"),t._uU(10),t.ALo(11,"date"),t.qZA()(),t.BQk()}if(2&n){const a=s.$implicit,e=t.oxw();t.xp6(3),t.Q6J("ngModel",a.selected),t.xp6(2),t.Q6J("href",a.URL,t.LSH),t.xp6(1),t.hij(" ",a.URL," "),t.xp6(1),t.Q6J("ngIf",1==t.lcZ(8,5,e.onMigrate$)),t.xp6(3),t.hij(" ",t.xi3(11,7,a.Date,"dd MMM yyyy")," ")}}let O=(()=>{var n;class s{constructor(){this.productMigrate=(0,t.f3M)(x),this.productMigrate$=this.productMigrate.getImageUrls$().pipe((0,p.d)(1)),this._onMigrate=new P.X(!1),this.onMigrate$=this._onMigrate.asObservable(),this.pagination={PageNumber:1,RowCount:100},this.toastr=(0,t.f3M)(y._W),this.dialog=(0,t.f3M)(A.uw),this.dateFilter={},this.totalSelected=(0,t.tdS)(0)}onMigrate(e){let o=e.Data.filter(c=>c.selected);if(0===o.length)return void this.toastr.error("Please select at least one image to migrate.","Error");const i=this.productMigrate.migrate(o).pipe((0,Z.U)(c=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(g=>{g.selected=!1;const C=c.find(k=>k.Path===g.Path);return g.CloudflareURL=C?.URL,g.Message=C?.Message,g}),e)));this.productMigrate$=i.pipe((0,p.d)(1))}onSelectAll(e,o){o=o.map(i=>(i.selected=e.checked,i)),this.totalSelected.set(o.filter(i=>i.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(o=>o.selected)?.length)}onMigrateAsync(){this.dialog.open(I.j,{data:{showDateFilter:!1}}).afterClosed().pipe((0,T.h)(e=>N.g.IsNotEmpty(e)),(0,v.b)(e=>this.productMigrate.migrateAsync({PageNumber:e.pageNumber,RowCount:e.rowCount}))).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.productMigrate$=this.productMigrate.getImageUrls$().pipe((0,p.d)(1))})}onFilter(){this.productMigrate$=this.productMigrate.getImageUrls$({PageNumber:this.pagination.PageNumber,RowCount:this.pagination.RowCount,From:this.dateFilter.from,To:this.dateFilter.to}).pipe((0,p.d)(1))}onPagination(e){this.pagination.PageNumber=e.pageIndex+1,this.pagination.RowCount=e.pageSize,this.productMigrate$=this.productMigrate.getImageUrls$(this.pagination).pipe((0,p.d)(1))}}return(n=s).\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-product-image"]],standalone:!0,features:[t._Bn([x]),t.jDz],decls:31,vars:19,consts:[["Title","Migrate Product Image",3,"hideSearchBox","onSubmit"],[1,"d-flex"],["container",""],[1,"mb-2"],[3,"date","dateChange"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[2,"width","120px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[4,"ngIf","ngIfElse"],["ASYNC",""],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModel","ngModelChange"],["target","_blank",1,"text-break",3,"href"],["SHOW_URL",""],[1,"text-break"],[1,"text-danger"]],template:function(e,o){if(1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return o.onFilter()}),t.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6",3),t._uU(5,"From - To"),t.qZA(),t.TgZ(6,"app-datepicker-range",4),t.NdJ("dateChange",function(c){return o.dateFilter=c}),t.qZA()()()(),t.TgZ(7,"actions"),t.YNc(8,U,4,2,"ng-container",5),t.ALo(9,"async"),t.qZA(),t.TgZ(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"table",9)(15,"thead",10)(16,"tr")(17,"th",11),t.YNc(18,J,2,0,"ng-container",5),t.ALo(19,"async"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Old URL"),t.qZA(),t.YNc(22,F,3,0,"ng-container",5),t.ALo(23,"async"),t.TgZ(24,"th",12),t._uU(25,"Payment Date"),t.qZA()()(),t.TgZ(26,"tbody"),t.YNc(27,w,12,10,"ng-container",13),t.ALo(28,"async"),t.qZA()(),t.TgZ(29,"mat-paginator",14),t.NdJ("page",function(c){return o.onPagination(c)}),t.ALo(30,"async"),t.qZA()()()()()()),2&e){let i,c,g;t.Q6J("hideSearchBox",!0),t.xp6(6),t.Q6J("date",o.dateFilter),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,9,o.productMigrate$)),t.xp6(10),t.Q6J("ngIf",null==(i=t.lcZ(19,11,o.productMigrate$))?null:i.Data),t.xp6(4),t.Q6J("ngIf",1==t.lcZ(23,13,o.onMigrate$)),t.xp6(5),t.Q6J("ngForOf",null==(c=t.lcZ(28,15,o.productMigrate$))?null:c.Data),t.xp6(2),t.Q6J("length",null==(g=t.lcZ(30,17,o.productMigrate$))?null:g.Count)("pageSize",o.pagination.RowCount)("pageIndex",0==o.pagination.PageNumber?0:o.pagination.PageNumber-1)}},dependencies:[l.ez,l.sg,l.O5,l.Ov,l.uU,m.R,m.p,M.AV,h.TU,h.NW,_.p9,_.oG,d.u5,d.JJ,d.On,f.C8,f.Pg]}),s})()}}]);
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[572],{4572:(B,u,r)=>{r.r(u),r.d(u,{ProductComponent:()=>O});var l=r(6814),t=r(5879),m=r(4387),M=r(2596),p=r(7081),P=r(5619),Z=r(7398),T=r(2181),v=r(6328),h=r(9887),_=r(5986),d=r(6223),y=r(2425),A=r(7700),I=r(3988),N=r(6493),f=r(8745),S=r(8017);let x=(()=>{var n;class s{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=(0,t.f3M)(S.O)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.http.post(`${this.domain}/api/image/ProductImage`,e)}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/ProductImage`,{Images:e})}migrateAsync(e){const i={...e,Host:`${localStorage.getItem("Domain")}`};return this.http.post("/api/MigrateImage/ProductImage",i)}}return(n=s).\u0275fac=function(e){return new(e||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac}),s})();function $(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"button",17),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().ngIf,i=t.oxw();return t.KtG(i.onMigrate(o))}),t._uU(2," Migrate "),t.qZA(),t.BQk()}}function b(n,s){if(1&n){const a=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.onMigrateAsync())}),t._uU(1," Migrate Async "),t.qZA()}}function U(n,s){if(1&n&&(t.ynx(0),t.YNc(1,$,3,0,"ng-container",15),t.YNc(2,b,2,0,"ng-template",null,16,t.W1O),t.BQk()),2&n){const a=t.MAs(3),e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.totalSelected()>0)("ngIfElse",a)}}function J(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"mat-checkbox",19),t.NdJ("change",function(o){const c=t.CHM(a).ngIf,g=t.oxw();return t.KtG(g.onSelectAll(o,c))}),t.qZA(),t.BQk()}}function F(n,s){1&n&&(t.ynx(0),t.TgZ(1,"th"),t._uU(2,"New URL"),t.qZA(),t.BQk())}function Q(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",23)(2,"span",24),t._uU(3),t.qZA()(),t.BQk()),2&n){const a=t.oxw(2).$implicit;t.xp6(3),t.Oqu(a.Message)}}function L(n,s){if(1&n&&(t.TgZ(0,"a",21),t._uU(1),t.qZA()),2&n){const a=t.oxw(2).$implicit;t.Q6J("href",a.CloudflareURL,t.LSH),t.xp6(1),t.hij(" ",a.CloudflareURL," ")}}function R(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"td"),t.YNc(2,Q,4,1,"ng-container",15),t.YNc(3,L,2,2,"ng-template",null,22,t.W1O),t.qZA(),t.BQk()),2&n){const a=t.MAs(4),e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",e.Message)("ngIfElse",a)}}function w(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",20),t.NdJ("ngModelChange",function(o){const c=t.CHM(a).$implicit;return t.KtG(c.selected=o)})("ngModelChange",function(){const i=t.CHM(a).ngForOf,c=t.oxw();return t.KtG(c.onSelect(i))}),t.qZA()(),t.TgZ(4,"td")(5,"a",21),t._uU(6),t.qZA()(),t.YNc(7,R,5,2,"ng-container",5),t.ALo(8,"async"),t.TgZ(9,"td"),t._uU(10),t.ALo(11,"date"),t.qZA()(),t.BQk()}if(2&n){const a=s.$implicit,e=t.oxw();t.xp6(3),t.Q6J("ngModel",a.selected),t.xp6(2),t.Q6J("href",a.URL,t.LSH),t.xp6(1),t.hij(" ",a.URL," "),t.xp6(1),t.Q6J("ngIf",1==t.lcZ(8,5,e.onMigrate$)),t.xp6(3),t.hij(" ",t.xi3(11,7,a.Date,"dd MMM yyyy")," ")}}let O=(()=>{var n;class s{constructor(){this.productMigrate=(0,t.f3M)(x),this.productMigrate$=this.productMigrate.getImageUrls$().pipe((0,p.d)(1)),this._onMigrate=new P.X(!1),this.onMigrate$=this._onMigrate.asObservable(),this.pagination={PageNumber:1,RowCount:100},this.toastr=(0,t.f3M)(y._W),this.dialog=(0,t.f3M)(A.uw),this.dateFilter={},this.totalSelected=(0,t.tdS)(0)}onMigrate(e){let o=e.Data.filter(c=>c.selected);if(0===o.length)return void this.toastr.error("Please select at least one image to migrate.","Error");const i=this.productMigrate.migrate(o).pipe((0,Z.U)(c=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(g=>{g.selected=!1;const C=c.find(k=>k.Path===g.Path);return g.CloudflareURL=C?.URL,g.Message=C?.Message,g}),e)));this.productMigrate$=i.pipe((0,p.d)(1))}onSelectAll(e,o){o=o.map(i=>(i.selected=e.checked,i)),this.totalSelected.set(o.filter(i=>i.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(o=>o.selected)?.length)}onMigrateAsync(){this.dialog.open(I.j,{data:{showDateFilter:!1}}).afterClosed().pipe((0,T.h)(e=>N.g.IsNotEmpty(e)),(0,v.b)(e=>this.productMigrate.migrateAsync({PageNumber:e.pageNumber,RowCount:e.rowCount}))).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.productMigrate$=this.productMigrate.getImageUrls$().pipe((0,p.d)(1))})}onFilter(){this.productMigrate$=this.productMigrate.getImageUrls$({PageNumber:this.pagination.PageNumber,RowCount:this.pagination.RowCount,From:this.dateFilter.from,To:this.dateFilter.to}).pipe((0,p.d)(1))}onPagination(e){this.pagination.PageNumber=e.pageIndex+1,this.pagination.RowCount=e.pageSize,this.productMigrate$=this.productMigrate.getImageUrls$(this.pagination).pipe((0,p.d)(1))}}return(n=s).\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-product-image"]],standalone:!0,features:[t._Bn([x]),t.jDz],decls:31,vars:19,consts:[["Title","Migrate Product Image",3,"hideSearchBox","onSubmit"],[1,"d-flex"],["container",""],[1,"mb-2"],[3,"date","dateChange"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[2,"width","120px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[4,"ngIf","ngIfElse"],["ASYNC",""],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModel","ngModelChange"],["target","_blank",1,"text-break",3,"href"],["SHOW_URL",""],[1,"text-break"],[1,"text-danger"]],template:function(e,o){if(1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return o.onFilter()}),t.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6",3),t._uU(5,"From - To"),t.qZA(),t.TgZ(6,"app-datepicker-range",4),t.NdJ("dateChange",function(c){return o.dateFilter=c}),t.qZA()()()(),t.TgZ(7,"actions"),t.YNc(8,U,4,2,"ng-container",5),t.ALo(9,"async"),t.qZA(),t.TgZ(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"table",9)(15,"thead",10)(16,"tr")(17,"th",11),t.YNc(18,J,2,0,"ng-container",5),t.ALo(19,"async"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Old URL"),t.qZA(),t.YNc(22,F,3,0,"ng-container",5),t.ALo(23,"async"),t.TgZ(24,"th",12),t._uU(25,"Created"),t.qZA()()(),t.TgZ(26,"tbody"),t.YNc(27,w,12,10,"ng-container",13),t.ALo(28,"async"),t.qZA()(),t.TgZ(29,"mat-paginator",14),t.NdJ("page",function(c){return o.onPagination(c)}),t.ALo(30,"async"),t.qZA()()()()()()),2&e){let i,c,g;t.Q6J("hideSearchBox",!0),t.xp6(6),t.Q6J("date",o.dateFilter),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,9,o.productMigrate$)),t.xp6(10),t.Q6J("ngIf",null==(i=t.lcZ(19,11,o.productMigrate$))?null:i.Data),t.xp6(4),t.Q6J("ngIf",1==t.lcZ(23,13,o.onMigrate$)),t.xp6(5),t.Q6J("ngForOf",null==(c=t.lcZ(28,15,o.productMigrate$))?null:c.Data),t.xp6(2),t.Q6J("length",null==(g=t.lcZ(30,17,o.productMigrate$))?null:g.Count)("pageSize",o.pagination.RowCount)("pageIndex",0==o.pagination.PageNumber?0:o.pagination.PageNumber-1)}},dependencies:[l.ez,l.sg,l.O5,l.Ov,l.uU,m.R,m.p,M.AV,h.TU,h.NW,_.p9,_.oG,d.u5,d.JJ,d.On,f.C8,f.Pg]}),s})()}}]);