-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12-es2015.48d891a699aed822d2d1.js
1 lines (1 loc) · 5.91 KB
/
12-es2015.48d891a699aed822d2d1.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{lY0r:function(e,n,t){"use strict";t.r(n),t.d(n,"SampleFirstModule",function(){return v});var a=t("An66"),i=t("1VvW"),c=t("5Q2+"),o=t("zMYQ"),l=t("umqh"),r=t("kZht"),b=t("mcff"),h=t("aJOL"),s=t("3kIJ"),d=t("EmXI"),g=t("IOEv"),u=t("pTnX"),m=t("Tcl6"),p=t("UDV5"),G=t("hCLc"),w=t("1ZKX"),f=t("qvIn");function V(e,n){1&e&&r.Qb(0,"mat-spinner",17),2&e&&r.oc("diameter",30)}const x=function(){return{standalone:!0}};let U=(()=>{class e{constructor(e,n,t){this.cd=e,this.dialog=n,this.ngZone=t,this.width="100%",this.height=null,this.rowHeight=null,this.dataSize="100x20",this.loading=!1,this.simple=[],this.regenerate=!1,this.idInterval=null}ngOnInit(){this.updateTable(),this.ngZone.runOutsideAngular(()=>{this.idInterval=window.setInterval(()=>{this.regenerate&&this.updateTable()},14500)})}ngOnDestroy(){window.clearInterval(this.idInterval)}showSample(){this.dialog.open(l.a,{data:{title:"Overview simple table",description:"If you want enabled virtual scroll, you need use auto-height or height attribute.",code:'\x3c!-- simple - is Array any objects --\x3e\n<ngx-table-builder [source]="simple"></ngx-table-builder>\n\n\n\x3c!-- also you can set height, width for cell in table --\x3e\n<ngx-table-builder\n [source]="simple"\n [width]="width"\n [height]="height"\n [row-height]="rowHeight"\n></ngx-table-builder>\n'},height:"450px",width:"600px"})}updateTable(){switch(this.loading=!0,this.dataSize){case"10x5":o.a.generator(10,5).then(e=>this.setData(e));break;case"100x20":o.a.generator(100,20).then(e=>this.setData(e));break;case"1000x30":o.a.generator(1e3,30).then(e=>this.setData(e));break;case"10000x50":o.a.generator(1e4,50).then(e=>this.setData(e));break;case"100000x100":o.a.generator(1e5,100).then(e=>this.setData(e))}this.cd.detectChanges()}setData(e){this.simple=e,window.setTimeout(()=>{this.loading=!1,this.cd.detectChanges()},500)}}return e.\u0275fac=function(n){return new(n||e)(r.Ob(r.h),r.Ob(b.b),r.Ob(r.B))},e.\u0275cmp=r.Ib({type:e,selectors:[["sample-first"]],decls:84,vars:14,consts:[["header",""],[1,"simple-toolbar"],["class","spinner","strokeWidth","5",3,"diameter",4,"ngIf"],[3,"value","valueChange","selectionChange"],["value","10x5"],["value","100x20"],["value","1000x30"],["value","10000x50"],["value","100000x100"],[1,"red"],["matInput","","name","width",3,"ngModel","ngModelChange"],["matInput","","name","height","type","number",3,"ngModel","ngModelChange"],["matInput","","name","rowHeight","type","number",3,"ngModel","ngModelChange"],[1,"regenerate",3,"ngModel","ngModelOptions","ngModelChange"],["mat-raised-button","",3,"click"],[1,"content-visible"],[3,"source","width","height","row-height"],["strokeWidth","5",1,"spinner",3,"diameter"]],template:function(e,n){if(1&e&&(r.Vb(0,"div",null,0),r.Gc(2,"\n "),r.Vb(3,"mat-toolbar",1),r.Gc(4,"\n "),r.Vb(5,"span"),r.Gc(6,"Virtual scroll table"),r.Ub(),r.Gc(7,"\n "),r.Ec(8,V,1,1,"mat-spinner",2),r.Gc(9,"\n "),r.Ub(),r.Gc(10,"\n\n "),r.Vb(11,"form"),r.Gc(12,"\n "),r.Vb(13,"mat-form-field"),r.Gc(14,"\n "),r.Vb(15,"mat-label"),r.Gc(16,"Data size"),r.Ub(),r.Gc(17,"\n "),r.Vb(18,"mat-select",3),r.dc("valueChange",function(e){return n.dataSize=e})("selectionChange",function(){return n.updateTable()}),r.Gc(19,"\n "),r.Vb(20,"mat-option",4),r.Gc(21,"10 x 5"),r.Ub(),r.Gc(22,"\n "),r.Vb(23,"mat-option",5),r.Gc(24,"100 x 20"),r.Ub(),r.Gc(25,"\n "),r.Vb(26,"mat-option",6),r.Gc(27,"1000 x 30"),r.Ub(),r.Gc(28,"\n "),r.Vb(29,"mat-option",7),r.Gc(30,"10 000 x 50"),r.Ub(),r.Gc(31,"\n "),r.Vb(32,"mat-option",8),r.Vb(33,"span",9),r.Gc(34,"100 000 x 100 (1.5Gb memory usage)"),r.Ub(),r.Ub(),r.Gc(35,"\n "),r.Ub(),r.Gc(36,"\n "),r.Ub(),r.Gc(37,"\n\n "),r.Vb(38,"mat-form-field"),r.Gc(39,"\n "),r.Vb(40,"mat-label"),r.Gc(41,"Table width"),r.Ub(),r.Gc(42,"\n "),r.Vb(43,"label"),r.Gc(44,"\n "),r.Vb(45,"input",10),r.dc("ngModelChange",function(e){return n.width=e}),r.Ub(),r.Gc(46,"\n "),r.Ub(),r.Gc(47,"\n "),r.Ub(),r.Gc(48,"\n\n "),r.Vb(49,"mat-form-field"),r.Gc(50,"\n "),r.Vb(51,"mat-label"),r.Gc(52,"Table height (px)"),r.Ub(),r.Gc(53,"\n "),r.Vb(54,"label"),r.Gc(55,"\n "),r.Vb(56,"input",11),r.dc("ngModelChange",function(e){return n.height=e}),r.Ub(),r.Gc(57,"\n "),r.Ub(),r.Gc(58,"\n "),r.Ub(),r.Gc(59,"\n\n "),r.Vb(60,"mat-form-field"),r.Gc(61,"\n "),r.Vb(62,"mat-label"),r.Gc(63,"Table row height"),r.Ub(),r.Gc(64,"\n "),r.Vb(65,"label"),r.Gc(66,"\n "),r.Vb(67,"input",12),r.dc("ngModelChange",function(e){return n.rowHeight=e}),r.Ub(),r.Gc(68,"\n "),r.Ub(),r.Gc(69,"\n "),r.Ub(),r.Gc(70,"\n\n "),r.Vb(71,"mat-checkbox",13),r.dc("ngModelChange",function(e){return n.regenerate=e}),r.Gc(72,"\n Auto regenerate (15sec)\n "),r.Ub(),r.Gc(73,"\n\n "),r.Vb(74,"button",14),r.dc("click",function(){return n.showSample()}),r.Gc(75,"show code sample"),r.Ub(),r.Gc(76,"\n "),r.Ub(),r.Gc(77,"\n"),r.Ub(),r.Gc(78,"\n\n"),r.Vb(79,"div",15),r.Gc(80,"\n "),r.Qb(81,"ngx-table-builder",16),r.Gc(82,"\n"),r.Ub(),r.Gc(83,"\n")),2&e){const e=r.wc(1);r.Cb(8),r.oc("ngIf",n.loading),r.Cb(10),r.oc("value",n.dataSize),r.Cb(27),r.oc("ngModel",n.width),r.Cb(11),r.oc("ngModel",n.height),r.Cb(11),r.oc("ngModel",n.rowHeight),r.Cb(4),r.oc("ngModel",n.regenerate)("ngModelOptions",r.qc(13,x)),r.Cb(8),r.Bc("height","calc(100% - "+e.offsetHeight+"px)"),r.Cb(2),r.oc("source",n.simple)("width",n.width)("height",n.height)("row-height",n.rowHeight)}},directives:[h.a,a.m,s.q,s.l,s.m,d.b,d.e,g.a,u.i,m.a,s.b,s.k,s.n,s.o,p.a,G.a,w.a,f.b],encapsulation:2,changeDetection:0}),e})(),v=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=r.Mb({type:e}),e.\u0275inj=r.Lb({imports:[[a.b,c.a,i.b.forChild([{path:"",component:U}])]]}),e})()}}]);